📄 runreportconfigview.cs
字号:
this.tabPage_visible.Controls.Add(this.groupBox_display);
this.tabPage_visible.ImageIndex = 2;
this.tabPage_visible.ImeMode = System.Windows.Forms.ImeMode.On;
this.tabPage_visible.Location = new System.Drawing.Point(4, 23);
this.tabPage_visible.Name = "tabPage_visible";
this.tabPage_visible.Size = new System.Drawing.Size(392, 133);
this.tabPage_visible.TabIndex = 0;
this.tabPage_visible.Text = "对象可见性";
//
// groupBox_display
//
this.groupBox_display.Controls.Add(this.radioButton_Show);
this.groupBox_display.Controls.Add(this.radioButton_Hide);
this.groupBox_display.Controls.Add(this.groupBox_movedirection);
this.groupBox_display.Location = new System.Drawing.Point(-3, -8);
this.groupBox_display.Name = "groupBox_display";
this.groupBox_display.Size = new System.Drawing.Size(395, 144);
this.groupBox_display.TabIndex = 0;
this.groupBox_display.TabStop = false;
//
// radioButton_Show
//
this.radioButton_Show.Checked = true;
this.radioButton_Show.Location = new System.Drawing.Point(47, 12);
this.radioButton_Show.Name = "radioButton_Show";
this.radioButton_Show.Size = new System.Drawing.Size(159, 23);
this.radioButton_Show.TabIndex = 7;
this.radioButton_Show.TabStop = true;
this.radioButton_Show.Text = "显示--可见,报表中出现";
this.radioButton_Show.CheckedChanged += new System.EventHandler(this.radioButton_Show_CheckedChanged);
//
// radioButton_Hide
//
this.radioButton_Hide.Location = new System.Drawing.Point(47, 34);
this.radioButton_Hide.Name = "radioButton_Hide";
this.radioButton_Hide.Size = new System.Drawing.Size(184, 23);
this.radioButton_Hide.TabIndex = 6;
this.radioButton_Hide.Text = "隐藏--不可见,报表中不出现";
//
// groupBox_movedirection
//
this.groupBox_movedirection.Controls.Add(this.checkBox_movepageheaderctl);
this.groupBox_movedirection.Controls.Add(this.radioButton_leftmove);
this.groupBox_movedirection.Controls.Add(this.radioButton_notmove);
this.groupBox_movedirection.Controls.Add(this.radioButton_upmove);
this.groupBox_movedirection.Enabled = false;
this.groupBox_movedirection.Location = new System.Drawing.Point(7, 61);
this.groupBox_movedirection.Name = "groupBox_movedirection";
this.groupBox_movedirection.Size = new System.Drawing.Size(376, 68);
this.groupBox_movedirection.TabIndex = 5;
this.groupBox_movedirection.TabStop = false;
this.groupBox_movedirection.Text = "隐藏时,布局变动方式";
//
// radioButton_leftmove
//
this.radioButton_leftmove.Checked = true;
this.radioButton_leftmove.Location = new System.Drawing.Point(16, 20);
this.radioButton_leftmove.Name = "radioButton_leftmove";
this.radioButton_leftmove.Size = new System.Drawing.Size(152, 20);
this.radioButton_leftmove.TabIndex = 0;
this.radioButton_leftmove.TabStop = true;
this.radioButton_leftmove.Text = "右边的控件向左移动";
this.radioButton_leftmove.CheckedChanged += new System.EventHandler(this.radioButton_leftmove_CheckedChanged);
//
// radioButton_notmove
//
this.radioButton_notmove.Location = new System.Drawing.Point(154, 42);
this.radioButton_notmove.Name = "radioButton_notmove";
this.radioButton_notmove.Size = new System.Drawing.Size(152, 21);
this.radioButton_notmove.TabIndex = 0;
this.radioButton_notmove.Text = "不改变原布局";
//
// radioButton_upmove
//
this.radioButton_upmove.Location = new System.Drawing.Point(16, 41);
this.radioButton_upmove.Name = "radioButton_upmove";
this.radioButton_upmove.Size = new System.Drawing.Size(152, 24);
this.radioButton_upmove.TabIndex = 0;
this.radioButton_upmove.Text = "下方的控件向上移";
//
// tabPage_dataconfig
//
this.tabPage_dataconfig.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.tabPage_dataconfig.Controls.Add(this.groupBox_dataconfig);
this.tabPage_dataconfig.ImageIndex = 3;
this.tabPage_dataconfig.Location = new System.Drawing.Point(4, 23);
this.tabPage_dataconfig.Name = "tabPage_dataconfig";
this.tabPage_dataconfig.Size = new System.Drawing.Size(392, 133);
this.tabPage_dataconfig.TabIndex = 1;
this.tabPage_dataconfig.Text = "数据及外观";
this.tabPage_dataconfig.Visible = false;
//
// groupBox_dataconfig
//
this.groupBox_dataconfig.Controls.Add(this.groupBox_datafield);
this.groupBox_dataconfig.Controls.Add(this.button_format);
this.groupBox_dataconfig.Controls.Add(this.button_style);
this.groupBox_dataconfig.Controls.Add(this.button_color);
this.groupBox_dataconfig.Location = new System.Drawing.Point(-5, -6);
this.groupBox_dataconfig.Name = "groupBox_dataconfig";
this.groupBox_dataconfig.Size = new System.Drawing.Size(396, 152);
this.groupBox_dataconfig.TabIndex = 0;
this.groupBox_dataconfig.TabStop = false;
//
// groupBox_datafield
//
this.groupBox_datafield.Controls.Add(this.comboBox_datafield);
this.groupBox_datafield.Controls.Add(this.label8);
this.groupBox_datafield.Location = new System.Drawing.Point(8, 2);
this.groupBox_datafield.Name = "groupBox_datafield";
this.groupBox_datafield.Size = new System.Drawing.Size(385, 40);
this.groupBox_datafield.TabIndex = 11;
this.groupBox_datafield.TabStop = false;
//
// comboBox_datafield
//
this.comboBox_datafield.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comboBox_datafield.Location = new System.Drawing.Point(157, 13);
this.comboBox_datafield.Name = "comboBox_datafield";
this.comboBox_datafield.Size = new System.Drawing.Size(223, 20);
this.comboBox_datafield.TabIndex = 9;
this.comboBox_datafield.SelectedIndexChanged += new System.EventHandler(this.comboBox_datafield_SelectedIndexChanged);
//
// label8
//
this.label8.Location = new System.Drawing.Point(5, 18);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(160, 16);
this.label8.TabIndex = 8;
this.label8.Text = "绑定的数据项(datafield):";
//
// button_format
//
this.button_format.Location = new System.Drawing.Point(49, 45);
this.button_format.Name = "button_format";
this.button_format.Size = new System.Drawing.Size(248, 24);
this.button_format.TabIndex = 10;
this.button_format.Text = "(改变)数据的显示格式(format)";
this.button_format.Click += new System.EventHandler(this.button_format_Click);
//
// button_style
//
this.button_style.Location = new System.Drawing.Point(49, 77);
this.button_style.Name = "button_style";
this.button_style.Size = new System.Drawing.Size(248, 24);
this.button_style.TabIndex = 9;
this.button_style.Text = "(改变)数据的显示风格(style)";
this.button_style.Click += new System.EventHandler(this.button_style_Click);
//
// button_color
//
this.button_color.Location = new System.Drawing.Point(49, 109);
this.button_color.Name = "button_color";
this.button_color.Size = new System.Drawing.Size(248, 24);
this.button_color.TabIndex = 8;
this.button_color.Text = "配置(改变)数据的显示颜色(color)";
this.button_color.Click += new System.EventHandler(this.button_color_Click);
//
// tabPage_miltilang
//
this.tabPage_miltilang.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.tabPage_miltilang.Controls.Add(this.groupBox_languish);
this.tabPage_miltilang.ImageIndex = 4;
this.tabPage_miltilang.Location = new System.Drawing.Point(4, 23);
this.tabPage_miltilang.Name = "tabPage_miltilang";
this.tabPage_miltilang.Size = new System.Drawing.Size(392, 133);
this.tabPage_miltilang.TabIndex = 2;
this.tabPage_miltilang.Text = "多语种标题";
this.tabPage_miltilang.Visible = false;
//
// groupBox_languish
//
this.groupBox_languish.Controls.Add(this.textBox_HKchinsestext);
this.groupBox_languish.Controls.Add(this.label4);
this.groupBox_languish.Controls.Add(this.textBox_chinesetext);
this.groupBox_languish.Controls.Add(this.label3);
this.groupBox_languish.Controls.Add(this.textBox_englishtext);
this.groupBox_languish.Controls.Add(this.label2);
this.groupBox_languish.Enabled = false;
this.groupBox_languish.Location = new System.Drawing.Point(8, 16);
this.groupBox_languish.Name = "groupBox_languish";
this.groupBox_languish.Size = new System.Drawing.Size(376, 96);
this.groupBox_languish.TabIndex = 2;
this.groupBox_languish.TabStop = false;
this.groupBox_languish.Text = "标题内容(显示文本)";
//
// textBox_HKchinsestext
//
this.textBox_HKchinsestext.Location = new System.Drawing.Point(44, 69);
this.textBox_HKchinsestext.Name = "textBox_HKchinsestext";
this.textBox_HKchinsestext.Size = new System.Drawing.Size(326, 21);
this.textBox_HKchinsestext.TabIndex = 9;
this.textBox_HKchinsestext.Text = "";
this.textBox_HKchinsestext.TextChanged += new System.EventHandler(this.textBox_HKchinsestext_TextChanged);
//
// label4
//
this.label4.Location = new System.Drawing.Point(5, 73);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(56, 16);
this.label4.TabIndex = 8;
this.label4.Text = "繁中:";
//
// textBox_chinesetext
//
this.textBox_chinesetext.Location = new System.Drawing.Point(44, 42);
this.textBox_chinesetext.Name = "textBox_chinesetext";
this.textBox_chinesetext.Size = new System.Drawing.Size(326, 21);
this.textBox_chinesetext.TabIndex = 7;
this.textBox_chinesetext.Text = "";
this.textBox_chinesetext.TextChanged += new System.EventHandler(this.textBox_chinesetext_TextChanged);
//
// label3
//
this.label3.Location = new System.Drawing.Point(5, 47);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(56, 16);
this.label3.TabIndex = 6;
this.label3.Text = "简中:";
//
// textBox_englishtext
//
this.textBox_englishtext.Location = new System.Drawing.Point(44, 17);
this.textBox_englishtext.Name = "textBox_englishtext";
this.textBox_englishtext.Size = new System.Drawing.Size(326, 21);
this.textBox_englishtext.TabIndex = 5;
this.textBox_englishtext.Text = "";
this.textBox_englishtext.TextChanged += new System.EventHandler(this.textBox_englishtext_TextChanged);
//
// label2
//
this.label2.Location = new System.Drawing.Point(5, 22);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(56, 16);
this.label2.TabIndex = 4;
this.label2.Text = "英语:";
//
// checkBox_movepageheaderctl
//
this.checkBox_movepageheaderctl.Location = new System.Drawing.Point(154, 18);
this.checkBox_movepageheaderctl.Name = "checkBox_movepageheaderctl";
this.checkBox_movepageheaderctl.Size = new System.Drawing.Size(206, 20);
this.checkBox_movepageheaderctl.TabIndex = 1;
this.checkBox_movepageheaderctl.Text = "移动报表头/尾、页头/脚中的控件";
this.checkBox_movepageheaderctl.CheckedChanged += new System.EventHandler(this.checkBox_movepageheaderctl_CheckedChanged);
//
// RunReportConfigView
//
this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
this.ClientSize = new System.Drawing.Size(648, 365);
this.ControlBox = false;
this.Controls.Add(this.panel_attribute);
this.Controls.Add(this.splitter1);
this.Controls.Add(this.listView_configcontrol);
this.Controls.Add(this.toolBar_config);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaximizeBox = false;
this.MaximumSize = new System.Drawing.Size(656, 392);
this.MinimizeBox = false;
this.MinimumSize = new System.Drawing.Size(656, 392);
this.Name = "RunReportConfigView";
this.ShowInTaskbar = false;
this.Text = "报表配置视图";
this.Load += new System.EventHandler(this.RunReportConfigView_Load);
this.panel_attribute.ResumeLayout(false);
this.groupBox1.ResumeLayout(false);
this.tabControl_configs.ResumeLayout(false);
this.tabPage_visible.ResumeLayout(false);
this.groupBox_display.ResumeLayout(false);
this.groupBox_movedirection.ResumeLayout(false);
this.tabPage_dataconfig.ResumeLayout(false);
this.groupBox_dataconfig.ResumeLayout(false);
this.groupBox_datafield.ResumeLayout(false);
this.tabPage_miltilang.ResumeLayout(false);
this.groupBox_languish.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
/// <summary>
/// newconfig() -- 从对象树中选择要配置的对象。
/// </summary>
private void newconfig()
{
RunReportExploreForCfg exploredlg = new RunReportExploreForCfg();
exploredlg.initExploreForCfg(currentreport,reportinfo);
//选择配置的控件
string control_id = "";
if (exploredlg.ShowDialog(this) == DialogResult.OK)
{
control_id = exploredlg.selectcontrlid;
}
exploredlg.Dispose();
if((""+control_id).Length==0)
return;
//查看可配置信息
DataRow configurablerow = reportinfo.getConfigurableRow(control_id);
if(configurablerow==null)
return;
//新增新的配置项(记录)
System.Data.DataRow rw = this.reportinfo.getConfigInfo().NewRow();
rw["ReportID"] = reportid;
rw["ControlID"] = control_id;
rw["DisplayConfigVal"] = configurablerow["DisplayDefaultVal"]; //显示/隐藏
rw["DataFieldConfigVal"] = ""; //选择的数据域
rw["FormatConfigVal"] = "";
rw["StyleConfigVal"] = "";
rw["ColorConfigVal"] = "";
rw["UserELabelCaption"] = configurablerow["ELabelCaption"];
rw["UserCLabelCaption"] = configurablerow["CLabelCaption"];
rw["UserHLabelCaption"] = configurablerow["HLabelCaption"];
rw["SuccCtlMoveDirect"] = "left";
this.reportinfo.getConfigInfo().Rows.Add(rw);
ListViewItem item = listView_configcontrol.Items.Add(control_id +" ["+ configurablerow["CName"] +"]",1);
item.Tag = rw;
item.Selected = true;
//initLeftView();
}
/// <summary>
/// delconfig() -- 删除配置
/// </summary>
private void delconfig()
{
if (listView_configcontrol.SelectedItems.Count>0)
{
DataRow rw = (DataRow)listView_configcontrol.SelectedItems[0].Tag;
//reportinfo.configdata.Rows.Remove(rw);//不能用remove删,否则更新不了
rw.Delete();
listView_configcontrol.SelectedItems[0].Remove();
}
}
/// <summary>
/// toolBar_config_ButtonClick -- 点击了工具按钮
/// </summary>
private void toolBar_config_ButtonClick(object sender, System.Windows.Forms.ToolBarButtonClickEventArgs e)
{
if (e.Button.Tag.ToString().Equals("newcfg"))
{
newconfig();
}
if (e.Button.Tag.ToString().Equals("delcfg"))
{
delconfig();
}
if (e.Button.Tag.ToString().Equals("exit"))
{
//- 取消当前的所有修改
reportinfo.getConfigInfo().RejectChanges();
DialogResult = DialogResult.Cancel;
this.Close();
}
if (e.Button.Tag.ToString().Equals("save"))
{
// 保存配置
reportinfo.saveUserConfigInfo();
DialogResult = DialogResult.OK;
this.Close();
}
}
/// <summary>
/// RunReportConfigView_Load -- 初始化左边列表视图
/// </summary>
private void RunReportConfigView_Load(object sender, System.EventArgs e)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -