Пример #1
0
 private void barButtonItem31_ItemClick(object sender, ItemClickEventArgs e)
 {
     DockPanel dockPanel = dockManager1.AddPanel(new System.Drawing.Point(-500, -500));
     AxisBrowser tabdet = new AxisBrowser();
     tabdet.onStartSymbolViewer += new AxisBrowser.StartSymbolViewer(tabdet_onStartSymbolViewer);
     tabdet.Dock = DockStyle.Fill;
     dockPanel.Controls.Add(tabdet);
     tabdet.ShowSymbolCollection(m_symbols);
     dockPanel.Text = "Axis browser: " + Path.GetFileName(m_currentfile);
     bool isDocked = false;
     foreach (DockPanel pnl in dockManager1.Panels)
     {
         if (pnl.Text.StartsWith("Axis browser: ") && pnl != dockPanel && (pnl.Visibility == DockVisibility.Visible))
         {
             dockPanel.DockAsTab(pnl, 0);
             isDocked = true;
             break;
         }
     }
     if (!isDocked)
     {
         dockPanel.DockTo(dockManager1, DockingStyle.Left, 1);
         dockPanel.Width = 700;
     }
 }
Пример #2
0
 private void browseAxisInfoToolStripMenuItem_Click(object sender, EventArgs e)
 {
     string symbolname = string.Empty;
     if (gridViewSymbols.SelectedRowsCount > 0)
     {
         int[] selrows = gridViewSymbols.GetSelectedRows();
         if (selrows.Length > 0)
         {
             SymbolHelper dr = (SymbolHelper)gridViewSymbols.GetRow((int)selrows.GetValue(0));
             symbolname = dr.Varname;
         }
     }
     DockPanel dockPanel = dockManager1.AddPanel(new System.Drawing.Point(-500, -500));
     AxisBrowser tabdet = new AxisBrowser();
     tabdet.onStartSymbolViewer += new AxisBrowser.StartSymbolViewer(tabdet_onStartSymbolViewer);
     tabdet.Dock = DockStyle.Fill;
     dockPanel.Controls.Add(tabdet);
     tabdet.ShowSymbolCollection(m_symbols);
     tabdet.SetCurrentSymbol(symbolname);
     dockPanel.Text = "Axis browser: " + Path.GetFileName(m_currentfile);
     bool isDocked = false;
     foreach (DockPanel pnl in dockManager1.Panels)
     {
         if (pnl.Text.StartsWith("Axis browser: ") && pnl != dockPanel && (pnl.Visibility == DockVisibility.Visible))
         {
             dockPanel.DockAsTab(pnl, 0);
             isDocked = true;
             break;
         }
     }
     if (!isDocked)
     {
         dockPanel.DockTo(dockManager1, DockingStyle.Left, 1);
         dockPanel.Width = 700;
     }
 }
Пример #3
0
 void tabdet_onStartSymbolViewer(object sender, AxisBrowser.SymbolViewerRequestedEventArgs e)
 {
     StartTableViewer(e.Mapname);
 }