Esempio n. 1
0
        public TabCollection(TabControl tabControl, ContextMenuStrip rtbContextMenuStrip,
                             ToolStripMenuItem versionHistoryToolStripMenuItem,
                             MainFormTitleUpdatingEventHandler mainFormTitleUpdatingEventHandler)
        {
            _tabControl          = tabControl;
            _rtbContextMenuStrip = rtbContextMenuStrip;

            MainFormTitleUpdating     += mainFormTitleUpdatingEventHandler;
            FixedSelectedIndexChanged += MainFormTitleUpdate;
            FixedSelectedIndexChanged += (sender, e) =>
            {
                if (ActiveTab != null)
                {
                    Autologging.UpdateLogsDropDownMenu(versionHistoryToolStripMenuItem, ActiveTab);
                }
            };

            _tabControl.Click += OnTabControlClick;
            _tabControl.SelectedIndexChanged += (sender, e) => FixedSelectedIndexChanged.Invoke(sender, e);
        }
Esempio n. 2
0
 private void OnAutologgingTimerTick(object sender, EventArgs e)
 {
     Debug.WriteLine("Autologging timer tick.");
     _tabCollection.ForEach(tab => Autologging.LogTab(tab));
     Autologging.UpdateLogsDropDownMenu(_versionHistoryToolStripMenuItem, _tabCollection.ActiveTab);
 }