SVN r1165

SVN-Revision: r1165
This commit is contained in:
cyf
2026-05-11 02:14:03 +00:00
parent 11b5c70012
commit c82504c18a
4 changed files with 57 additions and 90 deletions
+33 -33
View File
@@ -42,10 +42,13 @@
this.label2 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.splitter2 = new System.Windows.Forms.Splitter();
this.panel4 = new System.Windows.Forms.Panel();
this.richTextBox = new System.Windows.Forms.RichTextBox();
this.panel3.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.panel2.SuspendLayout();
this.panel1.SuspendLayout();
this.panel4.SuspendLayout();
this.SuspendLayout();
//
// splitter1
@@ -54,7 +57,7 @@
this.splitter1.Dock = System.Windows.Forms.DockStyle.Top;
this.splitter1.Location = new System.Drawing.Point(0, 77);
this.splitter1.Name = "splitter1";
this.splitter1.Size = new System.Drawing.Size(440, 2);
this.splitter1.Size = new System.Drawing.Size(446, 2);
this.splitter1.TabIndex = 12;
this.splitter1.TabStop = false;
//
@@ -72,9 +75,9 @@
this.panel3.Controls.Add(this.btnOk);
this.panel3.Controls.Add(this.btnCancel);
this.panel3.Dock = System.Windows.Forms.DockStyle.Bottom;
this.panel3.Location = new System.Drawing.Point(0, 134);
this.panel3.Location = new System.Drawing.Point(0, 237);
this.panel3.Name = "panel3";
this.panel3.Size = new System.Drawing.Size(440, 44);
this.panel3.Size = new System.Drawing.Size(446, 44);
this.panel3.TabIndex = 11;
//
// btnOk
@@ -111,9 +114,10 @@
//
this.panel2.Controls.Add(this.label3);
this.panel2.Controls.Add(this.label4);
this.panel2.Location = new System.Drawing.Point(-5, 78);
this.panel2.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel2.Location = new System.Drawing.Point(0, 77);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(450, 67);
this.panel2.Size = new System.Drawing.Size(446, 204);
this.panel2.TabIndex = 10;
//
// label3
@@ -144,7 +148,7 @@
this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
this.panel1.Location = new System.Drawing.Point(0, 0);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(440, 77);
this.panel1.Size = new System.Drawing.Size(446, 77);
this.panel1.TabIndex = 9;
//
// label2
@@ -170,17 +174,36 @@
//
this.splitter2.BackColor = System.Drawing.SystemColors.InactiveBorder;
this.splitter2.Dock = System.Windows.Forms.DockStyle.Bottom;
this.splitter2.Location = new System.Drawing.Point(0, 178);
this.splitter2.Location = new System.Drawing.Point(0, 281);
this.splitter2.Name = "splitter2";
this.splitter2.Size = new System.Drawing.Size(440, 2);
this.splitter2.Size = new System.Drawing.Size(446, 2);
this.splitter2.TabIndex = 13;
this.splitter2.TabStop = false;
//
// panel4
//
this.panel4.Controls.Add(this.richTextBox);
this.panel4.Dock = System.Windows.Forms.DockStyle.Bottom;
this.panel4.Location = new System.Drawing.Point(0, 126);
this.panel4.Name = "panel4";
this.panel4.Size = new System.Drawing.Size(446, 111);
this.panel4.TabIndex = 14;
//
// richTextBox
//
this.richTextBox.Dock = System.Windows.Forms.DockStyle.Fill;
this.richTextBox.Location = new System.Drawing.Point(0, 0);
this.richTextBox.Name = "richTextBox";
this.richTextBox.Size = new System.Drawing.Size(446, 111);
this.richTextBox.TabIndex = 6;
this.richTextBox.Text = "";
//
// FrmMain
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(440, 180);
this.ClientSize = new System.Drawing.Size(446, 283);
this.Controls.Add(this.panel4);
this.Controls.Add(this.splitter1);
this.Controls.Add(this.panel3);
this.Controls.Add(this.panel2);
@@ -197,27 +220,4 @@
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.panel2.ResumeLayout(false);
this.panel2.PerformLayout();
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Splitter splitter1;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Panel panel3;
private System.Windows.Forms.Button btnOk;
private System.Windows.Forms.Button btnCancel;
private System.Windows.Forms.PictureBox pictureBox1;
private System.Windows.Forms.Panel panel2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Splitter splitter2;
}
}
thi
+17 -25
View File
@@ -38,34 +38,26 @@ namespace Lskj.AutoUpdate
{
InitializeComponent();
this.panel4.Visible = false;
this.Height = this.Height - this.panel4.Height;
downloadFileList = downloadfileList;
}
/// <summary>
/// <para>说明:窗口加载</para>
/// <para>创建人:龚宇超</para>
/// <para>创建日期:2018-02-23 </para>
/// <para>修改人:</para>
/// <para>修改日期:</para>
/// <para>修改备注:</para>
/// <para>版本:1.0</para>
/// </summary>
/// <param name="sender">The sender.</param>
/// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
private void OnLoad(object sender, EventArgs e)
public FrmMain(List<DownloadFileInfo> downloadfileList, string text)
{
foreach (DownloadFileInfo file in this.downloadFileList)
InitializeComponent();
downloadFileList = downloadfileList;
if (!string.IsNullOrWhiteSpace(text))
{
ListViewItem item = new ListViewItem(new string[] { file.FileName, file.LastVersion, file.Size.ToString() });
}
this.Activate();
this.Focus();
}
//this.richTextBox.Enabled = false;
this.richTextBox.ReadOnly = true;
this.richTextBox.SelectionLength = 0; // 禁止选中
this.richTextBox.Text = "更新说明:\r\n" + text;
private void btnCancel_Click(object sender, EventArgs e)
{
this.Close();
}
}
}
}
else
{
this.panel4.Visible = false;
this.Height = this.Height - this.panel4.Height;
}
Binary file not shown.
+7 -32
View File
@@ -24,6 +24,12 @@ namespace Lskj.AutoUpdate
private string _serverUrl = string.Empty;
private UpdateFileList _updateFileList = new UpdateFileList();
/// <summary>
/// 提示的更新内容
/// </summary>
public string UpdateNotes;
/// <summary>
/// 下载地址
/// </summary>
@@ -53,35 +59,4 @@ namespace Lskj.AutoUpdate
/// <para>版本:1.0</para>
/// </summary>
/// <param name="file">The file.</param>
/// <returns>Config.</returns>
public Config LoadConfig(string file)
{
if (!File.Exists(file)) SaveConfig(file);
XmlSerializer xs = new XmlSerializer(typeof(Config));
StreamReader sr = new StreamReader(file);
Config config = xs.Deserialize(sr) as Config;
sr.Close();
return config;
}
/// <summary>
/// <para>说明:保存配置</para>
/// <para>创建人:龚宇超</para>
/// <para>创建日期:2018-02-23 </para>
/// <para>修改人:</para>
/// <para>修改日期:</para>
/// <para>修改备注:</para>
/// <para>版本:1.0</para>
/// </summary>
/// <param name="file">The file.</param>
public void SaveConfig(string file)
{
XmlSerializer xs = new XmlSerializer(typeof(Config));
StreamWriter sw = new StreamWriter(file);
xs.Serialize(sw, this);
sw.Close();
}
}
}
/// <