private void qRibbonItem3_ItemActivated(object sender, Qios.DevSuite.Components.QCompositeEventArgs e) { Command cmd = Command.CreateCommand(""); cmd.CommandString = "show !!reorderbasic"; cmd.RunInPdms(); }
//关闭当前页 private void ItemCancel_ItemActivated(object sender, Qios.DevSuite.Components.QCompositeEventArgs e) { Form frm = ActiveMdiChild;//获取当前多窗体中处于激活状态的子窗体 if (frm != null) { frm.Close(); } //Application.Exit(); }
private void ItemAbout_ItemActivated(object sender, Qios.DevSuite.Components.QCompositeEventArgs e) { FormAbout abt = new FormAbout(); string name = abt.Name; //使用循环判断当前已经打开的窗体中是否有主页的窗体 foreach (DockContent item in idockPanel.Contents) { if (item.Name == name) { item.Activate(); return; } } //如果上面满足if条件的话,就会运行到return,直接跳出代码,不会再执行下面这两句代码 abt.Show(idockPanel); }
private void ItemAdd_ItemActivated(object sender, Qios.DevSuite.Components.QCompositeEventArgs e) { //加载目录页窗体 FormDialog dialog = new FormDialog(); string name = dialog.Name; //使用循环判断当前已经打开的窗体中是否有目录的窗体 foreach (DockContent item in idockPanel.Contents) { if (item.Name == name) { item.Activate(); return; } } //如果上面满足if条件的话,就会运行到return,直接跳出代码,不会再执行下面这两句代码 dialog.Show(idockPanel); }
private void ItemChart_ItemActivated(object sender, Qios.DevSuite.Components.QCompositeEventArgs e) { if (simbolCalculate == true) { //加载图片页窗体 FormChart chartform = new FormChart(); string name = chartform.Name; //使用循环判断当前已经打开的窗体中是否有结果的窗体 foreach (DockContent item in idockPanel.Contents) { if (item.Name == name) { item.Activate(); return; } } //如果上面满足if条件的话,就会运行到return,直接跳出代码,不会再执行下面这两句代码 chartform.Show(idockPanel); } else { MessageBox.Show("Please calculate first", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void qRibbonPanel10_ItemActivated(object sender, Qios.DevSuite.Components.QCompositeEventArgs e) { }
private void qRibbonItem7_ItemActivated(object sender, Qios.DevSuite.Components.QCompositeEventArgs e) { Aveva.Pdms.Utilities.CommandLine.Command.CreateCommand("$p |실행했다옹 예은아 힘내자|").RunInPdms(); }
private void ItemOption_ItemActivated(object sender, Qios.DevSuite.Components.QCompositeEventArgs e) { FormRunOption formRunOption = new FormRunOption(); formRunOption.Show(); }
private void ItemHelp_ItemActivated(object sender, Qios.DevSuite.Components.QCompositeEventArgs e) { //download("/home/majiahui/files/help.pdf", Application.StartupPath + "/help.pdf"); System.Diagnostics.Process.Start(Application.StartupPath + "/help.pdf"); }
private void ItemExport_ItemActivated(object sender, Qios.DevSuite.Components.QCompositeEventArgs e) { FormOutPut.ExportExcel("result", FormOutPut.pubdgv); }
private void PanelSave_ItemActivated(object sender, Qios.DevSuite.Components.QCompositeEventArgs e) { }
private void ItemBegin_ItemActivated(object sender, Qios.DevSuite.Components.QCompositeEventArgs e) { if (FormDialog.simbolDialog == true) { resultDict = load_xml(); bool success = false; Lblmessage.Visible = true; Lblmessage.Text = "Calculating, please wait..."; TxtName = DateTime.Now.ToString("MMddhhmmss"); //设置生成的txt文件的名字 outPutPath = FormDialog.OutputFilePath_global + @"\" + TxtName; if (FormLogin.if_online) { // Thread thread = new Thread(delegate () // { // var testCmd = sshClient.RunCommand("mkdir " + "output"); // if (!string.IsNullOrWhiteSpace(testCmd.Error)) // Console.WriteLine(testCmd.Error); // else // Console.WriteLine(testCmd.Result); // string outPutPath_online = "/home/" + userName + "/output/" + TxtName; // string inputPath = "/home/" + userName + "/input"; // sshClient.RunCommand("mkdir " + outPutPath_online); // send_online(FormDialog.AllUploadFiles, FormDialog.AllRecievePaths); //把本地文件全部发送到服务器上 // calcute_online(inputPath); // //sshClient.RunCommand("docker run -v " + inputPath + ":/classification_sample/input -v " + outPutPath + ":/classification_sample/output -e PYTHONUNBUFFERED=0 phasenet_model_cross_entropy_ai_picking python3 classification_sample -i input -m inference_graph.xml -d CPU -dt " + FormDialog.AllFileType + " -o output -ot csv -pl"); // success = download(outPutPath_online); // if (success) // { // //Lblmessage.Visible = false; // Lblmessage.Text = "Connected"; // ItemResult.Enabled = true; // ItemChart.Enabled = true; // } // else // { // Lblmessage.Text = "Sorry,failed to calculate..."; // } // }); var testCmd = sshClient.RunCommand("mkdir " + "output"); if (!string.IsNullOrWhiteSpace(testCmd.Error)) { Console.WriteLine(testCmd.Error); } else { Console.WriteLine(testCmd.Result); } outPutPath_online = "/home/" + userName + "/output/" + TxtName; string inputPath_online = "/home/" + userName + "/input"; sshClient.RunCommand("mkdir " + outPutPath_online); send_online(FormDialog.AllUploadFiles, FormDialog.AllFileName); //把本地文件全部发送到服务器上 calcute_online(inputPath_online, outPutPath_online); //sshClient.RunCommand("docker run -v " + inputPath + ":/classification_sample/input -v " + outPutPath + ":/classification_sample/output -e PYTHONUNBUFFERED=0 phasenet_model_cross_entropy_ai_picking python3 classification_sample -i input -m inference_graph.xml -d CPU -dt " + FormDialog.AllFileType + " -o output -ot csv -pl"); success = download(outPutPath_online); if (success) { //Lblmessage.Visible = false; Lblmessage.Text = "Connected"; ItemResult.Enabled = true; ItemChart.Enabled = true; } else { Lblmessage.Text = "Sorry,failed to calculate..."; } } else { send(FormDialog.AllUploadFiles, FormDialog.AllRecievePaths); //把本地文件全部发送到服务器上 success = calculate(); //开始计算 //下载结束后,关闭提示 if (success) { Lblmessage.Visible = false; } } //inputFileName = FormDialog.AllFileName; //文件路径全赋给inputfilepath simbolCalculate = true; FormDialog.AllUploadFiles.Clear(); //发布完之后清空路径 FormDialog.AllRecievePaths.Clear(); //发布完之后清空路径 } else { MessageBox.Show("Please add files first", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
//退出按钮 private void ItemExit_ItemActivated(object sender, Qios.DevSuite.Components.QCompositeEventArgs e) { Application.Exit(); Application.ExitThread(); }
private void ItemLanguage_ItemActivated(object sender, Qios.DevSuite.Components.QCompositeEventArgs e) { }