Пример #1
0
        public ConfigWindowViewModel(IApplicationMessageEvent applicationMessageEvent, IConfigManager configManager)
        {
            Messenger          = applicationMessageEvent;
            this.configManager = configManager;

            OkButtonCommand = new OkButtonCommandImpl(applicationMessageEvent, configManager, this);

            Subject += ((IApplicationMessage m) => m.Execute(this));
        }
Пример #2
0
        public void Setup()
        {
            ApplicationController.ResetInstance();
            applicationController = ApplicationController.Create();

            applicationMessageEvent = new ApplicationMessageEvent();
            publisher  = new TestApplicationMessagePublisher();
            subscriber = new TestApplicationMessageSubscriber();
            publisher.Register(applicationMessageEvent);
        }
Пример #3
0
        public MainWindowViewModel(IApplicationMessageEvent applicationMessageEvent, IPomodoro pomodoro)
        {
            // setup for ApplicationMessageEvent to communicate with other viewmodels and views
            Messenger = applicationMessageEvent;
            Subject  += ((IApplicationMessage m) => m.Execute(this));

            this.pomodoro                 = pomodoro;
            pomodoro.OnSwitchToBreak     += new Action(OnSwitchToBreakEvent);
            pomodoro.OnSwitchToTask      += new Action(OnSwitchToTaskEvent);
            pomodoro.OnSwitchToLongBreak += new Action(OnSwitchToLongBreakEvent);
            pomodoro.OnCompletePomodoro  += new Action(OnCompletePomodoroEvent);

            tickTimer           = new TickTimer(50);
            tickTimer.OnTick   += new Action(OnTick);
            MainButtonCommand   = new StartCommand(this);
            ConfigButtonCommand = new ConfigButtonCommandImpl(applicationMessageEvent);

            InitializeBackgroundColor();
        }
Пример #4
0
 public ConfigurationDataManagingMessage(IApplicationMessageEvent messenger, ActionType actionType)
 {
     this.messenger  = messenger;
     this.actionType = actionType;
 }
Пример #5
0
 public ConfigButtonCommandImpl(IApplicationMessageEvent applicationMessageEvent)
 {
     this.applicationMessageEvent = applicationMessageEvent;
 }
Пример #6
0
 public void Register(IApplicationMessageEvent ev)
 {
     Messenger = ev;
 }
Пример #7
0
 public OkButtonCommandImpl(IApplicationMessageEvent messenger, IConfigManager configManager, IConfigWindowViewModel viewModel)
 {
     this.messenger     = messenger;
     this.configManager = configManager;
     this.viewModel     = viewModel;
 }