diff --git a/ntfysh_client/Form1.Designer.cs b/ntfysh_client/MainForm.Designer.cs similarity index 98% rename from ntfysh_client/Form1.Designer.cs rename to ntfysh_client/MainForm.Designer.cs index 6fbabac..83e8285 100644 --- a/ntfysh_client/Form1.Designer.cs +++ b/ntfysh_client/MainForm.Designer.cs @@ -1,7 +1,7 @@  namespace ntfysh_client { - partial class Form1 + partial class MainForm { /// /// Required designer variable. @@ -30,7 +30,7 @@ namespace ntfysh_client private void InitializeComponent() { this.components = new System.ComponentModel.Container(); - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1)); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm)); this.subscribeNewTopic = new System.Windows.Forms.Button(); this.removeSelectedTopics = new System.Windows.Forms.Button(); this.notificationTopics = new System.Windows.Forms.ListBox(); @@ -192,7 +192,7 @@ namespace ntfysh_client this.label1.TabIndex = 1; this.label1.Text = "Subscribed Notification Topics:"; // - // Form1 + // MainForm // this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; @@ -210,12 +210,12 @@ namespace ntfysh_client this.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); this.MaximizeBox = false; this.MinimizeBox = false; - this.Name = "Form1"; + this.Name = "MainForm"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "ntfy.sh"; - this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form1_FormClosing); - this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.Form1_FormClosed); - this.Load += new System.EventHandler(this.Form1_Load); + this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.MainForm_FormClosing); + this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.MainForm_FormClosed); + this.Load += new System.EventHandler(this.MainForm_Load); this.trayContextMenu.ResumeLayout(false); this.menuStrip1.ResumeLayout(false); this.menuStrip1.PerformLayout(); diff --git a/ntfysh_client/Form1.cs b/ntfysh_client/MainForm.cs similarity index 94% rename from ntfysh_client/Form1.cs rename to ntfysh_client/MainForm.cs index 05f07fc..296c664 100644 --- a/ntfysh_client/Form1.cs +++ b/ntfysh_client/MainForm.cs @@ -1,25 +1,21 @@ using System; using System.Collections.Generic; -using System.ComponentModel; -using System.Data; using System.Diagnostics; using System.Drawing; using System.IO; using System.Linq; using System.Reflection; -using System.Text; -using System.Threading.Tasks; using System.Windows.Forms; using Newtonsoft.Json; namespace ntfysh_client { - public partial class Form1 : Form + public partial class MainForm : Form { private readonly NotificationListener _notificationListener; private bool _trueExit; - public Form1(NotificationListener notificationListener) + public MainForm(NotificationListener notificationListener) { _notificationListener = notificationListener; _notificationListener.OnNotificationReceive += OnNotificationReceive; @@ -27,7 +23,7 @@ namespace ntfysh_client InitializeComponent(); } - private void Form1_Load(object sender, EventArgs e) => LoadTopics(); + private void MainForm_Load(object sender, EventArgs e) => LoadTopics(); private void subscribeNewTopic_Click(object sender, EventArgs e) { @@ -181,12 +177,12 @@ namespace ntfysh_client notifyIcon.ShowBalloonTip(3000, e.Title, e.Message, ToolTipIcon.Info); } - private void Form1_FormClosed(object sender, FormClosedEventArgs e) + private void MainForm_FormClosed(object sender, FormClosedEventArgs e) { notifyIcon.Dispose(); } - private void Form1_FormClosing(object sender, FormClosingEventArgs e) + private void MainForm_FormClosing(object sender, FormClosingEventArgs e) { // Let it close if (_trueExit) return; diff --git a/ntfysh_client/Form1.resx b/ntfysh_client/MainForm.resx similarity index 100% rename from ntfysh_client/Form1.resx rename to ntfysh_client/MainForm.resx diff --git a/ntfysh_client/Program.cs b/ntfysh_client/Program.cs index a8feec7..5841c89 100644 --- a/ntfysh_client/Program.cs +++ b/ntfysh_client/Program.cs @@ -19,7 +19,7 @@ namespace ntfysh_client Application.SetHighDpiMode(HighDpiMode.SystemAware); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); - Application.Run(new Form1(NotificationListener)); + Application.Run(new MainForm(NotificationListener)); } } } diff --git a/ntfysh_client/ntfysh_client.csproj b/ntfysh_client/ntfysh_client.csproj index dfe4310..5b9a3a3 100644 --- a/ntfysh_client/ntfysh_client.csproj +++ b/ntfysh_client/ntfysh_client.csproj @@ -7,14 +7,11 @@ latest enable NotificationHub.ico + ntfysh_client.Program - - - - \ No newline at end of file