1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70: 71: 72: 73: 74: 75: 76: 77: 78: 79: 80: 81: 82: 83: 84: 85: 86: 87: 88: 89: 90: 91: 92: 93: 94: 95: 96: 97: 98: 99: 100: 101: 102: 103: 104: 105: 106: 107: 108: 109: 110: 111: 112: 113: 114: 115: 116: 117: 118: 119: 120: 121: 122: 123: 124: 125: 126: 127: 128: 129: 130: 131: 132: 133: 134: 135: 136: 137: 138: 139: 140: 141: 142: 143: 144: 145:
| Procedure TForm1.Refresh; Var titel, moderator, hoerer: String; DJ: Boolean; Begin Panel1.Visible := true; Application.Processmessages; Form1.Caption := 'RMC-Tool by JayEff ' + v + ' [Aktualisierung...]'; CoolTrayIcon1.Hint := '[Aktualisierung...] *nichts geht mehr :( *';
s.text := IdHTTP1.Get('http://rigismusiccity.de/rmctool/rmcstatustool.php'); s.savetofile(ExtractFilePath(Application.ExeName) + 'temp.txt'); s.text := StringReplace(s.text, ';;', #13#10, [rfReplaceAll]); s.text := StringReplace(s.text, 'ü', 'ü', [rfReplaceAll]); If length(s.text) > 0 Then Begin Try If s[6] = '1' Then Begin erstesmalballoff := true; moderator := StringReplace(s[5], 'Rigi's Music-City © by Bulldog Record's -', '', [rfIgnoreCase, rfReplaceAll]); moderator := StringReplace(moderator, '- Rigi''s Music-City © by Bulldog Record''s -', '', [rfIgnoreCase, rfReplaceAll]); titel := StringReplace(s[4], ''', '''', [rfReplaceAll]); hoerer := 'DSL: ' + s[0] + ' (Rekord: ' + s[1] + ')' + #13#10 + 'ISDN: ' + s[2] + ' (Rekord: ' + s[3] + ')'; Label5.Caption := 'Moderator: ' + moderator; Label4.Caption := titel; Label8.Caption := 'Zuhörer: ' + #13#10 + hoerer; Form1.CoolTrayIcon1.Hint := titel + ' - Euer DJ: ' + moderator; If showballon And showAkt Then CoolTrayIcon1.ShowBalloonHint('RMC', titel + ' - Euer DJ: ' + moderator, bitInfo, 10); Form1.CoolTrayIcon1.IconIndex := 1; Form1.Button6.Enabled := true; Form1.Button7.Enabled := true; DJ := favouriteDJ(DJs, moderator); If DJ Then Begin If erstesmal Then Begin If showballon And showDJ Then CoolTrayIcon1.ShowBalloonHint('LieblingsDJ!', 'Dein LieblingsDJ ' + moderator + ' ist online!'#10#13'Er spielt gerade ' + titel, bitInfo, 10); erstesmal := False; If onDJ Then Begin MessageBox(0, PChar('Dein LieblingsDJ ' + moderator + ' ist online!'), PChar('LieblingsDJ!'), MB_ICONINFORMATION); End; Label5.Font.Color := clRed; Label5.Font.Style := [fsBold]; End; Form1.CoolTrayIcon1.Hint := titel + ' - LIEBLINGSDJ: ' + moderator; End Else Begin Label5.Font.Color := clWhite; erstesmal := true; Label5.Font.Style := []; End; End Else Begin erstesmalballon := true; Form1.CoolTrayIcon1.Hint := 'RMC ist Offline'; If showballon And erstesmalballoff And showOff Then Begin erstesmalballoff := False; CoolTrayIcon1.ShowBalloonHint('RMC', 'RMC ist Offline gegangen', bitInfo, 10); End; Form1.CoolTrayIcon1.IconIndex := 2; erstesmal := true; Form1.Button6.Enabled := False; Form1.Button7.Enabled := False; moderator := 'RMC ist Offline'; titel := ''; hoerer := ''; Label5.Caption := moderator; Label5.Font.Color := clWhite; Label1.Font.Style := []; Label4.Caption := titel; Label8.Caption := hoerer; End; Except On E: Exception Do Begin TLog.ELOG(E.Message); TLog.WLOG('Refresh fehlgeschlagen!'); Label5.Caption := 'FEHLER beim Aktualisieren!'; Label4.Caption := 'FEHLER beim Aktualisieren!'; Label8.Caption := 'FEHLER beim Aktualisieren!'; CoolTrayIcon1.Hint := 'FEHLER beim Aktualisieren!'; CoolTrayIcon1.IconIndex := 0; End;
End; End Else Begin TLog.WLOG('Refresh fehlgeschlagen! s.text war leer oO'); Label5.Caption := 'FEHLER beim Aktualisieren!'; Label4.Caption := 'FEHLER beim Aktualisieren!'; Label8.Caption := 'FEHLER beim Aktualisieren!'; CoolTrayIcon1.Hint := 'FEHLER beim Aktualisieren!'; CoolTrayIcon1.IconIndex := 0; End; Form1.Caption := 'RMC-Tool by JayEff ' + v; Panel1.Visible := False; End;
s.text := IdHTTP1.Get('http://rigismusiccity.de/rmctool/rmcstatustool.php'); s.savetofile(ExtractFilePath(Application.ExeName) + 'temp.txt'); s.text := StringReplace(s.text, ';;', #13#10, [rfReplaceAll]); s.text := StringReplace(s.text, 'ü', 'ü', [rfReplaceAll]); If length(s.text) > 0 Then Begin Try If s[6] = '1' Then Begin end;
Except On E: Exception Do Begin TLog.ELOG(E.Message); TLog.WLOG('Refresh fehlgeschlagen!'); Label5.Caption := 'FEHLER beim Aktualisieren!'; Label4.Caption := 'FEHLER beim Aktualisieren!'; Label8.Caption := 'FEHLER beim Aktualisieren!'; CoolTrayIcon1.Hint := 'FEHLER beim Aktualisieren!'; CoolTrayIcon1.IconIndex := 0; End; End; |