//メニュー選択時の処理 public void MenuOnClick(String cmd) { if (cmd.IndexOf("Option_") == 0) { if (RunMode == RunMode.Remote) { //Java fix RunMOde==Remoteの場合のメニュー処理 RemoteClient.MenuOnClick(cmd); } else { var oneOption = ListOption.Get(cmd.Substring(7)); if (oneOption != null) { var dlg = new OptionDlg(this, oneOption); if (DialogResult.OK == dlg.ShowDialog()) { //Ver5.8.6 Java fix //oneOption.Save(OptionIni.GetInstance()); oneOption.Save(IniDb); MenuOnClick("StartStop_Reload"); } } } } else if (cmd.IndexOf("Tool_") == 0) { if (RunMode == RunMode.Remote) { //Java fix RunMOde==Remoteの場合のメニュー処理 RemoteClient.MenuOnClick(cmd); } else { var nameTag = cmd.Substring(5); var oneTool = ListTool.Get(nameTag); if (oneTool == null) { return; } //BJD.EXE以外の場合、サーバオブジェクトへのポインタが必要になる OneServer oneServer = null; if (nameTag != "BJD") { oneServer = ListServer.Get(nameTag); if (oneServer == null) { return; } } ToolDlg dlg = oneTool.CreateDlg(oneServer); dlg.ShowDialog(); } } else if (cmd.IndexOf("StartStop_") == 0) { if (RunMode == RunMode.Remote) { //Java fix RunMOde==Remoteの場合のメニュー処理 RemoteClient.MenuOnClick(cmd); } else { switch (cmd) { case "StartStop_Start": Start(); break; case "StartStop_Stop": Stop(); break; case "StartStop_Restart": Stop(); Thread.Sleep(300); Start(); break; case "StartStop_Reload": Stop(); ListInitialize(); Start(); break; case "StartStop_Service": SetupService(); //サービスの設定 break; default: Util.RuntimeException(string.Format("cmd={0}", cmd)); break; } View.SetColor(); //ウインドのカラー初期化 Menu.SetEnable(); //状態に応じた有効・無効 } } else { switch (cmd) { case "File_LogClear": LogView.Clear(); break; case "File_LogCopy": LogView.SetClipboard(); break; case "File_Trace": TraceDlg.Open(); break; case "File_Exit": View.MainForm.Close(); break; case "Help_Version": var dlg = new VersionDlg(this); dlg.ShowDialog(); break; case "Help_Homepage": Process.Start(Define.WebHome()); break; case "Help_Document": Process.Start(Define.WebDocument()); break; case "Help_Support": Process.Start(Define.WebSupport()); break; } } }
//���j���[�I����̏��� public void MenuOnClick(String cmd) { if (cmd.IndexOf("Option_") == 0) { if (RunMode == RunMode.Remote) { //Java fix RunMOde==Remote�̏ꍇ�̃��j���[���� RemoteClient.MenuOnClick(cmd); } else { var oneOption = ListOption.Get(cmd.Substring(7)); if (oneOption != null) { var dlg = new OptionDlg(this, oneOption); if (DialogResult.OK == dlg.ShowDialog()) { //Ver5.8.6 Java fix //oneOption.Save(OptionIni.GetInstance()); oneOption.Save(IniDb); MenuOnClick("StartStop_Reload"); } } } } else if (cmd.IndexOf("Tool_") == 0) { if (RunMode == RunMode.Remote) { //Java fix RunMOde==Remote�̏ꍇ�̃��j���[���� RemoteClient.MenuOnClick(cmd); } else { var nameTag = cmd.Substring(5); var oneTool = ListTool.Get(nameTag); if (oneTool == null) { return; } //BJD.EXE�ȊO�̏ꍇ�A�T�[�o�I�u�W�F�N�g�ւ̃|�C���^���K�v�ɂȂ� OneServer oneServer = null; if (nameTag != "BJD") { oneServer = ListServer.Get(nameTag); if (oneServer == null) { return; } } ToolDlg dlg = oneTool.CreateDlg(oneServer); dlg.ShowDialog(); } } else if (cmd.IndexOf("StartStop_") == 0) { if (RunMode == RunMode.Remote) { //Java fix RunMOde==Remote�̏ꍇ�̃��j���[���� RemoteClient.MenuOnClick(cmd); } else { switch (cmd) { case "StartStop_Start": Start(); break; case "StartStop_Stop": Stop(); break; case "StartStop_Restart": Stop(); Thread.Sleep(300); Start(); break; case "StartStop_Reload": Stop(); ListInitialize(); Start(); break; case "StartStop_Service": SetupService(); //�T�[�r�X�̐ݒ� break; default: Util.RuntimeException(string.Format("cmd={0}", cmd)); break; } View.SetColor(); //�E�C���h�̃J���[������ Menu.SetEnable(); //��Ԃɉ������L���E���� } } else { switch (cmd) { case "File_LogClear": LogView.Clear(); break; case "File_LogCopy": LogView.SetClipboard(); break; case "File_Trace": TraceDlg.Open(); break; case "File_Exit": View.MainForm.Close(); break; case "Help_Version": var dlg = new VersionDlg(this); dlg.ShowDialog(); break; case "Help_Homepage": Process.Start(Define.WebHome()); break; case "Help_Document": Process.Start(Define.WebDocument()); break; case "Help_Support": Process.Start(Define.WebSupport()); break; } } }
private void PictureBoxClick(object sender, EventArgs e) { Process.Start(Define.WebHome()); }