예제 #1
0
        private void CaptureMovie_Click(object sender, RoutedEventArgs e)
        {
            //Capture capture = Capture.GetInstance();

            //if (capture.IsCapturingVideo)
            //{
            //    capture.StopCapturingVideoToFile();
            //}
            //else
            //{
            //    var filename = System.IO.Path.Combine(System.IO.Path.GetTempPath(), new Random().Next().ToString() + ".wmv");
            //    capture.StartCapturingVideoToFile(filename);
            ////}

            //var filename = System.IO.Path.Combine(System.IO.Path.GetTempPath(), new Random().Next().ToString() + ".wmv");
            //Capture capture = Capture.GetInstance();
            //capture.StartCapturingVideoToFile(filename);

            //  ActivationManager am = ActivationManager.GetInstance();

            // if (am.ActivationStatus())
            //  {

            CaptureMovieProcessFlow flow = CaptureMovieProcessFlow.GetInstance();

            flow.ToggleStartPause();
            //  }
            //   else
            //   {
            //         MessageBox.Show("Only registered users can record video");
            //        am.PresistActivation();
            //  }
        }
예제 #2
0
 private void CaptureMovieEnd_Click(object sender, RoutedEventArgs e)
 {
     if (MessageBoxResult.Yes == MessageBox.Show("Are you sure you want to end the current recording before hand", "Recording", MessageBoxButton.YesNo))
     {
         CaptureMovieProcessFlow flow = CaptureMovieProcessFlow.GetInstance();
         flow.End();
     }
 }
예제 #3
0
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            try
            {
                logger.Info("logging v2");
                ActivationManager am = new ActivationManager();
                am.PresistActivation();
                // am.IsExipred();
                logger.Info("get capture instance");
                Capture capture = Capture.GetInstance();
                logger.Info("set the device to the wpf");
                capture.SetCaptureDeviceWPFControl(videoElement);

                //folder view
                logger.Info("open the categories");
                StonesView.ViewControl = ViewControl;
                DirectoryManager dm = DirectoryManager.GetInstance();

                string path = dm.GetHomeFolder();

                FolderBrowser fb = FolderBrowser.GetInstance();
                logger.Info("set working folder");
                fb.SetFolderControl(this.FolderBrowserTree);
                fb.AddItemClickEvents();
                fb.Init(path);

                StonesView.StoneInfoDisplayControl = StoneInfo;

                StonesView.InitStonesView();
                logger.Info("Init stone view");
                StonesView.LoadImagesToImageView(path);
                logger.Info("loading images");
                if (SettingsManager.ReadBoolSetting("RunFirstTime"))
                {
                    //TODO add here things to run the first time
                    //Options options = new Options();
                    //options.Owner = this;
                    //options.Show();

                    SettingsManager.WriteBoolSetting("RunFirstTime", false);
                }



                CaptureMovieProcessFlow flow = CaptureMovieProcessFlow.GetInstance();
                flow.TextBlock     = this.MovieFlowTimerText;
                flow.CaptureFacede = capture;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
                MessageBox.Show(ex.StackTrace);

                throw;
            }
        }