mirror of
https://github.com/Nioux/AideDeJeu.git
synced 2025-10-29 14:35:45 +00:00
Renommage
This commit is contained in:
parent
cb2fe7a6e1
commit
8735147d3f
4 changed files with 14 additions and 12 deletions
|
|
@ -90,12 +90,12 @@ namespace AideDeJeu.Tools
|
|||
|
||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
var itemType = value as ViewModels.ItemsViewModel.ItemType?;
|
||||
if (itemType == ViewModels.ItemsViewModel.ItemType.Spell)
|
||||
var itemType = value as ViewModels.MainViewModel.ItemType?;
|
||||
if (itemType == ViewModels.MainViewModel.ItemType.Spell)
|
||||
{
|
||||
return SpellsTemplate;
|
||||
}
|
||||
if (itemType == ViewModels.ItemsViewModel.ItemType.Monster)
|
||||
if (itemType == ViewModels.MainViewModel.ItemType.Monster)
|
||||
{
|
||||
return MonstersTemplate;
|
||||
}
|
||||
|
|
@ -115,12 +115,12 @@ namespace AideDeJeu.Tools
|
|||
|
||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
var itemType = value as ViewModels.ItemsViewModel.ItemType?;
|
||||
if (itemType == ViewModels.ItemsViewModel.ItemType.Spell)
|
||||
var itemType = value as ViewModels.MainViewModel.ItemType?;
|
||||
if (itemType == ViewModels.MainViewModel.ItemType.Spell)
|
||||
{
|
||||
return Spells;
|
||||
}
|
||||
if (itemType == ViewModels.ItemsViewModel.ItemType.Monster)
|
||||
if (itemType == ViewModels.MainViewModel.ItemType.Monster)
|
||||
{
|
||||
return Monsters;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ using AideDeJeuLib;
|
|||
|
||||
namespace AideDeJeu.ViewModels
|
||||
{
|
||||
public class ItemsViewModel : BaseViewModel
|
||||
public class MainViewModel : BaseViewModel
|
||||
{
|
||||
public enum ItemType
|
||||
{
|
||||
|
|
@ -58,7 +58,7 @@ namespace AideDeJeu.ViewModels
|
|||
public Command SwitchToMonsters { get; set; }
|
||||
public Command AboutCommand { get; set; }
|
||||
|
||||
public ItemsViewModel(INavigation navigation)
|
||||
public MainViewModel(INavigation navigation)
|
||||
{
|
||||
//Title = "Browse";
|
||||
//Items = new ObservableCollection<Item>();
|
||||
|
|
@ -104,7 +104,9 @@
|
|||
<ToolbarItem Text="Déconnexion" Order="Secondary" Command="{Binding OpenUrl}" CommandParameter="http://www.pathfinder-fr.org/members/logout.aspx" />
|
||||
<ToolbarItem Text="Inscription" Order="Secondary" Command="{Binding OpenUrl}" CommandParameter="http://www.pathfinder-fr.org/members/register.aspx" />-->
|
||||
</ContentPage.ToolbarItems>
|
||||
<Grid>
|
||||
<StackLayout Orientation="Vertical">
|
||||
<SearchBar />
|
||||
|
||||
<ListView x:Name="ItemsListView"
|
||||
ItemsSource="{Binding Items}"
|
||||
VerticalOptions="FillAndExpand"
|
||||
|
|
@ -133,7 +135,7 @@
|
|||
</ListView>
|
||||
<!--<WebView x:Name="MainView" VerticalOptions="FillAndExpand" HorizontalOptions="FillAndExpand" Navigating="OnNavigating" Source="{Binding Source}" />-->
|
||||
<!--<ActivityIndicator x:Name="aiProgress" Color="Black" IsRunning="True" IsVisible="True" />-->
|
||||
</Grid>
|
||||
</StackLayout>
|
||||
</ContentPage>
|
||||
</MasterDetailPage.Detail>
|
||||
</MasterDetailPage>
|
||||
|
|
|
|||
|
|
@ -11,12 +11,12 @@ namespace AideDeJeu.Views
|
|||
[XamlCompilation(XamlCompilationOptions.Compile)]
|
||||
public partial class ItemsPage : MasterDetailPage //TabbedPage
|
||||
{
|
||||
ItemsViewModel viewModel;
|
||||
MainViewModel viewModel;
|
||||
|
||||
public ItemsPage ()
|
||||
{
|
||||
InitializeComponent ();
|
||||
BindingContext = viewModel = new ItemsViewModel(Navigation);
|
||||
BindingContext = viewModel = new MainViewModel(Navigation);
|
||||
}
|
||||
|
||||
protected override bool OnBackButtonPressed()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue