예제 #1
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));
             if (dr.Userdescription != "" && dr.Userdescription != String.Format("Symbolnumber {0}", dr.Symbol_number))
             {
                 symbolname = dr.Userdescription;
             }
             else
             {
                 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.ApplicationLanguage = m_appSettings.ApplicationLanguage;
     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;
     }
 }
예제 #2
0
 private void Information_browseAxisInformation_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.ApplicationLanguage = m_appSettings.ApplicationLanguage;
     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;
     }
 }
예제 #3
0
 void tabdet_onStartSymbolViewer(object sender, AxisBrowser.SymbolViewerRequestedEventArgs e)
 {
     StartAViewer(e.Mapname);
 }