Kaynağa Gözat

adding new example url, LSU entries

tone.tps example
Wilfried Klaas 6 yıl önce
ebeveyn
işleme
91ab6bc1f1
9 değiştirilmiş dosya ile 13 ekleme ve 7 silme
  1. 4 0
      Beispiele/examples.json
  2. 2 2
      SPS_EMU.000
  3. 1 0
      SPS_EMU.001
  4. 1 0
      SPS_EMU.044
  5. 1 0
      SPS_EMU.049
  6. 1 1
      SPS_Emu.lpi
  7. BIN
      SPS_Emu.lsu
  8. 1 1
      ugui.lfm
  9. 2 3
      ugui.pas

+ 4 - 0
Beispiele/examples.json

@@ -7,6 +7,10 @@
 			"name": "Servo",
 			"index": 2,
 			"file": "servo.tps"
+		}, {
+			"name": "Tone",
+			"index": 3,
+			"file": "tone.tps"
 		}
 	]
 }

+ 2 - 2
SPS_EMU.000

@@ -2,8 +2,8 @@
 LSUTextFile=1
 Copyrigth=MCS Media Computer Software
 [LSUInfo]
-CompileDate=12.12.2018
-CompileTime=00:25:33
+CompileDate=14.12.2018
+CompileTime=19:52:33
 Name=Wilfried Klaas
 LSUBinFile=E:\daten\git-sourcen\SPS_Emulator\SPS_Emu.lsu
 LSUTextFile=E:\daten\git-sourcen\SPS_Emulator\SPS_Emu.

+ 1 - 0
SPS_EMU.001

@@ -40,6 +40,7 @@ ID_RESETPRESETS=reset all presets
 ID_SAVEPRESETS=save presets to file
 ID_LOADPRESETS=load presets from file
 ID_NEXT_INSERT=goto next row, add row if necessary
+ID_EXAMPLE=Load example from web
 
 [infobox]
 ID_APPTITLE=TPS/PLC Emulator

+ 1 - 0
SPS_EMU.044

@@ -40,6 +40,7 @@ ID_RESETPRESETS=reset all presets
 ID_SAVEPRESETS=save presets to file
 ID_LOADPRESETS=load presets from file
 ID_NEXT_INSERT=goto next row, add row if necessary
+ID_EXAMPLE=Load example from web
 
 [infobox]
 ID_APPTITLE=TPS/PLC Emulator

+ 1 - 0
SPS_EMU.049

@@ -40,6 +40,7 @@ ID_RESETPRESETS=Einstellungen zurücksetzen
 ID_LOADPRESETS=Presets aus Datei laden
 ID_SAVEPRESETS=Presets in Datei speichern
 ID_NEXT_INSERT=nächste Zeile, wenn nötig, lege neue Zeile an
+ID_EXAMPLE=Beispiele aus dem Internet laden
 
 [infobox]
 ID_APPTITLE=TPS/SPS Emulator

+ 1 - 1
SPS_Emu.lpi

@@ -22,7 +22,7 @@
       <AutoIncrementBuild Value="True"/>
       <MinorVersionNr Value="2"/>
       <RevisionNr Value="1"/>
-      <BuildNr Value="57"/>
+      <BuildNr Value="58"/>
       <Language Value="0407"/>
       <StringTable CompanyName="MCS" FileDescription="TPS/SPS Emulator" InternalName="SPS_EMU" LegalCopyright="MCS (C) Wilfried Klaas" OriginalFilename="SPS_EMU.exe" ProductName="TPS/SPS Emulator" ProductVersion="0.2"/>
     </VersionInfo>

BIN
SPS_Emu.lsu


+ 1 - 1
ugui.lfm

@@ -869,7 +869,7 @@ object Form1: TForm1
     object ToolButton20: TToolButton
       Left = 49
       Top = 2
-      Caption = 'ToolButton20'
+      Caption = 'ID_EXAMPLE'
       DropdownMenu = pmExamples
       ImageIndex = 75
     end

+ 2 - 3
ugui.pas

@@ -368,12 +368,11 @@ var i : integer;
     fileName, data : String;
     lines : TStringList;
 begin
-  // todo
   if (Sender is TMenuItem) then begin
     if (checkDirty()) then begin
       i := TMenuItem(Sender).Tag;
       filename :=  examples[i-1];
-      data := DownloadFile('http://wkla.no-ip.biz/down/' + filename);
+      data := DownloadFile('http://wkla.no-ip.biz/down/tps_examples/' + filename);
       lines := TStringList.Create;
       lines.Text:= data;
       loadFromList(lines, filename);
@@ -405,7 +404,7 @@ begin
   Examples.Clear;
 
   try
-    jsonString := DownloadFile('http://wkla.no-ip.biz/down/examples.json');
+    jsonString := DownloadFile('http://wkla.no-ip.biz/down/tps_examples/examples.json');
     Data := StringToJSONData(jsonString);
     JArray := GetJSONProp(TJSONObject(Data), 'examples');
     for i := 1 to TJSONArray(JArray).Count do