Exemple #1
0
 internal HTMLLogicWindow()
 {
     _Id               = _GId++;
     _State            = WindowLogicalState.Loading;
     _IsListeningClose = false;
     CloseReady        = new BasicRelayCommand(() => EnTask(_CloseTask));
     EndOpen           = new BasicRelayCommand(() => EnTask(_OpenTask));
 }
 public WindowViewModel(IReadingSession readingSession, IChooseResource chooseResource, IServices services)
 {
     _readingSession = readingSession;
     _chooseResource = chooseResource;
     _services       = services;
     LoadFile        = new BasicRelayCommand(() => Load());
     Exit            = new BasicRelayCommand(() => _services.Save());
     //Si jamais on veut choisir un livre au premier demarrage.
     //if(_services.Book == null) ChooseFile();
 }
Exemple #3
0
 internal HTMLLogicWindow()
 {
     _Id              = _GId++;
     _State           = WindowLogicalState.Loading;
     _IsLiteningClose = false;
     CloseReady       = new BasicRelayCommand(() => State = WindowLogicalState.Closed);
     EndOpen          = new BasicRelayCommand(() => { if (_OpenTask != null)
                                                      {
                                                          _OpenTask.TrySetResult(null);
                                                      }
                                              });
 }
Exemple #4
0
        protected HTMLControlBase(IUrlSolver iIUrlSolver)
        {
            _IUrlSolver = iIUrlSolver;

            DebugWindow = new BasicRelayCommand(() => ShowDebugWindow());

            DebugBrowser = new BasicRelayCommand(() => OpenDebugBrowser());

            InitializeComponent();
            _WPFDoubleBrowserNavigator              = new WPFDoubleBrowserNavigator(this, _IUrlSolver);
            _WPFDoubleBrowserNavigator.OnFirstLoad += FirstLoad;
        }
Exemple #5
0
        protected HTMLControlBase(IUrlSolver urlSolver)
        {
            if (DesignerProperties.GetIsInDesignMode(this))
            {
                return;
            }

            _UrlSolver = urlSolver;

            DebugWindow  = new BasicRelayCommand(ShowDebugWindow);
            DebugBrowser = new BasicRelayCommand(OpenDebugBrowser);
            ShowInfo     = new BasicRelayCommand(DoShowInfo);

            InitializeComponent();

            this.Loaded += HTMLControlBase_Loaded;
        }
Exemple #6
0
 public BackViewModel(IReadingSession readingSession)
 {
     BackCommand = new BasicRelayCommand(() => readingSession.Back());
 }
 public ResetViewModel(IReadingSession readingSession, string answer)
 {
     Label  = answer;
     Select = new BasicRelayCommand(() => readingSession.Reset());
 }
 public AnswerViewModel(IReadingSession readingSession, string answer)
 {
     Label  = answer;
     Select = new BasicRelayCommand(() => readingSession.Next(answer));
 }