Your Products have been synced, click here to refresh
try { Type pcdObjType = Type.GetTypeFromProgID("PCDLRN.Application"); PCDApp = Activator.CreateInstance(pcdObjType); string status = ""; /* this while loop starts with status = "", and will query PC-DMIS for the text in the status bar at the bottom of the screen. when it finally says "READY" or it contains "DONE INIT", the loop will exit readystr and initstr is defined in the application settings */ while (status != readystr && !status.Contains(initstr)) { System.Threading.Thread.Sleep(1000); // give pc-dmis a second to work status = PCDApp.StatusBar(); } PCDStarted = true; //PC-DMIS started } catch //catch (System.Runtime.InteropServices.COMException f) { PCDStarted = false; // PC-DMIS did not start //MessageBox.Show(string.Format("PC-DMIS måste vara startat: {0}", f.Message)); // PC-DMIS needs to be started! //System.Windows.Forms.Application.Exit(); // Exit }
try { Type pcdObjType = Type.GetTypeFromProgID("PCDLRN.Application"); PCDApp = Activator.CreateInstance(pcdObjType); string status = ""; /* this while loop starts with status = "", and will query PC-DMIS for the text in the status bar at the bottom of the screen. when it finally says "READY" or it contains "DONE INIT", the loop will exit readystr and initstr is defined in the application settings */ while (status != readystr && !status.Contains(initstr)) { System.Threading.Thread.Sleep(1000); // give pc-dmis a second to work status = PCDApp.StatusBar(); } PCDStarted = true; //PC-DMIS started } catch //catch (System.Runtime.InteropServices.COMException f) { PCDStarted = false; // PC-DMIS did not start //MessageBox.Show(string.Format("PC-DMIS måste vara startat: {0}", f.Message)); // PC-DMIS needs to be started! //System.Windows.Forms.Application.Exit(); // Exit }
© 2024 Hexagon AB and/or its subsidiaries. | Privacy Policy | Cloud Services Agreement |