private void SendData(string data)
        {
            DummyDoc doc = (DummyDoc)this.DockPanel.ActiveDocument;

            if (null != doc)
            {
                doc.SendMessage(data);
            }
        }
예제 #2
0
        private void ddtbSelect_DropDownItemClicked(object sender, ToolStripItemClickedEventArgs e)
        {
            DummyDoc doc = (DummyDoc)e.ClickedItem.Tag;

            if (null != doc)
            {
                ActivedBySelect = true;
                doc.Activate();
            }
        }
예제 #3
0
 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;
     }
 }
예제 #4
0
        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);
            }
        }
예제 #5
0
 private void LoadActiveDocState(DummyDoc doc)
 {
     BeginInvoke(new Action(() =>
     {
         if (null != doc)
         {
             RecordState(doc.LogRecord);
             tsbtAutoScroll.Checked   = doc.AutoScroll;
             statusLabelPortInfo.Text = doc.PortInfo;
         }
     }));
 }
예제 #6
0
        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;
        }
예제 #7
0
        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);
        }
예제 #8
0
        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;
            }
        }
예제 #9
0
        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);
        }
예제 #10
0
        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;
                    }
                }
            }
        }
예제 #11
0
        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;
            }
        }
예제 #12
0
 public void ShowPortForm(DummyDoc pForm)
 {
     pForm.Show(dockPanel);
 }
예제 #13
0
        public ReceiveSetting(DummyDoc parent)
        {
            InitializeComponent();

            Parent = parent;
        }