public MainView(IToolbarView toolbarView, ITextInputView textInputView, IWordCounterView wordCounterView, IStatusBarView statusbarView) { InitializeComponent(); ((Form)textInputView).TopLevel = false; ((Form)textInputView).FormBorderStyle = FormBorderStyle.None; ((Form)textInputView).Show(); ((Form)textInputView).Dock = DockStyle.Fill; splitContainer1.Panel1.Controls.Add((Form)textInputView); ((Form)wordCounterView).TopLevel = false; ((Form)wordCounterView).FormBorderStyle = FormBorderStyle.None; ((Form)wordCounterView).Show(); ((Form)wordCounterView).Dock = DockStyle.Fill; splitContainer1.Panel2.Controls.Add((Form)wordCounterView); ((Form)toolbarView).TopLevel = false; ((Form)toolbarView).FormBorderStyle = FormBorderStyle.None; ((Form)toolbarView).Show(); ((Form)toolbarView).Dock = DockStyle.Fill; panel1.Controls.Add((Form)toolbarView); panel1.Height = 96; splitContainer1.BringToFront(); ((Form)statusbarView).TopLevel = false; ((Form)statusbarView).FormBorderStyle = FormBorderStyle.None; ((Form)statusbarView).Show(); ((Form)statusbarView).Dock = DockStyle.Fill; panel2.Controls.Add((Form)statusbarView); panel2.Height = ((Form)statusbarView).Height; }
public MainFormPresenter(IMainFormView mainFormView) { subscriptionView = mainFormView.SubscriptionView; episodeView = mainFormView.EpisodeView; podcastView = mainFormView.PodcastView; toolbarView = mainFormView.ToolbarView; this.mainFormView = mainFormView; mainFormView.Load += MainFormViewOnLoad; mainFormView.FormClosed += MainFormViewOnFormClosed; mainFormView.HelpRequested += OnHelpRequested; mainFormView.KeyUp += MainFormViewOnKeyUp; toolbarView.PlayClicked += OnButtonPlayClick; toolbarView.StopClicked += OnButtonStopClick; toolbarView.PauseClicked += OnButtonPauseClick; toolbarView.RemovePodcastClicked += OnButtonRemovePodcastClick; toolbarView.AddPodcastClicked += OnButtonAddSubscriptionClick; toolbarView.FavouriteChanged += OnButtonFavouriteCheckStateChanged; episodeView.Description = ""; episodeView.Title = ""; episodeView.PublicationDate = ""; subscriptionView.SelectionChanged += OnSelectedEpisodeChanged; subscriptionManager = new SubscriptionManager("subscriptions.xml"); podcastLoader = new PodcastLoader(); podcastPlayer = new PodcastPlayer(); podcasts = subscriptionManager.LoadPodcasts(); if (!SystemInformation.HighContrast) { mainFormView.BackColor = Color.White; } }
// :base(view) public ToolbarViewModel(IToolbarView view, IEventAggregator eventAggregator) { _eventAggregator = eventAggregator; View = view; View.DataContext = this; SearchCommand = new DelegateCommand(Search, CanSave); _eventAggregator.GetEvent<GetEntityTypesEvent>().Subscribe(SetEntityTypes); }
public ToolbarViewModel(IToolbarView view, IEventAggregator eventAggregator) // :base(view) { _eventAggregator = eventAggregator; View = view; View.DataContext = this; SearchCommand = new DelegateCommand(Search, CanSave); _eventAggregator.GetEvent <GetEntityTypesEvent>().Subscribe(SetEntityTypes); }
public ShellView(IShellViewModel vm, IToolbarView toolbarView, ITaskBoardView taskBoardView) : this() { DataContext = vm; mainGrid.Children.Add(toolbarView.Element); Grid.SetRow(toolbarView.Element, 0); mainGrid.Children.Add(taskBoardView.Element); Grid.SetRow(taskBoardView.Element, 1); }
public MainFormPresenter(IMainFormView mainFormView, ITfsHttpClient tfsHttpClient) { this._mainFormView = mainFormView; _consoleView = mainFormView.ConsoleView; _toolbarView = mainFormView.ToolbarView; _tfsRequestPanelView = mainFormView.TfsRequestPanelView; mainFormView.Load += MainFormView_Load; mainFormView.FormClosed += MainFormView_FormClosed; _toolbarView.StartClicked += ToolbarView_StartClicked; _toolbarView.TrashClicked += ToolbarView_TrashClicked; _tfsHttpClient = tfsHttpClient; }
public MainFormPresenter(IMainFormView mainFormView, IPodcastLoader podcastLoader, ISubscriptionManager subscriptionManager, IPodcastPlayer podcastPlayer, IMessageBoxDisplayService messageBoxDisplayService, ISettingsService settingsService, ISystemInformationService systemInformationService, IToolbarCommand[] commands) { subscriptionView = mainFormView.SubscriptionView; episodeView = mainFormView.EpisodeView; podcastView = mainFormView.PodcastView; toolbarView = mainFormView.ToolbarView; toolbarView.SetCommands(commands); timer = new Timer(); timer.Interval = 100; timer.Tick += TimerOnTick; timer.Start(); this.mainFormView = mainFormView; mainFormView.Load += MainFormViewOnLoad; mainFormView.FormClosed += MainFormViewOnFormClosed; mainFormView.HelpRequested += OnHelpRequested; mainFormView.KeyUp += MainFormViewOnKeyUp; episodeView.Description = ""; episodeView.Title = ""; episodeView.PublicationDate = ""; subscriptionView.SelectionChanged += OnSelectedEpisodeChanged; this.subscriptionManager = subscriptionManager; this.podcastLoader = podcastLoader; this.podcastPlayer = podcastPlayer; this.messageBoxDisplayService = messageBoxDisplayService; this.settingsService = settingsService; this.commands = commands; this.episodeView.NoteCreated += EpisodeViewOnNoteCreated; if (!systemInformationService.IsHighContrastColourScheme) { mainFormView.BackColor = Color.White; } episodeView.PositionChanged += (s, a) => podcastPlayer.PositionInSeconds = episodeView.PositionInSeconds; }
public MainFormPresenter(IMainFormView mainFormView, IPodcastLoader podcastLoader, ISubscriptionManager subscriptionManager, IPodcastPlayer podcastPlayer, IMessageBoxDisplayService messageBoxDisplayService, ISettingsService settingsService, ISystemInformationService systemInformationService, INewSubscriptionService newSubscriptionService) { subscriptionView = mainFormView.SubscriptionView; episodeView = mainFormView.EpisodeView; podcastView = mainFormView.PodcastView; toolbarView = mainFormView.ToolbarView; this.mainFormView = mainFormView; mainFormView.Load += MainFormViewOnLoad; mainFormView.FormClosed += MainFormViewOnFormClosed; mainFormView.HelpRequested += OnHelpRequested; mainFormView.KeyUp += MainFormViewOnKeyUp; toolbarView.PlayClicked += OnButtonPlayClick; toolbarView.StopClicked += OnButtonStopClick; toolbarView.PauseClicked += OnButtonPauseClick; toolbarView.RemovePodcastClicked += OnButtonRemovePodcastClick; toolbarView.AddPodcastClicked += OnButtonAddSubscriptionClick; toolbarView.FavouriteChanged += OnButtonFavouriteCheckStateChanged; episodeView.Description = ""; episodeView.Title = ""; episodeView.PublicationDate = ""; subscriptionView.SelectionChanged += OnSelectedEpisodeChanged; this.subscriptionManager = subscriptionManager; this.podcastLoader = podcastLoader; this.podcastPlayer = podcastPlayer; this.messageBoxDisplayService = messageBoxDisplayService; this.settingsService = settingsService; this.newSubscriptionService = newSubscriptionService; podcasts = subscriptionManager.LoadPodcasts(); if (!systemInformationService.IsHighContrastColourScheme) { mainFormView.BackColor = Color.White; } }
public ToolbarViewModel(IToolbarView view) : base(view) { }
public FileSelectionNavigator(IToolbarView toolbarView, LoadTextFromFileToTextInput loadTextFromFileToTextInput) { toolbarView.ButtonOpenFileClick += OnOpenFileClick; this.loadTextFromFileToTextInput = loadTextFromFileToTextInput; }
public AboutButtonNavigator(IToolbarView toolbarView, IAboutView aboutView) { toolbarView.ButtonAboutClick += OnAboutClick; this.aboutView = aboutView; }
public ToolbarViewViewModel(IToolbarView view, IUnityContainer container) : base(view) { _container = container; MainMenu = _container.Resolve <AbstractMenuItem>() as MenuItemViewModel; }
public ToolbarViewModel(IToolbarView view) //: base(view) // Module 7 { }
public ToolbarViewModel(IToolbarView view) : base(view) { }
public ToolbarViewViewModel(IToolbarView view, IUnityContainer container) : base(view) { _container = container; MainMenu = _container.Resolve<AbstractMenuItem>() as MenuItemViewModel; }
public RunButtonNavigator(IToolbarView toolbarView, IWordCounterModel wordCounterModel) { toolbarView.ButtonRunClick += OnRunClick; this.wordCounterModel = wordCounterModel; }
public ToolbarPresenter(IToolbarView toolbarView, IToolbarCommand[] commands) { toolbarView.SetCommands(commands); }
/// <summary>Initializes a new instance of the <see cref="ToolbarPresenter"/> class.</summary> /// <param name="view">The view.</param> /// <param name="commands">The commands.</param> public ToolbarPresenter(IToolbarView view, List<IToolbarCommand> commands) { this.view = view; view.SetCommands(commands); }
private void ToolbarItemTapped(IToolbarView toolbarView, ToolbarItem toolbarItem) { if (toolbarItem.HasChildren) { PushToolbar(toolbarItem, toolbarItem.AnimatesNavigation, null); } else if (toolbarItem.IsBackButton) { Pop(toolbarItem.AnimatesNavigation); } if (toolbarItem.Tapped != null) toolbarItem.Tapped(this, toolbarItem); }
public ToolbarPresenter(IToolbarView toolbarView, IToolbarModel toolbarModel) { toolbarView.ButtonRunClick += ButtonRunClick; this.toolbarModel = toolbarModel; }
public ToolbarViewModel(IToolbarView view, IEventAggregator eventAggregator) { View = view; View.DataContext = this; _eventAggregator = eventAggregator; IPList = new ObservableCollection <string>(LoadIpList()); FolderList = new ObservableCollection <string>(LoadFolderList()); AddCommand = new DelegateCommand(() => { IPList.Add(SelectedIP); AddCommand.RaiseCanExecuteChanged(); RemoveCommand.RaiseCanExecuteChanged(); UpdateFileList(); }, () => ValidateIP(SelectedIP) && !IPList.Contains(SelectedIP)); RemoveCommand = new DelegateCommand(() => { IPList.Remove(SelectedIP); AddCommand.RaiseCanExecuteChanged(); RemoveCommand.RaiseCanExecuteChanged(); UpdateFileList(); }, () => ValidateIP(SelectedIP) && IPList.Contains(SelectedIP)); ConnectCommand = new DelegateCommand(() => { Connected = !Connected; UpdateLastIp(); }, () => ValidateIP(SelectedIP)); DeployCommand = new DelegateCommand(() => { _eventAggregator.GetEvent <DeployEvent>().Publish(new DeployModel(SelectedIP, Folder)); }, () => Connected); OpenFolderCommand = new DelegateCommand(() => { var dialog = new System.Windows.Forms.FolderBrowserDialog(); dialog.SelectedPath = Folder; if (dialog.ShowDialog() == DialogResult.OK) { Folder = dialog.SelectedPath; UpdateLastFolder(); FolderList.Add(Folder); UpdateFolderList(); } }); ConfigCommand = new DelegateCommand(() => { _eventAggregator.GetEvent <ShowConfigEvent>().Publish(Folder); }); LaunchAppCommand = new DelegateCommand(() => { _eventAggregator.GetEvent <SendCommandEvent>().Publish(new EventModel(EventType.Launch, EventKey.Dev)); }, () => Connected); Command = new DelegateCommand <DebuggerCommandEnum?>(cmd => { if (cmd.HasValue) { _eventAggregator.GetEvent <CommandEvent>().Publish(new CommandModel(_port, cmd.ToString())); } }); ClearLogsCommand = new DelegateCommand(() => { _eventAggregator.GetEvent <ClearLogsEvent>().Publish(null); }); //_eventAggregator.GetEvent<LogEvent>().Subscribe(msg => Enable = msg.Message.Contains("Debugger>"), ThreadOption.UIThread); _eventAggregator.GetEvent <OutputChangeEvent>().Subscribe(p => _port = p); _eventAggregator.GetEvent <ConnectEvent>().Subscribe(ip => Connected = true, ThreadOption.UIThread); _eventAggregator.GetEvent <DisconnectEvent>().Subscribe(obj => Connected = false, ThreadOption.UIThread); LoadLastIp(); LoadLastFolder(); }
/// <summary>Initializes a new instance of the <see cref="ToolbarPresenter"/> class.</summary> /// <param name="view">The view.</param> /// <param name="commands">The commands.</param> public ToolbarPresenter(IToolbarView view, List <IToolbarCommand> commands) { this.view = view; view.SetCommands(commands); }