public ConfigWindowViewModel(IApplicationMessageEvent applicationMessageEvent, IConfigManager configManager) { Messenger = applicationMessageEvent; this.configManager = configManager; OkButtonCommand = new OkButtonCommandImpl(applicationMessageEvent, configManager, this); Subject += ((IApplicationMessage m) => m.Execute(this)); }
public void Setup() { ApplicationController.ResetInstance(); applicationController = ApplicationController.Create(); applicationMessageEvent = new ApplicationMessageEvent(); publisher = new TestApplicationMessagePublisher(); subscriber = new TestApplicationMessageSubscriber(); publisher.Register(applicationMessageEvent); }
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(); }
public ConfigurationDataManagingMessage(IApplicationMessageEvent messenger, ActionType actionType) { this.messenger = messenger; this.actionType = actionType; }
public ConfigButtonCommandImpl(IApplicationMessageEvent applicationMessageEvent) { this.applicationMessageEvent = applicationMessageEvent; }
public void Register(IApplicationMessageEvent ev) { Messenger = ev; }
public OkButtonCommandImpl(IApplicationMessageEvent messenger, IConfigManager configManager, IConfigWindowViewModel viewModel) { this.messenger = messenger; this.configManager = configManager; this.viewModel = viewModel; }