Ejemplo n.º 1
0
 private void trayicon_MouseClick(object sender, MouseEventArgs e)
 {
     if (e.Button == MouseButtons.Left)
     {
         if (cb_action.SelectedIndex == 0)
         {
             Hide();
             if (Program.formSelect == null || Program.formSelect.IsDisposed)
             {
                 Program.formSelect = new select();
             }
             Program.formSelect.initBmp();
             Program.formSelect.Show();
         }
         else if (cb_action.SelectedIndex == 1)
         {
             this.Hide();
             Uploader.Upload(Uploader.GetStringFromImage(Uploader.takeDefaultFullScreen()));
             this.Show();
         }
         else
         {
             int monitorID = cb_action.SelectedIndex - 2;
             if (monitorID < Screen.AllScreens.Length)
             {
                 this.Hide();
                 Uploader.Upload(Uploader.GetStringFromImage(Uploader.takeFullScreen(Screen.AllScreens[monitorID])));
                 this.Show();
             }
             else
             {
                 MessageBox.Show("Cannot find monitor with ID " + monitorID + "!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
             }
         }
     }
 }
Ejemplo n.º 2
0
 private void defaultToolStripMenuItem_Click(object sender, EventArgs e)
 {
     Uploader.Upload(Uploader.GetStringFromImage(Uploader.takeDefaultFullScreen()));
     displayInfo();
 }
Ejemplo n.º 3
0
 private void button3_Click(object sender, EventArgs e)
 {
     this.Hide();
     Uploader.Upload(Uploader.GetStringFromImage(Uploader.takeFullScreen(Screen.FromPoint(new Point(MousePosition.X, MousePosition.Y)))));
     this.Show();
 }