Rename main form
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
|
||||
namespace ntfysh_client
|
||||
{
|
||||
partial class Form1
|
||||
partial class MainForm
|
||||
{
|
||||
/// <summary>
|
||||
/// 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();
|
@@ -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;
|
@@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -7,14 +7,11 @@
|
||||
<LangVersion>latest</LangVersion>
|
||||
<Nullable>enable</Nullable>
|
||||
<ApplicationIcon>NotificationHub.ico</ApplicationIcon>
|
||||
<StartupObject>ntfysh_client.Program</StartupObject>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Properties" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
Reference in New Issue
Block a user