Prevent multiple instances, allow starting in tray, documentation edits and priority support #4

Merged
alexhorner merged 9 commits from master into master 2022-12-12 17:01:23 -05:00
6 changed files with 160 additions and 101 deletions
Showing only changes of commit b644035433 - Show all commits

View File

@@ -29,53 +29,107 @@ namespace ntfysh_client
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AboutBox));
this.button1 = new System.Windows.Forms.Button();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.tabControl1 = new System.Windows.Forms.TabControl();
this.aboutPage = new System.Windows.Forms.TabPage();
this.richTextBox2 = new System.Windows.Forms.RichTextBox();
this.licensePage = new System.Windows.Forms.TabPage();
this.richTextBox1 = new System.Windows.Forms.RichTextBox();
this.tabControl1.SuspendLayout();
this.aboutPage.SuspendLayout();
this.licensePage.SuspendLayout();
this.SuspendLayout();
//
// button1
//
this.button1.Location = new System.Drawing.Point(299, 173);
this.button1.Location = new System.Drawing.Point(522, 243);
this.button1.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(75, 23);
this.button1.Size = new System.Drawing.Size(88, 27);
this.button1.TabIndex = 0;
this.button1.Text = "Close";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(12, 49);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(358, 65);
this.label1.TabIndex = 1;
this.label1.Text = "Copyright © 2022 Lucas Bortoli\r\nAll rights reserved\r\n\r\nThe icons included in this" +
" application are property of Microsoft Corporation.\r\n(Visual Studio Image Librar" +
"y)";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Font = new System.Drawing.Font("Segoe UI", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label2.Location = new System.Drawing.Point(10, 9);
this.label2.Font = new System.Drawing.Font("Segoe UI", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.label2.Location = new System.Drawing.Point(12, 9);
this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(166, 30);
this.label2.TabIndex = 2;
this.label2.Text = "ntfy.sh Windows";
//
// tabControl1
//
this.tabControl1.Controls.Add(this.aboutPage);
this.tabControl1.Controls.Add(this.licensePage);
this.tabControl1.Location = new System.Drawing.Point(12, 43);
this.tabControl1.Name = "tabControl1";
this.tabControl1.SelectedIndex = 0;
this.tabControl1.Size = new System.Drawing.Size(598, 194);
this.tabControl1.TabIndex = 3;
//
// aboutPage
//
this.aboutPage.Controls.Add(this.richTextBox2);
this.aboutPage.Location = new System.Drawing.Point(4, 24);
this.aboutPage.Name = "aboutPage";
this.aboutPage.Padding = new System.Windows.Forms.Padding(3);
this.aboutPage.Size = new System.Drawing.Size(590, 166);
this.aboutPage.TabIndex = 0;
this.aboutPage.Text = "About";
this.aboutPage.UseVisualStyleBackColor = true;
//
// richTextBox2
//
this.richTextBox2.BackColor = System.Drawing.SystemColors.Window;
this.richTextBox2.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.richTextBox2.Location = new System.Drawing.Point(6, 6);
this.richTextBox2.Name = "richTextBox2";
this.richTextBox2.ReadOnly = true;
this.richTextBox2.Size = new System.Drawing.Size(578, 154);
this.richTextBox2.TabIndex = 0;
this.richTextBox2.Text = resources.GetString("richTextBox2.Text");
//
// licensePage
//
this.licensePage.Controls.Add(this.richTextBox1);
this.licensePage.Location = new System.Drawing.Point(4, 24);
this.licensePage.Name = "licensePage";
this.licensePage.Padding = new System.Windows.Forms.Padding(3);
this.licensePage.Size = new System.Drawing.Size(590, 166);
this.licensePage.TabIndex = 1;
this.licensePage.Text = "MIT License\n\n";
this.licensePage.UseVisualStyleBackColor = true;
//
// richTextBox1
//
this.richTextBox1.BackColor = System.Drawing.SystemColors.Window;
this.richTextBox1.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.richTextBox1.Location = new System.Drawing.Point(6, 6);
this.richTextBox1.Name = "richTextBox1";
this.richTextBox1.ReadOnly = true;
this.richTextBox1.Size = new System.Drawing.Size(578, 154);
this.richTextBox1.TabIndex = 0;
this.richTextBox1.Text = resources.GetString("richTextBox1.Text");
//
// AboutBox
//
this.AcceptButton = this.button1;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.White;
this.ClientSize = new System.Drawing.Size(386, 208);
this.ClientSize = new System.Drawing.Size(622, 275);
this.Controls.Add(this.tabControl1);
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
this.Controls.Add(this.button1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "AboutBox";
@@ -83,6 +137,9 @@ namespace ntfysh_client
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "About";
this.tabControl1.ResumeLayout(false);
this.aboutPage.ResumeLayout(false);
this.licensePage.ResumeLayout(false);
this.ResumeLayout(false);
this.PerformLayout();
@@ -91,7 +148,11 @@ namespace ntfysh_client
#endregion
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.TabControl tabControl1;
private System.Windows.Forms.TabPage aboutPage;
private System.Windows.Forms.TabPage licensePage;
private System.Windows.Forms.RichTextBox richTextBox1;
private System.Windows.Forms.RichTextBox richTextBox2;
}
}

View File

@@ -1,11 +1,4 @@
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;
namespace ntfysh_client

View File

@@ -1,64 +1,4 @@
<?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.
-->
<root>
<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">
@@ -117,4 +57,24 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="richTextBox2.Text" xml:space="preserve">
<value>ntfy.sh Windows by Lucas Bortoli and Contributors
ntfy.sh Windows is a small lightweight push notification client for notifications sent via https://ntfy.sh compatible servers.
It is capable of receiving notifications from multiple ntfy.sh servers simultaneously via Websocket or HTTP and supports both unauthenticated and authenticated topics.
Get the latest release and keep track of updates via GitHub at https://github.com/lucas-bortoli/ntfysh-windows</value>
</data>
<data name="richTextBox1.Text" xml:space="preserve">
<value>Copyright © 2022 Lucas Bortoli
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
The icons included in this application are property of Microsoft Corporation (Visual Studio Image Library)</value>
</data>
</root>