コード例 #1
0
 public void OcalcReload(PPLMain pPPLmain)
 {
     cPPLMain = pPPLmain;
     cPPLMain.ForceReloadDEP();
     cPPLMain.Rebuild3DDisplay();
     cPPLMain.UpdateCapacitySummary();
 }
コード例 #2
0
        public void AddToMenu(PPL_Lib.PPLMain pPPLMain, System.Windows.Forms.ToolStrip pToolStrip)
        {
            //save the reference to the O-Calc Pro main
            cPPLMain = pPPLMain;


            //create the toolstrip buttons
            saveFilesBtn             = new ToolStripMenuItem("BCF Save Files");
            saveFilesBtn.AutoToolTip = true;
            saveFilesBtn.ToolTipText = Description;
            saveFilesBtn.Click      += SaveFilesBtn_Click;

            valBtn             = new ToolStripMenuItem("BCF Validation");
            valBtn.AutoToolTip = true;
            valBtn.ToolTipText = Description;
            valBtn.Click      += ValBtn_Click;

            treeBtn             = new ToolStripMenuItem("BCF Tree Attachment Pole Builder");
            treeBtn.AutoToolTip = true;
            treeBtn.ToolTipText = Description;
            treeBtn.Click      += TreeBtn_Click;

            coordBtn             = new ToolStripMenuItem("BCF Update Coordinates Single");
            coordBtn.AutoToolTip = true;
            coordBtn.ToolTipText = "Updates the FAA coordinates for the current pole.  You must have the planning data spreadsheet saved to the desktop of your PGE computer";
            coordBtn.Click      += CoordBtn_Click;

            pgeDebugBtn             = new ToolStripMenuItem("PGE Debug");
            pgeDebugBtn.AutoToolTip = true;
            pgeDebugBtn.ToolTipText = "Debug";
            pgeDebugBtn.Click      += PgeDebugBtn_Click;



            //create the dropdown button
            bcfButton      = new ToolStripDropDownButton();
            bcfButton.Text = "BCF Plugins";
            bcfButton.DropDownDirection = ToolStripDropDownDirection.Default;
            bcfButton.DropDownOpened   += BcfButton_DropDownOpened;
            bcfButton.Click            += BcfButton_Click;

            //add toolstrip buttons to dropdown
            bcfButton.DropDownItems.Add(saveFilesBtn);
            bcfButton.DropDownItems.Add(valBtn);
            bcfButton.DropDownItems.Add(treeBtn);
            bcfButton.DropDownItems.Add(coordBtn);

            bcfButton.DropDownItems.Add(pgeDebugBtn);
            pToolStrip.Items.Add(bcfButton);
        }
コード例 #3
0
        /// <summary>
        /// Add a tabbed form to the tabbed window (if the plugin type is
        /// PLUGIN_TYPE.DOCKED_TAB
        /// or
        /// PLUGIN_TYPE.BOTH_DOCKED_AND_MENU
        /// </summary>
        /// <param name="pPPLMain"></param>
        public void AddForm(PPL_Lib.PPLMain pPPLMain)
        {
            cPPLMain = pPPLMain;
            cForm    = new PluginForm();
            Guid guid = new Guid(0x123eb510, 0xadcc, 0x4338, 0xa8, 0x12, 0x67, 0x6f, 0x32, 0xdb, 0x1e, 0x1e);



            cForm.cGuid = guid;
            cPPLMain.cDockedPanels.Add(cForm.cGuid.ToString(), cForm);
            foreach (Control ctrl in cPPLMain.Controls)
            {
                if (ctrl is WeifenLuo.WinFormsUI.Docking.DockPanel)
                {
                    cForm.Show(ctrl as WeifenLuo.WinFormsUI.Docking.DockPanel, WeifenLuo.WinFormsUI.Docking.DockState.Document);
                }
            }



            cForm.Show();
        }
コード例 #4
0
 /// <summary>
 /// Perform clearance analysis if type is PLUGIN_TYPE.CLEARANCE_SAG_PROVIDER
 /// </summary>
 /// <param name="pMain"></param>
 /// <returns></returns>
 public PPLClearance.ClearanceSagProvider GetClearanceSagProvider(PPL_Lib.PPLMain pMain)
 {
     System.Diagnostics.Debug.Assert(Type == PLUGIN_TYPE.CLEARANCE_SAG_PROVIDER, Name + " is not a clearance provider plugin.");
     return(null);
 }