Initial commit

This commit is contained in:
Lucas Bortoli
2022-06-25 18:30:01 -03:00
commit 347f466242
22 changed files with 2050 additions and 0 deletions

View File

@@ -0,0 +1,52 @@
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
{
public partial class SubscribeDialog : Form
{
public SubscribeDialog()
{
InitializeComponent();
}
public string getTopicId()
{
return topicId.Text;
}
private void button1_Click(object sender, EventArgs e)
{
if (topicId.Text.Length < 1)
{
MessageBox.Show("You must specify a topic name.", "Topic name not specified", MessageBoxButtons.OK, MessageBoxIcon.Error);
DialogResult = DialogResult.None;
topicId.Focus();
return;
}
DialogResult = DialogResult.OK;
}
private void button2_Click(object sender, EventArgs e)
{
DialogResult = DialogResult.Cancel;
}
private void topicId_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyData == Keys.Enter)
{
button1.PerformClick();
e.SuppressKeyPress = true;
}
}
}
}