private void SendData(string data) { DummyDoc doc = (DummyDoc)this.DockPanel.ActiveDocument; if (null != doc) { doc.SendMessage(data); } }
private void ddtbSelect_DropDownItemClicked(object sender, ToolStripItemClickedEventArgs e) { DummyDoc doc = (DummyDoc)e.ClickedItem.Tag; if (null != doc) { ActivedBySelect = true; doc.Activate(); } }
public void DocAddedNotify(DummyDoc doc) { if (null != doc) { //fctbOutput.AppendText(doc.Text + " added\n"); ToolStripItem item = ddtbSelect.DropDownItems.Add(doc.Text); //item.Image = doc.PortOpened ? imageList.Images[1] : imageList.Images[0]; item.Tag = doc; } }
private void dockPanel_ContentAdded(object sender, DockContentEventArgs e) { DockContent content = e.Content as DockContent; if (content is DummyDoc) { DummyDoc doc = (DummyDoc)content; m_outputWindow.DocAddedNotify(doc); } }
private void LoadActiveDocState(DummyDoc doc) { BeginInvoke(new Action(() => { if (null != doc) { RecordState(doc.LogRecord); tsbtAutoScroll.Checked = doc.AutoScroll; statusLabelPortInfo.Text = doc.PortInfo; } })); }
private void dockPanel_ContentRemoved(object sender, DockContentEventArgs e) { DockContent content = e.Content as DockContent; if (content is DummyDoc) { DummyDoc doc = (DummyDoc)content; m_outputWindow.DocRemovedNotify(doc); } //foreach (IDockContent content in dockPanel.Documents) // if (content.DockHandler.TabText == text) // return content; }
private void toolBarItem_Click(object sender, EventArgs e) { ToolStripButton tsbt = sender as ToolStripButton; DummyDoc form = GetActivedReceiveWindow(); if (null == form) { return; } if (tsbtShowLineNumber == tsbt) { form.ShowLineNumbers = !form.ShowLineNumbers; } else if (tsbtSaveToFile == tsbt) { form.SaveToFile(); } else if (tsbtClear == tsbt) { form.Clear(); } else if (tsbtClearBookmarks == tsbt) { form.ClearBookmarks(); } else if (tsbtRecord == tsbt) { form.LogRecord = !form.LogRecord; } else if (tsbtNewLog == tsbt) { form.NewLogFile(); } else if (tsbtOpenWithApp == tsbt) { OpenLogWithApp(form.LogFile); } else if (tsbtOpenLogDirectory == tsbt) { OpenLogDirectory(form.LogPath); } else if (tsbtAutoScroll == tsbt) { form.AutoScroll = !form.AutoScroll; } LoadActiveDocState(form); }
private void dockPanel_ActiveDocumentChanged(object sender, EventArgs e) { DummyDoc doc = (DummyDoc)dockPanel.ActiveDocument; if (null != m_outputWindow) { m_outputWindow.DocActivedChangedNotify(doc); } LoadActiveDocState(doc); if (null != searchForm) { searchForm.FCTB = (null == doc) ? null : doc.FCTB; } }
private void NewPortForm() { UpdatePortSetting(); DummyDoc portform = DockParent.NewPortForm(PortSetting); foreach (DataGridViewRow row in synaxHighLightGrid.Rows) { if ((bool)row.Cells[0].Value) { portform.AddxHighlightStyle((string)row.Cells[1].Value, row.Cells[1].Style.ForeColor, row.Cells[1].Style.BackColor, row.Cells[1].Style.Font.Style); } } DockParent.ShowPortForm(portform); }
public void DocRemovedNotify(DummyDoc doc) { if (null != doc) { foreach (ToolStripItem item in ddtbSelect.DropDownItems) { if (item.Tag == doc) { if (DocActived == doc) { tsbtSendWinLock.Checked = false; } ddtbSelect.DropDownItems.Remove(item); //fctbOutput.AppendText(item.Text + " removed\n"); break; } } } }
public void DocActivedChangedNotify(DummyDoc doc) { if (tsbtSendWinLock.Checked && !ActivedBySelect) { return; } ActivedBySelect = false; DocActived = doc; if (null != DocActived) { ddtbSelect.Text = DocActived.Text; ddtbSelect.Image = doc.PortOpened ? highQualityImageList.ImageItems[1].Image : highQualityImageList.ImageItems[0].Image; } else { ddtbSelect.Text = "No Select"; ddtbSelect.Image = highQualityImageList.ImageItems[2].Image; } }
public void ShowPortForm(DummyDoc pForm) { pForm.Show(dockPanel); }
public ReceiveSetting(DummyDoc parent) { InitializeComponent(); Parent = parent; }