Your Products have been synced, click here to refresh
public Mainform() { InitializeComponent(); // Turn off the menu strip till PC-Dmis has started. DmisMenuStrip.Enabled = false; HomeDir = Application.StartupPath; xmlFile = HomeDir + @"\DmisMenuData.xml"; // Display the Main Form Title this.Text = "Project Action Mananger Version " + Settings.Default.Version; // Start Pcdmis InitializePcdmis(); // DataSet ReadData(); UpDateProgramList(); UpdateToolMenu(); }
1 string PcdmisVersion = Settings.Default.PcdmisVersion; 2 try 3 { 4 CMMsession = new PcdmisHelper(ExternalToInternalVersion(PcdmisVersion)); 5 } 6 catch (Exception e) 7 { 8 String message = e.Message; 9 MessageBox.Show("Incorrect Version of PCDMIS or PCDMIS not found.", 10 "PCDMIS not Found", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); 11 return; 12 }
1 try // to startup and connect with PC-Dmis 2 { 3 CMMsession.ConnectPCDLRN(); 4 } 5 catch (NoRegistryException e) 6 { 7 String message = e.Message; 8 MessageBox.Show(message, "Connection Error - Check Help->PCDLRN Info", 9 MessageBoxButtons.OK, MessageBoxIcon.Exclamation); 10 return; 11 }
1 /// <summary> 2 /// This method starts the PCDMIS/PCDLRN CMM session in the background and 3 /// establishes a connection with the running PCDLRN session. The session is 4 /// running on a thread separate from the user DotNet application. 5 /// </summary> 6 public void ConnectPCDLRN() 7 { 8 if (!IsSessionActive) 9 { 10 Func<Boolean> method = Connect; 11 method.BeginInvoke(ConnectionDone, method); 12 } 13 else 14 { 15 . 16 . Code removed for brevity. 17 . 18 } 19 }
1 /* execute this method to make connection to the PCDLRN. */ 2 private Boolean Connect() 3 { 4 Type comType; 5 Object comObj; 6 try 7 { 8 pcdSession = null; 9 // Make sure the PCDLRN process is not already running. 10 Process[] PCDLRN_List = Process.GetProcessesByName("PCDLRN"); 11 foreach (Process exe in PCDLRN_List) 12 { 13 exe.Kill(); 14 } 15 //PCDMIS_CLSID = getCLSID_RegisterValue(); 16 comType = Type.GetTypeFromCLSID(Guid.Parse(PCDMIS_CLSID), true); 17 comObj = Activator.CreateInstance(comType); 18 pcdSession = comObj as PCDLRN.Application; 19 return IsSessionActive; 20 } 21 catch (Exception e) 22 { 23 ExceptionMessages = ExceptionMessages + "Problems starting PCDLRN CLSID " + 24 PCDMIS_CLSID + "\n" + e.Message; 25 } 26 return false; 27 }
public Mainform() { InitializeComponent(); // Turn off the menu strip till PC-Dmis has started. DmisMenuStrip.Enabled = false; HomeDir = Application.StartupPath; xmlFile = HomeDir + @"\DmisMenuData.xml"; // Display the Main Form Title this.Text = "Project Action Mananger Version " + Settings.Default.Version; // Start Pcdmis InitializePcdmis(); // DataSet ReadData(); UpDateProgramList(); UpdateToolMenu(); }
1 string PcdmisVersion = Settings.Default.PcdmisVersion; 2 try 3 { 4 CMMsession = new PcdmisHelper(ExternalToInternalVersion(PcdmisVersion)); 5 } 6 catch (Exception e) 7 { 8 String message = e.Message; 9 MessageBox.Show("Incorrect Version of PCDMIS or PCDMIS not found.", 10 "PCDMIS not Found", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); 11 return; 12 }
1 try // to startup and connect with PC-Dmis 2 { 3 CMMsession.ConnectPCDLRN(); 4 } 5 catch (NoRegistryException e) 6 { 7 String message = e.Message; 8 MessageBox.Show(message, "Connection Error - Check Help->PCDLRN Info", 9 MessageBoxButtons.OK, MessageBoxIcon.Exclamation); 10 return; 11 }
1 /// <summary> 2 /// This method starts the PCDMIS/PCDLRN CMM session in the background and 3 /// establishes a connection with the running PCDLRN session. The session is 4 /// running on a thread separate from the user DotNet application. 5 /// </summary> 6 public void ConnectPCDLRN() 7 { 8 if (!IsSessionActive) 9 { 10 Func<Boolean> method = Connect; 11 method.BeginInvoke(ConnectionDone, method); 12 } 13 else 14 { 15 . 16 . Code removed for brevity. 17 . 18 } 19 }
1 /* execute this method to make connection to the PCDLRN. */ 2 private Boolean Connect() 3 { 4 Type comType; 5 Object comObj; 6 try 7 { 8 pcdSession = null; 9 // Make sure the PCDLRN process is not already running. 10 Process[] PCDLRN_List = Process.GetProcessesByName("PCDLRN"); 11 foreach (Process exe in PCDLRN_List) 12 { 13 exe.Kill(); 14 } 15 //PCDMIS_CLSID = getCLSID_RegisterValue(); 16 comType = Type.GetTypeFromCLSID(Guid.Parse(PCDMIS_CLSID), true); 17 comObj = Activator.CreateInstance(comType); 18 pcdSession = comObj as PCDLRN.Application; 19 return IsSessionActive; 20 } 21 catch (Exception e) 22 { 23 ExceptionMessages = ExceptionMessages + "Problems starting PCDLRN CLSID " + 24 PCDMIS_CLSID + "\n" + e.Message; 25 } 26 return false; 27 }
© 2024 Hexagon AB and/or its subsidiaries. | Privacy Policy | Cloud Services Agreement |