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: 146: 147: 148: 149: 150: 151: 152: 153: 154: 155: 156: 157: 158: 159: 160: 161: 162: 163: 164: 165: 166: 167: 168: 169: 170: 171: 172: 173: 174: 175: 176: 177: 178: 179: 180: 181: 182: 183: 184: 185: 186: 187: 188: 189: 190: 191: 192: 193: 194: 195: 196: 197: 198: 199: 200: 201: 202: 203: 204: 205: 206: 207: 208: 209: 210: 211: 212: 213: 214: 215: 216: 217: 218: 219: 220: 221: 222: 223: 224: 225: 226: 227: 228: 229: 230: 231: 232: 233: 234: 235: 236: 237: 238: 239: 240: 241: 242: 243: 244: 245: 246: 247: 248: 249: 250: 251: 252: 253: 254: 255: 256: 257: 258: 259: 260: 261: 262: 263: 264: 265: 266: 267: 268: 269: 270: 271: 272: 273: 274: 275: 276: 277: 278: 279: 280: 281: 282: 283: 284: 285: 286: 287: 288: 289: 290: 291: 292: 293: 294: 295: 296: 297: 298: 299: 300: 301: 302: 303: 304: 305: 306: 307: 308: 309: 310: 311: 312: 313: 314: 315: 316: 317: 318: 319: 320: 321: 322: 323: 324: 325: 326: 327: 328: 329: 330: 331:
| unit backtimer;
interface
uses System.Drawing, System.Collections, System.ComponentModel, System.Windows.Forms, System.Data, Borland.Vcl.SysUtils;
type TWinForm = class(System.Windows.Forms.Form) {$REGION 'Designer Managed Code'} strict private Components: System.ComponentModel.Container; Label1: System.Windows.Forms.Label; Label2: System.Windows.Forms.Label; Label3: System.Windows.Forms.Label; Label4: System.Windows.Forms.Label; Label5: System.Windows.Forms.Label; Panel1: System.Windows.Forms.Panel; Panel2: System.Windows.Forms.Panel; Textbeginhour: System.Windows.Forms.TextBox; Textbeginminute: System.Windows.Forms.TextBox; Textbeginsecond: System.Windows.Forms.TextBox; Textsongminute: System.Windows.Forms.TextBox; Textsongsecond: System.Windows.Forms.TextBox; Textadsecond: System.Windows.Forms.TextBox; Textadminute: System.Windows.Forms.TextBox; Label6: System.Windows.Forms.Label; procedure InitializeComponent; {$ENDREGION} strict protected procedure Dispose(Disposing: Boolean); override; private public constructor Create; end;
[assembly: RuntimeRequiredAttribute(TypeOf(TWinForm))]
implementation
{$AUTOBOX ON}
{$REGION 'Windows Form Designer generated code'} procedure TWinForm.InitializeComponent; begin Self.Label1 := System.Windows.Forms.Label.Create; Self.Label2 := System.Windows.Forms.Label.Create; Self.Label3 := System.Windows.Forms.Label.Create; Self.Label4 := System.Windows.Forms.Label.Create; Self.Label5 := System.Windows.Forms.Label.Create; Self.Panel1 := System.Windows.Forms.Panel.Create; Self.Textadminute := System.Windows.Forms.TextBox.Create; Self.Textadsecond := System.Windows.Forms.TextBox.Create; Self.Textsongsecond := System.Windows.Forms.TextBox.Create; Self.Textsongminute := System.Windows.Forms.TextBox.Create; Self.Textbeginsecond := System.Windows.Forms.TextBox.Create; Self.Textbeginminute := System.Windows.Forms.TextBox.Create; Self.Textbeginhour := System.Windows.Forms.TextBox.Create; Self.Panel2 := System.Windows.Forms.Panel.Create; Self.Label6 := System.Windows.Forms.Label.Create; Self.Panel1.SuspendLayout; Self.Panel2.SuspendLayout; Self.SuspendLayout; Self.Label1.BackColor := System.Drawing.Color.FromArgb((Byte(0)), (Byte(192)), (Byte(0))); Self.Label1.Font := System.Drawing.Font.Create('Microsoft Sans Serif', 9.75, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, (Byte(0))); Self.Label1.Location := System.Drawing.Point.Create(8, 16); Self.Label1.Name := 'Label1'; Self.Label1.Size := System.Drawing.Size.Create(112, 16); Self.Label1.TabIndex := 0; Self.Label1.Text := 'News-Beginn:'; Self.Label2.BackColor := System.Drawing.Color.FromArgb((Byte(0)), (Byte(192)), (Byte(0))); Self.Label2.Font := System.Drawing.Font.Create('Microsoft Sans Serif', 9.75, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, (Byte(0))); Self.Label2.Location := System.Drawing.Point.Create(8, 80); Self.Label2.Name := 'Label2'; Self.Label2.Size := System.Drawing.Size.Create(112, 16); Self.Label2.TabIndex := 1; Self.Label2.Text := 'Dauer Werbung:'; Self.Label3.BackColor := System.Drawing.Color.FromArgb((Byte(0)), (Byte(192)), (Byte(0))); Self.Label3.Font := System.Drawing.Font.Create('Microsoft Sans Serif', 9.75, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, (Byte(0))); Self.Label3.Location := System.Drawing.Point.Create(8, 48); Self.Label3.Name := 'Label3'; Self.Label3.Size := System.Drawing.Size.Create(96, 16); Self.Label3.TabIndex := 2; Self.Label3.Text := 'Letzter Titel:'; Self.Label4.BackColor := System.Drawing.Color.Red; Self.Label4.Font := System.Drawing.Font.Create('Microsoft Sans Serif', 9.75, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, (Byte(0))); Self.Label4.Location := System.Drawing.Point.Create(8, 128); Self.Label4.Name := 'Label4'; Self.Label4.Size := System.Drawing.Size.Create(112, 23); Self.Label4.TabIndex := 3; Self.Label4.Text := 'Start letzter Titel:'; Self.Label5.BackColor := System.Drawing.Color.Red; Self.Label5.Font := System.Drawing.Font.Create('Microsoft Sans Serif', 9.75, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, (Byte(0))); Self.Label5.Location := System.Drawing.Point.Create(8, 160); Self.Label5.Name := 'Label5'; Self.Label5.TabIndex := 4; Self.Label5.Text := 'Start Werbung:'; Self.Panel1.BackColor := System.Drawing.Color.FromArgb((Byte(0)), (Byte(192)), (Byte(0))); Self.Panel1.Controls.Add(Self.Textadminute); Self.Panel1.Controls.Add(Self.Textadsecond); Self.Panel1.Controls.Add(Self.Textsongsecond); Self.Panel1.Controls.Add(Self.Textsongminute); Self.Panel1.Controls.Add(Self.Textbeginsecond); Self.Panel1.Controls.Add(Self.Textbeginminute); Self.Panel1.Controls.Add(Self.Textbeginhour); Self.Panel1.Location := System.Drawing.Point.Create(0, 0); Self.Panel1.Name := 'Panel1'; Self.Panel1.Size := System.Drawing.Size.Create(328, 112); Self.Panel1.TabIndex := 5; Self.Textadminute.BackColor := System.Drawing.Color.FromArgb((Byte(224)), (Byte(224)), (Byte(224))); Self.Textadminute.BorderStyle := System.Windows.Forms.BorderStyle.FixedSingle; Self.Textadminute.Font := System.Drawing.Font.Create('Microsoft Sans Serif', 9.75, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, (Byte(0))); Self.Textadminute.Location := System.Drawing.Point.Create(192, 80); Self.Textadminute.MaxLength := 2; Self.Textadminute.Name := 'Textadminute'; Self.Textadminute.Size := System.Drawing.Size.Create(24, 22); Self.Textadminute.TabIndex := 5; Self.Textadminute.Text := '00'; Self.Textadsecond.BackColor := System.Drawing.Color.FromArgb((Byte(224)), (Byte(224)), (Byte(224))); Self.Textadsecond.BorderStyle := System.Windows.Forms.BorderStyle.FixedSingle; Self.Textadsecond.Font := System.Drawing.Font.Create('Microsoft Sans Serif', 9.75, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, (Byte(0))); Self.Textadsecond.Location := System.Drawing.Point.Create(232, 80); Self.Textadsecond.MaxLength := 2; Self.Textadsecond.Name := 'Textadsecond'; Self.Textadsecond.Size := System.Drawing.Size.Create(24, 22); Self.Textadsecond.TabIndex := 6; Self.Textadsecond.Text := '00'; Self.Textsongsecond.BackColor := System.Drawing.Color.FromArgb((Byte(224)), (Byte(224)), (Byte(224))); Self.Textsongsecond.BorderStyle := System.Windows.Forms.BorderStyle.FixedSingle; Self.Textsongsecond.Font := System.Drawing.Font.Create('Microsoft Sans Ser' + 'if', 9.75, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, (Byte(0))); Self.Textsongsecond.Location := System.Drawing.Point.Create(232, 48); Self.Textsongsecond.MaxLength := 2; Self.Textsongsecond.Name := 'Textsongsecond'; Self.Textsongsecond.Size := System.Drawing.Size.Create(24, 22); Self.Textsongsecond.TabIndex := 4; Self.Textsongsecond.Text := '00'; Self.Textsongminute.BackColor := System.Drawing.Color.FromArgb((Byte(224)), (Byte(224)), (Byte(224))); Self.Textsongminute.BorderStyle := System.Windows.Forms.BorderStyle.FixedSingle; Self.Textsongminute.Font := System.Drawing.Font.Create('Microsoft Sans Ser' + 'if', 9.75, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, (Byte(0))); Self.Textsongminute.Location := System.Drawing.Point.Create(192, 48); Self.Textsongminute.MaxLength := 2; Self.Textsongminute.Name := 'Textsongminute'; Self.Textsongminute.Size := System.Drawing.Size.Create(24, 22); Self.Textsongminute.TabIndex := 3; Self.Textsongminute.Text := '00'; Self.Textbeginsecond.BackColor := System.Drawing.Color.FromArgb((Byte(224)), (Byte(224)), (Byte(224))); Self.Textbeginsecond.BorderStyle := System.Windows.Forms.BorderStyle.FixedSingle; Self.Textbeginsecond.Font := System.Drawing.Font.Create('Microsoft Sans Se' + 'rif', 9.75, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, (Byte(0))); Self.Textbeginsecond.Location := System.Drawing.Point.Create(232, 16); Self.Textbeginsecond.MaxLength := 2; Self.Textbeginsecond.Name := 'Textbeginsecond'; Self.Textbeginsecond.Size := System.Drawing.Size.Create(24, 22); Self.Textbeginsecond.TabIndex := 2; Self.Textbeginsecond.Text := '00'; Self.Textbeginminute.BackColor := System.Drawing.Color.FromArgb((Byte(224)), (Byte(224)), (Byte(224))); Self.Textbeginminute.BorderStyle := System.Windows.Forms.BorderStyle.FixedSingle; Self.Textbeginminute.Font := System.Drawing.Font.Create('Microsoft Sans Se' + 'rif', 9.75, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, (Byte(0))); Self.Textbeginminute.Location := System.Drawing.Point.Create(192, 16); Self.Textbeginminute.MaxLength := 2; Self.Textbeginminute.Name := 'Textbeginminute'; Self.Textbeginminute.Size := System.Drawing.Size.Create(24, 22); Self.Textbeginminute.TabIndex := 1; Self.Textbeginminute.Text := '00'; Self.Textbeginhour.BackColor := System.Drawing.Color.FromArgb((Byte(224)), (Byte(224)), (Byte(224))); Self.Textbeginhour.BorderStyle := System.Windows.Forms.BorderStyle.FixedSingle; Self.Textbeginhour.Font := System.Drawing.Font.Create('Microsoft Sans Seri' + 'f', 9.75, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, (Byte(0))); Self.Textbeginhour.Location := System.Drawing.Point.Create(152, 16); Self.Textbeginhour.MaxLength := 2; Self.Textbeginhour.Name := 'Textbeginhour'; Self.Textbeginhour.Size := System.Drawing.Size.Create(24, 22); Self.Textbeginhour.TabIndex := 0; Self.Textbeginhour.Text := '00'; Self.Panel2.BackColor := System.Drawing.Color.Red; Self.Panel2.Controls.Add(Self.Label6); Self.Panel2.Location := System.Drawing.Point.Create(0, 112); Self.Panel2.Name := 'Panel2'; Self.Panel2.Size := System.Drawing.Size.Create(328, 88); Self.Panel2.TabIndex := 6; Self.Label6.Location := System.Drawing.Point.Create(152, 16); Self.Label6.Name := 'Label6'; Self.Label6.Size := System.Drawing.Size.Create(104, 24); Self.Label6.TabIndex := 0; Self.Label6.Text := 'Label6'; Self.AutoScaleBaseSize := System.Drawing.Size.Create(5, 13); Self.ClientSize := System.Drawing.Size.Create(274, 197); Self.Controls.Add(Self.Label5); Self.Controls.Add(Self.Label4); Self.Controls.Add(Self.Label3); Self.Controls.Add(Self.Label2); Self.Controls.Add(Self.Label1); Self.Controls.Add(Self.Panel1); Self.Controls.Add(Self.Panel2); Self.FormBorderStyle := System.Windows.Forms.FormBorderStyle.FixedToolWindow; Self.Name := 'TWinForm'; Self.Text := 'Backtimer V0.01'; Self.Panel1.ResumeLayout(False); Self.Panel2.ResumeLayout(False); Self.ResumeLayout(False); end; {$ENDREGION}
procedure TWinForm.Dispose(Disposing: Boolean); begin if Disposing then begin if Components <> nil then Components.Dispose(); end; inherited Dispose(Disposing); end;
constructor TWinForm.Create; begin inherited Create; InitializeComponent; end;
function AlltoSeconds(hour,minute,second:Int64):Int64; begin AlltoSeconds:=hour*60*60+minute*60+second; end;
procedure CalcValues(beginhour,beginminute,beginsecond,songminute,songsecond,adminute,adsecond:Int64); var songstart, adstart:Int64; begin songstart:=AlltoSeconds(beginhour,beginminute,beginsecond)-AlltoSeconds(0,songminute,songsecond); textsongminute.text=''; end; end. |