// 选项。可为内置统计方案设置参数 private void button_option_Click(object sender, EventArgs e) { string name = this.comboBox_projectName.Text; switch (name) { case "#典藏移交清单": { TransferColumnOption option = new TransferColumnOption(Program.MainForm.UserDir); option.LoadData(Program.MainForm.AppInfo, ColumnDefPath); PrintOptionDlg dlg = new PrintOptionDlg(); MainForm.SetControlFont(dlg, this.Font, false); dlg.HidePage("tabPage_normal"); dlg.HidePage("tabPage_templates"); dlg.Text = "输出列配置"; dlg.PrintOption = option; dlg.DataDir = Program.MainForm.UserDir; dlg.ColumnItems = option.GetAllColumnItems(); dlg.UiState = Program.MainForm.AppInfo.GetString( "OperLogStatisForm", "columnDialog_uiState", ""); Program.MainForm.AppInfo.LinkFormState(dlg, "OperLogStatisForm_transferOption_formstate"); dlg.ShowDialog(this); Program.MainForm.AppInfo.UnlinkFormState(dlg); Program.MainForm.AppInfo.SetString( "OperLogStatisForm", "columnDialog_uiState", dlg.UiState); if (dlg.DialogResult != DialogResult.OK) { return; } option.SaveData(Program.MainForm.AppInfo, ColumnDefPath); } break; } }
private void button_orderColumns_Click(object sender, EventArgs e) { Order.EntityColumnOption option = new Order.EntityColumnOption(Program.MainForm.UserDir, ""); option.LoadData(Program.MainForm.AppInfo, EntityDefPath); PrintOptionDlg dlg = new PrintOptionDlg(); MainForm.SetControlFont(dlg, this.Font, false); dlg.HidePage("tabPage_normal"); dlg.HidePage("tabPage_templates"); dlg.Text = "册信息列"; dlg.PrintOption = option; dlg.DataDir = Program.MainForm.UserDir; dlg.ColumnItems = option.GetAllColumnItems(); dlg.UiState = Program.MainForm.AppInfo.GetString( "save_entity", "columnDialog_uiState", ""); Program.MainForm.AppInfo.LinkFormState(dlg, "distribute_order_outputoption_formstate"); dlg.ShowDialog(this); Program.MainForm.AppInfo.UnlinkFormState(dlg); Program.MainForm.AppInfo.SetString( "save_entity", "columnDialog_uiState", dlg.UiState); if (dlg.DialogResult != DialogResult.OK) { return; } option.SaveData(Program.MainForm.AppInfo, EntityDefPath); }