Skip to content

Commit

Permalink
* Sync
Browse files Browse the repository at this point in the history
  • Loading branch information
Oleksiy Penkov committed Jun 15, 2023
1 parent bf64956 commit e3315ee
Show file tree
Hide file tree
Showing 22 changed files with 1,053 additions and 809 deletions.
6 changes: 3 additions & 3 deletions XRayCalc3.dpr
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ uses
unit_XRCStackControl in 'components\unit_XRCStackControl.pas',
unit_SMessages in 'components\unit_SMessages.pas',
editor_Stack in 'components\editor_Stack.pas' {edtrStack},
editor_Substrate in 'components\editor_Substrate.pas' {edtrSubstrate},
unit_calc in 'math\unit_calc.pas',
unit_materials in 'math\unit_materials.pas',
math_globals in 'math\math_globals.pas',
Expand All @@ -30,7 +29,9 @@ uses
unit_LFPSO_Regular in 'math\unit_LFPSO_Regular.pas',
frm_MaterialSelector in 'forms\frm_MaterialSelector.pas' {frmMaterialSelector},
editor_Gradient in 'editors\editor_Gradient.pas' {edtrGradient},
frm_ExtensionType in 'forms\frm_ExtensionType.pas' {frmExtensionSelector};
frm_ExtensionType in 'forms\frm_ExtensionType.pas' {frmExtensionSelector},
Vcl.Themes,
Vcl.Styles;

{$R *.res}

Expand All @@ -39,7 +40,6 @@ begin
Application.MainFormOnTaskbar := True;
Application.CreateForm(TfrmMain, frmMain);
Application.CreateForm(TedtrStack, edtrStack);
Application.CreateForm(TedtrSubstrate, edtrSubstrate);
Application.CreateForm(TedtrLayer, edtrLayer);
Application.CreateForm(TfrmLimits, frmLimits);
Application.CreateForm(TedtrProjectItem, edtrProjectItem);
Expand Down
10 changes: 4 additions & 6 deletions XRayCalc3.dproj
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,9 @@
<VerInfo_Build>200</VerInfo_Build>
<VerInfo_Debug>true</VerInfo_Debug>
<VerInfo_AutoGenVersion>true</VerInfo_AutoGenVersion>
<Debugger_RunParams>-f &quot;d:\DelphiProjects\X-Ray Calc\X-Ray Calc 3\test_data\Multilayer(4x20).xrcx&quot; -a</Debugger_RunParams>
<VerInfo_Keys>CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=3.0.0.200;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=3.0.0.0;Comments=</VerInfo_Keys>
<Debugger_RunParams>-f &quot;d:\DelphiProjects\X-Ray Calc\X-Ray Calc 3\test_data\ML_PairingTest.xrcx&quot; -a</Debugger_RunParams>
<Icon_MainIcon>Resources\XRayCalc3_Icon.ico</Icon_MainIcon>
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_1_Win64)'!=''">
<AppDPIAwarenessMode>PerMonitorV2</AppDPIAwarenessMode>
Expand All @@ -133,8 +134,8 @@
<DCC_ImportedDataReferences>false</DCC_ImportedDataReferences>
<Icon_MainIcon>Resources\XRayCalc3_Icon.ico</Icon_MainIcon>
<VerInfo_MajorVer>3</VerInfo_MajorVer>
<VerInfo_Build>310</VerInfo_Build>
<VerInfo_Keys>CompanyName=Zhejiang University;FileDescription=$(MSBuildProjectName);FileVersion=3.0.0.310;InternalName=;LegalCopyright=Oleksiy Penkov;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=3.0.0;Comments=</VerInfo_Keys>
<VerInfo_Build>324</VerInfo_Build>
<VerInfo_Keys>CompanyName=Zhejiang University;FileDescription=$(MSBuildProjectName);FileVersion=3.0.0.324;InternalName=;LegalCopyright=Oleksiy Penkov;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=3.0.0;Comments=</VerInfo_Keys>
<VerInfo_PreRelease>true</VerInfo_PreRelease>
<VerInfo_AutoIncVersion>true</VerInfo_AutoIncVersion>
</PropertyGroup>
Expand All @@ -160,9 +161,6 @@
<DCCReference Include="components\editor_Stack.pas">
<Form>edtrStack</Form>
</DCCReference>
<DCCReference Include="components\editor_Substrate.pas">
<Form>edtrSubstrate</Form>
</DCCReference>
<DCCReference Include="math\unit_calc.pas"/>
<DCCReference Include="math\unit_materials.pas"/>
<DCCReference Include="math\math_globals.pas"/>
Expand Down
12 changes: 5 additions & 7 deletions components/editor_Layer.dfm
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ object edtrLayer: TedtrLayer
Top = 0
BorderStyle = bsToolWindow
Caption = 'Layer properties'
ClientHeight = 116
ClientHeight = 125
ClientWidth = 358
Color = 16765595
Font.Charset = DEFAULT_CHARSET
Expand All @@ -12,19 +12,18 @@ object edtrLayer: TedtrLayer
Font.Name = 'Tahoma'
Font.Style = []
Position = poMainFormCenter
OnShow = FormShow
TextHeight = 13
object RzPanel1: TRzPanel
AlignWithMargins = True
Left = 3
Top = 3
Width = 352
Height = 63
Height = 72
Align = alClient
BorderOuter = fsFlatRounded
Color = 15987699
TabOrder = 0
ExplicitWidth = 336
ExplicitWidth = 344
ExplicitHeight = 51
object Label1: TLabel
Left = 9
Expand Down Expand Up @@ -114,15 +113,15 @@ object edtrLayer: TedtrLayer
object RzPanel2: TRzPanel
AlignWithMargins = True
Left = 3
Top = 72
Top = 81
Width = 352
Height = 41
Align = alBottom
BorderOuter = fsFlatRounded
Color = 15987699
TabOrder = 1
ExplicitTop = 60
ExplicitWidth = 336
ExplicitWidth = 344
object btnOK: TRzBitBtn
Left = 192
Top = 10
Expand All @@ -131,7 +130,6 @@ object edtrLayer: TedtrLayer
ParentColor = True
TabOrder = 2
TabStop = False
OnClick = btnOKClick
Kind = bkOK
end
object btnCancel: TRzBitBtn
Expand Down
38 changes: 16 additions & 22 deletions components/editor_Layer.pas
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,13 @@ TedtrLayer = class(TForm)
Label6: TLabel;
btnPrev: TRzBitBtn;
btnNext: TRzBitBtn;
procedure btnOKClick(Sender: TObject);
procedure FormShow(Sender: TObject);

procedure FillEdits;
procedure SaveData;
procedure edMaterialButtonClick(Sender: TObject);

private
{ Private declarations }
public
{ Public declarations }
Data : TLayerData;
function ShowEditor(const IsSubstrate: Boolean; var Data: TLayerData): boolean;
end;

var
Expand All @@ -55,31 +50,30 @@ implementation

{$R *.dfm}

procedure TedtrLayer.FillEdits;

function TedtrLayer.ShowEditor(const IsSubstrate: Boolean; var Data: TLayerData): boolean;
begin
Result := False;
edMaterial.Text := Data.Material;
edH.Value := Data.H.V;
edSigma.Value := Data.S.V;
edRo.Value := Data.R.V;
end;

procedure TedtrLayer.FormShow(Sender: TObject);
begin
FillEdits;
edH.Visible := not IsSubstrate;
Label2.Visible := not IsSubstrate;


ActiveControl := edMaterial;
end;

procedure TedtrLayer.SaveData;
begin
Data.Material := edMaterial.Text;
Data.H.V := edH.Value;
Data.S.V := edSigma.Value;
Data.R.V := edRo.Value;
end;
if ShowModal = mrOk then
begin
Data.Material := edMaterial.Text;
Data.H.V := edH.Value;
Data.S.V := edSigma.Value;
Data.R.V := edRo.Value;
Result := True;
end;

procedure TedtrLayer.btnOKClick(Sender: TObject);
begin
SaveData;
end;

procedure TedtrLayer.edMaterialButtonClick(Sender: TObject);
Expand Down
119 changes: 0 additions & 119 deletions components/editor_Substrate.dfm

This file was deleted.

59 changes: 0 additions & 59 deletions components/editor_Substrate.pas

This file was deleted.

Loading

0 comments on commit e3315ee

Please sign in to comment.