Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- string gamePath = System.Windows.Forms.Application.StartupPath + "\\Games\\index.ini";
- //mothership code line
- string[] lines = File.ReadAllLines(gamePath);
- for (int i = 0; i < lines.Length - 2; i++)
- {
- //if (i%3 == 0) //Überprüft jede 3. Zeile <-- Uncomment -> Performanceboost, aber brauchst du nicht unbedingt
- //{ //<-- Uncomment -> Performanceboost, aber brauchst du nicht unbedingt
- //----------------------------------
- // Variablenzuweisung für bessere Code Lesbarkeit
- string twitchGame = "";
- string titelName = "";
- string gameProcessName = lines[i];
- if (lines[i + 1] != null) { // Überprüfung auf nicht definiertes Array
- twitchGame = lines[i + 1];
- }
- if (lines[i + 2] != null) {
- titelName = lines[i + 2];
- }
- // --------------------------------
- if (currentProcess.ProcessName == gameProcessName)
- {
- status.Text = ("Twitch Game: " + twitchGame);
- ChangeGame(twitchGame, channelName);
- if (titleName == ""){ // geändert
- streamtitlestatus.Text = ("Stream Title: " + titelName); // geändert
- streamTitle(titleName, channelName); // geändert
- }
- break;
- }
- else if (GetActiveWindowTitle() == "Twitch Switch")
- {
- //status.Text = ("Twitch Game: " + twitchGame);
- return;
- }
- else if (GetActiveWindowTitle() == "Twitch Auto Game Changer")
- {
- //status.Text = ("Twitch Game: " + twitchGame);
- return;
- }
- //} //<-- Uncomment -> Performanceboost, aber brauchst du nicht unbedingt
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement