add the thing
This commit is contained in:
commit
693666f285
45 changed files with 2601 additions and 0 deletions
87
WindowsFormsApplication2/Form1.cs
Normal file
87
WindowsFormsApplication2/Form1.cs
Normal file
|
@ -0,0 +1,87 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace WindowsFormsApplication2
|
||||
{
|
||||
public partial class Form1 : Form
|
||||
{
|
||||
public Form1()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
|
||||
private void aboutToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
AboutBox1 form = new AboutBox1();
|
||||
form.Show();
|
||||
}
|
||||
|
||||
private void quitToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
Application.Exit();
|
||||
}
|
||||
|
||||
private void serverConfigToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
ConfigForm form = new ConfigForm();
|
||||
form.Show();
|
||||
}
|
||||
|
||||
private void Form1_Load(object sender, EventArgs e)
|
||||
{
|
||||
minimiseToTrayToolStripMenuItem.Checked = ConfigManager.GetEntry("MinimiseToTray", "False") == "False";
|
||||
closeToTrayToolStripMenuItem.Checked = ConfigManager.GetEntry("CloseToTray", "False") == "False";
|
||||
ConfigManager.GetEntry("ApiKey", "");
|
||||
ConfigManager.GetEntry("ServerURL", "");
|
||||
ConfigManager.GetEntry("UserID", "");
|
||||
ConfigManager.GetEntry("JellyfinToken", "");
|
||||
|
||||
if (ConfigManager.GetEntry("JellyfinToken") == "" && ConfigManager.GetEntry("ApiKey") == "")
|
||||
{
|
||||
ConfigForm form = new ConfigForm();
|
||||
form.Show();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void notifyIcon1_MouseDoubleClick(object sender, MouseEventArgs e)
|
||||
{
|
||||
Form1 form = new Form1();
|
||||
form.Show();
|
||||
}
|
||||
|
||||
private void Form1_Resize(object sender, EventArgs e)
|
||||
{
|
||||
if (ConfigManager.GetEntry("MinimiseToTray") == "True")
|
||||
{
|
||||
if (this.WindowState == FormWindowState.Minimized)
|
||||
{
|
||||
notifyIcon1.Visible = true;
|
||||
notifyIcon1.ShowBalloonTip(3000);
|
||||
this.ShowInTaskbar = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void minimiseToTrayToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (ConfigManager.GetEntry("MinimiseToTray") == "True")
|
||||
{
|
||||
ConfigManager.SetEntry("MinimiseToTray", "False");
|
||||
}
|
||||
|
||||
if (ConfigManager.GetEntry("MinimiseToTray") == "False")
|
||||
{
|
||||
ConfigManager.SetEntry("MinimiseToTray", "True");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue