Exemple #1
0
        private void TabbedAnythingForm_Activated(object sender, EventArgs e)
        {
            TabbedAnythingForm form = (TabbedAnythingForm)sender;

            _forms.Remove(form);
            _forms.Add(form);
            _activeForm = form;
        }
Exemple #2
0
        private TabbedAnythingForm CreateNewTabbedAnything(Point createdAtPoint)
        {
            TabbedAnythingForm form = new TabbedAnythingForm(createdAtPoint);

            form.FormClosed += TabbedAnythingForm_FormClosed;
            form.Activated  += TabbedAnythingForm_Activated;

            _forms.Add(form);
            _activeForm = form;
            form.Show();

            return(form);
        }
Exemple #3
0
        private void TabbedAnythingForm_FormClosed(object sender, FormClosedEventArgs e)
        {
            TabbedAnythingForm form = (TabbedAnythingForm)sender;

            _forms.Remove(form);
            if (form == _activeForm)
            {
                _activeForm = _forms.LastOrDefault();
            }

            if (_forms.Count == 0)
            {
                if (!Settings.Default.CloseToSystemTray)
                {
                    Application.Exit();
                }
            }
        }
Exemple #4
0
        public void CreateNewFromTab(Tab tab, Point location)
        {
            TabbedAnythingForm form = CreateNewTabbedAnything(location);

            form.AddExistingTab(tab);
        }