Example #1
0
 private void saveAllToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (MessageBox.Show(
             "This process will take quite a long time\r\nPlease watch the progress bar at the bottom for it to finish\r\n"
             , "Long wait expected", MessageBoxButtons.OKCancel) == DialogResult.OK)
     {
         if (folderBrowserDialog1.ShowDialog() == DialogResult.OK)
         {
             convsAndSaveDir casd = new convsAndSaveDir();
             casd.saveDir = folderBrowserDialog1.SelectedPath;
             casd.convs   = new List <Conversation>();
             foreach (ListViewItem i in listViewConversations.Items)
             {
                 casd.convs.Add(i.Tag as Conversation);
             }
             saveAllWorker.RunWorkerAsync(casd);
             toolStripProgressBar1.Value = 0;
             toolStripStatusLabel1.Text  = "Saving all Conversations";
         }
     }
 }
 private void saveAllToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if(MessageBox.Show(
         "This process will take quite a long time\r\nPlease watch the progress bar at the bottom for it to finish\r\n"
         , "Long wait expected", MessageBoxButtons.OKCancel) == DialogResult.OK)
     {
         if (folderBrowserDialog1.ShowDialog() == DialogResult.OK)
         {
             convsAndSaveDir casd = new convsAndSaveDir();
             casd.saveDir = folderBrowserDialog1.SelectedPath;
             casd.convs = new List<Conversation>();
             foreach (ListViewItem i in listViewConversations.Items)
             {
                 casd.convs.Add(i.Tag as Conversation);
             }
             saveAllWorker.RunWorkerAsync(casd);
             toolStripProgressBar1.Value = 0;
             toolStripStatusLabel1.Text = "Saving all Conversations";
         }                
     }
 }
Example #3
0
        private void saveAllWorker_DoWork(object sender, DoWorkEventArgs e)
        {
            convsAndSaveDir casd = (e.Argument as convsAndSaveDir);

            exportConversations(casd.convs, casd.saveDir);
        }