-
Notifications
You must be signed in to change notification settings - Fork 0
/
Form1.cs
81 lines (71 loc) · 2.75 KB
/
Form1.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
using PIPIT.Backend.WinRegistry;
using PIPIT.Frontend;
namespace PIPIT
{
public partial class MainForm : Form
{
public MainForm()
{
InitializeComponent();
}
private void MainForm_Load(object sender, EventArgs e)
{
RegiMan appRegistrator = new()
{
AppName = "PIPIT",
RegistryAppPath = "Software"
};
if (!appRegistrator.IsAppRegistered())
{
appRegistrator.RegisterApp();
}
PiptSummaryLabel.Text = " Quickly fetch comprehensive public IP details with this tool utilizing ifconfig.co. " +
"\r\n\r\n - Public IP: Identify your network's public IP address." +
"\r\n - Country: Discover your country." +
"\r\n - Country ISO: View the ISO code for your country." +
"\r\n - Region Name: Identify your region by name." +
"\r\n - Region Code: Access the region code information." +
"\r\n - Zip Code: Know your postal code." +
"\r\n - City: Pinpoint your city of connection." +
"\r\n - Longitude: Get the precise longitude of your connection." +
"\r\n - Latitude: Discover the exact latitude of your connection." +
"\r\n - Time Zone: Determine your current time zone." +
"\r\n - ASN Organization: Autonomous System Number Organization associated with your IP." +
"\r\n - Hostname: Identify the hostname associated with your connection." +
"\r\n\n * The main application is located in the taskbar tray icons *";
}
private void openToolStripMenuItem_Click(object sender, EventArgs e)
{
if (Visible)
{
Hide();
}
Form infoWindow = new InfoWindow();
infoWindow.ShowDialog();
}
private void exitToolStripMenuItem_Click(object sender, EventArgs e)
{
Dispose(true);
}
private void ExitButton_Click(object sender, EventArgs e)
{
Close();
}
private void MainForm_FormClosing(object sender, FormClosingEventArgs e)
{
if (e.CloseReason == CloseReason.UserClosing)
{
e.Cancel = true;
TrayIcon.Visible = true;
WindowState = FormWindowState.Minimized;
Visible = false;
Hide();
}
}
private void showSummaryWindowToolStripMenuItem_Click(object sender, EventArgs e)
{
Show();
WindowState = FormWindowState.Normal;
}
}
}