private void view_Close(IChildView view)
 {
     splitContainer1.Panel1Collapsed = false;
     foreach (TabPage page in tabControl1.TabPages)
     {
         if (page.Controls.Contains(view.ChildControl))
         {
             tabControl1.TabPages.Remove(page);
             return;
         }
     }
 }
        public void Add(IChildView view)
        {
            var page = new TabPage(view.TabHeader);

            page.Controls.Add(view.ChildControl);
            tabControl1.TabPages.Add(page);
            view.ChildControl.Dock  = DockStyle.Fill;
            tabControl1.SelectedTab = page;
            view.Theme = Factory.GetCurrentTheme();

            view.Close += new Action <IChildView>(view_Close);
            view.OnToggleFullScreen += new Action(view_OnToggleFullScreen);
            view.OnSetMessage       += new Action <string>(SetMessage);
        }
 public ChildViewModel(IChildView view, IContainer container)
     : base(view, container)
 {
 }
 public ChildViewModel(IChildView view, IContainer container)
     : base(view, container)
 {
 }
Esempio n. 5
0
 public void OnSettingsClicked(object sender, System.EventArgs e)
 {
     //save current View so that the back button from SettingsView know where to return
     previousView = parentView.CurrentChildView;
     //set current settings
     settingView.RefreshMinutes = dataModel.Settings.RefreshMinutes;
     settingView.RefreshSeconds = dataModel.Settings.RefreshSeconds;
     settingView.ShowNotifications = dataModel.Settings.ShowNotifications;
     //show Settings View
     parentView.CurrentChildView = settingView;
 }
Esempio n. 6
0
 public void OnAboutClicked(object sender, System.EventArgs e)
 {
     //save current View so that the back button from AboutView know where to return
     previousView = parentView.CurrentChildView;
     //show About View
     parentView.CurrentChildView = aboutView;
 }