Esempio n. 1
0
 void OnClosingWindow(object sender, CancelEventArgs e)
 {
     SaveSettings();
     if (MovieEncodeInfo.IsEncoding)
     {
         MovieEncodeInfo.Stop();
     }
     if (TVShowEncodeInfo.IsEncoding)
     {
         TVShowEncodeInfo.Stop();
     }
 }
Esempio n. 2
0
        public MainWindow()
        {
            DataContext = this;

            InitializeComponent();
            SetupHandbrake();
            StartRefreshOpticalDrives();

            MovieEncodeInfo = new MovieEncodeInfo(this, this.encodeQueue);
            MovieEncodeInfo.PropertyChanged += OnEncodeInfoPropertyChanged;

            TVShowEncodeInfo = new TVShowEncodeInfo(this, this.encodeQueue);
            TVShowEncodeInfo.PropertyChanged += OnEncodeInfoPropertyChanged;

            Tabs.SelectionChanged += OnTabChanged;

            SourceInitialized += OnSourceInitialized;
            Closing           += OnClosingWindow;

            LoadSettings();

            // We frequently don't care about unobserved exceptions; swallow them silently.
            TaskScheduler.UnobservedTaskException += (o, e) => { e.SetObserved(); };
        }
Esempio n. 3
0
        public MainWindow()
        {
            DataContext = this;

            InitializeComponent();
            SetupHandbrake();
            StartRefreshOpticalDrives();

            MovieEncodeInfo = new MovieEncodeInfo(this, this.encodeQueue);
            MovieEncodeInfo.PropertyChanged += OnEncodeInfoPropertyChanged;

            TVShowEncodeInfo = new TVShowEncodeInfo(this, this.encodeQueue);
            TVShowEncodeInfo.PropertyChanged += OnEncodeInfoPropertyChanged;

            Tabs.SelectionChanged += OnTabChanged;

            SourceInitialized += OnSourceInitialized;
            Closing += OnClosingWindow;

            LoadSettings();

            // We frequently don't care about unobserved exceptions; swallow them silently.
            TaskScheduler.UnobservedTaskException += (o, e) => { e.SetObserved(); };
        }