コード例 #1
0
        private void button_findServer_Click(object sender, EventArgs e)
        {
            // 选择目标服务器
            OpenResDlg dlg = new OpenResDlg();

            dlg.Text           = "请选择服务器";
            dlg.EnabledIndices = new int[] { ResTree.RESTYPE_SERVER };
            dlg.ap             = this.SearchPanel.ap;
            dlg.ApCfgTitle     = "getlinkdbdlg_findserver";
            dlg.Path           = this.textBox_serverUrl.Text;
            dlg.Initial(this.SearchPanel.Servers,
                        this.SearchPanel.Channels);
            dlg.ShowDialog(this);

            if (dlg.DialogResult != DialogResult.OK)
            {
                return;
            }

            this.ServerUrl = dlg.Path;

            //

            string strError = "";
            int    nRet     = this.GetGlobalCfgFile(out strError);

            if (nRet == -1)
            {
                MessageBox.Show(this, strError);
                return;
            }

            FillList();
        }
コード例 #2
0
        private void button_findServerUrl_Click(object sender, EventArgs e)
        {
            OpenResDlg dlg = new OpenResDlg();

            dlg.Text           = "请选择主服务器";
            dlg.EnabledIndices = new int[] { ResTree.RESTYPE_SERVER };
            dlg.ap             = this.SearchPanel.ap;
            dlg.ApCfgTitle     = "findServerUrl_openresdlg";
            dlg.MultiSelect    = false;
            dlg.Path           = this.textBox_serverUrl.Text;
            dlg.Initial(this.SearchPanel.Servers,
                        this.SearchPanel.Channels);
            dlg.ShowDialog(this);

            if (dlg.DialogResult != DialogResult.OK)
            {
                return;
            }

            textBox_serverUrl.Text = dlg.Path;

            // 填充list内容
            if (this.ServerUrl != "")
            {
                int    nRet     = 0;
                string strError = "";

                Cursor oldCursor = this.Cursor;
                this.Cursor = Cursors.WaitCursor;

                try
                {
                    nRet = GetDupCfgFile(out strError);
                }
                finally
                {
                    this.Cursor = oldCursor;
                }

                if (nRet == -1)
                {
                    MessageBox.Show(this, strError);
                    return;
                }

                FillList();

                this.textBox_projectName.Text = "";
            }
        }
コード例 #3
0
        private void button_findServerUrl_Click(object sender, EventArgs e)
        {
            OpenResDlg dlg = new OpenResDlg();

            dlg.Text           = "请选择服务器";
            dlg.EnabledIndices = new int[] { ResTree.RESTYPE_SERVER };
            dlg.Path           = textBox_serverUrl.Text;
            dlg.Initial(this.SearchPanel.Servers,
                        this.SearchPanel.Channels);
            dlg.StartPosition = FormStartPosition.CenterScreen;
            dlg.ShowDialog(this);

            if (dlg.DialogResult != DialogResult.OK)
            {
                return;
            }

            this.textBox_serverUrl.Text = dlg.Path;
        }
コード例 #4
0
        private void button_findOverwriteDbName_Click(object sender, System.EventArgs e)
        {
            OpenResDlg dlg = new OpenResDlg();

            dlg.Text           = "请选择要覆盖的目标数据库";
            dlg.EnabledIndices = new int[] { ResTree.RESTYPE_DB };
            //dlg.ap = this.applicationInfo;
            //dlg.ApCfgTitle = "pageimport_openresdlg";
            dlg.MultiSelect = false;
            dlg.Path        = textBox_overwriteDbName.Text;
            dlg.Initial(this.Servers,
                        this.Channels);
            dlg.StartPosition = FormStartPosition.CenterScreen;
            dlg.ShowDialog(this);

            if (dlg.DialogResult != DialogResult.OK)
            {
                return;
            }

            textBox_overwriteDbName.Text = dlg.Path;
        }
コード例 #5
0
        private void button_findTarget_Click(object sender, System.EventArgs e)
        {
            OpenResDlg dlg = new OpenResDlg();

            dlg.Font = GuiUtil.GetDefaultFont();

            dlg.Text           = "请选择目标数据库";
            dlg.EnabledIndices = new int[] { ResTree.RESTYPE_DB };
            dlg.ap             = this.SearchPanel.ap;
            dlg.ApCfgTitle     = "dbnamemapitemdlg_origin";
            dlg.MultiSelect    = false;
            dlg.Path           = this.textBox_target.Text;
            dlg.Initial(this.SearchPanel.Servers,
                        this.SearchPanel.Channels);
            // dlg.StartPositon = FormStartPosition.CenterScreen;
            dlg.ShowDialog(this);

            if (dlg.DialogResult != DialogResult.OK)
            {
                return;
            }

            textBox_target.Text = dlg.Path;
        }
コード例 #6
0
        private void button_findPinyinDbPath_Click(object sender, EventArgs e)
        {
            // 选择目标数据库
            OpenResDlg dlg = new OpenResDlg();

            dlg.Font = GuiUtil.GetDefaultFont();

            dlg.Text           = "请选择拼音库";
            dlg.EnabledIndices = new int[] { ResTree.RESTYPE_DB };
            dlg.ap             = this.MainForm.AppInfo;
            dlg.ApCfgTitle     = "preferencedlg_findpinyinpathdlg";
            dlg.Path           = this.textBox_pinyin_pinyinDbPath.Text;
            dlg.Initial(MainForm.Servers,
                        MainForm.SearchPanel.Channels);
            // dlg.StartPosition = FormStartPosition.CenterScreen;
            dlg.ShowDialog(this);

            if (dlg.DialogResult != DialogResult.OK)
            {
                return;
            }

            this.textBox_pinyin_pinyinDbPath.Text = dlg.Path;
        }