Bläddra i källkod

Fixed Bug deleting presets

Simon Grossenbacher 7 år sedan
förälder
incheckning
65c21ea239
6 ändrade filer med 52 tillägg och 18 borttagningar
  1. BIN
      RESTDebugger.exe
  2. 9 9
      prj/RESTDebugger.dproj
  3. BIN
      prj/RESTDebugger.res
  4. 6 6
      prj/RESTDebugger.stat
  5. 13 1
      src/_frmMain.dfm
  6. 24 2
      src/_frmMain.pas

BIN
RESTDebugger.exe


+ 9 - 9
prj/RESTDebugger.dproj

@@ -86,9 +86,9 @@
     <PropertyGroup Condition="'$(Base_Win64)'!=''">
         <UWP_DelphiLogo44>$(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_44.png</UWP_DelphiLogo44>
         <UWP_DelphiLogo150>$(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_150.png</UWP_DelphiLogo150>
-        <VerInfo_Keys>FileVersion=1.1.7.30;ProductVersion=1.0.0.0;ProgramID=com.embarcadero.$(MSBuildProjectName);FileDescription=$(MSBuildProjectName);ProductName=$(MSBuildProjectName)</VerInfo_Keys>
-        <VerInfo_Release>7</VerInfo_Release>
-        <VerInfo_Build>30</VerInfo_Build>
+        <VerInfo_Keys>FileVersion=1.1.8.35;ProductVersion=1.0.0.0;ProgramID=com.embarcadero.$(MSBuildProjectName);FileDescription=$(MSBuildProjectName);ProductName=$(MSBuildProjectName)</VerInfo_Keys>
+        <VerInfo_Release>8</VerInfo_Release>
+        <VerInfo_Build>35</VerInfo_Build>
         <Icon_MainIcon>RESTDebugger_Icon.ico</Icon_MainIcon>
         <VerInfo_Locale>1033</VerInfo_Locale>
         <DCC_Namespace>Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(DCC_Namespace)</DCC_Namespace>
@@ -115,9 +115,9 @@
     </PropertyGroup>
     <PropertyGroup Condition="'$(Cfg_1_Win64)'!=''">
         <BT_BuildType>Debug</BT_BuildType>
-        <VerInfo_Keys>FileVersion=1.1.7.30;ProductVersion=1.0.0.0;ProgramID=com.embarcadero.$(MSBuildProjectName);FileDescription=$(MSBuildProjectName);ProductName=$(MSBuildProjectName)</VerInfo_Keys>
-        <VerInfo_Build>30</VerInfo_Build>
-        <VerInfo_Release>7</VerInfo_Release>
+        <VerInfo_Keys>FileVersion=1.1.8.35;ProductVersion=1.0.0.0;ProgramID=com.embarcadero.$(MSBuildProjectName);FileDescription=$(MSBuildProjectName);ProductName=$(MSBuildProjectName)</VerInfo_Keys>
+        <VerInfo_Build>35</VerInfo_Build>
+        <VerInfo_Release>8</VerInfo_Release>
         <VerInfo_Locale>1033</VerInfo_Locale>
         <AppEnableHighDPI>true</AppEnableHighDPI>
         <AppEnableRuntimeThemes>true</AppEnableRuntimeThemes>
@@ -140,9 +140,9 @@
     </PropertyGroup>
     <PropertyGroup Condition="'$(Cfg_2_Win64)'!=''">
         <BT_BuildType>Debug</BT_BuildType>
-        <VerInfo_Keys>FileVersion=1.1.7.30;ProductVersion=1.0.0.0;ProgramID=com.embarcadero.$(MSBuildProjectName);FileDescription=$(MSBuildProjectName);ProductName=$(MSBuildProjectName)</VerInfo_Keys>
-        <VerInfo_Release>7</VerInfo_Release>
-        <VerInfo_Build>30</VerInfo_Build>
+        <VerInfo_Keys>FileVersion=1.1.8.35;ProductVersion=1.0.0.0;ProgramID=com.embarcadero.$(MSBuildProjectName);FileDescription=$(MSBuildProjectName);ProductName=$(MSBuildProjectName)</VerInfo_Keys>
+        <VerInfo_Release>8</VerInfo_Release>
+        <VerInfo_Build>35</VerInfo_Build>
         <AppEnableHighDPI>true</AppEnableHighDPI>
         <AppEnableRuntimeThemes>true</AppEnableRuntimeThemes>
         <VerInfo_Locale>1033</VerInfo_Locale>

BIN
prj/RESTDebugger.res


+ 6 - 6
prj/RESTDebugger.stat

@@ -1,10 +1,10 @@
 [Stats]
-EditorSecs=20546
-DesignerSecs=5703
-InspectorSecs=3063
-CompileSecs=1060174
-OtherSecs=5211
+EditorSecs=22911
+DesignerSecs=5716
+InspectorSecs=3066
+CompileSecs=1092704
+OtherSecs=5362
 StartTime=27.10.2016 18:27:37
 RealKeys=0
 EffectiveKeys=0
-DebugSecs=14658
+DebugSecs=15554

+ 13 - 1
src/_frmMain.dfm

@@ -2,7 +2,7 @@ object frmMain: TfrmMain
   Left = 0
   Top = 0
   BorderIcons = [biSystemMenu, biMinimize]
-  Caption = 'REST Debugger'
+  Caption = 'Simnet REST Debugger'
   ClientHeight = 930
   ClientWidth = 725
   Color = clBtnFace
@@ -396,6 +396,10 @@ object frmMain: TfrmMain
       object cxTabSheet2: TcxTabSheet
         Caption = 'Extra Headers'
         ImageIndex = 1
+        ExplicitLeft = 0
+        ExplicitTop = 0
+        ExplicitWidth = 0
+        ExplicitHeight = 0
         object Panel4: TPanel
           Left = 0
           Top = 0
@@ -445,6 +449,10 @@ object frmMain: TfrmMain
       object cxTabSheet3: TcxTabSheet
         Caption = 'Authentication'
         ImageIndex = 3
+        ExplicitLeft = 0
+        ExplicitTop = 0
+        ExplicitWidth = 0
+        ExplicitHeight = 0
         object Label9: TLabel
           Left = 15
           Top = 47
@@ -481,6 +489,10 @@ object frmMain: TfrmMain
       object tabPostData: TcxTabSheet
         Caption = 'Post Data'
         ImageIndex = 2
+        ExplicitLeft = 0
+        ExplicitTop = 0
+        ExplicitWidth = 0
+        ExplicitHeight = 0
         object Panel5: TPanel
           Left = 0
           Top = 0

+ 24 - 2
src/_frmMain.pas

@@ -614,11 +614,31 @@ begin
 end;
 
 procedure TfrmMain.DeletePreset(const AID: Integer);
+var
+  i: Integer;
+  strlist: TStringList;
 begin
-  FActivePreset := '';
+  comboPresets.Properties.OnChange := nil;
+  comboPresets.ItemIndex := comboPresets.Properties.Items.Count - 1;
   comboPresets.Properties.Items.Delete(AID);
   FProjectConfig.DeleteSection('Preset_' + AID.ToString);
-  comboPresets.ItemIndex := comboPresets.Properties.Items.Count - 1;
+
+  //Rename Section Names - skip first section. This is the global configuration
+  strlist := TStringList.Create;
+  try
+    FProjectConfig.ReadSections(strlist);
+
+    for i := 1 to strlist.Count - 1 do
+    begin
+      FProjectConfig.RenameSection(strlist[i], 'Preset_' + (i - 1).ToString);
+    end;
+  finally
+    strlist.Free;
+  end;
+
+  FActivePreset := comboPresets.Text;
+  LoadPreset;
+  comboPresets.Properties.OnChange := comboPresetsPropertiesChange;
 end;
 
 procedure TfrmMain.DoGETRequest(const AMethodType: TMethodType);
@@ -1122,10 +1142,12 @@ begin
   if FIsTempProjectLoaded then
   begin
     dxStatusBar.Panels[3].Text := 'Default project loaded.';
+    Caption := 'Simnet REST Debugger';
   end
   else
   begin
     dxStatusBar.Panels[3].Text := 'Loaded project: ' + FActiveProject;
+    Caption := ExtractFileName(FActiveProject) + ' - Simnet REST Debugger';
     MainConfig.WriteString('Project', 'LastUsed', FActiveProject);
   end;