Exemplo n.º 1
0
        private void checkAllStateToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ToolStripMenuItem tmi = (ToolStripMenuItem)sender;

            switch (tmi.Text)
            {
            case "CheckAllState":
            {
                new Form_StateCheck(stateScan_NDC, stateScan_DDC).Show();
            }
            break;

            case "Log":
            {
                XDCUnity.OpenPath(XDCUnity.eCATPath + "\\log");
            }
            break;

            case "XDC\\NDC":
            {
                XDCUnity.OpenPath(XDCUnity.eCATPath + "\\XDC\\NDC\\Scripts");
            }
            break;

            case "XDC\\DDC":
            {
                XDCUnity.OpenPath(XDCUnity.eCATPath + "\\XDC\\DDC\\Scripts");
            }
            break;

            case "TransactionFlow":
            {
                XDCUnity.OpenPath(XDCUnity.eCATPath + "\\TransactionFlow\\XDC");
            }
            break;

            case "Config":
            {
                XDCUnity.OpenPath(XDCUnity.eCATPath + "\\Config");
            }
            break;

            case "Resource":
            {
                XDCUnity.OpenPath(XDCUnity.eCATPath + "\\Resource");
            }
            break;

            default:
                break;
            }
        }
Exemplo n.º 2
0
        private void Form_Main_Click(object sender, EventArgs e)
        {
            this.WindowState = FormWindowState.Minimized;
            string path        = ((ToolStripMenuItem)sender).ToolTipText;
            string currentPath = System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName;

            currentPath = currentPath.Substring(0, currentPath.LastIndexOf('\\'));
            if (!string.IsNullOrEmpty(path) &&
                path.Length > 2 &&
                path[1].ToString().Equals(":"))
            {
                //路径是类似c:\dd\..\..这样的绝对路径
                XDCUnity.OpenPath(path);
            }
            else
            {
                //相对路径
                XDCUnity.OpenPath(currentPath + path);
            }
        }
Exemplo n.º 3
0
        private void DDCServerToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ToolStripMenuItem tmi = sender as ToolStripMenuItem;

            switch (tmi.Text)
            {
            case "ATMC":
            case "DDCServer":
            case "DDCServer-2":
            case "NDCServer":
            case "NDCServer-2":
            case "VirtualDualHost":
            {
                isAlreadyNDC_1     = false;
                isAlreadyNDC_2     = false;
                isAlareadyDualHost = false;
                isAlreadyDDC_1     = false;
                isAlreadyDDC_2     = false;
                isATMC             = false;
                foreach (DockContent dockContent in dockPanel1.Contents)
                {
                    if (dockContent.Name.Equals("Form_NDCServer"))
                    {
                        isAlreadyNDC_1 = true;
                    }
                    else if (dockContent.Name.Equals("Form_NDCServer_2"))
                    {
                        isAlreadyNDC_2 = true;
                    }
                    else if (dockContent.Name.Equals("Form_DDCServer"))
                    {
                        isAlreadyDDC_1 = true;
                    }
                    else if (dockContent.Name.Equals("Form_DDCServe2"))
                    {
                        isAlreadyDDC_2 = true;
                    }
                    else if (dockContent.Name.Equals("Form_DualHost"))
                    {
                        isAlareadyDualHost = true;
                    }
                    else if (dockContent.Name.Equals("Form_Managerment"))
                    {
                        isATMC = true;
                    }
                    if (tmi.Text.Equals(dockContent.Text))
                    {
                        dockContent.Select();
                        break;
                    }
                }
                if (tmi.Text == "NDCServer_2" && !isAlreadyNDC_2)
                {
                    Form_NDCServer_2 form_NDCServer2 = new Form_NDCServer_2();
                    form_NDCServer2.Show(this.dockPanel1, DockState.Document);
                }
                else if (tmi.Text == "NDCServer" && !isAlreadyNDC_1)
                {
                    Form_NDCServer form_NDCServer1 = new Form_NDCServer();
                    form_NDCServer1.Show(this.dockPanel1, DockState.Document);
                }
                else if (tmi.Text == "DDCServer" && !isAlreadyDDC_1)
                {
                    Form_DDCServer form_DDCServer1 = new Form_DDCServer();
                    form_DDCServer1.Show(this.dockPanel1, DockState.Document);
                }
                else if (tmi.Text == "DDCServer_2" && !isAlreadyDDC_2)
                {
                    MessageBox.Show("Comming Soon...");
                }
                else if (tmi.Text == "VirtualDualHost" && !isAlareadyDualHost)
                {
                    Form_DualHost form_DualHost = new Form_DualHost();
                    form_DualHost.Show(this.dockPanel1, DockState.Document);
                }
                else if (tmi.Text == "ATMC" && !isATMC)
                {
                    form_managerMentMain.Show(this.dockPanel1, DockState.Document);
                }
            }
            break;

            case "SuperParse":
            {
                Form_Pars form_Pars = new Form_Pars();
                form_Pars.Show();
            }
            break;

            case "ScreenParse":
            {
                Form_ScreenParse form_screenPars = new Form_ScreenParse();
                form_screenPars.Show();
            }
            break;

            case "eCAT":
            {
                From_Seeting_eCATPath form_eCAT = new From_Seeting_eCATPath();
                form_eCAT.Show();
            }
            break;

            case "KilleCAT":
            {
                KilleCATFunc();
            }
            break;

            case "StarteCAT":
            {
                StarteCATFunc();
            }
            break;

            case "eCATConfigTool":
            {
                System.Threading.Thread eCATToolThread = new System.Threading.Thread(eCATConfigToolFunc);
                eCATToolThread.IsBackground = true;
                eCATToolThread.Start();
                //eCATConfigToolFunc();
            }
            break;

            case "Open-eCAT":
            {
                //打开eCAT路径
                XDCUnity.OpenPath(XDCUnity.eCATPath);
            }
            break;

            case "Open-XDCHost":
            {
                //打开当前主机路径
                XDCUnity.OpenPath(Environment.CurrentDirectory);
            }
            break;

            case "Open-TrueBack":
            {
                //打开当前主机路径
                CheckTrueBackPath();
                string truebackPath = XDCUnity.TrueBackPath;
                truebackPath = truebackPath.Substring(0, truebackPath.LastIndexOf('\\'));
                XDCUnity.OpenPath(truebackPath);
            }
            break;

            case "ErrorCode":
            {
                Form_ErrorCodeSearch form_errorcode = new Form_ErrorCodeSearch();
                form_errorcode.Show();
            }
            break;

            case "InteractiveBuffer":
            {
                new Form_GetInteractiveMsgTextToShow("").Show();
            }
            break;

            case "About":
            {
                new Form_About().ShowDialog();
            }
            break;

            case "ImportLogsToAutoReply":
            {
                new Form_ImportLogs().Show();
            }
            break;

            case "Exit":
            {
                this.Close();
            }
            break;

            case "C09":
            {
                new Form_C09().Show();
            }
            break;

            default:
                break;
            }
        }