コード例 #1
0
        private void button_editdp2KernelDef_Click(object sender, EventArgs e)
        {
            // string strError = "";

            InstallLibraryParamDlg param_dlg = new InstallLibraryParamDlg();

            GuiUtil.AutoSetDefaultFont(param_dlg);
            param_dlg.StartPosition = FormStartPosition.CenterScreen;
            if (this.LineInfo != null)
            {
                param_dlg.KernelUrl      = this.LineInfo.KernelUrl;
                param_dlg.ManageUserName = this.LineInfo.KernelUserName;
                param_dlg.ManagePassword = this.LineInfo.KernelPassword;
            }
            else
            {
                // param_dlg.KernelUrl = this.LineInfo.KernelUrl;
                param_dlg.ManageUserName = "******";  // 不能叫 supervisor ,那样容易和dpLibrary层的supervisor用户名混淆
                // param_dlg.ManagePassword = this.LineInfo.KernelPassword;
            }

            param_dlg.ShowDialog(this);
            if (param_dlg.DialogResult != DialogResult.OK)
            {
                return;
            }

            if (this.LineInfo == null)
            {
                this.LineInfo = new LineInfo();
            }

            this.LineInfo.KernelUrl      = param_dlg.KernelUrl;
            this.LineInfo.KernelUserName = param_dlg.ManageUserName;
            this.LineInfo.KernelPassword = param_dlg.ManagePassword;
            Refreshdp2KernelDef();
            return;

            /*
             * ERROR1:
             * MessageBox.Show(this, strError);
             * return;
             * */
        }
コード例 #2
0
ファイル: OneInstanceDialog.cs プロジェクト: paopaofeng/dp2
        private void button_editdp2KernelDef_Click(object sender, EventArgs e)
        {
            // string strError = "";

            InstallLibraryParamDlg param_dlg = new InstallLibraryParamDlg();
            GuiUtil.AutoSetDefaultFont(param_dlg);
            param_dlg.StartPosition = FormStartPosition.CenterScreen;
            if (this.LineInfo != null)
            {
                param_dlg.KernelUrl = this.LineInfo.KernelUrl;
                param_dlg.ManageUserName = this.LineInfo.KernelUserName;
                param_dlg.ManagePassword = this.LineInfo.KernelPassword;
            }
            else
            {
                // param_dlg.KernelUrl = this.LineInfo.KernelUrl;
                param_dlg.ManageUserName = "******";  // 不能叫 supervisor ,那样容易和dpLibrary层的supervisor用户名混淆
                // param_dlg.ManagePassword = this.LineInfo.KernelPassword;
            }

            param_dlg.ShowDialog(this);
            if (param_dlg.DialogResult != DialogResult.OK)
                return;

            if (this.LineInfo == null)
                this.LineInfo = new LineInfo();

            this.LineInfo.KernelUrl = param_dlg.KernelUrl;
            this.LineInfo.KernelUserName = param_dlg.ManageUserName;
            this.LineInfo.KernelPassword = param_dlg.ManagePassword;
            Refreshdp2KernelDef();
            return;
            /*
        ERROR1:
            MessageBox.Show(this, strError);
            return;
             * */
        }