private void Refresh_Click(object sender, EventArgs e) { UCTabbedDocument ucDoc = GetActiveUCTabbedDocument(); if (ucDoc != null) { ucDoc.SelfRefresh(); } }
private void tsmiSave_Click(object sender, EventArgs e) { UCTabbedDocument ucDoc = GetActiveUCTabbedDocument(); if (ucDoc != null) { ucDoc.Execute(); } }
private void tsmiRename_Click(object sender, EventArgs e) { UCTabbedDocument ucDoc = GetActiveUCTabbedDocument(); if (ucDoc != null) { ucDoc.Rename(); UpdateDocumentTitle(); } }
private void UpdateDocumentTitle() { UCTabbedDocument ucDoc = GetActiveUCTabbedDocument(); if (ucDoc != null) { if (_lastActivatedWindow != null && ucDoc != null) { _lastActivatedWindow.Text = ucDoc.Title; } } }
private void ctxWindow_Opening(object sender, CancelEventArgs e) { UCTabbedDocument ucDoc = GetActiveUCTabbedDocument(); UCTabbedStatus status = ucDoc == null ? UCTabbedStatus.Default : ucDoc.TabbedStatus; tsmiSave.Visible = (status & UCTabbedStatus.SaveVisible) == UCTabbedStatus.SaveVisible; tsmiSave.Enabled = (status & UCTabbedStatus.SaveEnable) == UCTabbedStatus.SaveEnable; tsmiRename.Visible = (status & UCTabbedStatus.AllowTitleChange) == UCTabbedStatus.AllowTitleChange; tsmiRefresh.Visible = (status & UCTabbedStatus.RefreshVisible) == UCTabbedStatus.RefreshVisible; tsmiRefresh.Enabled = (status & UCTabbedStatus.RefreshEnable) == UCTabbedStatus.RefreshEnable; tsSeparator1.Visible = !(status == UCTabbedStatus.Default); }
private void NavigateOrAddFormToTabControl(Type controlType) { foreach (DockControl doc in sandDockManager1.DocumentContainer.Controls) { if (doc.Controls.Count > 0 && doc.Controls[0].GetType() == controlType) { doc.Open(); return; } } UCTabbedDocument ucDoc = (UCTabbedDocument)Activator.CreateInstance(controlType); AddFormToTabControl(ucDoc); }
private void SystemTray(bool show) { if (show) { WindowState = FormWindowState.Maximized; this.ShowInTaskbar = true; UCTabbedDocument doc = GetUCTabbedDocumentByType(typeof(ActivePlanManager)); if (doc != null) { doc.SelfRefresh(false); } } else { this.ShowInTaskbar = false; } }
private void AddFormToTabControl(UserControl control) { string name = control.Name; UCTabbedDocument doc = control as UCTabbedDocument; if (doc != null) { name = doc.Title; } if (string.IsNullOrEmpty(name)) { name = Guid.NewGuid().ToString(); } DockControl window = new TabbedDocument(sandDockManager1, control, name); window.Open(); }