Advertisement
Guest User

Untitled

a guest
Mar 21st, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.79 KB | None | 0 0
  1. string gamePath = System.Windows.Forms.Application.StartupPath + "\\Games\\index.ini";
  2.  
  3. //mothership code line
  4. string[] lines = File.ReadAllLines(gamePath);
  5.  
  6. for (int i = 0; i < lines.Length - 2; i++)
  7. {
  8. //if (i%3 == 0) //Überprüft jede 3. Zeile <-- Uncomment -> Performanceboost, aber brauchst du nicht unbedingt
  9. //{ //<-- Uncomment -> Performanceboost, aber brauchst du nicht unbedingt
  10.  
  11. //----------------------------------
  12. // Variablenzuweisung für bessere Code Lesbarkeit
  13. string twitchGame = "";
  14. string titelName = "";
  15. string gameProcessName = lines[i];
  16. if (lines[i + 1] != null) { // Überprüfung auf nicht definiertes Array
  17. twitchGame = lines[i + 1];
  18. }
  19.  
  20. if (lines[i + 2] != null) {
  21. titelName = lines[i + 2];
  22. }
  23. // --------------------------------
  24.  
  25. if (currentProcess.ProcessName == gameProcessName)
  26. {
  27. status.Text = ("Twitch Game: " + twitchGame);
  28. ChangeGame(twitchGame, channelName);
  29. if (titleName == ""){ // geändert
  30. streamtitlestatus.Text = ("Stream Title: " + titelName); // geändert
  31. streamTitle(titleName, channelName); // geändert
  32. }
  33. break;
  34. }
  35. else if (GetActiveWindowTitle() == "Twitch Switch")
  36. {
  37. //status.Text = ("Twitch Game: " + twitchGame);
  38. return;
  39. }
  40. else if (GetActiveWindowTitle() == "Twitch Auto Game Changer")
  41. {
  42. //status.Text = ("Twitch Game: " + twitchGame);
  43. return;
  44. }
  45. //} //<-- Uncomment -> Performanceboost, aber brauchst du nicht unbedingt
  46.  
  47. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement