Wersja wydania 1.0.3.0
This commit is contained in:
Binary file not shown.
+15
-14
@@ -29,6 +29,7 @@ namespace NotepadUpdater
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
@@ -41,7 +42,7 @@ namespace NotepadUpdater
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(13, 13);
|
||||
this.label1.Location = new System.Drawing.Point(12, 9);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(81, 13);
|
||||
this.label1.TabIndex = 0;
|
||||
@@ -50,7 +51,7 @@ namespace NotepadUpdater
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(23, 35);
|
||||
this.label2.Location = new System.Drawing.Point(149, 9);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(71, 13);
|
||||
this.label2.TabIndex = 1;
|
||||
@@ -59,7 +60,7 @@ namespace NotepadUpdater
|
||||
// label3
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Location = new System.Drawing.Point(100, 13);
|
||||
this.label3.Location = new System.Drawing.Point(99, 9);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(31, 13);
|
||||
this.label3.TabIndex = 2;
|
||||
@@ -68,7 +69,7 @@ namespace NotepadUpdater
|
||||
// label4
|
||||
//
|
||||
this.label4.AutoSize = true;
|
||||
this.label4.Location = new System.Drawing.Point(100, 35);
|
||||
this.label4.Location = new System.Drawing.Point(226, 9);
|
||||
this.label4.Name = "label4";
|
||||
this.label4.Size = new System.Drawing.Size(31, 13);
|
||||
this.label4.TabIndex = 3;
|
||||
@@ -76,8 +77,10 @@ namespace NotepadUpdater
|
||||
//
|
||||
// richTextBox1
|
||||
//
|
||||
this.richTextBox1.BackColor = System.Drawing.Color.White;
|
||||
this.richTextBox1.BorderStyle = System.Windows.Forms.BorderStyle.None;
|
||||
this.richTextBox1.Location = new System.Drawing.Point(12, 61);
|
||||
this.richTextBox1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.richTextBox1.Location = new System.Drawing.Point(15, 25);
|
||||
this.richTextBox1.Name = "richTextBox1";
|
||||
this.richTextBox1.ReadOnly = true;
|
||||
this.richTextBox1.Size = new System.Drawing.Size(417, 157);
|
||||
@@ -86,7 +89,7 @@ namespace NotepadUpdater
|
||||
//
|
||||
// button1
|
||||
//
|
||||
this.button1.Location = new System.Drawing.Point(330, 19);
|
||||
this.button1.Location = new System.Drawing.Point(330, 188);
|
||||
this.button1.Name = "button1";
|
||||
this.button1.Size = new System.Drawing.Size(99, 23);
|
||||
this.button1.TabIndex = 6;
|
||||
@@ -96,16 +99,16 @@ namespace NotepadUpdater
|
||||
//
|
||||
// progressBar1
|
||||
//
|
||||
this.progressBar1.Location = new System.Drawing.Point(12, 224);
|
||||
this.progressBar1.Location = new System.Drawing.Point(12, 188);
|
||||
this.progressBar1.Name = "progressBar1";
|
||||
this.progressBar1.Size = new System.Drawing.Size(417, 23);
|
||||
this.progressBar1.Size = new System.Drawing.Size(312, 23);
|
||||
this.progressBar1.TabIndex = 7;
|
||||
//
|
||||
// Form1
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(441, 259);
|
||||
this.ClientSize = new System.Drawing.Size(441, 224);
|
||||
this.Controls.Add(this.progressBar1);
|
||||
this.Controls.Add(this.button1);
|
||||
this.Controls.Add(this.richTextBox1);
|
||||
@@ -113,14 +116,12 @@ namespace NotepadUpdater
|
||||
this.Controls.Add(this.label3);
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.label1);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.MaximizeBox = false;
|
||||
this.MaximumSize = new System.Drawing.Size(457, 298);
|
||||
this.MaximumSize = new System.Drawing.Size(457, 263);
|
||||
this.MinimizeBox = false;
|
||||
this.MinimumSize = new System.Drawing.Size(457, 298);
|
||||
this.MinimumSize = new System.Drawing.Size(457, 263);
|
||||
this.Name = "Form1";
|
||||
this.ShowIcon = false;
|
||||
this.ShowInTaskbar = false;
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "Update notatnika";
|
||||
this.Load += new System.EventHandler(this.Form1_Load);
|
||||
|
||||
@@ -25,10 +25,11 @@ namespace NotepadUpdater
|
||||
|
||||
private void Form1_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3 | SecurityProtocolType.Tls | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12;
|
||||
string urlVersion = "https://raw.githubusercontent.com/KrzysiekSiemv/Notepad/main/version.txt";
|
||||
string urlChangelog = "https://raw.githubusercontent.com/KrzysiekSiemv/Notepad/main/changelog.txt";
|
||||
|
||||
string urlVersion = "https://raw.githubusercontent.com/KrzysiekSiemv/Notepad/main/update/version";
|
||||
string urlChangelog = "https://raw.githubusercontent.com/KrzysiekSiemv/Notepad/main/update/changelog";
|
||||
|
||||
webClient = new WebClient();
|
||||
|
||||
Stream streamVersion = webClient.OpenRead(urlVersion);
|
||||
@@ -42,6 +43,12 @@ namespace NotepadUpdater
|
||||
|
||||
FileVersionInfo fileVersionInfo = FileVersionInfo.GetVersionInfo("Notatnik.exe");
|
||||
|
||||
if (fileVersionInfo.ProductVersion == contentVersion)
|
||||
{
|
||||
MessageBox.Show("Program nie wymaga aktualizacji, gdyż posiada najnowszą wersję oprogramowania", "Update niewymagany", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
Application.Exit();
|
||||
}
|
||||
|
||||
label3.Text = fileVersionInfo.ProductVersion;
|
||||
label4.Text = contentVersion;
|
||||
|
||||
@@ -50,17 +57,17 @@ namespace NotepadUpdater
|
||||
|
||||
void downloadUpdate()
|
||||
{
|
||||
string urlDownload = "https://raw.githubusercontent.com/KrzysiekSiemv/Notepad/main/changelog.txt";
|
||||
string urlDownload = "https://raw.githubusercontent.com/KrzysiekSiemv/Notepad/main/update/download";
|
||||
Stream streamDownload = webClient.OpenRead(urlDownload);
|
||||
StreamReader readerDownload = new StreamReader(streamDownload);
|
||||
string contentDownload = readerDownload.ReadToEnd();
|
||||
string download = readerDownload.ReadToEnd();
|
||||
|
||||
File.Delete("Notatnik.exe");
|
||||
|
||||
webClient.DownloadProgressChanged += new DownloadProgressChangedEventHandler(client_DownloadProgressChanged);
|
||||
webClient.DownloadFileCompleted += new AsyncCompletedEventHandler(client_DownloadFileCompleted);
|
||||
|
||||
webClient.DownloadFileAsync(new Uri(contentDownload), "Notatnik.exe");
|
||||
webClient.DownloadFileAsync(new Uri(download), "Notatnik.exe");
|
||||
}
|
||||
|
||||
void client_DownloadProgressChanged(object sender, DownloadProgressChangedEventArgs e)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -8,3 +8,13 @@ C:\Users\Krzysiek\source\repos\NotepadUpdater\NotepadUpdater\obj\Debug\NotepadUp
|
||||
C:\Users\Krzysiek\source\repos\NotepadUpdater\NotepadUpdater\obj\Debug\NotepadUpdater.exe
|
||||
C:\Users\Krzysiek\source\repos\NotepadUpdater\NotepadUpdater\obj\Debug\NotepadUpdater.pdb
|
||||
C:\Users\Krzysiek\source\repos\NotepadUpdater\NotepadUpdater\obj\Debug\NotepadUpdater.Form1.resources
|
||||
C:\Users\Krzysiek\Documents\GitHub\Notepad\NotepadUpdater\NotepadUpdater\bin\Debug\NotepadUpdater.exe.config
|
||||
C:\Users\Krzysiek\Documents\GitHub\Notepad\NotepadUpdater\NotepadUpdater\bin\Debug\NotepadUpdater.exe
|
||||
C:\Users\Krzysiek\Documents\GitHub\Notepad\NotepadUpdater\NotepadUpdater\bin\Debug\NotepadUpdater.pdb
|
||||
C:\Users\Krzysiek\Documents\GitHub\Notepad\NotepadUpdater\NotepadUpdater\obj\Debug\NotepadUpdater.csprojAssemblyReference.cache
|
||||
C:\Users\Krzysiek\Documents\GitHub\Notepad\NotepadUpdater\NotepadUpdater\obj\Debug\NotepadUpdater.Form1.resources
|
||||
C:\Users\Krzysiek\Documents\GitHub\Notepad\NotepadUpdater\NotepadUpdater\obj\Debug\NotepadUpdater.Properties.Resources.resources
|
||||
C:\Users\Krzysiek\Documents\GitHub\Notepad\NotepadUpdater\NotepadUpdater\obj\Debug\NotepadUpdater.csproj.GenerateResource.cache
|
||||
C:\Users\Krzysiek\Documents\GitHub\Notepad\NotepadUpdater\NotepadUpdater\obj\Debug\NotepadUpdater.csproj.CoreCompileInputs.cache
|
||||
C:\Users\Krzysiek\Documents\GitHub\Notepad\NotepadUpdater\NotepadUpdater\obj\Debug\NotepadUpdater.exe
|
||||
C:\Users\Krzysiek\Documents\GitHub\Notepad\NotepadUpdater\NotepadUpdater\obj\Debug\NotepadUpdater.pdb
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user