Commit 3a771fef authored by 段廷瑞's avatar 段廷瑞

1、工具平台:首页增加需求反馈功能

parent faa6a7d2
...@@ -27,6 +27,10 @@ namespace Tools.MyCommon ...@@ -27,6 +27,10 @@ namespace Tools.MyCommon
/// 更新时间 /// 更新时间
/// </summary> /// </summary>
public static string UPDATE_TIME => "UpdateTime"; public static string UPDATE_TIME => "UpdateTime";
/// <summary>
/// 临时用户名
/// </summary>
public static string TEMP_USER_NAME = "访客";
/// <summary> /// <summary>
/// 操作标识 /// 操作标识
...@@ -47,7 +51,7 @@ namespace Tools.MyCommon ...@@ -47,7 +51,7 @@ namespace Tools.MyCommon
/// <summary> /// <summary>
/// 用户名 /// 用户名
/// </summary> /// </summary>
public static string UserName { get; set; } = "访客"; public static string UserName { get; set; } = APP.TEMP_USER_NAME;
/// <summary> /// <summary>
/// 密码 /// 密码
/// </summary> /// </summary>
......
...@@ -253,7 +253,22 @@ namespace Tools.MyCommon ...@@ -253,7 +253,22 @@ namespace Tools.MyCommon
#endregion #endregion
#region 通用:控件初始化
/// <summary>
/// 初始化表格控件
/// </summary>
/// <param name="dgv"></param>
public void InitGridView(DataGridView dgv, bool isMultiSelect, bool isReadOnly)
{
dgv.ReadOnly = isReadOnly;
dgv.MultiSelect = isMultiSelect;
dgv.AutoGenerateColumns = false;
dgv.AllowUserToAddRows = false;
dgv.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
}
#endregion
} }
} }
...@@ -118,6 +118,12 @@ ...@@ -118,6 +118,12 @@
<Compile Include="UI\sys\wLogin.Designer.cs"> <Compile Include="UI\sys\wLogin.Designer.cs">
<DependentUpon>wLogin.cs</DependentUpon> <DependentUpon>wLogin.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="UI\sys\wTellUS.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="UI\sys\wTellUS.Designer.cs">
<DependentUpon>wTellUS.cs</DependentUpon>
</Compile>
<Compile Include="UI\wCefDemo.cs"> <Compile Include="UI\wCefDemo.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
...@@ -350,6 +356,9 @@ ...@@ -350,6 +356,9 @@
<EmbeddedResource Include="UI\sys\wLogin.resx"> <EmbeddedResource Include="UI\sys\wLogin.resx">
<DependentUpon>wLogin.cs</DependentUpon> <DependentUpon>wLogin.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="UI\sys\wTellUS.resx">
<DependentUpon>wTellUS.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="UI\wCefDemo.resx"> <EmbeddedResource Include="UI\wCefDemo.resx">
<DependentUpon>wCefDemo.cs</DependentUpon> <DependentUpon>wCefDemo.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
......
...@@ -46,9 +46,6 @@ namespace Tools.UI.sys ...@@ -46,9 +46,6 @@ namespace Tools.UI.sys
//表格事件 //表格事件
this.dgvDetail.CellContentClick += DgvDetail_CellContentClick; this.dgvDetail.CellContentClick += DgvDetail_CellContentClick;
} }
public override void InitData() public override void InitData()
{ {
this._ds = this._db.GetData(this.ModuleTableList, true); this._ds = this._db.GetData(this.ModuleTableList, true);
......
This diff is collapsed.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
//
using Tools.MyCommon;
using Tools.MyData;
using Tools.MyUtils;
namespace Tools.UI.sys
{
public partial class wTellUS : wEditBasic
{
/// <summary>
/// 数据源(单表)
/// </summary>
DataTable _dt = null;
/// <summary>
/// 是否新增(默认为True)
/// </summary>
bool _IsAdd = true;
/// <summary>
/// 编辑行,默认为null
/// </summary>
DataRow _EditRow = null;
public wTellUS()
{
InitializeComponent();
}
private void wTellUS_Load(object sender, EventArgs e)
{
//初始化模块表
this.ModuleTableList = new List<TQuery> { new TQuery("FTT_UserDemand", "SELECT * FROM FTT_UserDemand ") };
//初始化数据访问对象
this.InitDBHelper(Utils.GetDbLinkString204("FTT_Work"));
//初始化界面
this.InitUI();
//异步装载数据
Task.Run(() => this.InitData());
}
public override void InitData()
{
this._ds = this._db.GetData(this.ModuleTableList, true);
this._dt = this._ds.Tables[0];
}
public override void InitUI()
{
//默认全部填充
this.panelEdit.Dock = DockStyle.Fill;
this.panelHistory.Dock = DockStyle.Fill;
this.panelRevoke.Dock = DockStyle.Fill;
//显示编辑页面
this.InitGridView(this.dgvHistory, false, true);
this.InitGridView(this.dgvRevoked, false, true);
this.ShowEditPage();
//编辑相关事件
this.btnSubmit.Click += BtnSubmit_Click;
this.lbHistory.Click += LbHistory_Click;
//历史记录事件
this.btnReEdit.Click += BtnReEdit_Click;
this.btnRevoke.Click += BtnRevoke_Click;
this.lbRevokeHistory.Click += LbRevokeHistory_Click;
this.lbBackEdit.Click += LbBackEdit_Click;
//撤销记录事件
this.btnReSubmit.Click += BtnReSubmit_Click;
this.btnDelete.Click += BtnDelete_Click;
this.lbBackHistory.Click += LbBackHistory_Click;
}
private void BtnSubmit_Click(object sender, EventArgs e)
{
var text = this.tbDemand.Text;
if (string.IsNullOrEmpty(text))
{
MessageBox.Show("请先填写需求内容!");
return;
}
if (text.Length < 20)
{
MessageBox.Show("需求内容太短了,请完善一下吧!");
return;
}
//提交数据
this.Submit(this._IsAdd);
}
private void LbHistory_Click(object sender, EventArgs e)
{
this.ShowHistoryPage();
}
private void BtnReEdit_Click(object sender, EventArgs e)
{
if (this.dgvHistory.SelectedRows.Count == 0)
{
MessageBox.Show("请先选择一行信息!", "提示");
return;
}
if (this.tbDemand.Text.Trim() != "" && !Utils.TipYN("编辑页需求尚未保存,是否清空?"))
{
return;
}
//获取当前行索引
var index = this.dgvHistory.SelectedRows[0].Index;
//设定编辑行
this._IsAdd = false;
this._EditRow = this._dt.DefaultView[index].Row;
this.tbDemand.Text = this._EditRow["DemandText"].ToString();
this.ShowEditPage();
}
private void BtnRevoke_Click(object sender, EventArgs e)
{
this.SetStatus(DelStatus.Revoked);
}
private void LbRevokeHistory_Click(object sender, EventArgs e)
{
this.ShowRevokedPage();
}
private void LbBackEdit_Click(object sender, EventArgs e)
{
this.ShowEditPage();
}
private void BtnReSubmit_Click(object sender, EventArgs e)
{
this.SetStatus(DelStatus.Nomarl);
}
private void BtnDelete_Click(object sender, EventArgs e)
{
this.SetStatus(DelStatus.Deleted);
}
private void LbBackHistory_Click(object sender, EventArgs e)
{
this.ShowHistoryPage();
}
/// <summary>
/// 提交需求(新增或编辑)
/// </summary>
private void Submit(bool isAdd)
{
if (isAdd)
{
var drNew = this._dt.NewRow();
drNew["UserName"] = LoginInfo.UserName;
drNew["DemandText"] = this.tbDemand.Text;
drNew["CreateDate"] = DateTime.Now;
drNew["AcceptStatus"] = AcceptStatus.None;
drNew["DelStatus"] = DelStatus.Nomarl;
drNew.EndEdit();
this._dt.Rows.Add(drNew);
}
else
{
//有变化则更新
if (this._EditRow["DemandText"].ToString() != this.tbDemand.Text)
{
this._EditRow["DemandText"] = this.tbDemand.Text;
this._EditRow["ModifiedDate"] = DateTime.Now;
this._EditRow.EndEdit();
}
}
//保存数据
if (this.Save())
{
this._IsAdd = true; //恢复新增标志
this._EditRow = null; //清除编辑行
this.tbDemand.Text = ""; //清空文本
}
}
/// <summary>
/// 设置记录状态
/// </summary>
/// <param name="status"></param>
private void SetStatus(int status)
{
if (this.dgvHistory.SelectedRows.Count == 0)
{
MessageBox.Show("请先选择一行信息!", "提示");
return;
}
//设置状态并保存
var index = this.dgvHistory.SelectedRows[0].Index;
var drNow = this._dt.DefaultView[index].Row;
drNow["DelStatus"] = status;
drNow.EndEdit();
this.Save();
}
/// <summary>
/// 显示编辑页面
/// </summary>
private void ShowEditPage()
{
this.PageVisible(this.panelEdit, this.panelHistory, this.panelRevoke);
}
/// <summary>
/// 显示历史页面
/// </summary>
private void ShowHistoryPage()
{
this._dt.DefaultView.RowFilter = $"DelStatus = {DelStatus.Nomarl}";
this.dgvHistory.DataSource = this._dt.DefaultView;
this.PageVisible(this.panelHistory, this.panelEdit, this.panelRevoke);
}
/// <summary>
/// 显示已撤销页面
/// </summary>
private void ShowRevokedPage()
{
this._dt.DefaultView.RowFilter = $"DelStatus = {DelStatus.Revoked}";
this.dgvRevoked.DataSource = this._dt.DefaultView;
this.PageVisible(this.panelRevoke, this.panelEdit, this.panelHistory);
}
/// <summary>
/// 页面显示
/// </summary>
/// <param name="visiblePanel">显示的面板</param>
/// <param name="hidePanels">隐藏的面板</param>
private void PageVisible(Panel visiblePanel, params Panel[] hidePanels)
{
visiblePanel.Visible = true;
foreach (Panel p in hidePanels)
{
p.Visible = false;
}
}
}
/// <summary>
/// 受理状态
/// </summary>
internal class AcceptStatus
{
/// <summary>
/// 无
/// </summary>
public static string None => "";
/// <summary>
/// 已受理
/// </summary>
public static string Accepted => "已受理";
/// <summary>
/// 已回绝
/// </summary>
public static string Failed => "已回绝";
}
/// <summary>
/// 删除状态
/// </summary>
internal class DelStatus
{
/// <summary>
/// 正常
/// </summary>
public static int Nomarl => 0;
/// <summary>
/// 已撤销
/// </summary>
public static int Revoked => 1;
/// <summary>
/// 已删除
/// </summary>
public static int Deleted => 2;
}
}
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="Column3.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column5.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column2.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column4.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column6.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column7.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column8.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>
\ No newline at end of file
...@@ -36,7 +36,11 @@ ...@@ -36,7 +36,11 @@
this.imageList1 = new System.Windows.Forms.ImageList(this.components); this.imageList1 = new System.Windows.Forms.ImageList(this.components);
this.tabControl1 = new Tools.MyCommon.controls.TabControlEx(); this.tabControl1 = new Tools.MyCommon.controls.TabControlEx();
this.HomePage = new System.Windows.Forms.TabPage(); this.HomePage = new System.Windows.Forms.TabPage();
this.label5 = new System.Windows.Forms.Label(); this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.lbTellUS = new System.Windows.Forms.Label();
this.label7 = new System.Windows.Forms.Label();
this.label8 = new System.Windows.Forms.Label();
this.label9 = new System.Windows.Forms.Label();
this.menuStrip1 = new System.Windows.Forms.MenuStrip(); this.menuStrip1 = new System.Windows.Forms.MenuStrip();
this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
this.tsmiSysUpload = new System.Windows.Forms.ToolStripMenuItem(); this.tsmiSysUpload = new System.Windows.Forms.ToolStripMenuItem();
...@@ -72,6 +76,7 @@ ...@@ -72,6 +76,7 @@
this.splitContainer1.SuspendLayout(); this.splitContainer1.SuspendLayout();
this.tabControl1.SuspendLayout(); this.tabControl1.SuspendLayout();
this.HomePage.SuspendLayout(); this.HomePage.SuspendLayout();
this.tableLayoutPanel1.SuspendLayout();
this.menuStrip1.SuspendLayout(); this.menuStrip1.SuspendLayout();
this.Header.SuspendLayout(); this.Header.SuspendLayout();
this.Footer.SuspendLayout(); this.Footer.SuspendLayout();
...@@ -153,7 +158,7 @@ ...@@ -153,7 +158,7 @@
// //
// HomePage // HomePage
// //
this.HomePage.Controls.Add(this.label5); this.HomePage.Controls.Add(this.tableLayoutPanel1);
this.HomePage.Location = new System.Drawing.Point(4, 26); this.HomePage.Location = new System.Drawing.Point(4, 26);
this.HomePage.Name = "HomePage"; this.HomePage.Name = "HomePage";
this.HomePage.Padding = new System.Windows.Forms.Padding(3); this.HomePage.Padding = new System.Windows.Forms.Padding(3);
...@@ -162,17 +167,85 @@ ...@@ -162,17 +167,85 @@
this.HomePage.Text = "首页"; this.HomePage.Text = "首页";
this.HomePage.UseVisualStyleBackColor = true; this.HomePage.UseVisualStyleBackColor = true;
// //
// label5 // tableLayoutPanel1
// //
this.label5.Dock = System.Windows.Forms.DockStyle.Fill; this.tableLayoutPanel1.ColumnCount = 5;
this.label5.Font = new System.Drawing.Font("微软雅黑", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F));
this.label5.ForeColor = System.Drawing.SystemColors.AppWorkspace; this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F));
this.label5.Location = new System.Drawing.Point(3, 3); this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F));
this.label5.Name = "label5"; this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F));
this.label5.Size = new System.Drawing.Size(480, 333); this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F));
this.label5.TabIndex = 4; this.tableLayoutPanel1.Controls.Add(this.lbTellUS, 1, 1);
this.label5.Text = "欢迎使用飞天兔工具平台"; this.tableLayoutPanel1.Controls.Add(this.label7, 3, 1);
this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; this.tableLayoutPanel1.Controls.Add(this.label8, 1, 3);
this.tableLayoutPanel1.Controls.Add(this.label9, 3, 3);
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel1.Location = new System.Drawing.Point(3, 3);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
this.tableLayoutPanel1.RowCount = 5;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 30F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 20F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 20F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 30F));
this.tableLayoutPanel1.Size = new System.Drawing.Size(480, 333);
this.tableLayoutPanel1.TabIndex = 0;
//
// lbTellUS
//
this.lbTellUS.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(192)))), ((int)(((byte)(192)))));
this.lbTellUS.Dock = System.Windows.Forms.DockStyle.Fill;
this.lbTellUS.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lbTellUS.ForeColor = System.Drawing.Color.Black;
this.lbTellUS.Location = new System.Drawing.Point(115, 93);
this.lbTellUS.Margin = new System.Windows.Forms.Padding(0);
this.lbTellUS.Name = "lbTellUS";
this.lbTellUS.Size = new System.Drawing.Size(115, 62);
this.lbTellUS.TabIndex = 0;
this.lbTellUS.Text = "需求反馈";
this.lbTellUS.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// label7
//
this.label7.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(192)))), ((int)(((byte)(255)))));
this.label7.Dock = System.Windows.Forms.DockStyle.Fill;
this.label7.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label7.ForeColor = System.Drawing.Color.White;
this.label7.Location = new System.Drawing.Point(250, 93);
this.label7.Margin = new System.Windows.Forms.Padding(0);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(115, 62);
this.label7.TabIndex = 1;
this.label7.Text = "敬请期待";
this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// label8
//
this.label8.BackColor = System.Drawing.Color.PaleTurquoise;
this.label8.Dock = System.Windows.Forms.DockStyle.Fill;
this.label8.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label8.ForeColor = System.Drawing.Color.White;
this.label8.Location = new System.Drawing.Point(115, 175);
this.label8.Margin = new System.Windows.Forms.Padding(0);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(115, 62);
this.label8.TabIndex = 2;
this.label8.Text = "敬请期待";
this.label8.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// label9
//
this.label9.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(192)))), ((int)(((byte)(128)))));
this.label9.Dock = System.Windows.Forms.DockStyle.Fill;
this.label9.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label9.ForeColor = System.Drawing.Color.White;
this.label9.Location = new System.Drawing.Point(250, 175);
this.label9.Margin = new System.Windows.Forms.Padding(0);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(115, 62);
this.label9.TabIndex = 3;
this.label9.Text = "敬请期待";
this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
// //
// menuStrip1 // menuStrip1
// //
...@@ -479,6 +552,7 @@ ...@@ -479,6 +552,7 @@
this.splitContainer1.ResumeLayout(false); this.splitContainer1.ResumeLayout(false);
this.tabControl1.ResumeLayout(false); this.tabControl1.ResumeLayout(false);
this.HomePage.ResumeLayout(false); this.HomePage.ResumeLayout(false);
this.tableLayoutPanel1.ResumeLayout(false);
this.menuStrip1.ResumeLayout(false); this.menuStrip1.ResumeLayout(false);
this.menuStrip1.PerformLayout(); this.menuStrip1.PerformLayout();
this.Header.ResumeLayout(false); this.Header.ResumeLayout(false);
...@@ -523,6 +597,10 @@ ...@@ -523,6 +597,10 @@
private System.Windows.Forms.ToolStripMenuItem tsmiSysUpdateLog; private System.Windows.Forms.ToolStripMenuItem tsmiSysUpdateLog;
private Tools.MyCommon.controls.TabControlEx tabControl1; private Tools.MyCommon.controls.TabControlEx tabControl1;
private System.Windows.Forms.TabPage HomePage; private System.Windows.Forms.TabPage HomePage;
private System.Windows.Forms.Label label5; private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
private System.Windows.Forms.Label lbTellUS;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.Label label9;
} }
} }
\ No newline at end of file
...@@ -73,12 +73,13 @@ namespace Tools ...@@ -73,12 +73,13 @@ namespace Tools
} }
} }
//用TabControl模拟MDI效果 //用TabControl模拟MDI效果
//扩展:选项卡激活对比颜色设置
this.tabControl1.ShowToolTips = true; this.tabControl1.ShowToolTips = true;
this.tabControl1.SelectedIndexChanged += TabControl1_SelectedIndexChanged; this.tabControl1.SelectedIndexChanged += TabControl1_SelectedIndexChanged;
this.tabControl1.MouseDoubleClick += TabControl1_MouseDoubleClick; this.tabControl1.MouseDoubleClick += TabControl1_MouseDoubleClick;
//用户登录 //用户登录
this.lbSysLoginUser.Click += LbSysLoginUser_Click; this.lbSysLoginUser.Click += LbSysLoginUser_Click;
//扩展:首页功能
this.lbTellUS.Click += LbTellUS_Click;
//检查更新 //检查更新
Task.Run(() => this.CheckUpdate(true)); Task.Run(() => this.CheckUpdate(true));
...@@ -545,6 +546,22 @@ namespace Tools ...@@ -545,6 +546,22 @@ namespace Tools
this.tsmiSysUpload.Enabled = LoginInfo.IsPrincipal; this.tsmiSysUpload.Enabled = LoginInfo.IsPrincipal;
} }
#endregion
#region 扩展:首页功能
//事件:需求反馈
private void LbTellUS_Click(object sender, EventArgs e)
{
//权限校验
if (LoginInfo.UserName.Equals(APP.TEMP_USER_NAME) && string.IsNullOrEmpty(LoginInfo.Password))
{
this.ShowMessage("使用此功能,需要先登录!");
return;
}
//弹出需求反馈窗口
new wTellUS().ShowDialog();
}
#endregion #endregion
#region 本地:菜单渲染 #region 本地:菜单渲染
......
...@@ -125,7 +125,7 @@ ...@@ -125,7 +125,7 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAD0 ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAD0
EgAAAk1TRnQBSQFMAgEBBQEAAbgBAAG4AQABIAEAASABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo EgAAAk1TRnQBSQFMAgEBBQEAAcgBAAHIAQABIAEAASABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
AwABgAMAAUADAAEBAQABCAYAASAYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA AwABgAMAAUADAAEBAQABCAYAASAYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5 AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment