Skip to content

Commit

Permalink
removing item input code
Browse files Browse the repository at this point in the history
  • Loading branch information
Programming-With-Chris committed Aug 17, 2022
1 parent d24d75c commit c916d69
Show file tree
Hide file tree
Showing 16 changed files with 90 additions and 339 deletions.
2 changes: 0 additions & 2 deletions ShoppingList/AppShell.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ public AppShell()

Routing.RegisterRoute(nameof(UserListDetails), typeof(UserListDetails));
Routing.RegisterRoute(nameof(UserListDataInput), typeof(UserListDataInput));
Routing.RegisterRoute(nameof(ItemInput), typeof(ItemInput));
Routing.RegisterRoute(nameof(ItemDetail), typeof(ItemDetail));
Routing.RegisterRoute(nameof(MainPage), typeof(MainPage));
Routing.RegisterRoute(nameof(SettingsView), typeof(SettingsView));
Routing.RegisterRoute(nameof(StoreFinder), typeof(StoreFinder));
Expand Down
4 changes: 0 additions & 4 deletions ShoppingList/MauiProgram.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,9 @@ public static MauiApp CreateMauiApp()
builder.Services.AddSingleton<UserListViewModel>();
builder.Services.AddTransient<UserListDetailViewModel>();
builder.Services.AddTransient<UserListDataInputViewModel>();
builder.Services.AddTransient<ItemInputViewModel>();
builder.Services.AddTransient<ItemDetailViewModel>();
builder.Services.AddSingleton<MainPage>();
builder.Services.AddTransient<UserListDetails>();
builder.Services.AddTransient<UserListDataInput>();
builder.Services.AddTransient<ItemInput>();
builder.Services.AddTransient<ItemDetail>();
builder.Services.AddSingleton<SettingsView>();
builder.Services.AddSingleton<SettingsViewModel>();
builder.Services.AddSingleton<StoreFinder>();
Expand Down
12 changes: 0 additions & 12 deletions ShoppingList/ShoppingList.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -106,15 +106,9 @@
<Compile Update="View\StoreFinder.xaml.cs">
<DependentUpon>StoreFinder.xaml</DependentUpon>
</Compile>
<Compile Update="View\ItemDetail.xaml.cs">
<DependentUpon>ItemDetail.xaml</DependentUpon>
</Compile>
<Compile Update="View\SettingsView.xaml.cs">
<DependentUpon>SettingsView.xaml</DependentUpon>
</Compile>
<Compile Update="View\ItemInput.xaml.cs">
<DependentUpon>ItemInput.xaml</DependentUpon>
</Compile>
<Compile Update="View\UserListDataInput.xaml.cs">
<DependentUpon>UserListDataInput.xaml</DependentUpon>
</Compile>
Expand All @@ -127,15 +121,9 @@
<MauiXaml Update="View\StoreFinder.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="View\ItemDetail.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="View\SettingsView.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="View\ItemInput.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="View\UserListDataInput.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
Expand Down
24 changes: 0 additions & 24 deletions ShoppingList/View/ItemDetail.xaml

This file was deleted.

15 changes: 0 additions & 15 deletions ShoppingList/View/ItemDetail.xaml.cs

This file was deleted.

77 changes: 0 additions & 77 deletions ShoppingList/View/ItemInput.xaml

This file was deleted.

23 changes: 0 additions & 23 deletions ShoppingList/View/ItemInput.xaml.cs

This file was deleted.

8 changes: 4 additions & 4 deletions ShoppingList/View/MainPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,17 @@
<Button Text="Get UserLists"
Command="{Binding GetUserListsCommand}"
IsEnabled="{Binding IsNotBusy}"
TextColor="{StaticResource Secondary}"
BackgroundColor="{StaticResource Primary}"
TextColor="{StaticResource Primary}"
BackgroundColor="{StaticResource Secondary}"
Grid.Row="1"
Margin="8"/>


<Button Text="Create New List"
Command="{Binding CreateUserListCommand}"
IsEnabled="{Binding IsNotBusy}"
TextColor="{StaticResource Secondary}"
BackgroundColor="{StaticResource Primary}"
TextColor="{StaticResource Primary}"
BackgroundColor="{StaticResource Secondary}"
Grid.Row="1"
Grid.Column="3"
Margin="8"/>
Expand Down
100 changes: 55 additions & 45 deletions ShoppingList/View/SettingsView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,51 +11,61 @@
<Shell.BackButtonBehavior>
<BackButtonBehavior Command="{Binding GoBackToMainCommand}"/>
</Shell.BackButtonBehavior>

<VerticalStackLayout Margin="0,35,50,25"
Spacing="10">

<Border BackgroundColor="{StaticResource Secondary}">
<Label Text="List Sorting Settings" TextColor="{StaticResource Primary}"

Margin="5,15,15,15"
Padding="10"/>
</Border>

<HorizontalStackLayout
Margin="25,0,0,0">
<Label Text="Start at back of store?"
TextColor="{StaticResource Primary}"/>
<CheckBox IsChecked="{Binding StartAtBackOfStore}"
Color="{StaticResource Primary}"
HorizontalOptions="End"/>
</HorizontalStackLayout>

<HorizontalStackLayout
Margin="25,0,0,0">
<Label Text="Get Frozen Aisle Food Last?"
TextColor="{StaticResource Primary}"/>
<CheckBox IsChecked="{Binding FrozenFoodLast}"
Color="{StaticResource Primary}"
HorizontalOptions="End"/>
</HorizontalStackLayout>

<HorizontalStackLayout
Margin="25,0,0,0">
<Label Text="Default Kroger Location:"
TextColor="{StaticResource Primary}"
Margin="0,0,25,0"/>
<Label Text="{Binding KrogerStoreName}"
TextColor="{StaticResource Primary}"
>
<Label.GestureRecognizers>
<TapGestureRecognizer Command="{Binding OpenLocationFinderDialogCommand}"/>
</Label.GestureRecognizers>
</Label>


</HorizontalStackLayout>

<Grid RowDefinitions="*,Auto"
ColumnDefinitions="*,*,*">
<VerticalStackLayout Margin="0,35,0,25"
Spacing="10"
Grid.ColumnSpan="3">

<Border BackgroundColor="{StaticResource Secondary}">
<Label Text="List Sorting Settings" TextColor="{StaticResource Primary}"

Margin="5,15,15,15"
Padding="10"/>
</Border>

<HorizontalStackLayout
Margin="25,0,0,0"
Grid.ColumnSpan="3">
<Label Text="Start at back of store?"
TextColor="{StaticResource Primary}"/>
<CheckBox IsChecked="{Binding StartAtBackOfStore}"
Color="{StaticResource Primary}"
HorizontalOptions="Center"
Grid.Column="2"/>
</HorizontalStackLayout>

<HorizontalStackLayout
Margin="25,0,0,0"
Grid.ColumnSpan="3">
<Label Text="Get Frozen Aisle Food Last?"
TextColor="{StaticResource Primary}"/>
<CheckBox IsChecked="{Binding FrozenFoodLast}"
Color="{StaticResource Primary}"
Grid.Column="2"/>
</HorizontalStackLayout>

<HorizontalStackLayout
Margin="25,0,0,0">
<Label Text="Default Kroger Location:"
TextColor="{StaticResource Primary}"
Margin="0,0,25,0"/>
<Label Text="{Binding KrogerStoreName}"
TextColor="{StaticResource Primary}"
>
<Label.GestureRecognizers>
<TapGestureRecognizer Command="{Binding OpenLocationFinderDialogCommand}"/>
</Label.GestureRecognizers>
</Label>


</HorizontalStackLayout>

</VerticalStackLayout>
</VerticalStackLayout>



</Grid>

</ContentPage>
13 changes: 9 additions & 4 deletions ShoppingList/View/StoreFinder.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@
Shell.PresentationMode="ModalAnimated"
>

<Grid ColumnDefinitions="*,*"
RowDefinitions="Auto,*">
<Grid ColumnDefinitions="*,*,*"
RowDefinitions="Auto,*,Auto">

<VerticalStackLayout Grid.ColumnSpan="2">
<VerticalStackLayout Grid.ColumnSpan="3">
<SearchBar Placeholder="Enter your zip code to find stores near you"
SearchButtonPressed="OnSearchButtonPressed"
SearchCommandParameter="{Binding ZipSearched}"
Text="{Binding ZipSearched}"/>
</VerticalStackLayout>
<CollectionView Grid.Row="1"
Grid.ColumnSpan="2"
Grid.ColumnSpan="3"
ItemsSource="{Binding StoreNames}">
<CollectionView.ItemTemplate>
<DataTemplate>
Expand All @@ -37,6 +37,11 @@
</CollectionView.ItemTemplate>
</CollectionView>

<Button Text="Cancel"
Grid.Row="2"
Grid.Column="1"
Command="{Binding CancelQueryCommand}"/>

</Grid>

</ContentPage>
3 changes: 2 additions & 1 deletion ShoppingList/View/UserListDataInput.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,13 @@
Command="{Binding CancelCommand}"
Margin="8"
Grid.Row="1"
Grid.Column="2"/>
Grid.Column="0"/>

<Button Text="Create New List"
IsEnabled="True"
Command="{Binding UserListCompletedCommand}"
Margin="8"
Grid.Column="1"
Grid.Row="1"/>
</Grid>

Expand Down
8 changes: 4 additions & 4 deletions ShoppingList/View/UserListDetails.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,15 @@
<!-- </RefreshView>-->
<controls:CircularButton
Grid.Row="0"
Grid.Column="0"
Grid.Column="2"
x:Name="CircularButton"
WidthRequest="75"
HeightRequest="75"
Margin="15,0,0,0"
ButtonColor="{StaticResource Primary}"
Margin="0,0,40,20"
ButtonColor="{StaticResource Secondary}"
BackgroundColor="Transparent"
VerticalOptions="End"
HorizontalOptions="Start"
HorizontalOptions="End"
>
<GraphicsView.GestureRecognizers>
<TapGestureRecognizer Command="{Binding NewItemDialogCommand}"/>
Expand Down
Loading

0 comments on commit c916d69

Please sign in to comment.