Example #1
0
        private void OpenThermalSequenceCommandExecute()
        {
            string pathToFile     = null;
            string pathToLicences = ApplicationViewModel.LicenseFilesFolder;

            using (OpenFileDialog dlg = new OpenFileDialog())
            {
                dlg.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
                DialogResult result = dlg.ShowDialog();
                if (result == System.Windows.Forms.DialogResult.OK)
                {
                    pathToFile = dlg.FileName;
                    try
                    {
                        thermalSequencePlayer = new ThermalSequencePlayer(pathToFile, pathToLicences);
                    }
                    catch (Exception e)
                    {
                        string           messageBoxText = e.Message;
                        string           caption        = "Warning";
                        MessageBoxButton button         = MessageBoxButton.OK;
                        MessageBoxImage  icon           = MessageBoxImage.Warning;
                        System.Windows.MessageBox.Show(messageBoxText, caption, button, icon);
                    }
                    thermalSequencePlayer.RecalculationCompleted += thermalSequencePlayer_RecalculationCompleted;
                    if (thermalSequencePlayer.IsRadiometricSequence && !thermalSequencePlayer.IsRadiometrisSequenceRecalculated)
                    {
                        ProgressWindow.OpenWindow("Recalculating sequence", "Recalculating...");
                    }

                    RaiseInit();
                    RaiseParameters();
                    RaiseImage();
                }
            }
        }
Example #2
0
 private void CloseThermalSequenceCommandExecute()
 {
     Loop = false;
     thermalSequencePlayer.UnloadSequence();
     thermalSequencePlayer = null;
 }