2019-03-12 21:41:30 +01:00
|
|
|
|
using System;
|
|
|
|
|
|
using System.Windows;
|
|
|
|
|
|
using System.Windows.Media.Imaging;
|
|
|
|
|
|
using Caliburn.Micro;
|
2019-02-26 01:26:03 +01:00
|
|
|
|
using LaDOSE.DesktopApp.Services;
|
|
|
|
|
|
|
|
|
|
|
|
namespace LaDOSE.DesktopApp.ViewModels
|
|
|
|
|
|
{
|
2019-03-09 14:03:25 +01:00
|
|
|
|
public class ShellViewModel : Conductor<IScreen>.Collection.AllActive
|
2019-02-26 01:26:03 +01:00
|
|
|
|
{
|
2019-03-12 21:41:30 +01:00
|
|
|
|
|
|
|
|
|
|
|
2019-03-09 14:03:25 +01:00
|
|
|
|
protected override void OnInitialize()
|
|
|
|
|
|
{
|
2019-03-12 21:41:30 +01:00
|
|
|
|
this.DisplayName = "LaDOSE";
|
|
|
|
|
|
this.AppIcon = BitmapFrame.Create(Application.GetResourceStream(new Uri("/LaDOSE.DesktopApp;component/Resources/64x64.png",
|
|
|
|
|
|
UriKind.RelativeOrAbsolute)).Stream);
|
2019-03-09 14:03:25 +01:00
|
|
|
|
var wordPressViewModel = new WordPressViewModel(IoC.Get<RestService>());
|
|
|
|
|
|
ActivateItem(wordPressViewModel);
|
|
|
|
|
|
base.OnInitialize();
|
2019-03-12 21:41:30 +01:00
|
|
|
|
|
2019-03-09 14:03:25 +01:00
|
|
|
|
|
|
|
|
|
|
}
|
2019-02-26 01:26:03 +01:00
|
|
|
|
|
2019-03-12 21:41:30 +01:00
|
|
|
|
public BitmapFrame AppIcon { get; set; }
|
|
|
|
|
|
|
2019-02-26 01:26:03 +01:00
|
|
|
|
public void LoadEvent()
|
|
|
|
|
|
{
|
|
|
|
|
|
ActivateItem(new WordPressViewModel(IoC.Get<RestService>()));
|
|
|
|
|
|
}
|
|
|
|
|
|
public void LoadGames()
|
|
|
|
|
|
{
|
|
|
|
|
|
ActivateItem(new GameViewModel(IoC.Get<RestService>()));
|
|
|
|
|
|
}
|
2019-03-09 14:03:25 +01:00
|
|
|
|
|
2019-03-12 21:41:30 +01:00
|
|
|
|
public void OpenWeb()
|
|
|
|
|
|
{
|
|
|
|
|
|
ActivateItem(new WebNavigationViewModel("www.google.com"));
|
|
|
|
|
|
}
|
2019-02-26 01:26:03 +01:00
|
|
|
|
}
|
|
|
|
|
|
}
|