Compare commits

20 Commits

Author SHA1 Message Date
1cb9380b5b changes
All checks were successful
continuous-integration/appveyor/branch AppVeyor build succeeded
2025-09-08 14:35:46 +02:00
a42af3cb93 Little update 2025-09-08 14:29:56 +02:00
d8579a53c1 v1.1.3.2 2025-09-08 14:28:15 +02:00
5b27cee567 Add appveyor.yml
All checks were successful
continuous-integration/appveyor/branch AppVeyor build succeeded
2025-09-08 12:16:49 +00:00
Vichingo455
36f345422b bugfix 2025-06-08 17:41:12 +02:00
ad64ed7aa1 Update README.md 2025-06-08 15:33:32 +00:00
Vichingo455
90dcc6ca3f 1.1.3.1 2025-06-08 17:32:08 +02:00
Vichingo455
761fffd541 Merge branch 'master' of https://github.com/Vichingo455/Notepad 2022-03-17 17:39:43 +01:00
Vichingo455
9356826d42 1.1.3 2022-03-17 17:39:37 +01:00
Vichingo455
3a22188ab5 1.1.3 2022-03-17 17:39:19 +01:00
Vichingo455
5c29d3f81a Update codeql-analysis.yml 2022-03-12 18:40:40 +01:00
Vichingo455
e0f9eef473 1.1.2 2022-03-12 14:51:32 +01:00
Vichingo455
cfc5f21bce Actually 1.1.2 2022-03-12 14:50:34 +01:00
Vichingo455
0afc96c9d6 Merge branch 'master' of https://github.com/Vichingo455/Notepad 2022-03-11 16:05:15 +01:00
Vichingo455
43712da0a3 Actually 1.1.1 2022-03-11 16:05:07 +01:00
Vichingo455
beb0ae60de Actually 1.1.1 2022-03-11 16:00:12 +01:00
Vichingo455
65e8c15a0c Merge branch 'master' of https://github.com/Vichingo455/Notepad 2022-03-11 15:59:45 +01:00
Vichingo455
78c89b0705 Updated CodeQL 2022-03-10 18:47:08 +01:00
Vichingo455
36eacb8d14 Added CodeQL 2022-03-10 18:46:32 +01:00
Vichingo455
746f86bdc4 Update README.md 2022-03-10 16:53:59 +01:00
12 changed files with 280 additions and 149 deletions

70
.github/workflows/codeql-analysis.yml vendored Normal file
View File

@@ -0,0 +1,70 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"
on:
push:
branches: [ master ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ master ]
schedule:
- cron: '38 3 * * 3'
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [ 'csharp' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://git.io/codeql-language-support
steps:
- name: Checkout repository
uses: actions/checkout@v2
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
# Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
#- run: |
# make bootstrap
# make release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/>
</startup>
</configuration>
</configuration>

View File

@@ -39,9 +39,11 @@
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.wordWrapToolStripMenuItem = 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,11 +58,12 @@
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.Location = new System.Drawing.Point(-3, 31);
this.text_area.Location = new System.Drawing.Point(-2, 25);
this.text_area.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.text_area.Multiline = true;
this.text_area.Name = "text_area";
this.text_area.ScrollBars = System.Windows.Forms.ScrollBars.Both;
this.text_area.Size = new System.Drawing.Size(1057, 546);
this.text_area.Size = new System.Drawing.Size(794, 444);
this.text_area.TabIndex = 0;
this.text_area.WordWrap = false;
//
@@ -73,7 +76,8 @@
this.helpToolStripMenuItem});
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
this.menuStrip1.Name = "menuStrip1";
this.menuStrip1.Size = new System.Drawing.Size(1054, 30);
this.menuStrip1.Padding = new System.Windows.Forms.Padding(4, 2, 0, 2);
this.menuStrip1.Size = new System.Drawing.Size(790, 24);
this.menuStrip1.TabIndex = 1;
this.menuStrip1.Text = "menuStrip1";
//
@@ -87,14 +91,14 @@
this.saveFileWithNameToolStripMenuItem,
this.exitToolStripMenuItem});
this.fileToolStripMenuItem.Name = "fileToolStripMenuItem";
this.fileToolStripMenuItem.Size = new System.Drawing.Size(46, 26);
this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20);
this.fileToolStripMenuItem.Text = "File";
//
// newToolStripMenuItem
//
this.newToolStripMenuItem.Name = "newToolStripMenuItem";
this.newToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.N)));
this.newToolStripMenuItem.Size = new System.Drawing.Size(320, 26);
this.newToolStripMenuItem.Size = new System.Drawing.Size(229, 22);
this.newToolStripMenuItem.Text = "New";
this.newToolStripMenuItem.Click += new System.EventHandler(this.newToolStripMenuItem_Click);
//
@@ -103,7 +107,7 @@
this.newWindowToolStripMenuItem.Name = "newWindowToolStripMenuItem";
this.newWindowToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)(((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Shift)
| System.Windows.Forms.Keys.N)));
this.newWindowToolStripMenuItem.Size = new System.Drawing.Size(320, 26);
this.newWindowToolStripMenuItem.Size = new System.Drawing.Size(229, 22);
this.newWindowToolStripMenuItem.Text = "New window";
this.newWindowToolStripMenuItem.Click += new System.EventHandler(this.newWindowToolStripMenuItem_Click);
//
@@ -111,7 +115,7 @@
//
this.openToolStripMenuItem.Name = "openToolStripMenuItem";
this.openToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.O)));
this.openToolStripMenuItem.Size = new System.Drawing.Size(320, 26);
this.openToolStripMenuItem.Size = new System.Drawing.Size(229, 22);
this.openToolStripMenuItem.Text = "Open";
this.openToolStripMenuItem.Click += new System.EventHandler(this.openToolStripMenuItem_Click);
//
@@ -119,7 +123,7 @@
//
this.saveToolStripMenuItem.Name = "saveToolStripMenuItem";
this.saveToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.S)));
this.saveToolStripMenuItem.Size = new System.Drawing.Size(320, 26);
this.saveToolStripMenuItem.Size = new System.Drawing.Size(229, 22);
this.saveToolStripMenuItem.Text = "Save";
this.saveToolStripMenuItem.Click += new System.EventHandler(this.saveToolStripMenuItem_Click);
//
@@ -128,7 +132,7 @@
this.saveFileWithNameToolStripMenuItem.Name = "saveFileWithNameToolStripMenuItem";
this.saveFileWithNameToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)(((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Shift)
| System.Windows.Forms.Keys.S)));
this.saveFileWithNameToolStripMenuItem.Size = new System.Drawing.Size(320, 26);
this.saveFileWithNameToolStripMenuItem.Size = new System.Drawing.Size(229, 22);
this.saveFileWithNameToolStripMenuItem.Text = "Save with name";
this.saveFileWithNameToolStripMenuItem.Click += new System.EventHandler(this.saveFileWithNameToolStripMenuItem_Click);
//
@@ -136,45 +140,62 @@
//
this.exitToolStripMenuItem.Name = "exitToolStripMenuItem";
this.exitToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Alt | System.Windows.Forms.Keys.F4)));
this.exitToolStripMenuItem.Size = new System.Drawing.Size(320, 26);
this.exitToolStripMenuItem.Size = new System.Drawing.Size(229, 22);
this.exitToolStripMenuItem.Text = "Exit";
this.exitToolStripMenuItem.Click += new System.EventHandler(this.exitToolStripMenuItem_Click);
//
// viewToolStripMenuItem
//
this.viewToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.alwaysOnTopToolStripMenuItem,
this.characterStyleToolStripMenuItem,
this.searchTextInTheWebToolStripMenuItem});
this.backgroundColorToolStripMenuItem,
this.searchTextInTheWebToolStripMenuItem,
this.alwaysOnTopToolStripMenuItem,
this.wordWrapToolStripMenuItem});
this.viewToolStripMenuItem.Name = "viewToolStripMenuItem";
this.viewToolStripMenuItem.Size = new System.Drawing.Size(55, 26);
this.viewToolStripMenuItem.Size = new System.Drawing.Size(44, 20);
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";
this.characterStyleToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.F7;
this.characterStyleToolStripMenuItem.Size = new System.Drawing.Size(301, 26);
this.characterStyleToolStripMenuItem.Size = new System.Drawing.Size(232, 22);
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(232, 22);
this.backgroundColorToolStripMenuItem.Text = "Window color";
this.backgroundColorToolStripMenuItem.Click += new System.EventHandler(this.backgroundColorToolStripMenuItem_Click);
//
// searchTextInTheWebToolStripMenuItem
//
this.searchTextInTheWebToolStripMenuItem.Name = "searchTextInTheWebToolStripMenuItem";
this.searchTextInTheWebToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Q)));
this.searchTextInTheWebToolStripMenuItem.Size = new System.Drawing.Size(301, 26);
this.searchTextInTheWebToolStripMenuItem.Size = new System.Drawing.Size(232, 22);
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(232, 22);
this.alwaysOnTopToolStripMenuItem.Text = "Always on top";
this.alwaysOnTopToolStripMenuItem.Click += new System.EventHandler(this.alwaysOnTopToolStripMenuItem_Click);
//
// wordWrapToolStripMenuItem
//
this.wordWrapToolStripMenuItem.Name = "wordWrapToolStripMenuItem";
this.wordWrapToolStripMenuItem.Size = new System.Drawing.Size(232, 22);
this.wordWrapToolStripMenuItem.Text = "Word wrap";
this.wordWrapToolStripMenuItem.Click += new System.EventHandler(this.wordWrapToolStripMenuItem_Click);
//
// helpToolStripMenuItem
//
this.helpToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
@@ -183,7 +204,7 @@
this.aboutToolStripMenuItem,
this.aboutWindowsToolStripMenuItem});
this.helpToolStripMenuItem.Name = "helpToolStripMenuItem";
this.helpToolStripMenuItem.Size = new System.Drawing.Size(30, 26);
this.helpToolStripMenuItem.Size = new System.Drawing.Size(24, 20);
this.helpToolStripMenuItem.Text = "?";
this.helpToolStripMenuItem.Click += new System.EventHandler(this.viewToolStripMenuItem_Click);
//
@@ -191,15 +212,16 @@
//
this.checkForUpdatesToolStripMenuItem.Name = "checkForUpdatesToolStripMenuItem";
this.checkForUpdatesToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.F10;
this.checkForUpdatesToolStripMenuItem.Size = new System.Drawing.Size(265, 26);
this.checkForUpdatesToolStripMenuItem.Size = new System.Drawing.Size(205, 22);
this.checkForUpdatesToolStripMenuItem.Text = "Check for updates";
this.checkForUpdatesToolStripMenuItem.Click += new System.EventHandler(this.checkForUpdatesToolStripMenuItem_Click);
//
// giveAFeedbackToolStripMenuItem
//
this.giveAFeedbackToolStripMenuItem.Enabled = false;
this.giveAFeedbackToolStripMenuItem.Name = "giveAFeedbackToolStripMenuItem";
this.giveAFeedbackToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.F8;
this.giveAFeedbackToolStripMenuItem.Size = new System.Drawing.Size(265, 26);
this.giveAFeedbackToolStripMenuItem.Size = new System.Drawing.Size(205, 22);
this.giveAFeedbackToolStripMenuItem.Text = "Give a feedback";
this.giveAFeedbackToolStripMenuItem.Click += new System.EventHandler(this.giveAFeedbackToolStripMenuItem_Click);
//
@@ -207,7 +229,7 @@
//
this.aboutToolStripMenuItem.Name = "aboutToolStripMenuItem";
this.aboutToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.F1;
this.aboutToolStripMenuItem.Size = new System.Drawing.Size(265, 26);
this.aboutToolStripMenuItem.Size = new System.Drawing.Size(205, 22);
this.aboutToolStripMenuItem.Text = "About";
this.aboutToolStripMenuItem.Click += new System.EventHandler(this.aboutToolStripMenuItem_Click);
//
@@ -215,21 +237,23 @@
//
this.aboutWindowsToolStripMenuItem.Name = "aboutWindowsToolStripMenuItem";
this.aboutWindowsToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.F1)));
this.aboutWindowsToolStripMenuItem.Size = new System.Drawing.Size(265, 26);
this.aboutWindowsToolStripMenuItem.Size = new System.Drawing.Size(205, 22);
this.aboutWindowsToolStripMenuItem.Text = "About Windows";
this.aboutWindowsToolStripMenuItem.Visible = false;
this.aboutWindowsToolStripMenuItem.Click += new System.EventHandler(this.aboutWindowsToolStripMenuItem_Click);
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1054, 575);
this.ClientSize = new System.Drawing.Size(790, 467);
this.Controls.Add(this.text_area);
this.Controls.Add(this.menuStrip1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MainMenuStrip = this.menuStrip1;
this.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.Name = "Form1";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Notepad";
this.Load += new System.EventHandler(this.Form1_Load);
this.menuStrip1.ResumeLayout(false);
@@ -259,6 +283,8 @@
private System.Windows.Forms.ToolStripMenuItem aboutWindowsToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem characterStyleToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem searchTextInTheWebToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem backgroundColorToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem wordWrapToolStripMenuItem;
}
}

View File

@@ -20,7 +20,7 @@ namespace Notepad
{
// Update strings
private readonly string _releaseURL = "https://raw.githubusercontent.com/Vichingo455/Notepad/master/latest.txt";
private readonly string _releaseURL = "https://git.vichingo455.freeddns.org/Vichingo455/Notepad/raw/branch/master/latest.txt";
public Version CurrentVersion = new Version(Application.ProductVersion);
public Version LatestVersion;
@@ -40,7 +40,7 @@ namespace Notepad
OpenFileDialog ofd = new OpenFileDialog();
ofd.Title = "Open a file";
ofd.Multiselect = false;
ofd.Filter = "*.txt|*.txt|*.*|*.*";
ofd.Filter = "Text file|*.txt|All files|*.*";
ofd.DefaultExt = "*.txt";
if (ofd.ShowDialog() == DialogResult.OK)
{
@@ -75,7 +75,7 @@ namespace Notepad
{
SaveFileDialog sfd = new SaveFileDialog();
sfd.Title = "Save the file";
sfd.Filter = "*.txt|*.txt|*.*|*.*";
sfd.Filter = "Text file|*.txt|All files|*.*";
sfd.DefaultExt = "*.txt";
if (sfd.ShowDialog() == DialogResult.OK)
{
@@ -119,7 +119,7 @@ namespace Notepad
{
SaveFileDialog sfd = new SaveFileDialog();
sfd.Title = "Save the file";
sfd.Filter = "*.txt|*.txt|*.*|*.*";
sfd.Filter = "Text file|*.txt|All files|*.*";
sfd.DefaultExt = "*.txt";
if (sfd.ShowDialog() == DialogResult.OK)
{
@@ -154,7 +154,11 @@ namespace Notepad
private void aboutToolStripMenuItem_Click(object sender, EventArgs e)
{
MessageBox.Show("Notepad\nVersion " + Program.GetCurrentVersionTostring() + "" + "\nMaded by Vichingo455\nCopyright (C) 2022 Vichingo455. All rights reserved.\n\n\nReleased under GPL 3.0 License: you are free to\n- Modify\n- Use for business\n- Distribute\n- Use at home\n\nBut you have:\n- No liability\n- No warranty", Text);
#if DEBUG
MessageBox.Show("Notepad\nVersion " + Program.GetCurrentVersionTostring() + " (Debug/Beta)" + "\nMade by Vichingo455\nCopyright (C) 2025 Vichingo455. All rights reserved.\n\n\nReleased under GPL 3.0 License: you are free to\n- Modify\n- Use for business\n- Distribute\n- Use at home\n\nBut you have:\n- No liability\n- No warranty\n\nAt these conditions:\n- License and copyright notice\n- State changes\n- Disclose source\n- Same license", Text);
#else
MessageBox.Show("Notepad\nVersion " + Program.GetCurrentVersionTostring() + "\nMade by Vichingo455\nCopyright (C) 2025 Vichingo455. All rights reserved.\n\n\nReleased under GPL 3.0 License: you are free to\n- Modify\n- Use for business\n- Distribute\n- Use at home\n\nBut you have:\n- No liability\n- No warranty\n\nAt these conditions:\n- License and copyright notice\n- State changes\n- Disclose source\n- Same license", Text);
#endif
}
/// <summary>
/// Check for updates
@@ -163,6 +167,7 @@ namespace Notepad
{
try
{
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12; //Fix HTTPS
WebRequest hreq = WebRequest.Create(_releaseURL);
hreq.Timeout = 10000;
hreq.Headers.Set("Cache-Control", "no-cache, no-store, must-revalidate");
@@ -191,24 +196,29 @@ 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);
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
{
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://git.vichingo455.freeddns.org/Vichingo455/Notepad/releases/tag/" + LatestVersion);
}
}
}
catch
{
}
}
@@ -238,7 +248,8 @@ namespace Notepad
private void giveAFeedbackToolStripMenuItem_Click(object sender, EventArgs e)
{
Process.Start("https://forms.gle/crZF4YJ6eiAzQ8ic8");
// TODO
//Process.Start("https://forms.gle/crZF4YJ6eiAzQ8ic8");
}
private void resetTransparencyToolStripMenuItem_Click(object sender, EventArgs e)
@@ -263,26 +274,18 @@ namespace Notepad
private void Form1_Load(object sender, EventArgs e)
{
#if DEBUG
var dialog = MessageBox.Show("This version is for testing purpouses only!!!\nYou should use it only for debugging.\nThe update feature is disabled.\nContinue?", Text, MessageBoxButtons.YesNo, MessageBoxIcon.None, MessageBoxDefaultButton.Button2);
if (dialog == DialogResult.No)
{
Environment.Exit(436);
}
checkForUpdatesToolStripMenuItem.Enabled = false;
#endif
if (File.Exists(Global.savefilename))
{
text_area.Text = File.ReadAllText(Global.savefilename);
}
if (Global.confidential == "true")
{
var dialog = MessageBox.Show("This version is for testing purpouses only!!!\nYou should use it only for debugging.\nPublic publication of this version is fobidden and severally punished!! Do you agree?",Text,MessageBoxButtons.YesNo,MessageBoxIcon.None,MessageBoxDefaultButton.Button2);
if (dialog == DialogResult.Yes)
{
}
else
{
Environment.Exit(436);
}
}
else
{
}
}
private void aboutWindowsToolStripMenuItem_Click(object sender, EventArgs e)
@@ -317,6 +320,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 +374,53 @@ 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
{
}
}
}
private void wordWrapToolStripMenuItem_Click(object sender, EventArgs e)
{
if (wordWrapToolStripMenuItem.Checked == true)
{
text_area.WordWrap = false;
wordWrapToolStripMenuItem.Checked = false;
}
else
{
text_area.WordWrap = true;
wordWrapToolStripMenuItem.Checked = true;
}
}
}
public class Global
{
public static string savefilename;
public static string confidential;
public static string font_text;
}
}

View File

@@ -8,7 +8,7 @@
<OutputType>WinExe</OutputType>
<RootNamespace>Notepad</RootNamespace>
<AssemblyName>Notepad</AssemblyName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
@@ -37,6 +37,7 @@
<UseApplicationTrust>false</UseApplicationTrust>
<PublishWizardCompleted>true</PublishWizardCompleted>
<BootstrapperEnabled>true</BootstrapperEnabled>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
@@ -52,12 +53,13 @@
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<DebugType>none</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<WarningLevel>0</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>notepad.ico</ApplicationIcon>
@@ -72,10 +74,11 @@
<ManifestKeyFile>Notepad_TemporaryKey.pfx</ManifestKeyFile>
</PropertyGroup>
<PropertyGroup>
<SignAssembly>true</SignAssembly>
<SignAssembly>false</SignAssembly>
</PropertyGroup>
<PropertyGroup>
<AssemblyOriginatorKeyFile>Notepad_TemporaryKey.pfx</AssemblyOriginatorKeyFile>
<AssemblyOriginatorKeyFile>
</AssemblyOriginatorKeyFile>
</PropertyGroup>
<PropertyGroup>
<ManifestTimestampUrl>http://timestamp.digicert.com</ManifestTimestampUrl>
@@ -123,8 +126,8 @@
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<None Include="Notepad_TemporaryKey.pfx" />
<None Include="Properties\app.manifest" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>

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://git.vichingo455.freeddns.org/Vichingo455/Notepad/issues/new?title={header}&body={body}";
Process.Start(uri);
}
/// <summary>

View File

@@ -10,7 +10,7 @@ using System.Runtime.InteropServices;
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Vichingo455")]
[assembly: AssemblyProduct("Notepad")]
[assembly: AssemblyCopyright("Copyright © Vichingo455 2022")]
[assembly: AssemblyCopyright("Copyright © 2025 Vichingo455")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
@@ -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.3.2")]
[assembly: AssemblyFileVersion("1.1.3.2")]

View File

@@ -1,69 +1,61 @@
//------------------------------------------------------------------------------
// <auto-generated>
// Codice generato da uno strumento.
// Versione runtime:4.0.30319.42000
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Le modifiche apportate a questo file possono causare un comportamento non corretto e andranno perse se
// il codice viene rigenerato.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Notepad.Properties
{
namespace Notepad.Properties {
using System;
/// <summary>
/// Classe di risorse fortemente tipizzata per la ricerca di stringhe localizzate e così via.
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// Questa classe è stata generata automaticamente dalla classe StronglyTypedResourceBuilder
// tramite uno strumento quale ResGen o Visual Studio.
// Per aggiungere o rimuovere un membro, modificare il file .ResX, quindi eseguire di nuovo ResGen
// con l'opzione /str oppure ricompilare il progetto VS.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources
{
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources()
{
internal Resources() {
}
/// <summary>
/// Restituisce l'istanza di ResourceManager memorizzata nella cache e usata da questa classe.
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager
{
get
{
if ((resourceMan == null))
{
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Notepad.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Esegue l'override della proprietà CurrentUICulture del thread corrente per tutte
/// le ricerche di risorse che utilizzano questa classe di risorse fortemente tipizzata.
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture
{
get
{
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set
{
set {
resourceCulture = value;
}
}

View File

@@ -8,21 +8,17 @@
// </auto-generated>
//------------------------------------------------------------------------------
namespace Notepad.Properties
{
namespace Notepad.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.14.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default
{
get
{
public static Settings Default {
get {
return defaultInstance;
}
}

View File

@@ -5,25 +5,12 @@
</h1>
<h3 align="center">Old notepad for Windows (Open source)</h3>
<p align="center">
<a href="https://github.com/Vichingo455/Notepad/releases/latest" target="_blank">
<img alt="Latest GitHub release" src="https://img.shields.io/github/release/Vichingo455/Notepad.svg?style=flat-square" />
</a>
<a href="https://github.com/Vichingo455/Notepad/releases" target="_blank">
<img alt="Downloads on GitHub" src="https://img.shields.io/github/downloads/Vichingo455/Notepad/total.svg?style=flat-square" />
</a>
<a href="https://github.com/Vichingo455/Notepad/issues">
<img src="https://img.shields.io/github/issues-raw/Vichingo455/Notepad.svg?style=flat-square&logo=github&logoColor=white"
alt="GitHub issues">
</p>
## Screenshots
![image](https://user-images.githubusercontent.com/59311016/157070091-b5b419ed-8d11-4c8d-babe-9cfa5c2cc01a.png)
![image](https://user-images.githubusercontent.com/59311016/157070141-e572019f-bdfb-4b24-8c4d-0475c82eaf6e.png)
![image](https://user-images.githubusercontent.com/59311016/157700391-3d78c1c4-8167-4f4d-868e-f503ac11ed48.png)
## Command line usage
`Notepad.exe <file>`

10
appveyor.yml Normal file
View File

@@ -0,0 +1,10 @@
version: autobuild.{build}
build_cloud: Hyper-V
configuration: Debug
platform: Any CPU
build:
parallel: true
verbosity: detailed
artifacts:
- path: Notepad/bin/Debug/Notepad.exe
name: Notepad

View File

@@ -1 +1 @@
1.1.0.0
1.1.3.2