Example #1
0
        private void toolStripButton_option_Click(object sender, EventArgs e)
        {
            EntityFormOptionDlg dlg = new EntityFormOptionDlg();

            MainForm.SetControlFont(dlg, this.Font, false);
            // dlg.MainForm = Program.MainForm;
            dlg.DisplayStyle  = "normal_entity";
            dlg.StartPosition = FormStartPosition.CenterScreen;
            dlg.ShowDialog(this);
        }
Example #2
0
        private void button_defaultEntityFields_Click(object sender, EventArgs e)
        {
            EntityFormOptionDlg dlg = new EntityFormOptionDlg();

            MainForm.SetControlFont(dlg, this.Font, false);
            dlg.DisplayStyle  = "quick_entity";
            dlg.StartPosition = FormStartPosition.CenterScreen;
            dlg.ShowDialog(this);

            if (dlg.DialogResult == DialogResult.Cancel)
            {
                return;
            }

            // 批次号可能被对话框修改,需要刷新
            this.textBox_general_batchNo.Text = EntityFormOptionDlg.GetFieldValue("quickRegister_default",
                                                                                  "batchNo");
        }
Example #3
0
 private void button_option_Click(object sender, EventArgs e)
 {
     EntityFormOptionDlg dlg = new EntityFormOptionDlg();
     MainForm.SetControlFont(dlg, this.Font, false);
     dlg.MainForm = this.MainForm;
     dlg.StartPosition = FormStartPosition.CenterScreen;
     dlg.ShowDialog(this);
 }
Example #4
0
 private void button_settings_entityDefault_Click(object sender, EventArgs e)
 {
     EntityFormOptionDlg dlg = new EntityFormOptionDlg();
     MainForm.SetControlFont(dlg, this.Font, false);
     dlg.MainForm = this.MainForm;
     dlg.DisplayStyle = "quick_entity";
     dlg.StartPosition = FormStartPosition.CenterScreen;
     dlg.ShowDialog(this);
 }
Example #5
0
        private void button_OK_Click(object sender, EventArgs e)
        {
            Debug.Assert(this.AppInfo != null, "");

#if NO
            this.AppInfo.SetString(
                "binding_form",
                "accept_batchno",
                this.textBox_general_acceptBatchNo.Text);
#endif
            // 批次号需要保存到默认值模板
            EntityFormOptionDlg.SetFieldValue("quickRegister_default",
                                              "batchNo",
                                              this.textBox_general_batchNo.Text);

            this.AppInfo.SetString(
                "binding_form",
                "splitter_direction",
                this.comboBox_ui_splitterDirection.Text);

            // 显示订购信息坐标值
            this.AppInfo.SetBoolean(
                "binding_form",
                "display_orderinfoxy",
                this.checkBox_ui_displayOrderInfoXY.Checked);

            // 显示分馆外订购信息
            this.AppInfo.SetBoolean(
                "binding_form",
                "display_lockedOrderGroup",
                this.checkBox_ui_displayLockedOrderGroup.Checked);

            // 册格子内容行
            if (this.m_bCellContentsChanged == true)
            {
                string strLinesCfg = GetCellContentList();
                string strDefault  = string.Join(",", this.DefaultTextLineNames);
                if (strLinesCfg == strDefault)
                {
                    strLinesCfg = "";
                }

                this.AppInfo.SetString(
                    "binding_form",
                    "cell_lines_cfg",
                    strLinesCfg);
            }

            // 组格子内容行
            if (this.m_bGroupContentsChanged == true)
            {
                string strLinesCfg = GetGroupContentList();
                string strDefault  = string.Join(",", this.DefaultGroupTextLineNames);
                if (strLinesCfg == strDefault)
                {
                    strLinesCfg = "";
                }

                this.AppInfo.SetString(
                    "binding_form",
                    "group_lines_cfg",
                    strLinesCfg);
            }

            this.DialogResult = DialogResult.OK;
            this.Close();
        }
Example #6
0
 private void textBox_general_acceptBatchNo_Leave(object sender, EventArgs e)
 {
     EntityFormOptionDlg.SetFieldValue("quickRegister_default",
                                       "batchNo",
                                       this.textBox_general_batchNo.Text);
 }
Example #7
0
        private void BindingOptionDialog_Load(object sender, EventArgs e)
        {
            Debug.Assert(this.AppInfo != null, "");

#if NO
            // 验收批次号
            this.textBox_general_acceptBatchNo.Text = this.AppInfo.GetString(
                "binding_form",
                "accept_batchno",
                "");
#endif

            // 批次号需要从默认值模板里面获得
            this.textBox_general_batchNo.Text = EntityFormOptionDlg.GetFieldValue("quickRegister_default",
                                                                                  "batchNo");

            // 编辑区布局方式
            this.comboBox_ui_splitterDirection.Text = this.AppInfo.GetString(
                "binding_form",
                "splitter_direction",
                "水平");

            // 显示订购信息坐标值
            this.checkBox_ui_displayOrderInfoXY.Checked = this.AppInfo.GetBoolean(
                "binding_form",
                "display_orderinfoxy",
                false);

            // 显示分馆外订购组
            this.checkBox_ui_displayLockedOrderGroup.Checked = this.AppInfo.GetBoolean(
                "binding_form",
                "display_lockedOrderGroup",
                true);

            // 册格子内容行
            {
                string strLinesCfg = this.AppInfo.GetString(
                    "binding_form",
                    "cell_lines_cfg",
                    "");
                if (string.IsNullOrEmpty(strLinesCfg) == true &&
                    this.DefaultTextLineNames != null)
                {
                    strLinesCfg = string.Join(",", this.DefaultTextLineNames);
                }

                FillCellContentsList(strLinesCfg);
            }

            // 组格子内容行
            {
                string strLinesCfg = this.AppInfo.GetString(
                    "binding_form",
                    "group_lines_cfg",
                    "");
                if (string.IsNullOrEmpty(strLinesCfg) == true &&
                    this.DefaultGroupTextLineNames != null)
                {
                    strLinesCfg = string.Join(",", this.DefaultGroupTextLineNames);
                }

                FillGroupContentsList(strLinesCfg);
            }
        }