📄 designreportconfigview.cs
字号:
this.label7.Size = new System.Drawing.Size(56, 16);
this.label7.TabIndex = 4;
this.label7.Text = "英语:";
//
// tabControl_configs
//
this.tabControl_configs.Controls.Add(this.tabPage_visible);
this.tabControl_configs.Controls.Add(this.tabPage_dataconfig);
this.tabControl_configs.Controls.Add(this.tabPage_miltilang);
this.tabControl_configs.Location = new System.Drawing.Point(16, 152);
this.tabControl_configs.Name = "tabControl_configs";
this.tabControl_configs.SelectedIndex = 0;
this.tabControl_configs.Size = new System.Drawing.Size(400, 160);
this.tabControl_configs.TabIndex = 6;
//
// tabPage_visible
//
this.tabPage_visible.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.tabPage_visible.Controls.Add(this.checkBox_DisplaySelectable);
this.tabPage_visible.Controls.Add(this.groupBox_DisplayOption);
this.tabPage_visible.ImeMode = System.Windows.Forms.ImeMode.On;
this.tabPage_visible.Location = new System.Drawing.Point(4, 21);
this.tabPage_visible.Name = "tabPage_visible";
this.tabPage_visible.Size = new System.Drawing.Size(392, 135);
this.tabPage_visible.TabIndex = 0;
this.tabPage_visible.Text = "可见的可选性";
//
// checkBox_DisplaySelectable
//
this.checkBox_DisplaySelectable.Location = new System.Drawing.Point(16, 13);
this.checkBox_DisplaySelectable.Name = "checkBox_DisplaySelectable";
this.checkBox_DisplaySelectable.Size = new System.Drawing.Size(240, 24);
this.checkBox_DisplaySelectable.TabIndex = 2;
this.checkBox_DisplaySelectable.Text = "用户可以选择显示或隐藏此项";
this.checkBox_DisplaySelectable.CheckedChanged += new System.EventHandler(this.checkBox_DisplaySelectable_CheckedChanged);
//
// groupBox_DisplayOption
//
this.groupBox_DisplayOption.Controls.Add(this.radioButton_DefaultShow);
this.groupBox_DisplayOption.Controls.Add(this.radioButton_DefaultHide);
this.groupBox_DisplayOption.Enabled = false;
this.groupBox_DisplayOption.Location = new System.Drawing.Point(14, 42);
this.groupBox_DisplayOption.Name = "groupBox_DisplayOption";
this.groupBox_DisplayOption.Size = new System.Drawing.Size(258, 80);
this.groupBox_DisplayOption.TabIndex = 1;
this.groupBox_DisplayOption.TabStop = false;
this.groupBox_DisplayOption.Text = "默认配置";
//
// radioButton_DefaultShow
//
this.radioButton_DefaultShow.Checked = true;
this.radioButton_DefaultShow.Location = new System.Drawing.Point(16, 16);
this.radioButton_DefaultShow.Name = "radioButton_DefaultShow";
this.radioButton_DefaultShow.Size = new System.Drawing.Size(216, 23);
this.radioButton_DefaultShow.TabIndex = 2;
this.radioButton_DefaultShow.TabStop = true;
this.radioButton_DefaultShow.Text = "显示---用户没有进行配置时,可见";
this.radioButton_DefaultShow.CheckedChanged += new System.EventHandler(this.radioButton_DefaultShow_CheckedChanged);
//
// radioButton_DefaultHide
//
this.radioButton_DefaultHide.Location = new System.Drawing.Point(16, 48);
this.radioButton_DefaultHide.Name = "radioButton_DefaultHide";
this.radioButton_DefaultHide.Size = new System.Drawing.Size(232, 23);
this.radioButton_DefaultHide.TabIndex = 2;
this.radioButton_DefaultHide.Text = "隐藏---用户没有进行配置时,不可见";
//
// tabPage_dataconfig
//
this.tabPage_dataconfig.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.tabPage_dataconfig.Controls.Add(this.checkBox_style);
this.tabPage_dataconfig.Controls.Add(this.checkBox_datafield);
this.tabPage_dataconfig.Controls.Add(this.checkBox_format);
this.tabPage_dataconfig.Controls.Add(this.checkBox_color);
this.tabPage_dataconfig.Location = new System.Drawing.Point(4, 21);
this.tabPage_dataconfig.Name = "tabPage_dataconfig";
this.tabPage_dataconfig.Size = new System.Drawing.Size(392, 135);
this.tabPage_dataconfig.TabIndex = 1;
this.tabPage_dataconfig.Text = "数据的可配性";
this.tabPage_dataconfig.Visible = false;
//
// checkBox_style
//
this.checkBox_style.Location = new System.Drawing.Point(16, 64);
this.checkBox_style.Name = "checkBox_style";
this.checkBox_style.Size = new System.Drawing.Size(312, 24);
this.checkBox_style.TabIndex = 1;
this.checkBox_style.Text = "用户可以配置(改变)数据的显示风格(style)";
this.checkBox_style.CheckedChanged += new System.EventHandler(this.checkBox_style_CheckedChanged);
//
// checkBox_datafield
//
this.checkBox_datafield.Location = new System.Drawing.Point(16, 12);
this.checkBox_datafield.Name = "checkBox_datafield";
this.checkBox_datafield.Size = new System.Drawing.Size(304, 24);
this.checkBox_datafield.TabIndex = 0;
this.checkBox_datafield.Text = "用户可以选择(改变)绑定的数据项(datafield)";
this.checkBox_datafield.CheckedChanged += new System.EventHandler(this.checkBox_datafield_CheckedChanged);
//
// checkBox_format
//
this.checkBox_format.Location = new System.Drawing.Point(16, 38);
this.checkBox_format.Name = "checkBox_format";
this.checkBox_format.Size = new System.Drawing.Size(304, 24);
this.checkBox_format.TabIndex = 0;
this.checkBox_format.Text = "用户可以配置(改变)数据的显示格式(format)";
this.checkBox_format.CheckedChanged += new System.EventHandler(this.checkBox_format_CheckedChanged);
//
// checkBox_color
//
this.checkBox_color.Location = new System.Drawing.Point(16, 88);
this.checkBox_color.Name = "checkBox_color";
this.checkBox_color.Size = new System.Drawing.Size(312, 24);
this.checkBox_color.TabIndex = 1;
this.checkBox_color.Text = "用户可以配置(改变)数据的显示颜色(color)";
this.checkBox_color.CheckedChanged += new System.EventHandler(this.checkBox_color_CheckedChanged);
//
// tabPage_miltilang
//
this.tabPage_miltilang.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.tabPage_miltilang.Controls.Add(this.checkBox_CaptionConfigurable);
this.tabPage_miltilang.Controls.Add(this.groupBox_languish);
this.tabPage_miltilang.Controls.Add(this.checkBox_IsMultilanguish);
this.tabPage_miltilang.Location = new System.Drawing.Point(4, 21);
this.tabPage_miltilang.Name = "tabPage_miltilang";
this.tabPage_miltilang.Size = new System.Drawing.Size(392, 135);
this.tabPage_miltilang.TabIndex = 2;
this.tabPage_miltilang.Text = "多语种标题";
this.tabPage_miltilang.Visible = false;
//
// checkBox_CaptionConfigurable
//
this.checkBox_CaptionConfigurable.Location = new System.Drawing.Point(192, 11);
this.checkBox_CaptionConfigurable.Name = "checkBox_CaptionConfigurable";
this.checkBox_CaptionConfigurable.Size = new System.Drawing.Size(176, 24);
this.checkBox_CaptionConfigurable.TabIndex = 3;
this.checkBox_CaptionConfigurable.Text = "允许用户自定义标题(更改)";
this.checkBox_CaptionConfigurable.CheckedChanged += new System.EventHandler(this.checkBox_CaptionConfigurable_CheckedChanged);
//
// 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, 34);
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_IsMultilanguish
//
this.checkBox_IsMultilanguish.Location = new System.Drawing.Point(16, 8);
this.checkBox_IsMultilanguish.Name = "checkBox_IsMultilanguish";
this.checkBox_IsMultilanguish.Size = new System.Drawing.Size(120, 24);
this.checkBox_IsMultilanguish.TabIndex = 1;
this.checkBox_IsMultilanguish.Text = "使用多语种标题";
this.checkBox_IsMultilanguish.CheckedChanged += new System.EventHandler(this.checkBox_IsMultilanguish_CheckedChanged);
//
// TreeReportConfigView
//
this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
this.ClientSize = new System.Drawing.Size(648, 365);
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 = "TreeReportConfigView";
this.Text = "报表可配项清单";
this.Load += new System.EventHandler(this.TreeReportConfigView_Load);
this.panel_attribute.ResumeLayout(false);
this.groupBox1.ResumeLayout(false);
this.tabControl_configs.ResumeLayout(false);
this.tabPage_visible.ResumeLayout(false);
this.groupBox_DisplayOption.ResumeLayout(false);
this.tabPage_dataconfig.ResumeLayout(false);
this.tabPage_miltilang.ResumeLayout(false);
this.groupBox_languish.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
/// <summary>
/// newconfig() -- 从对象树中选择要配置的对象。
/// </summary>
private void newconfig()
{
TreeReportExploreForCfg exploredlg = new TreeReportExploreForCfg();
exploredlg.initExploreForCfg(designreport,configinfo);
if (exploredlg.ShowDialog(this) == DialogResult.OK)
{
System.Data.DataRow rw = this.configinfo.configdata.NewRow();
rw["ReportID"] = reportid;
rw["ControlID"] = exploredlg.selectcontrlid;
configinfo.configdata.Rows.Add(rw);
ListViewItem item = listView_configcontrol.Items.Add(rw["ControlID"]+" ["+ rw["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;
//configinfo.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"))
{
this.Close();
}
}
/// <summary>
/// TreeReportConfigView_Load -- 初始化左边列表视图
/// </summary>
private void TreeReportConfigView_Load(object sender, System.EventArgs e)
{
listView_configcontrol.Columns.Add("用户可配置的对象(控件)",200,HorizontalAlignment.Left);
listView_configcontrol.View = View.Details;
if (configinfo.configdata.Rows.Count==0)
{
}
else
{
//关闭自动重绘
listView_configcontrol.BeginUpdate();
//逐项填写
ListViewItem item;
foreach( DataRow rw in configinfo.configdata.Rows)
{
item = listView_configcontrol.Items.Add(rw["ControlID"]+" ["+ rw["CName"] +"]",1);
item.Tag = rw; //rw["ControlID"];
}
//自动重绘
listView_configcontrol.EndUpdate();
initLeftView();
//使第一项为当前选项
if(listView_configcontrol.Items.Count>0)
listView_configcontrol.Items[0].Selected = true;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -