Beispiel #1
0
 private void OnExit(object sender, EventArgs e)
 {
     Properties.Settings.Default.Save();
     client.KillKeepAliveThread();
     client  = null;
     running = false;
     this.Dispose();
     Application.Exit();
     Application.ExitThread();
     this.Close();
 }
Beispiel #2
0
 private void OnExit(object sender, EventArgs e)
 {
     Properties.Settings.Default.Save();
     client.KillKeepAliveThread();
     client = null;
     running = false;
     this.Dispose();
     Application.Exit();
     Application.ExitThread();
     this.Close();
 }
Beispiel #3
0
        public QuickGett()
        {
            // Create a tray menu
            trayMenu = new ContextMenu();

            trayMenu.MenuItems.Add(new MenuItem("Upload...", OnMenuUpload));
            trayMenu.MenuItems.Add(new MenuItem("Switch User", Configure));
            trayMenu.MenuItems.Add(new MenuItem("Exit", OnExit));

            trayIcon      = new NotifyIcon();
            trayIcon.Icon = Properties.Resources.favicon;

            // Add menu to tray icon and show it.
            trayIcon.ContextMenu = trayMenu;
            trayIcon.Visible     = true;

            //create a client
            client = new GettClient(trayIcon);

            //check for user/pass credentials in settings
            //if missing, prompt for them.

            if (!CredentialManager.ValidCredentials())
            {
                LoginForm lf = new LoginForm(client);
                lf.Show();
                client.Notify("You need to log in to ge.tt!");
            }
            else
            {
                //credentials exist, auto login
                client.Notify("Logging into ge.tt with saved credentials...");
                client.Login();
            }

            //start status updating thread
            running = true;
            Thread statusThread = new Thread(new ThreadStart(this.UpdateSysTrayStatusThread));

            statusThread.Start();
        }
Beispiel #4
0
        public QuickGett()
        {

            // Create a tray menu
            trayMenu = new ContextMenu();

            trayMenu.MenuItems.Add(new MenuItem("Upload...", OnMenuUpload));
            trayMenu.MenuItems.Add(new MenuItem("Switch User", Configure));
            trayMenu.MenuItems.Add(new MenuItem("Exit", OnExit));

            trayIcon = new NotifyIcon();
            trayIcon.Icon = Properties.Resources.favicon;

            // Add menu to tray icon and show it.
            trayIcon.ContextMenu = trayMenu;
            trayIcon.Visible = true;

            //create a client
            client = new GettClient(trayIcon);

            //check for user/pass credentials in settings
            //if missing, prompt for them.

            if (!CredentialManager.ValidCredentials())
            {
                LoginForm lf = new LoginForm(client);
                lf.Show();
                client.Notify("You need to log in to ge.tt!");
            }
            else
            {
                //credentials exist, auto login
                client.Notify("Logging into ge.tt with saved credentials...");
                client.Login();
            }

            //start status updating thread
            running = true;
            Thread statusThread = new Thread(new ThreadStart(this.UpdateSysTrayStatusThread));
            statusThread.Start();
        }
Beispiel #5
0
 public LoginForm(GettClient client)
 {
     this.client = client;
     InitializeComponent();
 }
Beispiel #6
0
 public LoginForm(GettClient client)
 {
     this.client = client;
     InitializeComponent();
 }