コード例 #1
0
        private void DupForm_FormClosed(object sender, FormClosedEventArgs e)
        {
            if (stop != null)      // 脱离关联
            {
                stop.Unregister(); // 和容器关联
                stop = null;
            }

            if (this.MainForm != null && this.MainForm.AppInfo != null)
            {
                this.MainForm.AppInfo.SetBoolean(
                    "dup_form",
                    "include_low_cols",
                    this.checkBox_includeLowCols.Checked);
                this.MainForm.AppInfo.SetBoolean(
                    "dup_form",
                    "return_all_records",
                    this.checkBox_returnAllRecords.Checked);

                this.MainForm.AppInfo.SetString(
                    "dup_form",
                    "projectname",
                    this.comboBox_projectName.Text);

                string strWidths = ListViewUtil.GetColumnWidthListString(this.listView_browse);
                this.MainForm.AppInfo.SetString(
                    "dup_form",
                    "browse_list_column_width",
                    strWidths);
            }

            this.Channels.BeforeLogin -= new BeforeLoginEventHandle(Channels_BeforeLogin);

            EventFinish.Set();
        }
コード例 #2
0
        private void DupForm_FormClosed(object sender, FormClosedEventArgs e)
        {
#if NO
            if (stop != null)      // 脱离关联
            {
                stop.Unregister(); // 和容器关联
                stop = null;
            }
#endif
            if (Program.MainForm != null && Program.MainForm.AppInfo != null)
            {
                Program.MainForm.AppInfo.SetBoolean(
                    "dup_form",
                    "include_low_cols",
                    this.checkBox_includeLowCols.Checked);
                Program.MainForm.AppInfo.SetBoolean(
                    "dup_form",
                    "return_all_records",
                    this.checkBox_returnAllRecords.Checked);

                Program.MainForm.AppInfo.SetString(
                    "dup_form",
                    "projectname",
                    this.comboBox_projectName.Text);

                string strWidths = ListViewUtil.GetColumnWidthListString(this.listView_browse);
                Program.MainForm.AppInfo.SetString(
                    "dup_form",
                    "browse_list_column_width",
                    strWidths);
            }

            EventFinish.Set();
        }
コード例 #3
0
ファイル: ChannelForm.cs プロジェクト: zhangandding/dp2
 private void ChannelForm_FormClosed(object sender, FormClosedEventArgs e)
 {
     if (Program.MainForm != null && Program.MainForm.AppInfo != null)
     {
         string strWidths = ListViewUtil.GetColumnWidthListString(this.listView_channel);
         Program.MainForm.AppInfo.SetString(
             "channel_form",
             "browse_list_column_width",
             strWidths);
     }
 }
コード例 #4
0
ファイル: ValueListDlg.cs プロジェクト: zhangandding/dp2
 private void ValueListDlg_FormClosed(object sender, FormClosedEventArgs e)
 {
     if (this.AppInfo != null)
     {
         string strWidths = ListViewUtil.GetColumnWidthListString(this.listView_valueList);
         this.AppInfo.SetString(
             "marceditor_valuelistdialog",
             "list_column_width",
             strWidths);
     }
 }
コード例 #5
0
        string GetUiState()
        {
            Hashtable table = new Hashtable();

            table["l_c_w"] = ListViewUtil.GetColumnWidthListString(this.listView_list);
            table["v_c_w"] = ListViewUtil.GetColumnWidthListString(this.listView_levels);

            table["s_c"] = GuiUtil.GetSplitterState(this.splitContainer1).ToString();
            table["l"]   = this.toolStripButton_wild.Checked == true ? "yes" : "no";

            return(StringUtil.BuildParameterString(table,
                                                   ';',
                                                   '='));
        }
コード例 #6
0
ファイル: InputItemBarcodeDialog.cs プロジェクト: zszqwe/dp2
        private void InputItemBarcodeDialog_FormClosed(object sender, FormClosedEventArgs e)
        {
            if (this.AppInfo != null)
            {
                if (this.columnHeader_volumeDisplay.Width == 0)
                {
                    this.columnHeader_volumeDisplay.Width = this.m_nOriginDisplayColumnWidth;
                }

                string strWidths = ListViewUtil.GetColumnWidthListString(this.listView_barcodes);
                this.AppInfo.SetString(
                    "input_item_barcode_dialog",
                    "list_column_width",
                    strWidths);
            }
        }
コード例 #7
0
        void SaveSize()
        {
            if (Program.MainForm != null && Program.MainForm.AppInfo != null)
            {
                // 保存splitContainer_main的状态
                Program.MainForm.SaveSplitterPos(
                    this.splitContainer_main,
                    "userform_state",
                    "splitContainer_main_ratio");

                string strWidths = ListViewUtil.GetColumnWidthListString(this.listView_users);
                Program.MainForm.AppInfo.SetString(
                    "user_form",
                    "amerced_list_column_width",
                    strWidths);
            }
        }
コード例 #8
0
        void ManageServers(bool bFirstRun)
        {
            ServersDlg dlg = new ServersDlg();

            MainForm.SetControlFont(dlg, this.DefaultFont);

            string strWidths = this.AppInfo.GetString(
                "serversdlg",
                "list_column_width",
                "");

            if (String.IsNullOrEmpty(strWidths) == false)
            {
                ListViewUtil.SetColumnHeaderWidth(dlg.ListView,
                                                  strWidths,
                                                  true);
            }

            ServerCollection newServers = Servers.Dup();

            if (bFirstRun == true)
            {
                dlg.Text = "首次运行: 请指定服务器参数";
            }
            dlg.Servers = newServers;
            this.AppInfo.LinkFormState(dlg, "serversdlg_state");
            dlg.ShowDialog(this);
            this.AppInfo.UnlinkFormState(dlg);

            strWidths = ListViewUtil.GetColumnWidthListString(dlg.ListView);
            this.AppInfo.SetString(
                "serversdlg",
                "list_column_width",
                strWidths);

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

            // this.Servers = newServers;
            this.Servers.Import(newServers);
        }
コード例 #9
0
        private void menuItem_serversCfg_Click(object sender, System.EventArgs e)
        {
            ServersDlg dlg = new ServersDlg();

            MainForm.SetControlFont(dlg, this.DefaultFont);

            ServerCollection newServers = Servers.Dup();

            string strWidths = this.AppInfo.GetString(
                "serversdlg",
                "list_column_width",
                "");

            if (String.IsNullOrEmpty(strWidths) == false)
            {
                ListViewUtil.SetColumnHeaderWidth(dlg.ListView,
                                                  strWidths,
                                                  true);
            }

            dlg.Servers = newServers;

            this.AppInfo.LinkFormState(dlg, "serversdlg_state");
            dlg.ShowDialog(this);
            this.AppInfo.UnlinkFormState(dlg);

            strWidths = ListViewUtil.GetColumnWidthListString(dlg.ListView);
            this.AppInfo.SetString(
                "serversdlg",
                "list_column_width",
                strWidths);

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

            // this.Servers = newServers;
            this.Servers.Import(newServers);

            // this.treeView_res.Servers = this.Servers;
            treeView_res.Fill(null);
        }
コード例 #10
0
ファイル: InvoiceSearchForm.cs プロジェクト: zszqwe/dp2
        private void InvoiceSearchForm_FormClosed(object sender, FormClosedEventArgs e)
        {
            if (Program.MainForm != null && Program.MainForm.AppInfo != null)
            {
                Program.MainForm.AppInfo.SetString(
                    this.DbType + "_search_form",
                    "from",
                    this.comboBox_from.Text);

                Program.MainForm.AppInfo.SetString(
                    this.DbType + "_search_form",
                    "match_style",
                    this.comboBox_matchStyle.Text);

                string strWidths = ListViewUtil.GetColumnWidthListString(this.listView_records);
                Program.MainForm.AppInfo.SetString(
                    this.DbType + "_search_form",
                    "record_list_column_width",
                    strWidths);
            }
        }
コード例 #11
0
 static string GetListViewState(ListView listview)
 {
     return(listview.GetType().ToString() + ":" + ListViewUtil.GetColumnWidthListString(listview));
 }