Wersja wydania 1.0.3.0
This commit is contained in:
Binary file not shown.
@@ -23,6 +23,9 @@
|
||||
<setting name="FirstRun" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
<setting name="KolorCzcionki" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
</Notatnik.Properties.Settings>
|
||||
<Notepad_v2.Properties.Settings>
|
||||
<setting name="Czcionka" serializeAs="String">
|
||||
|
||||
Generated
+26
-17
@@ -78,6 +78,7 @@ namespace Notatnik
|
||||
this.printPreviewDialog1 = new System.Windows.Forms.PrintPreviewDialog();
|
||||
this.colorDialog1 = new System.Windows.Forms.ColorDialog();
|
||||
this.colorDialog2 = new System.Windows.Forms.ColorDialog();
|
||||
this.informacjeOProgramieToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.panel1.SuspendLayout();
|
||||
this.contextMenuStrip1.SuspendLayout();
|
||||
this.statusStrip1.SuspendLayout();
|
||||
@@ -514,15 +515,16 @@ namespace Notatnik
|
||||
this.kursywaToolStripMenuItem,
|
||||
this.podkreślenieToolStripMenuItem,
|
||||
this.updateSeparator,
|
||||
this.informacjeOProgramieToolStripMenuItem,
|
||||
this.updateToolStripMenuItem});
|
||||
this.contextMenuStrip1.Name = "contextMenuStrip1";
|
||||
this.contextMenuStrip1.Size = new System.Drawing.Size(185, 292);
|
||||
this.contextMenuStrip1.Size = new System.Drawing.Size(200, 314);
|
||||
//
|
||||
// kopiujToolStripMenuItem
|
||||
//
|
||||
this.kopiujToolStripMenuItem.Name = "kopiujToolStripMenuItem";
|
||||
this.kopiujToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.C)));
|
||||
this.kopiujToolStripMenuItem.Size = new System.Drawing.Size(184, 22);
|
||||
this.kopiujToolStripMenuItem.Size = new System.Drawing.Size(199, 22);
|
||||
this.kopiujToolStripMenuItem.Text = "Kopiuj";
|
||||
this.kopiujToolStripMenuItem.Click += new System.EventHandler(this.kopiujToolStripMenuItem_Click);
|
||||
//
|
||||
@@ -530,7 +532,7 @@ namespace Notatnik
|
||||
//
|
||||
this.wytnijToolStripMenuItem.Name = "wytnijToolStripMenuItem";
|
||||
this.wytnijToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.X)));
|
||||
this.wytnijToolStripMenuItem.Size = new System.Drawing.Size(184, 22);
|
||||
this.wytnijToolStripMenuItem.Size = new System.Drawing.Size(199, 22);
|
||||
this.wytnijToolStripMenuItem.Text = "Wytnij";
|
||||
this.wytnijToolStripMenuItem.Click += new System.EventHandler(this.wytnijToolStripMenuItem_Click);
|
||||
//
|
||||
@@ -538,20 +540,20 @@ namespace Notatnik
|
||||
//
|
||||
this.wklejToolStripMenuItem.Name = "wklejToolStripMenuItem";
|
||||
this.wklejToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.V)));
|
||||
this.wklejToolStripMenuItem.Size = new System.Drawing.Size(184, 22);
|
||||
this.wklejToolStripMenuItem.Size = new System.Drawing.Size(199, 22);
|
||||
this.wklejToolStripMenuItem.Text = "Wklej";
|
||||
this.wklejToolStripMenuItem.Click += new System.EventHandler(this.wklejToolStripMenuItem_Click);
|
||||
//
|
||||
// toolStripSeparator1
|
||||
//
|
||||
this.toolStripSeparator1.Name = "toolStripSeparator1";
|
||||
this.toolStripSeparator1.Size = new System.Drawing.Size(181, 6);
|
||||
this.toolStripSeparator1.Size = new System.Drawing.Size(196, 6);
|
||||
//
|
||||
// cofnijToolStripMenuItem
|
||||
//
|
||||
this.cofnijToolStripMenuItem.Name = "cofnijToolStripMenuItem";
|
||||
this.cofnijToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Z)));
|
||||
this.cofnijToolStripMenuItem.Size = new System.Drawing.Size(184, 22);
|
||||
this.cofnijToolStripMenuItem.Size = new System.Drawing.Size(199, 22);
|
||||
this.cofnijToolStripMenuItem.Text = "Cofnij";
|
||||
this.cofnijToolStripMenuItem.Click += new System.EventHandler(this.cofnijToolStripMenuItem_Click);
|
||||
//
|
||||
@@ -559,39 +561,39 @@ namespace Notatnik
|
||||
//
|
||||
this.przywrócToolStripMenuItem.Name = "przywrócToolStripMenuItem";
|
||||
this.przywrócToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Y)));
|
||||
this.przywrócToolStripMenuItem.Size = new System.Drawing.Size(184, 22);
|
||||
this.przywrócToolStripMenuItem.Size = new System.Drawing.Size(199, 22);
|
||||
this.przywrócToolStripMenuItem.Text = "Przywróć";
|
||||
this.przywrócToolStripMenuItem.Click += new System.EventHandler(this.przywrócToolStripMenuItem_Click);
|
||||
//
|
||||
// toolStripSeparator2
|
||||
//
|
||||
this.toolStripSeparator2.Name = "toolStripSeparator2";
|
||||
this.toolStripSeparator2.Size = new System.Drawing.Size(181, 6);
|
||||
this.toolStripSeparator2.Size = new System.Drawing.Size(196, 6);
|
||||
//
|
||||
// zmieńKolorTłaToolStripMenuItem
|
||||
//
|
||||
this.zmieńKolorTłaToolStripMenuItem.Name = "zmieńKolorTłaToolStripMenuItem";
|
||||
this.zmieńKolorTłaToolStripMenuItem.Size = new System.Drawing.Size(184, 22);
|
||||
this.zmieńKolorTłaToolStripMenuItem.Size = new System.Drawing.Size(199, 22);
|
||||
this.zmieńKolorTłaToolStripMenuItem.Text = "Zmień kolor tła";
|
||||
this.zmieńKolorTłaToolStripMenuItem.Click += new System.EventHandler(this.zmieńKolorTłaToolStripMenuItem_Click);
|
||||
//
|
||||
// zmieńKolorCzcionkiToolStripMenuItem
|
||||
//
|
||||
this.zmieńKolorCzcionkiToolStripMenuItem.Name = "zmieńKolorCzcionkiToolStripMenuItem";
|
||||
this.zmieńKolorCzcionkiToolStripMenuItem.Size = new System.Drawing.Size(184, 22);
|
||||
this.zmieńKolorCzcionkiToolStripMenuItem.Size = new System.Drawing.Size(199, 22);
|
||||
this.zmieńKolorCzcionkiToolStripMenuItem.Text = "Zmień kolor czcionki";
|
||||
this.zmieńKolorCzcionkiToolStripMenuItem.Click += new System.EventHandler(this.zmieńKolorCzcionkiToolStripMenuItem_Click);
|
||||
//
|
||||
// toolStripSeparator3
|
||||
//
|
||||
this.toolStripSeparator3.Name = "toolStripSeparator3";
|
||||
this.toolStripSeparator3.Size = new System.Drawing.Size(181, 6);
|
||||
this.toolStripSeparator3.Size = new System.Drawing.Size(196, 6);
|
||||
//
|
||||
// pogrubienieToolStripMenuItem
|
||||
//
|
||||
this.pogrubienieToolStripMenuItem.Name = "pogrubienieToolStripMenuItem";
|
||||
this.pogrubienieToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.B)));
|
||||
this.pogrubienieToolStripMenuItem.Size = new System.Drawing.Size(184, 22);
|
||||
this.pogrubienieToolStripMenuItem.Size = new System.Drawing.Size(199, 22);
|
||||
this.pogrubienieToolStripMenuItem.Text = "Pogrubienie";
|
||||
this.pogrubienieToolStripMenuItem.Click += new System.EventHandler(this.pogrubienieToolStripMenuItem_Click);
|
||||
//
|
||||
@@ -599,7 +601,7 @@ namespace Notatnik
|
||||
//
|
||||
this.kursywaToolStripMenuItem.Name = "kursywaToolStripMenuItem";
|
||||
this.kursywaToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.I)));
|
||||
this.kursywaToolStripMenuItem.Size = new System.Drawing.Size(184, 22);
|
||||
this.kursywaToolStripMenuItem.Size = new System.Drawing.Size(199, 22);
|
||||
this.kursywaToolStripMenuItem.Text = "Kursywa";
|
||||
this.kursywaToolStripMenuItem.Click += new System.EventHandler(this.kursywaToolStripMenuItem_Click);
|
||||
//
|
||||
@@ -607,21 +609,20 @@ namespace Notatnik
|
||||
//
|
||||
this.podkreślenieToolStripMenuItem.Name = "podkreślenieToolStripMenuItem";
|
||||
this.podkreślenieToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.U)));
|
||||
this.podkreślenieToolStripMenuItem.Size = new System.Drawing.Size(184, 22);
|
||||
this.podkreślenieToolStripMenuItem.Size = new System.Drawing.Size(199, 22);
|
||||
this.podkreślenieToolStripMenuItem.Text = "Podkreślenie";
|
||||
this.podkreślenieToolStripMenuItem.Click += new System.EventHandler(this.podkreślenieToolStripMenuItem_Click);
|
||||
//
|
||||
// updateSeparator
|
||||
//
|
||||
this.updateSeparator.Name = "updateSeparator";
|
||||
this.updateSeparator.Size = new System.Drawing.Size(181, 6);
|
||||
this.updateSeparator.Visible = false;
|
||||
this.updateSeparator.Size = new System.Drawing.Size(196, 6);
|
||||
//
|
||||
// updateToolStripMenuItem
|
||||
//
|
||||
this.updateToolStripMenuItem.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold);
|
||||
this.updateToolStripMenuItem.Name = "updateToolStripMenuItem";
|
||||
this.updateToolStripMenuItem.Size = new System.Drawing.Size(184, 22);
|
||||
this.updateToolStripMenuItem.Size = new System.Drawing.Size(199, 22);
|
||||
this.updateToolStripMenuItem.Text = "Update!";
|
||||
this.updateToolStripMenuItem.Visible = false;
|
||||
this.updateToolStripMenuItem.Click += new System.EventHandler(this.updateToolStripMenuItem_Click);
|
||||
@@ -684,6 +685,13 @@ namespace Notatnik
|
||||
this.printPreviewDialog1.Name = "printPreviewDialog1";
|
||||
this.printPreviewDialog1.Visible = false;
|
||||
//
|
||||
// informacjeOProgramieToolStripMenuItem
|
||||
//
|
||||
this.informacjeOProgramieToolStripMenuItem.Name = "informacjeOProgramieToolStripMenuItem";
|
||||
this.informacjeOProgramieToolStripMenuItem.Size = new System.Drawing.Size(199, 22);
|
||||
this.informacjeOProgramieToolStripMenuItem.Text = "Informacje o programie";
|
||||
this.informacjeOProgramieToolStripMenuItem.Click += new System.EventHandler(this.informacjeOProgramieToolStripMenuItem_Click);
|
||||
//
|
||||
// Form1
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
@@ -760,6 +768,7 @@ namespace Notatnik
|
||||
private System.Windows.Forms.Button button17;
|
||||
private System.Windows.Forms.ToolStripSeparator updateSeparator;
|
||||
private System.Windows.Forms.ToolStripMenuItem updateToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem informacjeOProgramieToolStripMenuItem;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+32
-11
@@ -29,12 +29,13 @@ namespace Notatnik
|
||||
{
|
||||
richTextBox1.Font = Properties.Settings.Default.Czcionka;
|
||||
richTextBox1.BackColor = Properties.Settings.Default.Tlo;
|
||||
richTextBox1.ForeColor = Properties.Settings.Default.KolorCzcionki;
|
||||
this.Size = Properties.Settings.Default.FormSize;
|
||||
wytnijToolStripMenuItem.Enabled = false;
|
||||
kopiujToolStripMenuItem.Enabled = false;
|
||||
button8.Enabled = false;
|
||||
button9.Enabled = false;
|
||||
|
||||
|
||||
if(NetworkInterface.GetIsNetworkAvailable())
|
||||
checkUpdate();
|
||||
}
|
||||
@@ -230,7 +231,11 @@ namespace Notatnik
|
||||
if(colorDialog1.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
if (richTextBox1.SelectedText.Length == 0 | richTextBox1.SelectedText.Length == richTextBox1.Text.Length)
|
||||
{
|
||||
richTextBox1.ForeColor = colorDialog1.Color;
|
||||
Properties.Settings.Default.KolorCzcionki = colorDialog1.Color;
|
||||
Properties.Settings.Default.Save();
|
||||
}
|
||||
else
|
||||
richTextBox1.SelectionColor = colorDialog1.Color;
|
||||
}
|
||||
@@ -373,13 +378,16 @@ namespace Notatnik
|
||||
|
||||
private void Form1_FormClosing(object sender, FormClosingEventArgs e)
|
||||
{
|
||||
if (MessageBox.Show("Czy chcesz zapisać plik?", "Notatnik", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.Yes)
|
||||
if(richTextBox1.Text != "")
|
||||
{
|
||||
if (filePath == Path.GetTempPath() + "null.txt")
|
||||
saveAsFile();
|
||||
else
|
||||
saveFile();
|
||||
}
|
||||
if (MessageBox.Show("Czy chcesz zapisać plik?", "Notatnik", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.Yes)
|
||||
{
|
||||
if (filePath == Path.GetTempPath() + "null.txt")
|
||||
saveAsFile();
|
||||
else
|
||||
saveFile();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void checkUpdate()
|
||||
@@ -396,16 +404,29 @@ namespace Notatnik
|
||||
{
|
||||
toolStripStatusLabel1.Text = "Jest dostępna nowa wersja! Jeżeli chcesz zainstalować, wybierz w Context Menu: Pobierz update!";
|
||||
statusStrip1.BackColor = Color.FromArgb(255, 202, 81, 0);
|
||||
|
||||
updateSeparator.Visible = true;
|
||||
updateToolStripMenuItem.Visible = true;
|
||||
}
|
||||
}
|
||||
|
||||
private void updateToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
Process.Start("updater.exe");
|
||||
this.Close();
|
||||
if (File.Exists(Application.StartupPath + "\\updater.exe"))
|
||||
{
|
||||
Process.Start("updater.exe");
|
||||
this.Close();
|
||||
} else
|
||||
{
|
||||
if(MessageBox.Show("Nie posiadasz programu do aktualizacji Notatnika. Być może dlatego, że jest to wersja Portable lub plik \"updater.exe\" został usunięty.", "Nie ma pliku updater.exe!", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.Yes)
|
||||
{
|
||||
Process.Start("https://github.com/KrzysiekSiemv/Notepad/releases");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void informacjeOProgramieToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
Info info = new Info();
|
||||
info.Show();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Generated
+136
@@ -0,0 +1,136 @@
|
||||
|
||||
namespace Notatnik
|
||||
{
|
||||
partial class Info
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Info));
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.linkLabel1 = new System.Windows.Forms.LinkLabel();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.linkLabel2 = new System.Windows.Forms.LinkLabel();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.label1.Location = new System.Drawing.Point(0, 0);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(284, 30);
|
||||
this.label1.TabIndex = 0;
|
||||
this.label1.Text = "Notatnik";
|
||||
this.label1.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.label2.Location = new System.Drawing.Point(12, 30);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(70, 20);
|
||||
this.label2.TabIndex = 1;
|
||||
this.label2.Text = "Twórca:";
|
||||
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.label3.Location = new System.Drawing.Point(12, 50);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(70, 20);
|
||||
this.label3.TabIndex = 2;
|
||||
this.label3.Text = "Wersja:";
|
||||
this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
//
|
||||
// linkLabel1
|
||||
//
|
||||
this.linkLabel1.AutoSize = true;
|
||||
this.linkLabel1.Location = new System.Drawing.Point(88, 34);
|
||||
this.linkLabel1.Name = "linkLabel1";
|
||||
this.linkLabel1.Size = new System.Drawing.Size(166, 13);
|
||||
this.linkLabel1.TabIndex = 3;
|
||||
this.linkLabel1.TabStop = true;
|
||||
this.linkLabel1.Text = "Krzysztof \"KrzysiekSiemv\" Smaga";
|
||||
this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked);
|
||||
//
|
||||
// label4
|
||||
//
|
||||
this.label4.AutoSize = true;
|
||||
this.label4.Location = new System.Drawing.Point(88, 54);
|
||||
this.label4.Name = "label4";
|
||||
this.label4.Size = new System.Drawing.Size(35, 13);
|
||||
this.label4.TabIndex = 4;
|
||||
this.label4.Text = "label4";
|
||||
//
|
||||
// linkLabel2
|
||||
//
|
||||
this.linkLabel2.AutoSize = true;
|
||||
this.linkLabel2.Location = new System.Drawing.Point(181, 89);
|
||||
this.linkLabel2.Name = "linkLabel2";
|
||||
this.linkLabel2.Size = new System.Drawing.Size(91, 13);
|
||||
this.linkLabel2.TabIndex = 5;
|
||||
this.linkLabel2.TabStop = true;
|
||||
this.linkLabel2.Text = "Wpłać darowiznę";
|
||||
this.linkLabel2.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel2_LinkClicked);
|
||||
//
|
||||
// Info
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(284, 111);
|
||||
this.Controls.Add(this.linkLabel2);
|
||||
this.Controls.Add(this.label4);
|
||||
this.Controls.Add(this.linkLabel1);
|
||||
this.Controls.Add(this.label3);
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.MaximizeBox = false;
|
||||
this.MaximumSize = new System.Drawing.Size(300, 150);
|
||||
this.MinimizeBox = false;
|
||||
this.MinimumSize = new System.Drawing.Size(300, 150);
|
||||
this.Name = "Info";
|
||||
this.Text = "Informacje o programie";
|
||||
this.Load += new System.EventHandler(this.Info_Load);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.LinkLabel linkLabel1;
|
||||
private System.Windows.Forms.Label label4;
|
||||
private System.Windows.Forms.LinkLabel linkLabel2;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
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;
|
||||
|
||||
namespace Notatnik
|
||||
{
|
||||
public partial class Info : Form
|
||||
{
|
||||
public Info() { InitializeComponent(); }
|
||||
private void Info_Load(object sender, EventArgs e) { label4.Text = Application.ProductVersion; }
|
||||
private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { System.Diagnostics.Process.Start("https://github.com/KrzysiekSiemv"); }
|
||||
private void linkLabel2_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { System.Diagnostics.Process.Start("https://tipply.pl/u/krzysieksiemv"); }
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -82,6 +82,12 @@
|
||||
<Compile Include="Form1.Designer.cs">
|
||||
<DependentUpon>Form1.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Info.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Info.Designer.cs">
|
||||
<DependentUpon>Info.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Update.cs">
|
||||
@@ -93,6 +99,9 @@
|
||||
<EmbeddedResource Include="Form1.resx">
|
||||
<DependentUpon>Form1.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Info.resx">
|
||||
<DependentUpon>Info.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
|
||||
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
||||
// Możesz określić wszystkie wartości lub użyć domyślnych numerów kompilacji i poprawki
|
||||
// przy użyciu symbolu „*”, tak jak pokazano poniżej:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.1.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.1.0")]
|
||||
[assembly: AssemblyVersion("1.0.3.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.3.0")]
|
||||
|
||||
+11
@@ -70,5 +70,16 @@ namespace Notatnik.Properties {
|
||||
this["FirstRun"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
public global::System.Drawing.Color KolorCzcionki {
|
||||
get {
|
||||
return ((global::System.Drawing.Color)(this["KolorCzcionki"]));
|
||||
}
|
||||
set {
|
||||
this["KolorCzcionki"] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,5 +14,8 @@
|
||||
<Setting Name="FirstRun" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">True</Value>
|
||||
</Setting>
|
||||
<Setting Name="KolorCzcionki" Type="System.Drawing.Color" Scope="User">
|
||||
<Value Profile="(Default)" />
|
||||
</Setting>
|
||||
</Settings>
|
||||
</SettingsFile>
|
||||
Binary file not shown.
@@ -23,6 +23,9 @@
|
||||
<setting name="FirstRun" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
<setting name="KolorCzcionki" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
</Notatnik.Properties.Settings>
|
||||
<Notepad_v2.Properties.Settings>
|
||||
<setting name="Czcionka" serializeAs="String">
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1 +1 @@
|
||||
75f58dc4ce47ae60a4b7e2aa90a185fab752a7be
|
||||
df752835c6004492f28e25014c00264fb7368a30
|
||||
|
||||
@@ -19,3 +19,4 @@ C:\Users\Krzysiek\Documents\GitHub\Notepad\Notepad\Notepad v2\obj\Debug\Notepad
|
||||
C:\Users\Krzysiek\Documents\GitHub\Notepad\Notepad\Notepad v2\obj\Debug\Notatnik.exe
|
||||
C:\Users\Krzysiek\Documents\GitHub\Notepad\Notepad\Notepad v2\obj\Debug\Notatnik.pdb
|
||||
C:\Users\Krzysiek\Documents\GitHub\Notepad\Notepad\Notepad v2\obj\Debug\Notatnik.Update.resources
|
||||
C:\Users\Krzysiek\Documents\GitHub\Notepad\Notepad\Notepad v2\obj\Debug\Notatnik.Info.resources
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
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