public void ClickMethodPlay()
        {
            if (SelectedItemInPlayList < 0 || PlayList.Count <= 0)
            {
                return;
            }
            PlayerThread playerThread = new PlayerThread(player.PlayList.ElementAt(SelectedItemInPlayList), player);

            playerThread.Start();
            player.PlayNowList.Add(playerThread);
        }
Пример #2
0
        private void Initialize()
        {
            // If the player has already loaded an animation, kill it first
            if (PlayerThread != null)
            {
                PlayerThread.Abort();
            }

            // create a new player thread
            PlayerThread      = new Thread(playerThredDoWork);
            PlayerThread.Name = "Chroma Animation Player Thread";
            PlayerThread.Start();
        }
Пример #3
0
        public static bool Start()
        {
            if (Instance.Config.GameDir == string.Empty)
            {
                Logger.Write(Logger.Status.Error, Localization.Localization.CORE_SET_DIRECTORY);

                return(false);
            }

            if (!Directory.Exists(Instance.Config.GameDir))
            {
                Logger.Write(Logger.Status.Error, Localization.Localization.CORE_ERROR_CANT_FIND_DIR + Instance.Config.GameDir);

                return(false);
            }

            if (!Instance.Load())
            {
                Logger.Write(
                    Logger.Status.Error,
                    Localization.Localization.CORE_ERRORS_FOUND_CLOSE_PROGRAM,
                    ConsoleColor.Red);
                return(false);
            }

            //if (!File.Exists(Instance.Config.GameDir + "/console.log"))
            //{
            //    //try
            //    //{
            //    //    File.WriteAllText(Instance.Config.GameDir + "/console.log", string.Empty);
            //    //}
            //    //catch
            //    //{
            //    //    Logger.Write(
            //    //        Logger.Status.Error,
            //    //        Localization.Localization.CORE_ERROR_CANT_PREPARE_CONSOLE_LOG,
            //    //        ConsoleColor.Red);
            //    //    return false;
            //    //}
            //}


            PlayerThread.StartThread();
            ReaderThread.StartThread();
            return(true);
        }