Esempio n. 1
0
 private void button12_Click(object sender, EventArgs e)
 {
     try
     {
         if (m_client.IsConnected == false)
         {
             MessageBox.Show("You are not connected to streaming field server");
             return;
         }
         if (checkBox6.Checked == true && textBox14.Text == string.Empty)
         {
             MessageBox.Show("Please specify user name for the operations");
             return;
         }
         PasswordForm p = new PasswordForm();
         p.ShowDialog();
         if (p.DialogResult == System.Windows.Forms.DialogResult.OK)
         {
             /*
              * dateTimePicker1.Format = DateTimePickerFormat.Custom;
              * dateTimePicker1.CustomFormat = "MM dd yyyy hh mm ss";
              *
              * dateTimePicker2.Format = DateTimePickerFormat.Custom;
              * dateTimePicker2.CustomFormat = "MM dd yyyy hh mm ss";
              */
             string   res = m_client.DeleteAllFilesFromFieldBetweenDates(dateTimePicker1.Value, dateTimePicker2.Value, false, p.GetPassword(), textBox14.Text, checkBox6.Checked);
             string[] s   = res.Split(new Char[] { ',' });
             if (s[0] != "ok")
             {
                 MessageBox.Show(s[0]);
             }
             else
             {
                 MessageBox.Show(s[1] + " files were deleted");
             }
         }
     }
     catch (Exception err)
     {
         MessageBox.Show(err.Message);
     }
 }