123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- 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 RDServer
- {
- public partial class ServerMain : Form
- {
- public ServerMain()
- {
- InitializeComponent();
- this.Resize += ServerMain_Resize;
- this.FormClosing += ServerMain_FormClosing;
- }
- private void ServerMain_FormClosing(object sender, FormClosingEventArgs e)
- {
- e.Cancel = true;
- this.WindowState = FormWindowState.Minimized;
- }
- private void ServerMain_Resize(object sender, EventArgs e)
- {
- if (this.WindowState == FormWindowState.Minimized)
- {
- this.Hide();
- //this.Visible = false;
- this.ShowInTaskbar = false;
- }
- }
-
- private void tlsShowMain_Click(object sender, EventArgs e)
- {
- this.Show();
- //this.Visible = true;
- this.WindowState = FormWindowState.Normal;
- this.ShowInTaskbar = true;
- }
- private void tlsExitAPP_Click(object sender, EventArgs e)
- {
- System.Environment.Exit(System.Environment.ExitCode);
- Application.ExitThread();
- Application.Exit();
- }
- private void notifyIcon_MouseDoubleClick(object sender, MouseEventArgs e)
- {
- tlsShowMain_Click( sender, e);
- }
- }
- }
|