Exemplo n.º 1
0
 void airmassResult_onStartTableViewer(object sender, ctrlAirmassResult.StartTableViewerEventArgs e)
 {
     StartTableViewer(e.SymbolName);
 }
Exemplo n.º 2
0
        private void btnAirmassResult_ItemClick(object sender, ItemClickEventArgs e)
        {
            // start a dockview for this <GS-26012011>
            DockPanel dockPanel;

            if (CheckAllTablesAvailable())
            {
                //dockPanel = dockManager1.AddPanel(new System.Drawing.Point(-500, -500));
                dockManager1.BeginUpdate();
                try
                {
                    ctrlAirmassResult airmassResult = new ctrlAirmassResult();
                    airmassResult.Dock = DockStyle.Fill;
                    dockPanel = dockManager1.AddPanel(DockingStyle.Right);
                    dockPanel.Tag = m_currentfile;
                    dockPanel.ClosedPanel += new DockPanelEventHandler(dockPanel_ClosedPanel);
                    dockPanel.Text = "Airmass result viewer: " + Path.GetFileName(m_currentfile);
                    dockPanel.Width = 800;
                    airmassResult.onStartTableViewer += new ctrlAirmassResult.StartTableViewer(airmassResult_onStartTableViewer);
                    airmassResult.onClose += new ctrlAirmassResult.ViewerClose(airmassResult_onClose);
                    airmassResult.Currentfile = m_currentfile;
                    airmassResult.Symbols = m_symbols;
                    airmassResult.Calculate();
                    dockPanel.Controls.Add(airmassResult);
                }
                catch (Exception newdockE)
                {
                    logger.Debug(newdockE.Message);
                }
                dockManager1.EndUpdate();
            }
            /*System.Windows.Forms.Application.DoEvents();
            if (CheckAllTablesAvailable())
            {
                // build a table that shows the maximum allowed airmass depending on the current limiters
                // table show be the same size as the pedalrequest map
                frmAirmassResult airmassresult = new frmAirmassResult();
                airmassresult.onStartTableViewer += new frmAirmassResult.StartTableViewer(airmassresult_onStartTableViewer);
                airmassresult.Currentfile = m_currentfile;
                airmassresult.Symbols = m_symbols;
                airmassresult.Calculate();
                airmassresult.Show(); // not dialog?
            }
            */
        }