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