示例#1
0
 private void pano_my_zip_Click(object sender, RoutedEventArgs e)
 {
     if (MessageBox.Show("This will overwrite any existing modifications to the Panorama UI, would you like to continue?",
                         "About To Overwrite Panorama UI", MessageBoxButton.YesNo, MessageBoxImage.Question, MessageBoxResult.No)
         == MessageBoxResult.Yes)
     {
         CreatePanoramaMyZip.RunWorkerAsync();
         StatusBarText.Content = "Generating panorama.my.zip";
         StatusBarWorker.RunWorkerAsync(CreatePanoramaMyZip);
         StatusBarPulse.RunWorkerAsync(CreatePanoramaMyZip);
     }
 }
示例#2
0
        private void snapshot_btn_Click(object sender, RoutedEventArgs e)
        {
            SaveFileDialog SFD = new SaveFileDialog();

            SFD.AddExtension     = true;
            SFD.Filter           = "Panorama Screenshot|*.pss";
            SFD.InitialDirectory = Directory.GetCurrentDirectory() + "\\snapshots";
            SFD.OverwritePrompt  = true;
            SFD.FileName         = "Snapshot-" + DateTime.Today.Year + "-" +
                                   DateTime.Today.Month + "-" + DateTime.Today.Day;

            if (SFD.ShowDialog() == true)
            {
                if (File.Exists(SFD.FileName))
                {
                    File.Delete(SFD.FileName);
                }
                CreateSnapshot.RunWorkerAsync(SFD.FileName);
                StatusBarText.Content = "Generating snapshot " + SFD.SafeFileName;
                StatusBarWorker.RunWorkerAsync(CreateSnapshot);
                StatusBarPulse.RunWorkerAsync(CreateSnapshot);
            }
        }