Exemple #1
0
        private void OpenFromPath(string path)
        {
            if (Path.GetFileName(path).Contains("*"))
            {
                // Replay watcher.
                ScreenDescriptionPlayback screenDescription = new ScreenDescriptionPlayback();
                screenDescription.FullPath        = path;
                screenDescription.IsReplayWatcher = true;
                screenDescription.Stretch         = true;
                screenDescription.Autoplay        = true;
                screenDescription.SpeedPercentage = PreferencesManager.PlayerPreferences.DefaultReplaySpeed;
                LoaderVideo.LoadVideoInScreen(screenManager, path, screenDescription);

                screenManager.OrganizeScreens();
            }
            else
            {
                // Normal file.
                if (File.Exists(path))
                {
                    LoaderVideo.LoadVideoInScreen(screenManager, path, -1);
                    screenManager.OrganizeScreens();
                }
                else
                {
                    MessageBox.Show(ScreenManagerLang.LoadMovie_FileNotOpened, ScreenManagerLang.LoadMovie_Error, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                }
            }
        }
Exemple #2
0
 private void OpenFileFromPath(string filePath)
 {
     if (File.Exists(filePath))
     {
         LoaderVideo.LoadVideoInScreen(screenManager, filePath, -1);
         screenManager.OrganizeScreens();
     }
     else
     {
         MessageBox.Show(ScreenManagerLang.LoadMovie_FileNotOpened, ScreenManagerLang.LoadMovie_Error, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
     }
 }
Exemple #3
0
        private void mnuTutorialVideos_OnClick(object sender, EventArgs e)
        {
            // Launch help video from current UI language.
            string resourceUri = GetLocalizedHelpResource(false);

            if (resourceUri != null && resourceUri.Length > 0 && File.Exists(resourceUri))
            {
                LoaderVideo.LoadVideoInScreen(screenManager, resourceUri, -1);
            }
            else
            {
                log.Error(String.Format("Cannot find the video tutorial file. ({0}).", resourceUri));
                MessageBox.Show(ScreenManagerLang.LoadMovie_FileNotOpened, ScreenManagerLang.LoadMovie_Error, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
            }
        }
Exemple #4
0
        private void mnuOpenReplayWatcherOnClick(object sender, EventArgs e)
        {
            NotificationCenter.RaiseStopPlayback(this);

            string path = FilePicker.OpenReplayWatcher();

            if (path == null || !Directory.Exists(Path.GetDirectoryName(path)))
            {
                return;
            }

            ScreenDescriptionPlayback screenDescription = new ScreenDescriptionPlayback();

            screenDescription.FullPath        = path;
            screenDescription.IsReplayWatcher = true;
            screenDescription.Stretch         = true;
            screenDescription.Autoplay        = true;
            screenDescription.SpeedPercentage = PreferencesManager.PlayerPreferences.DefaultReplaySpeed;
            LoaderVideo.LoadVideoInScreen(screenManager, path, screenDescription);

            screenManager.OrganizeScreens();
        }