Skip to content

Commit

Permalink
Added: Checking Optimization level option when Selected from Optimiza…
Browse files Browse the repository at this point in the history
…tion level Dropdown in Project Properties
  • Loading branch information
XusinboyBekchanov committed Sep 30, 2022
1 parent cb7cc96 commit 014c390
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
2 changes: 2 additions & 0 deletions src/frmProjectProperties.bi
Expand Up @@ -60,6 +60,8 @@ Using My.Sys.Forms
Declare Sub cboCompiler_Selected(ByRef Sender As ComboBoxEdit, ItemIndex As Integer)
Declare Static Sub chkManifest_Click_(ByRef Sender As CheckBox)
Declare Sub chkManifest_Click(ByRef Sender As CheckBox)
Declare Static Sub _cboOptimizationLevel_Selected(ByRef Sender As ComboBoxEdit, ItemIndex As Integer)
Declare Sub cboOptimizationLevel_Selected(ByRef Sender As ComboBoxEdit, ItemIndex As Integer)
Declare Constructor

Dim As TabControl tabProperties
Expand Down
20 changes: 15 additions & 5 deletions src/frmProjectProperties.frm
Expand Up @@ -318,6 +318,8 @@ pfProjectProperties = @fProjectProperties
cboOptimizationLevel.AddItem "0"
cboOptimizationLevel.AddItem "1"
cboOptimizationLevel.AddItem "2"
cboOptimizationLevel.Designer = @This
cboOptimizationLevel.OnSelected = @_cboOptimizationLevel_Selected
cboOptimizationLevel.AddItem "3"
' cmdAdvancedOptions
cmdAdvancedOptions.Name = "cmdAdvancedOptions"
Expand Down Expand Up @@ -667,6 +669,10 @@ pfProjectProperties = @fProjectProperties
End With
End Constructor

Private Sub frmProjectProperties._cboOptimizationLevel_Selected(ByRef Sender As ComboBoxEdit, ItemIndex As Integer)
*Cast(frmProjectProperties Ptr, Sender.Designer).cboOptimizationLevel_Selected(Sender, ItemIndex)
End Sub

Private Sub frmProjectProperties.chkManifest_Click_(ByRef Sender As CheckBox)
*Cast(frmProjectProperties Ptr, Sender.Designer).chkManifest_Click(Sender)
End Sub
Expand Down Expand Up @@ -924,14 +930,14 @@ Public Sub frmProjectProperties.RefreshProperties()
.Types.Set ML("Original Filename"), *ppe->OriginalFilename
.Types.Set ML("Product Name"), *ppe->ProductName
.optCompileByDefault.Checked = False
.optCompileToGAS.Checked = False
.optCompileToGas.Checked = False
.optCompileToLLVM.Checked = False
.optCompileToGCC.Checked = False
.optCompileToGcc.Checked = False
Select Case ppe->CompileTo
Case ByDefault: .optCompileByDefault.Checked = True
Case ToGAS: .optCompileToGAS.Checked = True
Case ToGAS: .optCompileToGas.Checked = True
Case ToLLVM: .optCompileToLLVM.Checked = True
Case ToGCC: .optCompileToGCC.Checked = True
Case ToGCC: .optCompileToGcc.Checked = True
End Select
.optCompileToGas_Click(.optCompileToGas)
.optNoOptimization.Checked = ppe->OptimizationLevel = 0
Expand All @@ -954,7 +960,7 @@ Public Sub frmProjectProperties.RefreshProperties()
Dim pBuff As WString Ptr
Dim As Integer FileSize
FileSize = LOF(Fn)
WReallocate(pBuff, FileSize)
WReAllocate(pBuff, FileSize)
Do Until EOF(Fn)
LineInputWstr Fn, pBuff, FileSize
If StartsWith(*pBuff, "sdk.dir=") Then
Expand Down Expand Up @@ -1191,3 +1197,7 @@ End Sub
Private Sub frmProjectProperties.chkManifest_Click(ByRef Sender As CheckBox)
chkRunAsAdministrator.Enabled = chkManifest.Checked
End Sub

Private Sub frmProjectProperties.cboOptimizationLevel_Selected(ByRef Sender As ComboBoxEdit, ItemIndex As Integer)
optOptimizationLevel.Checked = True
End Sub

0 comments on commit 014c390

Please sign in to comment.