Skip to content

Commit

Permalink
cleaned up
Browse files Browse the repository at this point in the history
  • Loading branch information
benhysell committed Jun 29, 2014
1 parent 08492ac commit 9015528
Show file tree
Hide file tree
Showing 17 changed files with 318 additions and 416 deletions.
6 changes: 6 additions & 0 deletions NinjaReadMe.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@

----------------------------------------------------------------------------------------------------
16 Jun 14 19:37 Add Projects
----------------------------------------------------------------------------------------------------

V.FlyoutTest.WindowsPhone project successfully added.

----------------------------------------------------------------------------------------------------
10 Jun 14 10:19 Add Plugins
----------------------------------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion NinjaVersion.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.0.2
3.0.7
2 changes: 1 addition & 1 deletion V.FlyoutTest.Core/V.FlyoutTest.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@
<Compile Include="ViewModels\BaseViewModel.cs" />
<Compile Include="ViewModels\CreateNewJobViewModel.cs" />
<Compile Include="ViewModels\EnterTimeViewModel.cs" />
<Compile Include="ViewModels\FirstViewModel.cs" />
<Compile Include="ViewModels\HomeViewModel.cs" />
<Compile Include="ViewModels\LoginViewModel.cs" />
<Compile Include="ViewModels\MenuViewModel.cs" />
</ItemGroup>
<ItemGroup>
Expand Down
73 changes: 18 additions & 55 deletions V.FlyoutTest.Core/ViewModels/EnterTimeViewModel.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// --------------------------------------------------------------------------------------------------------------------
// <summary>
// Defines the EnterTimeViewModel type.
// </summary>
// --------------------------------------------------------------------------------------------------------------------
// <summary>
// Defines the EnterTimeViewModel type.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

using System.Windows.Input;
Expand All @@ -10,57 +10,20 @@
using Cirrious.MvvmCross.ViewModels;
using V.FlyoutTest.Core.Entities;

namespace V.FlyoutTest.Core.ViewModels
{
/// <summary>
/// Define the EnterTimeViewModel type.
/// </summary>
public class EnterTimeViewModel : BaseViewModel
{
private MvxSubscriptionToken loginToken;
private MvxSubscriptionToken loadHoursToken;
readonly IMvxMessenger messenger = Mvx.Resolve<IMvxMessenger>();

/// <summary>
/// Example of showing the next view
/// </summary>
public void ShowFirstView()
{
this.ShowViewModel<AddHoursEntryViewModel>();
}

public override void Start()
{
base.Start();
//subscribe to login request
loginToken = messenger.SubscribeOnMainThread<LoginRequestMessage>(OnLoginRequestMessage);
}

/// <summary>
/// Attempt to log into system
/// </summary>
/// <param name="obj"></param>
private void OnLoginRequestMessage(LoginRequestMessage obj)
{
ShowViewModel<LoginViewModel>();
}


private MvxCommand reloadCommand;
public ICommand ReloadCommand
{
get
{
return reloadCommand ?? (reloadCommand = new MvxCommand(RefreshHoursFromTable));
}
}

namespace V.FlyoutTest.Core.ViewModels
{
/// <summary>
/// Define the EnterTimeViewModel type.
/// </summary>
public class EnterTimeViewModel : BaseViewModel
{
/// <summary>
/// Uses built in table refresh mechanism instead of whole screen hud
/// Example of showing the next view
/// </summary>
private void RefreshHoursFromTable()
public void ShowFirstView()
{
//simple no-op command
}
}
}
this.ShowViewModel<AddHoursEntryViewModel>();
}

}
}
14 changes: 14 additions & 0 deletions V.FlyoutTest.Core/ViewModels/FirstViewModel.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// --------------------------------------------------------------------------------------------------------------------
// <summary>
// Defines the FirstViewModel type.
// </summary>
// --------------------------------------------------------------------------------------------------------------------
namespace V.FlyoutTest.Core.ViewModels
{
/// <summary>
/// Define the FirstViewModel type.
/// </summary>
public class FirstViewModel : BaseViewModel
{
}
}
52 changes: 0 additions & 52 deletions V.FlyoutTest.Core/ViewModels/LoginViewModel.cs

This file was deleted.

2 changes: 1 addition & 1 deletion V.FlyoutTest.Droid/Properties/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="16" />
<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="19" />
<application></application>
</manifest>
36 changes: 0 additions & 36 deletions V.FlyoutTest.Droid/Resources/Layout/LoginView.axml

This file was deleted.

13 changes: 2 additions & 11 deletions V.FlyoutTest.Droid/Resources/Resource.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 1 addition & 5 deletions V.FlyoutTest.Droid/V.FlyoutTest.Droid.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@
<Compile Include="Views\EnterTimeView.cs" />
<Compile Include="Views\FirstView.cs" />
<Compile Include="Views\HomeView.cs" />
<Compile Include="Views\LoginView.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
Expand All @@ -138,9 +137,6 @@
<SubType>AndroidResource</SubType>
</AndroidResource>
<AndroidResource Include="Resources\Layout\AddHoursEntryView.axml" />
<AndroidResource Include="Resources\Layout\LoginView.axml">
<SubType>AndroidResource</SubType>
</AndroidResource>
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\Values\Strings.xml" />
Expand Down Expand Up @@ -168,7 +164,7 @@
<ItemGroup>
<XamarinComponentReference Include="xamandroidsupportv4-18">
<Visible>False</Visible>
<Version>19.1.0</Version>
<Version>20.0.0</Version>
</XamarinComponentReference>
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" />
Expand Down
3 changes: 1 addition & 2 deletions V.FlyoutTest.Droid/Views/EnterTimeView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ public EnterTimeView()
public override Android.Views.View OnCreateView(Android.Views.LayoutInflater inflater, Android.Views.ViewGroup container, Android.OS.Bundle savedInstanceState)
{
this.HasOptionsMenu = true;
var ignored = base.OnCreateView(inflater, container, savedInstanceState);
var x = ((EnterTimeViewModel) ViewModel).ReloadCommand; //try to grab something from the ViewModel xxx
var ignored = base.OnCreateView(inflater, container, savedInstanceState);
return this.BindingInflate(Resource.Layout.EnterTimeView, null);
}

Expand Down
79 changes: 0 additions & 79 deletions V.FlyoutTest.Droid/Views/LoginView.cs

This file was deleted.

2 changes: 1 addition & 1 deletion V.FlyoutTest.iOS/V.FlyoutTest.iOS.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@
<Compile Include="Views\BaseView.cs" />
<Compile Include="Views\CreateNewJobView.cs" />
<Compile Include="Views\EnterTimeView.cs" />
<Compile Include="Views\FirstView.cs" />
<Compile Include="Views\HomeView.cs" />
<Compile Include="Views\LoginView.cs" />
<None Include="app.config" />
<None Include="Info.plist" />
<Compile Include="Properties\AssemblyInfo.cs" />
Expand Down
Loading

0 comments on commit 9015528

Please sign in to comment.