blep
This commit is contained in:
@@ -15,11 +15,14 @@
|
||||
<value>Calibri, 12pt</value>
|
||||
</setting>
|
||||
<setting name="FormSize" serializeAs="String">
|
||||
<value>900, 512</value>
|
||||
<value>1044, 700</value>
|
||||
</setting>
|
||||
<setting name="Tlo" serializeAs="String">
|
||||
<value>White</value>
|
||||
</setting>
|
||||
<setting name="FirstRun" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
</Notatnik.Properties.Settings>
|
||||
<Notepad_v2.Properties.Settings>
|
||||
<setting name="Czcionka" serializeAs="String">
|
||||
|
||||
Generated
+114
-94
@@ -32,6 +32,9 @@ namespace Notatnik
|
||||
this.components = new System.ComponentModel.Container();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
|
||||
this.panel1 = new System.Windows.Forms.Panel();
|
||||
this.button15 = new System.Windows.Forms.Button();
|
||||
this.button16 = new System.Windows.Forms.Button();
|
||||
this.button17 = new System.Windows.Forms.Button();
|
||||
this.button14 = new System.Windows.Forms.Button();
|
||||
this.button13 = new System.Windows.Forms.Button();
|
||||
this.button12 = new System.Windows.Forms.Button();
|
||||
@@ -58,6 +61,10 @@ namespace Notatnik
|
||||
this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.zmieńKolorTłaToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.zmieńKolorCzcionkiToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.pogrubienieToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.kursywaToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.podkreślenieToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
|
||||
this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
|
||||
this.saveFileDialog1 = new System.Windows.Forms.SaveFileDialog();
|
||||
@@ -69,13 +76,8 @@ namespace Notatnik
|
||||
this.printPreviewDialog1 = new System.Windows.Forms.PrintPreviewDialog();
|
||||
this.colorDialog1 = new System.Windows.Forms.ColorDialog();
|
||||
this.colorDialog2 = new System.Windows.Forms.ColorDialog();
|
||||
this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.pogrubienieToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.kursywaToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.podkreślenieToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.button15 = new System.Windows.Forms.Button();
|
||||
this.button16 = new System.Windows.Forms.Button();
|
||||
this.button17 = new System.Windows.Forms.Button();
|
||||
this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.updateToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.panel1.SuspendLayout();
|
||||
this.contextMenuStrip1.SuspendLayout();
|
||||
this.statusStrip1.SuspendLayout();
|
||||
@@ -107,6 +109,66 @@ namespace Notatnik
|
||||
this.panel1.Size = new System.Drawing.Size(44, 639);
|
||||
this.panel1.TabIndex = 0;
|
||||
//
|
||||
// button15
|
||||
//
|
||||
this.button15.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.button15.FlatAppearance.BorderSize = 0;
|
||||
this.button15.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent;
|
||||
this.button15.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent;
|
||||
this.button15.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.button15.Font = new System.Drawing.Font("Segoe MDL2 Assets", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.button15.ForeColor = System.Drawing.Color.White;
|
||||
this.button15.Location = new System.Drawing.Point(5, 481);
|
||||
this.button15.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.button15.Name = "button15";
|
||||
this.button15.Size = new System.Drawing.Size(36, 36);
|
||||
this.button15.TabIndex = 19;
|
||||
this.button15.Text = "";
|
||||
this.button15.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
this.toolTip1.SetToolTip(this.button15, "Podkreślenie");
|
||||
this.button15.UseVisualStyleBackColor = true;
|
||||
this.button15.Click += new System.EventHandler(this.button15_Click);
|
||||
//
|
||||
// button16
|
||||
//
|
||||
this.button16.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.button16.FlatAppearance.BorderSize = 0;
|
||||
this.button16.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent;
|
||||
this.button16.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent;
|
||||
this.button16.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.button16.Font = new System.Drawing.Font("Segoe MDL2 Assets", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.button16.ForeColor = System.Drawing.Color.White;
|
||||
this.button16.Location = new System.Drawing.Point(5, 445);
|
||||
this.button16.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.button16.Name = "button16";
|
||||
this.button16.Size = new System.Drawing.Size(36, 36);
|
||||
this.button16.TabIndex = 18;
|
||||
this.button16.Text = "";
|
||||
this.button16.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
this.toolTip1.SetToolTip(this.button16, "Kursywa");
|
||||
this.button16.UseVisualStyleBackColor = true;
|
||||
this.button16.Click += new System.EventHandler(this.button16_Click);
|
||||
//
|
||||
// button17
|
||||
//
|
||||
this.button17.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.button17.FlatAppearance.BorderSize = 0;
|
||||
this.button17.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent;
|
||||
this.button17.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent;
|
||||
this.button17.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.button17.Font = new System.Drawing.Font("Segoe MDL2 Assets", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.button17.ForeColor = System.Drawing.Color.White;
|
||||
this.button17.Location = new System.Drawing.Point(5, 409);
|
||||
this.button17.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.button17.Name = "button17";
|
||||
this.button17.Size = new System.Drawing.Size(36, 36);
|
||||
this.button17.TabIndex = 17;
|
||||
this.button17.Text = "";
|
||||
this.button17.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
this.toolTip1.SetToolTip(this.button17, "Pobrugienie");
|
||||
this.button17.UseVisualStyleBackColor = true;
|
||||
this.button17.Click += new System.EventHandler(this.button17_Click);
|
||||
//
|
||||
// button14
|
||||
//
|
||||
this.button14.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
@@ -450,9 +512,11 @@ namespace Notatnik
|
||||
this.toolStripSeparator3,
|
||||
this.pogrubienieToolStripMenuItem,
|
||||
this.kursywaToolStripMenuItem,
|
||||
this.podkreślenieToolStripMenuItem});
|
||||
this.podkreślenieToolStripMenuItem,
|
||||
this.toolStripSeparator4,
|
||||
this.updateToolStripMenuItem});
|
||||
this.contextMenuStrip1.Name = "contextMenuStrip1";
|
||||
this.contextMenuStrip1.Size = new System.Drawing.Size(185, 242);
|
||||
this.contextMenuStrip1.Size = new System.Drawing.Size(185, 292);
|
||||
//
|
||||
// kopiujToolStripMenuItem
|
||||
//
|
||||
@@ -518,6 +582,35 @@ namespace Notatnik
|
||||
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);
|
||||
//
|
||||
// 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.Text = "Pogrubienie";
|
||||
this.pogrubienieToolStripMenuItem.Click += new System.EventHandler(this.pogrubienieToolStripMenuItem_Click);
|
||||
//
|
||||
// kursywaToolStripMenuItem
|
||||
//
|
||||
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.Text = "Kursywa";
|
||||
this.kursywaToolStripMenuItem.Click += new System.EventHandler(this.kursywaToolStripMenuItem_Click);
|
||||
//
|
||||
// podkreślenieToolStripMenuItem
|
||||
//
|
||||
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.Text = "Podkreślenie";
|
||||
this.podkreślenieToolStripMenuItem.Click += new System.EventHandler(this.podkreślenieToolStripMenuItem_Click);
|
||||
//
|
||||
// openFileDialog1
|
||||
//
|
||||
this.openFileDialog1.Filter = "Plik tekstowy (*.txt)|*.txt|Tekst sformatowany (*.rtf)|*.rtf|Strona HTML (*.html)" +
|
||||
@@ -576,94 +669,19 @@ namespace Notatnik
|
||||
this.printPreviewDialog1.Name = "printPreviewDialog1";
|
||||
this.printPreviewDialog1.Visible = false;
|
||||
//
|
||||
// toolStripSeparator3
|
||||
// toolStripSeparator4
|
||||
//
|
||||
this.toolStripSeparator3.Name = "toolStripSeparator3";
|
||||
this.toolStripSeparator3.Size = new System.Drawing.Size(181, 6);
|
||||
this.toolStripSeparator4.Name = "toolStripSeparator4";
|
||||
this.toolStripSeparator4.Size = new System.Drawing.Size(181, 6);
|
||||
//
|
||||
// pogrubienieToolStripMenuItem
|
||||
// updateToolStripMenuItem
|
||||
//
|
||||
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.Text = "Pogrubienie";
|
||||
this.pogrubienieToolStripMenuItem.Click += new System.EventHandler(this.pogrubienieToolStripMenuItem_Click);
|
||||
//
|
||||
// kursywaToolStripMenuItem
|
||||
//
|
||||
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.Text = "Kursywa";
|
||||
this.kursywaToolStripMenuItem.Click += new System.EventHandler(this.kursywaToolStripMenuItem_Click);
|
||||
//
|
||||
// podkreślenieToolStripMenuItem
|
||||
//
|
||||
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.Text = "Podkreślenie";
|
||||
this.podkreślenieToolStripMenuItem.Click += new System.EventHandler(this.podkreślenieToolStripMenuItem_Click);
|
||||
//
|
||||
// button15
|
||||
//
|
||||
this.button15.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.button15.FlatAppearance.BorderSize = 0;
|
||||
this.button15.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent;
|
||||
this.button15.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent;
|
||||
this.button15.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.button15.Font = new System.Drawing.Font("Segoe MDL2 Assets", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.button15.ForeColor = System.Drawing.Color.White;
|
||||
this.button15.Location = new System.Drawing.Point(5, 481);
|
||||
this.button15.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.button15.Name = "button15";
|
||||
this.button15.Size = new System.Drawing.Size(36, 36);
|
||||
this.button15.TabIndex = 19;
|
||||
this.button15.Text = "";
|
||||
this.button15.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
this.toolTip1.SetToolTip(this.button15, "Podkreślenie");
|
||||
this.button15.UseVisualStyleBackColor = true;
|
||||
this.button15.Click += new System.EventHandler(this.button15_Click);
|
||||
//
|
||||
// button16
|
||||
//
|
||||
this.button16.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.button16.FlatAppearance.BorderSize = 0;
|
||||
this.button16.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent;
|
||||
this.button16.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent;
|
||||
this.button16.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.button16.Font = new System.Drawing.Font("Segoe MDL2 Assets", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.button16.ForeColor = System.Drawing.Color.White;
|
||||
this.button16.Location = new System.Drawing.Point(5, 445);
|
||||
this.button16.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.button16.Name = "button16";
|
||||
this.button16.Size = new System.Drawing.Size(36, 36);
|
||||
this.button16.TabIndex = 18;
|
||||
this.button16.Text = "";
|
||||
this.button16.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
this.toolTip1.SetToolTip(this.button16, "Kursywa");
|
||||
this.button16.UseVisualStyleBackColor = true;
|
||||
this.button16.Click += new System.EventHandler(this.button16_Click);
|
||||
//
|
||||
// button17
|
||||
//
|
||||
this.button17.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.button17.FlatAppearance.BorderSize = 0;
|
||||
this.button17.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent;
|
||||
this.button17.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent;
|
||||
this.button17.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.button17.Font = new System.Drawing.Font("Segoe MDL2 Assets", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.button17.ForeColor = System.Drawing.Color.White;
|
||||
this.button17.Location = new System.Drawing.Point(5, 409);
|
||||
this.button17.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.button17.Name = "button17";
|
||||
this.button17.Size = new System.Drawing.Size(36, 36);
|
||||
this.button17.TabIndex = 17;
|
||||
this.button17.Text = "";
|
||||
this.button17.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
this.toolTip1.SetToolTip(this.button17, "Pobrugienie");
|
||||
this.button17.UseVisualStyleBackColor = true;
|
||||
this.button17.Click += new System.EventHandler(this.button17_Click);
|
||||
this.updateToolStripMenuItem.Enabled = false;
|
||||
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.Text = "Update!";
|
||||
this.updateToolStripMenuItem.Click += new System.EventHandler(this.updateToolStripMenuItem_Click);
|
||||
//
|
||||
// Form1
|
||||
//
|
||||
@@ -739,6 +757,8 @@ namespace Notatnik
|
||||
private System.Windows.Forms.Button button15;
|
||||
private System.Windows.Forms.Button button16;
|
||||
private System.Windows.Forms.Button button17;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator4;
|
||||
private System.Windows.Forms.ToolStripMenuItem updateToolStripMenuItem;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+57
-30
@@ -8,6 +8,8 @@ using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using System.Net.NetworkInformation;
|
||||
|
||||
namespace Notatnik
|
||||
{
|
||||
@@ -16,6 +18,7 @@ namespace Notatnik
|
||||
public string filePath = Path.GetTempPath() + "null.txt";
|
||||
private string[] lines;
|
||||
private int printedLines;
|
||||
|
||||
public Form1()
|
||||
{
|
||||
InitializeComponent();
|
||||
@@ -31,9 +34,13 @@ namespace Notatnik
|
||||
button8.Enabled = false;
|
||||
button9.Enabled = false;
|
||||
|
||||
TextWriter textWriter = new StreamWriter(filePath);
|
||||
textWriter.Write("null");
|
||||
textWriter.Close();
|
||||
if(NetworkInterface.GetIsNetworkAvailable())
|
||||
checkUpdate();
|
||||
}
|
||||
|
||||
public void openFile_FromExplorer(String[] file) {
|
||||
filePath = file[0];
|
||||
openFile(true);
|
||||
}
|
||||
|
||||
#region Zmiany kolorów przycisków
|
||||
@@ -156,18 +163,28 @@ namespace Notatnik
|
||||
}
|
||||
}
|
||||
|
||||
void openFile()
|
||||
void openFile(bool fromCmd)
|
||||
{
|
||||
if (openFileDialog1.ShowDialog() == DialogResult.OK)
|
||||
if (fromCmd)
|
||||
{
|
||||
filePath = openFileDialog1.FileName;
|
||||
this.Text = openFileDialog1.FileName + " - Notatnik";
|
||||
|
||||
var fileStream = openFileDialog1.OpenFile();
|
||||
TextReader textReader = new StreamReader(fileStream);
|
||||
richTextBox1.Text = textReader.ReadToEnd();
|
||||
this.Text = filePath + " - Notatnik";
|
||||
StreamReader streamReader = new StreamReader(filePath);
|
||||
richTextBox1.Text = streamReader.ReadToEnd();
|
||||
streamReader.Close();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (openFileDialog1.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
filePath = openFileDialog1.FileName;
|
||||
this.Text = openFileDialog1.FileName + " - Notatnik";
|
||||
|
||||
var fileStream = openFileDialog1.OpenFile();
|
||||
TextReader textReader = new StreamReader(fileStream);
|
||||
richTextBox1.Text = textReader.ReadToEnd();
|
||||
}
|
||||
toolStripStatusLabel1.Text = "Otwarto plik " + openFileDialog1.FileName + "!";
|
||||
}
|
||||
toolStripStatusLabel1.Text = "Otwarto plik " + openFileDialog1.FileName + "!";
|
||||
}
|
||||
|
||||
void saveFile()
|
||||
@@ -284,7 +301,7 @@ namespace Notatnik
|
||||
#endregion
|
||||
#region Skrypty odpowiadające za przyciski
|
||||
private void button1_Click(object sender, EventArgs e) { newFile(); }
|
||||
private void button2_Click(object sender, EventArgs e) { openFile(); }
|
||||
private void button2_Click(object sender, EventArgs e) { openFile(false); }
|
||||
private void button3_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (filePath == Path.GetTempPath() + "null.txt")
|
||||
@@ -355,27 +372,37 @@ namespace Notatnik
|
||||
|
||||
private void Form1_FormClosing(object sender, FormClosingEventArgs e)
|
||||
{
|
||||
TextReader textReader = new StreamReader(filePath);
|
||||
if (filePath != Path.GetTempPath() + "null.txt" && richTextBox1.Text == "")
|
||||
if (MessageBox.Show("Czy chcesz zapisać plik?", "Notatnik", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.Yes)
|
||||
{
|
||||
if (richTextBox1.Text == textReader.ReadToEnd())
|
||||
{
|
||||
if (MessageBox.Show("W tym pliku zostały wprowadzone zmiany. Czy chcesz je zapisać", "Notatnik", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.Yes)
|
||||
{
|
||||
if (filePath == Path.GetTempPath() + "null.txt")
|
||||
saveAsFile();
|
||||
else
|
||||
saveFile();
|
||||
}
|
||||
else
|
||||
Application.Exit();
|
||||
}
|
||||
if (filePath == Path.GetTempPath() + "null.txt")
|
||||
saveAsFile();
|
||||
else
|
||||
Application.Exit();
|
||||
saveFile();
|
||||
}
|
||||
else
|
||||
Application.Exit();
|
||||
}
|
||||
|
||||
void checkUpdate()
|
||||
{
|
||||
string urlVersion = "https://raw.githubusercontent.com/KrzysiekSiemv/Notepad/main/version.txt";
|
||||
WebClient webClient = new WebClient();
|
||||
Stream stream = webClient.OpenRead(urlVersion);
|
||||
|
||||
StreamReader reader = new StreamReader(stream);
|
||||
String content = reader.ReadToEnd();
|
||||
|
||||
if(Application.ProductVersion != content)
|
||||
{
|
||||
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);
|
||||
|
||||
updateToolStripMenuItem.Enabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
private void updateToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
Update update = new Update();
|
||||
update.Show();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -123,6 +123,9 @@
|
||||
<metadata name="contextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>1285, 17</value>
|
||||
</metadata>
|
||||
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="openFileDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>114, 17</value>
|
||||
</metadata>
|
||||
|
||||
@@ -11,6 +11,25 @@
|
||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<Deterministic>true</Deterministic>
|
||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||
<PublishUrl>publikuj\</PublishUrl>
|
||||
<Install>true</Install>
|
||||
<InstallFrom>Disk</InstallFrom>
|
||||
<UpdateEnabled>false</UpdateEnabled>
|
||||
<UpdateMode>Foreground</UpdateMode>
|
||||
<UpdateInterval>7</UpdateInterval>
|
||||
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
|
||||
<UpdatePeriodically>false</UpdatePeriodically>
|
||||
<UpdateRequired>false</UpdateRequired>
|
||||
<MapFileExtensions>true</MapFileExtensions>
|
||||
<TargetCulture>pl-PL</TargetCulture>
|
||||
<ProductName>Notatnik</ProductName>
|
||||
<PublisherName>Krzysztof %27KrzysiekSiemv%27 Smaga</PublisherName>
|
||||
<SuiteName>Notepad</SuiteName>
|
||||
<ApplicationRevision>0</ApplicationRevision>
|
||||
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
@@ -34,6 +53,15 @@
|
||||
<PropertyGroup>
|
||||
<ApplicationIcon>icon.ico</ApplicationIcon>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<TargetZone>LocalIntranet</TargetZone>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<GenerateManifests>false</GenerateManifests>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ApplicationManifest>Properties\app.manifest</ApplicationManifest>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
@@ -56,6 +84,12 @@
|
||||
</Compile>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Update.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Update.Designer.cs">
|
||||
<DependentUpon>Update.cs</DependentUpon>
|
||||
</Compile>
|
||||
<EmbeddedResource Include="Form1.resx">
|
||||
<DependentUpon>Form1.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
@@ -69,6 +103,10 @@
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
<DesignTime>True</DesignTime>
|
||||
</Compile>
|
||||
<EmbeddedResource Include="Update.resx">
|
||||
<DependentUpon>Update.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<None Include="Properties\app.manifest" />
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
@@ -85,5 +123,20 @@
|
||||
<ItemGroup>
|
||||
<Content Include="icon.ico" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<FileAssociation Include=".txt">
|
||||
<Visible>False</Visible>
|
||||
<Description>Plik tekstowy</Description>
|
||||
<Progid>1</Progid>
|
||||
<DefaultIcon>icon.ico</DefaultIcon>
|
||||
</FileAssociation>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
||||
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<PublishUrlHistory>publikuj\</PublishUrlHistory>
|
||||
<InstallUrlHistory />
|
||||
<SupportUrlHistory />
|
||||
<UpdateUrlHistory />
|
||||
<BootstrapperUrlHistory />
|
||||
<ErrorReportUrlHistory />
|
||||
<FallbackCulture>pl-PL</FallbackCulture>
|
||||
<VerifyUploadedFiles>false</VerifyUploadedFiles>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -12,11 +12,21 @@ namespace Notatnik
|
||||
/// Główny punkt wejścia dla aplikacji.
|
||||
/// </summary>
|
||||
[STAThread]
|
||||
static void Main()
|
||||
static void Main(String[] args)
|
||||
{
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
Application.Run(new Form1());
|
||||
Application.EnableVisualStyles();
|
||||
Form1 form1 = new Form1();
|
||||
|
||||
if (args.Length > 0)
|
||||
{
|
||||
form1.openFile_FromExplorer(args);
|
||||
Application.Run(form1);
|
||||
}
|
||||
else
|
||||
{
|
||||
Application.Run(form1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ using System.Runtime.InteropServices;
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("Krzysztof 'KrzysiekSiemv' Smaga")]
|
||||
[assembly: AssemblyProduct("Notatnik")]
|
||||
[assembly: AssemblyCopyright("Copyright © Krzysztof Smaga 2020")]
|
||||
[assembly: AssemblyCopyright("Copyright © Krzysztof Smaga 2021")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
|
||||
+13
-1
@@ -37,7 +37,7 @@ namespace Notatnik.Properties {
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("900, 512")]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("1044, 700")]
|
||||
public global::System.Drawing.Size FormSize {
|
||||
get {
|
||||
return ((global::System.Drawing.Size)(this["FormSize"]));
|
||||
@@ -58,5 +58,17 @@ namespace Notatnik.Properties {
|
||||
this["Tlo"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("True")]
|
||||
public bool FirstRun {
|
||||
get {
|
||||
return ((bool)(this["FirstRun"]));
|
||||
}
|
||||
set {
|
||||
this["FirstRun"] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,10 +6,13 @@
|
||||
<Value Profile="(Default)">Calibri, 12pt</Value>
|
||||
</Setting>
|
||||
<Setting Name="FormSize" Type="System.Drawing.Size" Scope="User">
|
||||
<Value Profile="(Default)">900, 512</Value>
|
||||
<Value Profile="(Default)">1044, 700</Value>
|
||||
</Setting>
|
||||
<Setting Name="Tlo" Type="System.Drawing.Color" Scope="User">
|
||||
<Value Profile="(Default)">White</Value>
|
||||
</Setting>
|
||||
<Setting Name="FirstRun" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">True</Value>
|
||||
</Setting>
|
||||
</Settings>
|
||||
</SettingsFile>
|
||||
@@ -0,0 +1,70 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<assemblyIdentity version="1.0.0.0" name="MyApplication.app" />
|
||||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
|
||||
<security>
|
||||
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
<!-- Opcje manifestu Kontroli konta użytkownika
|
||||
Jeśli chcesz zmienić poziom Kontroli konta użytkownika systemu Windows, zastąp
|
||||
węzeł requestedExecutionLevel jednym z następujących.
|
||||
|
||||
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
|
||||
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
|
||||
<requestedExecutionLevel level="highestAvailable" uiAccess="false" />
|
||||
|
||||
Określenie elementu requestedExecutionLevel spowoduje wyłączenie wirtualizacji plików i rejestru.
|
||||
Usuń ten element, jeśli aplikacja wymaga wirtualizacji w celu zachowania
|
||||
zgodności z poprzednimi wersjami.
|
||||
-->
|
||||
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
|
||||
</requestedPrivileges>
|
||||
<applicationRequestMinimum>
|
||||
<defaultAssemblyRequest permissionSetReference="Custom" />
|
||||
<PermissionSet class="System.Security.PermissionSet" version="1" Unrestricted="true" ID="Custom" SameSite="site" />
|
||||
</applicationRequestMinimum>
|
||||
</security>
|
||||
</trustInfo>
|
||||
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
|
||||
<application>
|
||||
<!-- Lista wersji systemu Windows, na których ta aplikacja została przetestowana
|
||||
i dla których została zaprojektowana. Odkomentuj odpowiednie elementy, a system Windows
|
||||
automatycznie wybierze najbardziej zgodne środowisko. -->
|
||||
<!-- Windows Vista -->
|
||||
<!--<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}" />-->
|
||||
<!-- Windows 7 -->
|
||||
<!--<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}" />-->
|
||||
<!-- Windows 8 -->
|
||||
<!--<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}" />-->
|
||||
<!-- Windows 8.1 -->
|
||||
<!--<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}" />-->
|
||||
<!-- Windows 10 -->
|
||||
<!--<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />-->
|
||||
</application>
|
||||
</compatibility>
|
||||
<!-- Wskazuje, że aplikacja rozpoznaje wartości DPI i nie będzie automatycznie skalowana przez system Windows przy dużych
|
||||
wartościach DPI. Aplikacje korzystające z technologii Windows Presentation Foundation (WPF) automatycznie rozpoznają wartości DPI i nie potrzebują
|
||||
tej opcji. Aplikacje korzystające z technologii Windows Forms przeznaczone dla platformy .NET Framework 4.6, które korzystają z tej opcji, powinny
|
||||
ustawić także wartość „true” dla parametru „EnableWindowsFormsHighDpiAutoResizing” w pliku app.config. -->
|
||||
<!--
|
||||
<application xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
<windowsSettings>
|
||||
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
|
||||
</windowsSettings>
|
||||
</application>
|
||||
-->
|
||||
<!-- Włącz motywy dla typowych formantów systemu Windows i okien dialogowych (system Windows XP i nowsze) -->
|
||||
<!--
|
||||
<dependency>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity
|
||||
type="win32"
|
||||
name="Microsoft.Windows.Common-Controls"
|
||||
version="6.0.0.0"
|
||||
processorArchitecture="*"
|
||||
publicKeyToken="6595b64144ccf1df"
|
||||
language="*"
|
||||
/>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
-->
|
||||
</assembly>
|
||||
Generated
+141
@@ -0,0 +1,141 @@
|
||||
|
||||
namespace Notatnik
|
||||
{
|
||||
partial class Update
|
||||
{
|
||||
/// <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()
|
||||
{
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.richTextBox1 = new System.Windows.Forms.RichTextBox();
|
||||
this.button1 = new System.Windows.Forms.Button();
|
||||
this.progressBar1 = new System.Windows.Forms.ProgressBar();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(13, 13);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(81, 13);
|
||||
this.label1.TabIndex = 0;
|
||||
this.label1.Text = "Obecna wersja:";
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(23, 35);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(71, 13);
|
||||
this.label2.TabIndex = 1;
|
||||
this.label2.Text = "Nowa wersja:";
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Location = new System.Drawing.Point(100, 13);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(31, 13);
|
||||
this.label3.TabIndex = 2;
|
||||
this.label3.Text = "1.0.2";
|
||||
//
|
||||
// label4
|
||||
//
|
||||
this.label4.AutoSize = true;
|
||||
this.label4.Location = new System.Drawing.Point(100, 35);
|
||||
this.label4.Name = "label4";
|
||||
this.label4.Size = new System.Drawing.Size(31, 13);
|
||||
this.label4.TabIndex = 3;
|
||||
this.label4.Text = "1.0.3";
|
||||
//
|
||||
// richTextBox1
|
||||
//
|
||||
this.richTextBox1.BorderStyle = System.Windows.Forms.BorderStyle.None;
|
||||
this.richTextBox1.Location = new System.Drawing.Point(12, 61);
|
||||
this.richTextBox1.Name = "richTextBox1";
|
||||
this.richTextBox1.ReadOnly = true;
|
||||
this.richTextBox1.Size = new System.Drawing.Size(417, 157);
|
||||
this.richTextBox1.TabIndex = 5;
|
||||
this.richTextBox1.Text = "";
|
||||
//
|
||||
// button1
|
||||
//
|
||||
this.button1.Location = new System.Drawing.Point(330, 19);
|
||||
this.button1.Name = "button1";
|
||||
this.button1.Size = new System.Drawing.Size(99, 23);
|
||||
this.button1.TabIndex = 6;
|
||||
this.button1.Text = "Update";
|
||||
this.button1.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// progressBar1
|
||||
//
|
||||
this.progressBar1.Location = new System.Drawing.Point(12, 224);
|
||||
this.progressBar1.Name = "progressBar1";
|
||||
this.progressBar1.Size = new System.Drawing.Size(417, 23);
|
||||
this.progressBar1.TabIndex = 7;
|
||||
//
|
||||
// Update
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(441, 259);
|
||||
this.Controls.Add(this.progressBar1);
|
||||
this.Controls.Add(this.button1);
|
||||
this.Controls.Add(this.richTextBox1);
|
||||
this.Controls.Add(this.label4);
|
||||
this.Controls.Add(this.label3);
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.label1);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
|
||||
this.MaximizeBox = false;
|
||||
this.MaximumSize = new System.Drawing.Size(457, 298);
|
||||
this.MinimizeBox = false;
|
||||
this.MinimumSize = new System.Drawing.Size(457, 298);
|
||||
this.Name = "Update";
|
||||
this.ShowIcon = false;
|
||||
this.ShowInTaskbar = false;
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "Update notatnika";
|
||||
this.Load += new System.EventHandler(this.Update_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.Label label4;
|
||||
private System.Windows.Forms.RichTextBox richTextBox1;
|
||||
private System.Windows.Forms.Button button1;
|
||||
private System.Windows.Forms.ProgressBar progressBar1;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
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 System.Net;
|
||||
using System.IO;
|
||||
|
||||
namespace Notatnik
|
||||
{
|
||||
public partial class Update : Form
|
||||
{
|
||||
WebClient webClient;
|
||||
String content;
|
||||
public Update()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void Update_Load(object sender, EventArgs e)
|
||||
{
|
||||
string urlVersion = "https://raw.githubusercontent.com/KrzysiekSiemv/Notepad/main/version.txt";
|
||||
webClient = new WebClient();
|
||||
Stream stream = webClient.OpenRead(urlVersion);
|
||||
|
||||
StreamReader reader = new StreamReader(stream);
|
||||
content = reader.ReadToEnd();
|
||||
|
||||
label3.Text = Application.ProductVersion;
|
||||
label4.Text = content;
|
||||
}
|
||||
|
||||
void downloadUpdate()
|
||||
{
|
||||
webClient.DownloadFile("https://github.com/KrzysiekSiemv/Notepad/releases/download/" + content + "/Notatnik.exe", Path.GetTempPath() + "\\Notatnik\\NotatnikUpdate.exe");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
<?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>
|
||||
</root>
|
||||
Binary file not shown.
@@ -15,7 +15,7 @@
|
||||
<value>Calibri, 12pt</value>
|
||||
</setting>
|
||||
<setting name="FormSize" serializeAs="String">
|
||||
<value>900, 512</value>
|
||||
<value>1044, 700</value>
|
||||
</setting>
|
||||
<setting name="Tlo" serializeAs="String">
|
||||
<value>White</value>
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -15,11 +15,14 @@
|
||||
<value>Calibri, 12pt</value>
|
||||
</setting>
|
||||
<setting name="FormSize" serializeAs="String">
|
||||
<value>900, 512</value>
|
||||
<value>1044, 700</value>
|
||||
</setting>
|
||||
<setting name="Tlo" serializeAs="String">
|
||||
<value>White</value>
|
||||
</setting>
|
||||
<setting name="FirstRun" serializeAs="String">
|
||||
<value>True</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.
@@ -8,3 +8,13 @@ C:\Users\Krzysiek\source\repos\Notepad v2\Notepad v2\bin\Debug\Notatnik.exe
|
||||
C:\Users\Krzysiek\source\repos\Notepad v2\Notepad v2\bin\Debug\Notatnik.pdb
|
||||
C:\Users\Krzysiek\source\repos\Notepad v2\Notepad v2\obj\Debug\Notatnik.exe
|
||||
C:\Users\Krzysiek\source\repos\Notepad v2\Notepad v2\obj\Debug\Notatnik.pdb
|
||||
C:\Users\Krzysiek\Documents\GitHub\Notepad\Notepad\Notepad v2\bin\Debug\Notatnik.exe.config
|
||||
C:\Users\Krzysiek\Documents\GitHub\Notepad\Notepad\Notepad v2\bin\Debug\Notatnik.exe
|
||||
C:\Users\Krzysiek\Documents\GitHub\Notepad\Notepad\Notepad v2\bin\Debug\Notatnik.pdb
|
||||
C:\Users\Krzysiek\Documents\GitHub\Notepad\Notepad\Notepad v2\obj\Debug\Notepad v2.csprojAssemblyReference.cache
|
||||
C:\Users\Krzysiek\Documents\GitHub\Notepad\Notepad\Notepad v2\obj\Debug\Notatnik.Form1.resources
|
||||
C:\Users\Krzysiek\Documents\GitHub\Notepad\Notepad\Notepad v2\obj\Debug\Notatnik.Properties.Resources.resources
|
||||
C:\Users\Krzysiek\Documents\GitHub\Notepad\Notepad\Notepad v2\obj\Debug\Notepad v2.csproj.GenerateResource.cache
|
||||
C:\Users\Krzysiek\Documents\GitHub\Notepad\Notepad\Notepad v2\obj\Debug\Notepad v2.csproj.CoreCompileInputs.cache
|
||||
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
|
||||
|
||||
Binary file not shown.
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 @@
|
||||
42fc91b920426e379a4ce720848eb9d703449fc4
|
||||
5ecff3787183e7feb272360ec7673dd58ad31ff2
|
||||
|
||||
@@ -8,3 +8,4 @@ C:\Users\Krzysiek\Documents\GitHub\Notepad\Notepad\Notepad v2\obj\Release\Notepa
|
||||
C:\Users\Krzysiek\Documents\GitHub\Notepad\Notepad\Notepad v2\obj\Release\Notepad v2.csproj.CoreCompileInputs.cache
|
||||
C:\Users\Krzysiek\Documents\GitHub\Notepad\Notepad\Notepad v2\obj\Release\Notatnik.exe
|
||||
C:\Users\Krzysiek\Documents\GitHub\Notepad\Notepad\Notepad v2\obj\Release\Notatnik.pdb
|
||||
C:\Users\Krzysiek\Documents\GitHub\Notepad\Notepad\Notepad v2\obj\Release\Notatnik.Update.resources
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user