Ejemplo n.º 1
0
 public void ChangeSelectedGame(SourceGame selectedGame)
 {
     if (selectedGame != null)
     {
         this.selectedGame = selectedGame;
     }
 }
Ejemplo n.º 2
0
        //AudioFileManager afm;

        public ConsoleUI(SourceGame game, ref AudioFileManager afm, ref MainWindow mw)
        {
            this.afm         = afm;
            startUpContent   = new List <string>();
            trackListContent = new List <string>();
            helpContent      = new List <string>();
            tracks           = new List <TrackListItem>();
            this.mw          = mw;
            this.game        = game;

            Render();
        }
Ejemplo n.º 3
0
        private async void FindSteamApps()
        {
            if (string.IsNullOrWhiteSpace(PathManager.steamApps))
            {
                //Finds all proccesses that have "Steam" in them
                Process[] procs = Process.GetProcessesByName("Steam");
                Process   steam = null;

                string steamPath;
                if (procs.Length > 0)
                {
                    //Gets actual Steam process
                    steam = procs[0];

                    //Gets steam directory
                    steamPath                = Path.GetDirectoryName(steam.MainModule.FileName);
                    PathManager.steamApps    = steamPath + @"\SteamApps";
                    steamAppsFolderPath.Text = PathManager.steamApps;

                    //Gets the current game
                    SourceGame game = SourceGameManager.getByName(Setup_Game.Text);
                    Setup_steamAppsLabel.Content = "SteamApps Folder (Found)";

                    //Init things that need the steamapps folder
                    conUI     = new ConsoleUI(game, ref afm, ref mw);
                    cmdReader = new CommandReader(ref qss, ref ape, ref afm, game);
                }
                else
                {
                    //keep looking for the steam process each 500ms
                    await Task.Delay(new TimeSpan(0, 0, 0, 0, 500));

                    FindSteamApps();
                }
            }
            else
            {
                //Gets the current game
                SourceGame game = SourceGameManager.getByName(Setup_Game.Text);
                Setup_steamAppsLabel.Content = "SteamApps Folder (Found)";

                //Init things that need the steamapps folder
                if (!Directory.Exists(PathManager.steamApps + PathManager.steamApps + @"\common\Team Fortress 2"))
                {
                    conUI     = new ConsoleUI(game, ref afm, ref mw);
                    cmdReader = new CommandReader(ref qss, ref ape, ref afm, game);
                }
            }
        }
Ejemplo n.º 4
0
        public CommandReader(ref QueuedSpeechSynthesizer qss, ref AudioPlaybackEngine ape, ref AudioFileManager afm, SourceGame selectedGame)
        {
            this.selectedGame = selectedGame;
            this.logFile      = PathManager.steamApps + MainWindow.gameDir + @"\!tts-axynos.log";
            this.qss          = qss;
            this.ape          = ape;
            this.afm          = afm;

            this.synthCmd     = CommandManager.synthCmd;
            playCmd           = CommandManager.playCmd;
            playVideoCmd      = CommandManager.playVideoCmd;
            pauseCmd          = CommandManager.pauseCmd;
            resumeCmd         = CommandManager.resumeCmd;
            stopCmd           = CommandManager.stopCmd;
            skipCurrentCmd    = CommandManager.skipCurrentCmd;
            clearQueueCmd     = CommandManager.clearQueueCmd;
            ttsSkipCurrentCmd = CommandManager.ttsSkipCurrentCmd;
            ttsClearQueueCmd  = CommandManager.ttsClearQueueCmd;
            blockUserCmd      = CommandManager.blockUserCmd;
            blockWordCmd      = CommandManager.blockWordCmd;

            Setup(logFile);
            StartReadLoop();
        }
Ejemplo n.º 5
0
 public static void ChangeSelectedGame(SourceGame newSelectedGame)
 {
     selectedGame = newSelectedGame;
 }