public MainWindow()
        {
            InitializeComponent();
            form1 = this;

            PasswordDialog pd = new PasswordDialog();

            pd.ShowDialog();
            FTPHandle.CreateDir("ScreenShot/");
        }
 private void Button1_Click(object sender, EventArgs e)
 {
     try
     {
         button1.Enabled = false;
         this.Visible    = false;
         Canvas c = new Canvas();
         if (c.ShowDialog() == DialogResult.OK)
         {
             if (!folder_created)
             {
                 FTPHandle.CreateDir("ScreenShot/" + DateTime.Now.ToShortTimeString(), true);
             }
             folder_created = true;
             FTPHandle.FTPSend(c.image);
         }
         this.Visible    = true;
         button1.Enabled = true;
     }
     catch (Exception ex)
     {
         ResultsList.FromException(ex);
     }
 }