public SettingsForm(ManageRobot manager)
 {
     InitializeComponent();
     this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.SettingsForm_FormClosing);
     this.manager = manager;
     useFRCsimCheckbox.Checked = PluginSettings.UseFRCsim;
     DebugCheckbox.Checked = PluginSettings.DebugMode;
     logCheckbox.Checked = PluginSettings.Log;
 }
 /// <summary>
 /// update fields in JointProperties panel when change joints. 
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void Parent_Changed(object sender, EventArgs e)
 {
     if (Parent != null)
         robotManager = (ManageRobot)this.Parent.FindForm();
 }
Example #3
0
 /// <summary>
 /// open Joint tab of JointEditor for given joint when click Joint Pose button from Manage Robot window
 /// call from JointProperties
 /// </summary>
 /// <param name="robot">current robot to edit</param>
 /// <param name="manager"></param>
 public void OpenJointEditorPage(RobotModel robot, ManageRobot manager)
 {
     JointPMPage editor = jointSpecifics.FillPropertyPage();//SetupPage();
     editor.RestoreManager += manager.ExternalSelect;
     editor.Show();
        // editor.OnJointSelectionChanged(this);            //calls SaveCurrentLinkSelection() and LoadCurrentLinkSelection();
     //const int jointTabID = 33; editor.OnTabClicked(jointTabID);            //calls ToggleJointPropertyManagers(this.Type);
 }
Example #4
0
        public int OnDocClose(int destroyType)
        {
            if (manager != null && manager.Visible == true)
            {
                manager.Close();
                manager = null;
            }
            if (settings.Visible == true)
            {
                settings.Close();
                settings = null;
            }
            if (exporter != null && !exporter.IsClosed())
            {
                exporter.CloseExporter();
                exporter = null;
            }
            currentRobot = null;

            RobotInfo.WriteToLogFile("Doc closed (SwAddin)\n");
            return 0;
        }
Example #5
0
 public int OnDocChange()
 {
     currentRobot = null;
         currentDoc = null;
         ModelDoc2 activeDoc = iSwApp.ActiveDoc;
         if (activeDoc.GetType() == (int)swDocumentTypes_e.swDocASSEMBLY)
         {
             currentDoc = (AssemblyDoc)activeDoc;
             currentDoc.DestroyNotify2 += new DAssemblyDocEvents_DestroyNotify2EventHandler(OnDocClose);
             currentRobot = new RobotModel(currentDoc, iSwApp);
             if (manager != null && manager.Visible == true)
             {
                 manager.Close();
             }
             if (settings!= null && settings.Visible == true)
             {
                 settings.Close();
             }
             if (exporter != null && !exporter.IsClosed())
             {
                 exporter.CloseExporter();
                 exporter = null;
             }
             manager = new ManageRobot(currentRobot);
             settings = new SettingsForm(manager);
         }
     RobotInfo.WriteToLogFile("Doc changed (SwAddin)");
     return 0;
 }
Example #6
0
 /// <summary>
 /// opens link editor page in solidworks window
 /// </summary>
 /// <param name="robot"></param>
 /// <param name="manager"></param>
 public void OpenRobotEditorPage(RobotModel robot, ManageRobot manager)
 {
     RobotPMPage editor = new RobotPMPage(robot, asmDoc, swApp); //SetupPage();
     editor.Show();
     editor.RestoreManager += manager.ExternalSelect;
     editor.OnRobotSelectionChanged(this);            //calls SaveCurrentLinkSelection() and LoadCurrentLinkSelection();
 }
Example #7
0
 /// <summary>
 /// opens link editor page in solidworks window
 /// </summary>
 /// <param name="robot"></param>
 /// <param name="manager"></param>
 public void OpenLinkEditorPage(RobotModel robot,ManageRobot manager, int modelType)
 {
     LinkPMPage editor = new LinkPMPage(robot, asmDoc, swApp, modelType); //SetupPage();
     editor.Show();
     editor.RestoreManager += manager.ExternalSelect;
     editor.OnLinkSelectionChanged(this);            //calls SaveCurrentLinkSelection() and LoadCurrentLinkSelection();
 }