Actually 1.1.2

This commit is contained in:
Vichingo455 2022-03-12 14:50:34 +01:00
parent 0afc96c9d6
commit cfc5f21bce
4 changed files with 79 additions and 30 deletions

View File

@ -39,9 +39,10 @@
this.saveFileWithNameToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.viewToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.alwaysOnTopToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.characterStyleToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.backgroundColorToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.searchTextInTheWebToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.alwaysOnTopToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.helpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.checkForUpdatesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.giveAFeedbackToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
@ -56,6 +57,7 @@
this.text_area.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.text_area.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.text_area.Location = new System.Drawing.Point(-3, 31);
this.text_area.Multiline = true;
this.text_area.Name = "text_area";
@ -143,22 +145,15 @@
// viewToolStripMenuItem
//
this.viewToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.alwaysOnTopToolStripMenuItem,
this.characterStyleToolStripMenuItem,
this.searchTextInTheWebToolStripMenuItem});
this.backgroundColorToolStripMenuItem,
this.searchTextInTheWebToolStripMenuItem,
this.alwaysOnTopToolStripMenuItem});
this.viewToolStripMenuItem.Name = "viewToolStripMenuItem";
this.viewToolStripMenuItem.Size = new System.Drawing.Size(55, 26);
this.viewToolStripMenuItem.Text = "View";
this.viewToolStripMenuItem.Click += new System.EventHandler(this.viewToolStripMenuItem_Click_1);
//
// alwaysOnTopToolStripMenuItem
//
this.alwaysOnTopToolStripMenuItem.Name = "alwaysOnTopToolStripMenuItem";
this.alwaysOnTopToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.F5;
this.alwaysOnTopToolStripMenuItem.Size = new System.Drawing.Size(301, 26);
this.alwaysOnTopToolStripMenuItem.Text = "Always on top";
this.alwaysOnTopToolStripMenuItem.Click += new System.EventHandler(this.alwaysOnTopToolStripMenuItem_Click);
//
// characterStyleToolStripMenuItem
//
this.characterStyleToolStripMenuItem.Name = "characterStyleToolStripMenuItem";
@ -167,6 +162,14 @@
this.characterStyleToolStripMenuItem.Text = "Font style";
this.characterStyleToolStripMenuItem.Click += new System.EventHandler(this.characterStyleToolStripMenuItem_Click_1);
//
// backgroundColorToolStripMenuItem
//
this.backgroundColorToolStripMenuItem.Name = "backgroundColorToolStripMenuItem";
this.backgroundColorToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.F7)));
this.backgroundColorToolStripMenuItem.Size = new System.Drawing.Size(301, 26);
this.backgroundColorToolStripMenuItem.Text = "Window color";
this.backgroundColorToolStripMenuItem.Click += new System.EventHandler(this.backgroundColorToolStripMenuItem_Click);
//
// searchTextInTheWebToolStripMenuItem
//
this.searchTextInTheWebToolStripMenuItem.Name = "searchTextInTheWebToolStripMenuItem";
@ -175,6 +178,14 @@
this.searchTextInTheWebToolStripMenuItem.Text = "Search text in the web";
this.searchTextInTheWebToolStripMenuItem.Click += new System.EventHandler(this.searchTextInTheWebToolStripMenuItem_Click);
//
// alwaysOnTopToolStripMenuItem
//
this.alwaysOnTopToolStripMenuItem.Name = "alwaysOnTopToolStripMenuItem";
this.alwaysOnTopToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.F5;
this.alwaysOnTopToolStripMenuItem.Size = new System.Drawing.Size(301, 26);
this.alwaysOnTopToolStripMenuItem.Text = "Always on top";
this.alwaysOnTopToolStripMenuItem.Click += new System.EventHandler(this.alwaysOnTopToolStripMenuItem_Click);
//
// helpToolStripMenuItem
//
this.helpToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
@ -259,6 +270,7 @@
private System.Windows.Forms.ToolStripMenuItem aboutWindowsToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem characterStyleToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem searchTextInTheWebToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem backgroundColorToolStripMenuItem;
}
}

View File

@ -191,24 +191,30 @@ namespace Notepad
}
}
try
{
var equals = LatestVersion.CompareTo(CurrentVersion);
var equals = LatestVersion.CompareTo(CurrentVersion);
if (equals == 0)
{
// Up-to-date
MessageBox.Show("The program is up-to-date",Text,MessageBoxButtons.OK);
}
else if (equals < 0)
{
MessageBox.Show("You are using an unofficial release of Notepad", Text, MessageBoxButtons.OK); // Unofficial
}
else // New release available!
{
if (MessageBox.Show("This new version is available:" + " " + LatestVersion + ". You are using the version" + " " + CurrentVersion + ". Do you want to open the download website?", Text, MessageBoxButtons.YesNo) == DialogResult.Yes) // New release available!
if (equals == 0)
{
Process.Start("https://github.com/Vichingo455/Notepad/releases/tag/" + LatestVersion);
// Up-to-date
MessageBox.Show("The program is up-to-date", Text, MessageBoxButtons.OK);
}
else if (equals < 0)
{
MessageBox.Show("You are using an unofficial release of Notepad", Text, MessageBoxButtons.OK); // Unofficial
}
else // New release available!
{
if (MessageBox.Show("This new version is available:" + " " + LatestVersion + ". You are using the version" + " " + CurrentVersion + ". Do you want to open the download website?", Text, MessageBoxButtons.YesNo) == DialogResult.Yes) // New release available!
{
Process.Start("https://github.com/Vichingo455/Notepad/releases/tag/" + LatestVersion);
}
}
}
catch
{
}
}
@ -317,6 +323,8 @@ namespace Notepad
FontDialog stl = new FontDialog();
stl.ShowColor = true;
stl.AllowVectorFonts = true;
stl.Font = text_area.Font;
stl.Color = text_area.ForeColor;
if (stl.ShowDialog() == DialogResult.OK)
{
text_area.Font = stl.Font;
@ -369,11 +377,40 @@ namespace Notepad
}
}
}
private void backgroundColorToolStripMenuItem_Click(object sender, EventArgs e)
{
try
{
ColorDialog clr = new ColorDialog();
clr.Color = text_area.BackColor;
if (clr.ShowDialog() == DialogResult.OK)
{
text_area.BackColor = clr.Color;
BackColor = clr.Color;
menuStrip1.BackColor = clr.Color;
}
}
catch (Exception ex)
{
try
{
var dialog = MessageBox.Show("The following exception occured: " + ex.Message + "\nDo you want to send a crash report", this.Text + " - Critical error", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
if (dialog == DialogResult.Yes)
{
Program.SendCrashReport(ex);
}
}
catch
{
}
}
}
}
public class Global
{
public static string savefilename;
public static string confidential;
public static string font_text;
}
}

View File

@ -29,7 +29,7 @@ namespace Notepad
body = HttpUtility.UrlEncode(body);
string uri = $"https://github.com/builtbybel/ThisIsWin11/issues/new?labels=crash+report&title={header}&body={body}";
string uri = $"https://github.com/Vichingo455/Notepad/issues/new?labels=crash+report&title={header}&body={body}";
Process.Start(uri);
}
/// <summary>

View File

@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// È possibile specificare tutti i valori oppure impostare valori predefiniti per i numeri relativi alla revisione e alla build
// usando l'asterisco '*' come illustrato di seguito:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.1.1.0")]
[assembly: AssemblyFileVersion("1.1.1.0")]
[assembly: AssemblyVersion("1.1.2.0")]
[assembly: AssemblyFileVersion("1.1.2.0")]