Commit 800c7b7d authored by tr's avatar tr

1、帮助文档:增加更新文件功能

parent 888e7cfa
...@@ -37,6 +37,7 @@ ...@@ -37,6 +37,7 @@
this.panel1 = new System.Windows.Forms.Panel(); this.panel1 = new System.Windows.Forms.Panel();
this.panel2 = new System.Windows.Forms.Panel(); this.panel2 = new System.Windows.Forms.Panel();
this.label1 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label();
this.btnUpdate = new System.Windows.Forms.Button();
((System.ComponentModel.ISupportInitialize)(this.dgvDetail)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.dgvDetail)).BeginInit();
this.panel1.SuspendLayout(); this.panel1.SuspendLayout();
this.panel2.SuspendLayout(); this.panel2.SuspendLayout();
...@@ -84,7 +85,7 @@ ...@@ -84,7 +85,7 @@
this.btnUpload.BackColor = System.Drawing.SystemColors.Window; this.btnUpload.BackColor = System.Drawing.SystemColors.Window;
this.btnUpload.Enabled = false; this.btnUpload.Enabled = false;
this.btnUpload.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnUpload.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnUpload.Location = new System.Drawing.Point(14, 6); this.btnUpload.Location = new System.Drawing.Point(12, 6);
this.btnUpload.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.btnUpload.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.btnUpload.Name = "btnUpload"; this.btnUpload.Name = "btnUpload";
this.btnUpload.Size = new System.Drawing.Size(87, 27); this.btnUpload.Size = new System.Drawing.Size(87, 27);
...@@ -110,6 +111,7 @@ ...@@ -110,6 +111,7 @@
// panel1 // panel1
// //
this.panel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(234)))), ((int)(((byte)(245)))), ((int)(((byte)(255))))); this.panel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(234)))), ((int)(((byte)(245)))), ((int)(((byte)(255)))));
this.panel1.Controls.Add(this.btnUpdate);
this.panel1.Controls.Add(this.btnDownload); this.panel1.Controls.Add(this.btnDownload);
this.panel1.Controls.Add(this.btnUpload); this.panel1.Controls.Add(this.btnUpload);
this.panel1.Dock = System.Windows.Forms.DockStyle.Top; this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
...@@ -140,6 +142,20 @@ ...@@ -140,6 +142,20 @@
this.label1.TabIndex = 0; this.label1.TabIndex = 0;
this.label1.Text = "*温馨提示:超过50M的文件将被直接忽略"; this.label1.Text = "*温馨提示:超过50M的文件将被直接忽略";
// //
// btnUpdate
//
this.btnUpdate.BackColor = System.Drawing.SystemColors.Window;
this.btnUpdate.Enabled = false;
this.btnUpdate.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnUpdate.Location = new System.Drawing.Point(560, 6);
this.btnUpdate.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.btnUpdate.Name = "btnUpdate";
this.btnUpdate.Size = new System.Drawing.Size(87, 27);
this.btnUpdate.TabIndex = 2;
this.btnUpdate.Text = "更新文件";
this.btnUpdate.UseVisualStyleBackColor = false;
this.btnUpdate.Click += new System.EventHandler(this.btnUpdate_Click);
//
// wHelpDocument // wHelpDocument
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F); this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
...@@ -173,5 +189,6 @@ ...@@ -173,5 +189,6 @@
private System.Windows.Forms.DataGridViewTextBoxColumn Column4; private System.Windows.Forms.DataGridViewTextBoxColumn Column4;
private System.Windows.Forms.Panel panel2; private System.Windows.Forms.Panel panel2;
private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label1;
private System.Windows.Forms.Button btnUpdate;
} }
} }
\ No newline at end of file
...@@ -56,31 +56,17 @@ namespace Tools.UI.sys ...@@ -56,31 +56,17 @@ namespace Tools.UI.sys
//事件:上传 //事件:上传
private void btnUpload_Click(object sender, EventArgs e) private void btnUpload_Click(object sender, EventArgs e)
{ {
var dlg = new OpenFileDialog() { var list = this.SelectFile(true);
CheckFileExists = true, if (list.Count > 0)
CheckPathExists = true,
Multiselect = true,
Filter = "所有文件|*.*",
InitialDirectory = Utils.DesktopPath,
};
if (dlg.ShowDialog() == DialogResult.OK)
{ {
foreach (string path in dlg.FileNames) foreach (string path in list)
{ {
//读取文件
var bytes = File.ReadAllBytes(path);
var KB = bytes.Length / 1024M;
//超过50M直接忽略
if (KB > 50 * 1024)
continue;
//添加文件 //添加文件
var drNew = this._ds.Tables[0].NewRow(); var drNew = this._ds.Tables[0].NewRow();
drNew["dName"] = Path.GetFileName(path); if (this.FillRowData(drNew, path))
drNew["dSize"] = KB.ToString("0.##"); {
drNew["dData"] = bytes; this._ds.Tables[0].Rows.Add(drNew);
drNew["CreateDate"] = DateTime.Now; }
drNew.EndEdit();
this._ds.Tables[0].Rows.Add(drNew);
} }
this.Save(); this.Save();
} }
...@@ -112,12 +98,76 @@ namespace Tools.UI.sys ...@@ -112,12 +98,76 @@ namespace Tools.UI.sys
Utils.Tip("下载成功!"); Utils.Tip("下载成功!");
} }
} }
//事件:更新文件
private void btnUpdate_Click(object sender, EventArgs e)
{
if (this.dgvDetail.SelectedRows.Count != 1)
{
Utils.Tip("更新必须且只能选中一行!");
return;
}
var list = this.SelectFile(false);
if (list.Count > 0)
{
//更新文件
var index = this.dgvDetail.SelectedRows[0].Index;
var drNow = this._ds.Tables[0].DefaultView[index].Row;
if (this.FillRowData(drNow, list[0]))
{
this.Save();
}
}
}
//按钮有效性 //按钮有效性
private void ButtonEnabled(bool enable) private void ButtonEnabled(bool enable)
{ {
this.btnUpload.Enabled = enable; this.btnUpload.Enabled = enable;
this.btnDownload.Enabled = enable; this.btnDownload.Enabled = enable;
this.btnUpdate.Enabled = enable;
}
//选择文件
private List<string> SelectFile(bool isMulti, string filter = "所有文件|*.*")
{
var result = new List<string>();
var dlg = new OpenFileDialog()
{
CheckFileExists = true,
CheckPathExists = true,
Multiselect = isMulti,
Filter = filter,
InitialDirectory = Utils.DesktopPath,
};
if (dlg.ShowDialog() == DialogResult.OK)
{
result = dlg.FileNames.ToList();
}
return result;
}
//检查文件尺寸
private bool CheckSize(decimal kb)
{
return kb <= 50 * 1024;
} }
//填充数据行
private bool FillRowData(DataRow dr, string path)
{
//读取文件
var bytes = File.ReadAllBytes(path);
var KB = bytes.Length / 1024M;
//超过50M直接忽略
if (!this.CheckSize(KB))
return false;
//添加文件
dr["dName"] = Path.GetFileName(path);
dr["dSize"] = KB.ToString("0.##");
dr["dData"] = bytes;
dr["CreateDate"] = DateTime.Now;
dr.EndEdit();
return true;
}
} }
} }
...@@ -126,13 +126,4 @@ ...@@ -126,13 +126,4 @@
<metadata name="Column4.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="Column4.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>
<metadata name="Column1.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>
</root> </root>
\ No newline at end of file
...@@ -36,6 +36,7 @@ ...@@ -36,6 +36,7 @@
this.imageList1 = new System.Windows.Forms.ImageList(this.components); this.imageList1 = new System.Windows.Forms.ImageList(this.components);
this.tabControl1 = new System.Windows.Forms.TabControl(); this.tabControl1 = new System.Windows.Forms.TabControl();
this.HomePage = new System.Windows.Forms.TabPage(); this.HomePage = new System.Windows.Forms.TabPage();
this.webBrowser1 = new System.Windows.Forms.WebBrowser();
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();
...@@ -55,14 +56,14 @@ ...@@ -55,14 +56,14 @@
this.btnMaximized = new System.Windows.Forms.Button(); this.btnMaximized = new System.Windows.Forms.Button();
this.btnClosed = new System.Windows.Forms.Button(); this.btnClosed = new System.Windows.Forms.Button();
this.Footer = new System.Windows.Forms.Panel(); this.Footer = new System.Windows.Forms.Panel();
this.lbSysMemery = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.lbSysVersion = new System.Windows.Forms.Label(); this.lbSysVersion = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label(); this.label6 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label();
this.lbSysLoginUser = new System.Windows.Forms.Label(); this.lbSysLoginUser = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label();
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
this.label3 = new System.Windows.Forms.Label();
this.lbSysMemery = new System.Windows.Forms.Label();
this.timer1 = new System.Windows.Forms.Timer(this.components); this.timer1 = new System.Windows.Forms.Timer(this.components);
this.panel1.SuspendLayout(); this.panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
...@@ -70,6 +71,7 @@ ...@@ -70,6 +71,7 @@
this.splitContainer1.Panel2.SuspendLayout(); this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout(); this.splitContainer1.SuspendLayout();
this.tabControl1.SuspendLayout(); this.tabControl1.SuspendLayout();
this.HomePage.SuspendLayout();
this.menuStrip1.SuspendLayout(); this.menuStrip1.SuspendLayout();
this.Header.SuspendLayout(); this.Header.SuspendLayout();
this.Footer.SuspendLayout(); this.Footer.SuspendLayout();
...@@ -149,6 +151,7 @@ ...@@ -149,6 +151,7 @@
// //
// HomePage // HomePage
// //
this.HomePage.Controls.Add(this.webBrowser1);
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);
...@@ -157,6 +160,17 @@ ...@@ -157,6 +160,17 @@
this.HomePage.Text = "首页"; this.HomePage.Text = "首页";
this.HomePage.UseVisualStyleBackColor = true; this.HomePage.UseVisualStyleBackColor = true;
// //
// webBrowser1
//
this.webBrowser1.Dock = System.Windows.Forms.DockStyle.Fill;
this.webBrowser1.Location = new System.Drawing.Point(3, 3);
this.webBrowser1.MinimumSize = new System.Drawing.Size(20, 20);
this.webBrowser1.Name = "webBrowser1";
this.webBrowser1.Size = new System.Drawing.Size(480, 333);
this.webBrowser1.TabIndex = 0;
this.webBrowser1.Url = new System.Uri("", System.UriKind.Relative);
this.webBrowser1.Visible = false;
//
// menuStrip1 // menuStrip1
// //
this.menuStrip1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(234)))), ((int)(((byte)(245)))), ((int)(((byte)(255))))); this.menuStrip1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(234)))), ((int)(((byte)(245)))), ((int)(((byte)(255)))));
...@@ -184,25 +198,25 @@ ...@@ -184,25 +198,25 @@
// tsmiSysUpload // tsmiSysUpload
// //
this.tsmiSysUpload.Name = "tsmiSysUpload"; this.tsmiSysUpload.Name = "tsmiSysUpload";
this.tsmiSysUpload.Size = new System.Drawing.Size(180, 22); this.tsmiSysUpload.Size = new System.Drawing.Size(124, 22);
this.tsmiSysUpload.Text = "上传更新"; this.tsmiSysUpload.Text = "上传更新";
// //
// tsmiSysUpdate // tsmiSysUpdate
// //
this.tsmiSysUpdate.Name = "tsmiSysUpdate"; this.tsmiSysUpdate.Name = "tsmiSysUpdate";
this.tsmiSysUpdate.Size = new System.Drawing.Size(180, 22); this.tsmiSysUpdate.Size = new System.Drawing.Size(124, 22);
this.tsmiSysUpdate.Text = "检查更新"; this.tsmiSysUpdate.Text = "检查更新";
// //
// tsmiSysReLogin // tsmiSysReLogin
// //
this.tsmiSysReLogin.Name = "tsmiSysReLogin"; this.tsmiSysReLogin.Name = "tsmiSysReLogin";
this.tsmiSysReLogin.Size = new System.Drawing.Size(180, 22); this.tsmiSysReLogin.Size = new System.Drawing.Size(124, 22);
this.tsmiSysReLogin.Text = "重新登录"; this.tsmiSysReLogin.Text = "重新登录";
// //
// tsmiSysExit // tsmiSysExit
// //
this.tsmiSysExit.Name = "tsmiSysExit"; this.tsmiSysExit.Name = "tsmiSysExit";
this.tsmiSysExit.Size = new System.Drawing.Size(180, 22); this.tsmiSysExit.Size = new System.Drawing.Size(124, 22);
this.tsmiSysExit.Text = "退出系统"; this.tsmiSysExit.Text = "退出系统";
// //
// toolStripMenuItem2 // toolStripMenuItem2
...@@ -217,13 +231,13 @@ ...@@ -217,13 +231,13 @@
// tsmiAccPasswordMgr // tsmiAccPasswordMgr
// //
this.tsmiAccPasswordMgr.Name = "tsmiAccPasswordMgr"; this.tsmiAccPasswordMgr.Name = "tsmiAccPasswordMgr";
this.tsmiAccPasswordMgr.Size = new System.Drawing.Size(180, 22); this.tsmiAccPasswordMgr.Size = new System.Drawing.Size(124, 22);
this.tsmiAccPasswordMgr.Text = "密码管理"; this.tsmiAccPasswordMgr.Text = "密码管理";
// //
// tsmiAccPersonalSetting // tsmiAccPersonalSetting
// //
this.tsmiAccPersonalSetting.Name = "tsmiAccPersonalSetting"; this.tsmiAccPersonalSetting.Name = "tsmiAccPersonalSetting";
this.tsmiAccPersonalSetting.Size = new System.Drawing.Size(180, 22); this.tsmiAccPersonalSetting.Size = new System.Drawing.Size(124, 22);
this.tsmiAccPersonalSetting.Text = "个人设置"; this.tsmiAccPersonalSetting.Text = "个人设置";
// //
// toolStripMenuItem3 // toolStripMenuItem3
...@@ -238,13 +252,13 @@ ...@@ -238,13 +252,13 @@
// tsmiHelpDocument // tsmiHelpDocument
// //
this.tsmiHelpDocument.Name = "tsmiHelpDocument"; this.tsmiHelpDocument.Name = "tsmiHelpDocument";
this.tsmiHelpDocument.Size = new System.Drawing.Size(180, 22); this.tsmiHelpDocument.Size = new System.Drawing.Size(124, 22);
this.tsmiHelpDocument.Text = "帮助文档"; this.tsmiHelpDocument.Text = "帮助文档";
// //
// tsmiHelpAboutUs // tsmiHelpAboutUs
// //
this.tsmiHelpAboutUs.Name = "tsmiHelpAboutUs"; this.tsmiHelpAboutUs.Name = "tsmiHelpAboutUs";
this.tsmiHelpAboutUs.Size = new System.Drawing.Size(180, 22); this.tsmiHelpAboutUs.Size = new System.Drawing.Size(124, 22);
this.tsmiHelpAboutUs.Text = "关于我们"; this.tsmiHelpAboutUs.Text = "关于我们";
// //
// Header // Header
...@@ -344,6 +358,32 @@ ...@@ -344,6 +358,32 @@
this.Footer.Size = new System.Drawing.Size(698, 27); this.Footer.Size = new System.Drawing.Size(698, 27);
this.Footer.TabIndex = 0; this.Footer.TabIndex = 0;
// //
// lbSysMemery
//
this.lbSysMemery.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)));
this.lbSysMemery.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lbSysMemery.ForeColor = System.Drawing.Color.White;
this.lbSysMemery.Location = new System.Drawing.Point(209, 4);
this.lbSysMemery.Name = "lbSysMemery";
this.lbSysMemery.Size = new System.Drawing.Size(75, 20);
this.lbSysMemery.TabIndex = 12;
this.lbSysMemery.Text = "00M";
this.lbSysMemery.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// label3
//
this.label3.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)));
this.label3.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label3.ForeColor = System.Drawing.Color.White;
this.label3.Location = new System.Drawing.Point(177, 4);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(44, 20);
this.label3.TabIndex = 11;
this.label3.Text = "内存:";
this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// lbSysVersion // lbSysVersion
// //
this.lbSysVersion.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) this.lbSysVersion.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
...@@ -409,32 +449,6 @@ ...@@ -409,32 +449,6 @@
this.label2.Text = "登录人员:"; this.label2.Text = "登录人员:";
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
// //
// label3
//
this.label3.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)));
this.label3.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label3.ForeColor = System.Drawing.Color.White;
this.label3.Location = new System.Drawing.Point(177, 4);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(44, 20);
this.label3.TabIndex = 11;
this.label3.Text = "内存:";
this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// lbSysMemery
//
this.lbSysMemery.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)));
this.lbSysMemery.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lbSysMemery.ForeColor = System.Drawing.Color.White;
this.lbSysMemery.Location = new System.Drawing.Point(209, 4);
this.lbSysMemery.Name = "lbSysMemery";
this.lbSysMemery.Size = new System.Drawing.Size(75, 20);
this.lbSysMemery.TabIndex = 12;
this.lbSysMemery.Text = "00M";
this.lbSysMemery.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// timer1 // timer1
// //
this.timer1.Enabled = true; this.timer1.Enabled = true;
...@@ -452,6 +466,7 @@ ...@@ -452,6 +466,7 @@
this.Name = "wMain"; this.Name = "wMain";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "工具平台"; this.Text = "工具平台";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.wMain_FormClosing);
this.panel1.ResumeLayout(false); this.panel1.ResumeLayout(false);
this.panel1.PerformLayout(); this.panel1.PerformLayout();
this.splitContainer1.Panel1.ResumeLayout(false); this.splitContainer1.Panel1.ResumeLayout(false);
...@@ -459,6 +474,7 @@ ...@@ -459,6 +474,7 @@
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
this.splitContainer1.ResumeLayout(false); this.splitContainer1.ResumeLayout(false);
this.tabControl1.ResumeLayout(false); this.tabControl1.ResumeLayout(false);
this.HomePage.ResumeLayout(false);
this.menuStrip1.ResumeLayout(false); this.menuStrip1.ResumeLayout(false);
this.menuStrip1.PerformLayout(); this.menuStrip1.PerformLayout();
this.Header.ResumeLayout(false); this.Header.ResumeLayout(false);
...@@ -503,5 +519,6 @@ ...@@ -503,5 +519,6 @@
private System.Windows.Forms.Label lbSysMemery; private System.Windows.Forms.Label lbSysMemery;
private System.Windows.Forms.Label label3; private System.Windows.Forms.Label label3;
private System.Windows.Forms.Timer timer1; private System.Windows.Forms.Timer timer1;
private System.Windows.Forms.WebBrowser webBrowser1;
} }
} }
\ No newline at end of file
...@@ -7,6 +7,7 @@ using System.Drawing; ...@@ -7,6 +7,7 @@ using System.Drawing;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows.Forms; using System.Windows.Forms;
// //
...@@ -64,6 +65,17 @@ namespace Tools ...@@ -64,6 +65,17 @@ namespace Tools
//检查更新 //检查更新
Task.Run(() => this.CheckUpdate(true)); Task.Run(() => this.CheckUpdate(true));
//加载首页
Task.Run(() => this.AsyncUI(() => {
this.webBrowser1.Url = new Uri("http://www.feteto.cn/#/");
this.webBrowser1.Show();
})
);
}
private void wMain_FormClosing(object sender, FormClosingEventArgs e)
{
this.webBrowser1.Hide();
this.webBrowser1.Dispose();
} }
#region 基础:关闭、最大化、最小化 #region 基础:关闭、最大化、最小化
...@@ -420,6 +432,5 @@ namespace Tools ...@@ -420,6 +432,5 @@ namespace Tools
MessageBox.Show(msg, "提示"); MessageBox.Show(msg, "提示");
} }
} }
} }
...@@ -117,9 +117,6 @@ ...@@ -117,9 +117,6 @@
<resheader name="writer"> <resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>478, 17</value>
</metadata>
<metadata name="imageList1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="imageList1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>598, 17</value> <value>598, 17</value>
</metadata> </metadata>
...@@ -128,7 +125,7 @@ ...@@ -128,7 +125,7 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAAc ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAAc
GwAAAk1TRnQBSQFMAgEBCQEAAVABAAFQAQABIAEAASABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo GwAAAk1TRnQBSQFMAgEBCQEAAWABAAFgAQABIAEAASABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
AwABgAMAAWADAAEBAQABCAYAATAYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA AwABgAMAAWADAAEBAQABCAYAATAYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5 AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
...@@ -252,9 +249,6 @@ ...@@ -252,9 +249,6 @@
<metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>478, 17</value> <value>478, 17</value>
</metadata> </metadata>
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>713, 17</value>
</metadata>
<metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>814, 17</value> <value>814, 17</value>
</metadata> </metadata>
......
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