Esempio n. 1
0
        private void OpenFileFromPath(string _FilePath)
        {
            if (File.Exists(_FilePath))
            {
                //--------------------------------------------------------------------------
                // CommandLoadMovieInScreen est une commande du ScreenManager.
                // elle gère la création du screen si besoin, et demande
                // si on veut charger surplace ou dans un nouveau en fonction de l'existant.
                //--------------------------------------------------------------------------
                IUndoableCommand clmis = new CommandLoadMovieInScreen(m_ScreenManager, _FilePath, -1, true);
                CommandManager   cm    = CommandManager.Instance();
                cm.LaunchUndoableCommand(clmis);

                //-------------------------------------------------------------
                // Get the video ready to play (normalement inutile ici, car on
                // l'a déjà fait dans le LoadMovieInScreen.
                //-------------------------------------------------------------
                ICommand css = new CommandShowScreens(m_ScreenManager);
                CommandManager.LaunchCommand(css);
            }
            else
            {
                MessageBox.Show(m_ScreenManager.resManager.GetString("LoadMovie_FileNotOpened"),
                                m_ScreenManager.resManager.GetString("LoadMovie_Error"),
                                MessageBoxButtons.OK,
                                MessageBoxIcon.Exclamation);
            }
        }
Esempio n. 2
0
 private void LaunchVideo(HelpItem _Video)
 {
     if (File.Exists(_Video.FileLocation))
     {
         //--------------------------------------------------------------------------
         // CommandLoadMovieInScreen est une commande du ScreenManager.
         // elle gère la création du screen si besoin, et demande
         // si on veut charger surplace ou dans un nouveau en fonction de l'existant.
         //--------------------------------------------------------------------------
         IUndoableCommand clmis = new CommandLoadMovieInScreen(m_ScreenManagerKernel, _Video.FileLocation, -1, true);
         CommandManager   cm    = CommandManager.Instance();
         cm.LaunchUndoableCommand(clmis);
     }
     else
     {
         log.Error(String.Format("Cannot find the video tutorial file. ({0}).", _Video.FileLocation));
     }
 }
Esempio n. 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))
            {
                IUndoableCommand clmis = new CommandLoadMovieInScreen(m_ScreenManager, resourceUri, -1, true);
                CommandManager   cm    = CommandManager.Instance();
                cm.LaunchUndoableCommand(clmis);
            }
            else
            {
                log.Error(String.Format("Cannot find the video tutorial file. ({0}).", resourceUri));
                MessageBox.Show(m_ScreenManager.resManager.GetString("LoadMovie_FileNotOpened"),
                                m_ScreenManager.resManager.GetString("LoadMovie_Error"),
                                MessageBoxButtons.OK,
                                MessageBoxIcon.Exclamation);
            }
        }