123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109 |
- using System;
- using System.Net;
- using System.Windows;
- using System.Windows.Controls;
- using System.Windows.Documents;
- using System.Windows.Ink;
- using System.Windows.Input;
- using System.Windows.Media;
- using System.Windows.Media.Animation;
- using System.Windows.Shapes;
- using VocabManager.Command;
- namespace VocabManager.ViewModel
- {
- public class WelcomeViewModel : ViewModelBase
- {
- public string Title
- {
- get
- {
- return "Vocab Manager";
- }
- }
- #region Start App
- RelayCommand _startAppCommand;
- public ICommand StartAppCommand
- {
- get
- {
- if (_startAppCommand == null)
- {
- _startAppCommand = new RelayCommand(
- param => this.StartApp(),
- param => this.CanStart()
- );
- }
- return _startAppCommand;
- }
- }
- private bool CanStart()
- {
- return true;
- }
- private void StartApp()
- {
- App.Instance.MainPage.LoadDeckListView();
- }
- #endregion
- #region ShowHelp
- RelayCommand _showHelpCommand;
- public ICommand ShowHelpCommand
- {
- get
- {
- if (_showHelpCommand == null)
- {
- _showHelpCommand = new RelayCommand(
- param => this.ShowHelp(),
- param => this.CanShowHelp()
- );
- }
- return _showHelpCommand;
- }
- }
- private bool CanShowHelp()
- {
- return true;
- }
- private void ShowHelp()
- {
- App.Instance.MainPage.LoadHelpView();
- }
- #endregion
- #region ShowAbout
- RelayCommand _showAboutCommand;
- public ICommand ShowAboutCommand
- {
- get
- {
- if (_showAboutCommand == null)
- {
- _showAboutCommand = new RelayCommand(
- param => this.ShowAbout(),
- param => this.CanShowAbout()
- );
- }
- return _showAboutCommand;
- }
- }
- private bool CanShowAbout()
- {
- return true;
- }
- private void ShowAbout()
- {
- App.Instance.MainPage.LoadAboutView();
- }
- #endregion
- }
- }
|