mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 02:59:17 +02:00
MessageComposer:
* refactor * fix wrong boolean parameter in InputQuery * fix wrong resulttype of InputBox and PasswordBox * fix crash when CaseResultCheckGroup is empty * less hints * fix grammar and typo in comment (Also fixes issue #0028481) git-svn-id: trunk@49759 -
This commit is contained in:
parent
eedacb424f
commit
bb8c94cba4
@ -1,9 +1,10 @@
|
|||||||
object FormMessagesComposer: TFormMessagesComposer
|
object FormMessagesComposer: TFormMessagesComposer
|
||||||
AnchorSideLeft.Side = asrBottom
|
AnchorSideLeft.Side = asrBottom
|
||||||
Left = 650
|
Left = 658
|
||||||
Height = 591
|
Height = 591
|
||||||
Top = 195
|
Top = 123
|
||||||
Width = 584
|
Width = 584
|
||||||
|
ActiveControl = KindMessageComboBox
|
||||||
BorderIcons = [biSystemMenu]
|
BorderIcons = [biSystemMenu]
|
||||||
BorderStyle = bsDialog
|
BorderStyle = bsDialog
|
||||||
Caption = 'Messages Composer'
|
Caption = 'Messages Composer'
|
||||||
@ -11,12 +12,12 @@ object FormMessagesComposer: TFormMessagesComposer
|
|||||||
ClientWidth = 584
|
ClientWidth = 584
|
||||||
OnCreate = MessagesInitExecute
|
OnCreate = MessagesInitExecute
|
||||||
Position = poScreenCenter
|
Position = poScreenCenter
|
||||||
LCLVersion = '0.9.31'
|
LCLVersion = '1.5'
|
||||||
object CaptionLabel: TLabel
|
object CaptionLabel: TLabel
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 16
|
Height = 15
|
||||||
Top = 70
|
Top = 70
|
||||||
Width = 71
|
Width = 70
|
||||||
Caption = 'CaptionLabel'
|
Caption = 'CaptionLabel'
|
||||||
ParentColor = False
|
ParentColor = False
|
||||||
end
|
end
|
||||||
@ -24,18 +25,18 @@ object FormMessagesComposer: TFormMessagesComposer
|
|||||||
AnchorSideTop.Control = CaptionEdit
|
AnchorSideTop.Control = CaptionEdit
|
||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 16
|
Height = 15
|
||||||
Top = 124
|
Top = 123
|
||||||
Width = 52
|
Width = 51
|
||||||
BorderSpacing.Top = 12
|
BorderSpacing.Top = 12
|
||||||
Caption = 'MsgLabel'
|
Caption = 'MsgLabel'
|
||||||
ParentColor = False
|
ParentColor = False
|
||||||
end
|
end
|
||||||
object DlgTypeLabel: TLabel
|
object DlgTypeLabel: TLabel
|
||||||
Left = 154
|
Left = 154
|
||||||
Height = 16
|
Height = 15
|
||||||
Top = 70
|
Top = 70
|
||||||
Width = 45
|
Width = 44
|
||||||
Caption = 'DlgType'
|
Caption = 'DlgType'
|
||||||
ParentColor = False
|
ParentColor = False
|
||||||
end
|
end
|
||||||
@ -43,9 +44,9 @@ object FormMessagesComposer: TFormMessagesComposer
|
|||||||
AnchorSideTop.Control = HelpCtxBevel
|
AnchorSideTop.Control = HelpCtxBevel
|
||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
Left = 8
|
Left = 8
|
||||||
Height = 16
|
Height = 15
|
||||||
Top = 296
|
Top = 294
|
||||||
Width = 70
|
Width = 69
|
||||||
Caption = 'Help Context'
|
Caption = 'Help Context'
|
||||||
ParentColor = False
|
ParentColor = False
|
||||||
end
|
end
|
||||||
@ -53,9 +54,9 @@ object FormMessagesComposer: TFormMessagesComposer
|
|||||||
AnchorSideTop.Control = HelpContextLabel
|
AnchorSideTop.Control = HelpContextLabel
|
||||||
AnchorSideTop.Side = asrCenter
|
AnchorSideTop.Side = asrCenter
|
||||||
Left = 103
|
Left = 103
|
||||||
Height = 16
|
Height = 15
|
||||||
Top = 296
|
Top = 294
|
||||||
Width = 77
|
Width = 76
|
||||||
Caption = 'Help KeyWord'
|
Caption = 'Help KeyWord'
|
||||||
ParentColor = False
|
ParentColor = False
|
||||||
end
|
end
|
||||||
@ -63,9 +64,9 @@ object FormMessagesComposer: TFormMessagesComposer
|
|||||||
AnchorSideTop.Control = XSpinEdit
|
AnchorSideTop.Control = XSpinEdit
|
||||||
AnchorSideTop.Side = asrCenter
|
AnchorSideTop.Side = asrCenter
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 16
|
Height = 15
|
||||||
Top = 261
|
Top = 260
|
||||||
Width = 8
|
Width = 7
|
||||||
Caption = 'X'
|
Caption = 'X'
|
||||||
ParentColor = False
|
ParentColor = False
|
||||||
end
|
end
|
||||||
@ -74,10 +75,10 @@ object FormMessagesComposer: TFormMessagesComposer
|
|||||||
AnchorSideLeft.Side = asrBottom
|
AnchorSideLeft.Side = asrBottom
|
||||||
AnchorSideTop.Control = YSpinEdit
|
AnchorSideTop.Control = YSpinEdit
|
||||||
AnchorSideTop.Side = asrCenter
|
AnchorSideTop.Side = asrCenter
|
||||||
Left = 92
|
Left = 91
|
||||||
Height = 16
|
Height = 15
|
||||||
Top = 261
|
Top = 260
|
||||||
Width = 8
|
Width = 7
|
||||||
BorderSpacing.Left = 8
|
BorderSpacing.Left = 8
|
||||||
Caption = 'Y'
|
Caption = 'Y'
|
||||||
ParentColor = False
|
ParentColor = False
|
||||||
@ -86,34 +87,34 @@ object FormMessagesComposer: TFormMessagesComposer
|
|||||||
AnchorSideTop.Control = HelpContextSpinEdit
|
AnchorSideTop.Control = HelpContextSpinEdit
|
||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
Left = 8
|
Left = 8
|
||||||
Height = 16
|
Height = 15
|
||||||
Top = 344
|
Top = 341
|
||||||
Width = 79
|
Width = 78
|
||||||
BorderSpacing.Top = 6
|
BorderSpacing.Top = 6
|
||||||
Caption = 'Help FileName'
|
Caption = 'Help FileName'
|
||||||
ParentColor = False
|
ParentColor = False
|
||||||
end
|
end
|
||||||
object PromptLabel: TLabel
|
object PromptLabel: TLabel
|
||||||
Left = 16
|
Left = 16
|
||||||
Height = 16
|
Height = 15
|
||||||
Top = 425
|
Top = 425
|
||||||
Width = 69
|
Width = 68
|
||||||
Caption = 'PromptLabel'
|
Caption = 'PromptLabel'
|
||||||
ParentColor = False
|
ParentColor = False
|
||||||
end
|
end
|
||||||
object ValueLabel: TLabel
|
object ValueLabel: TLabel
|
||||||
Left = 16
|
Left = 16
|
||||||
Height = 16
|
Height = 15
|
||||||
Top = 478
|
Top = 478
|
||||||
Width = 57
|
Width = 56
|
||||||
Caption = 'Value (var)'
|
Caption = 'Value (var)'
|
||||||
ParentColor = False
|
ParentColor = False
|
||||||
end
|
end
|
||||||
object DefaultValue: TLabel
|
object DefaultValue: TLabel
|
||||||
Left = 138
|
Left = 138
|
||||||
Height = 16
|
Height = 15
|
||||||
Top = 478
|
Top = 478
|
||||||
Width = 39
|
Width = 38
|
||||||
Caption = 'Default'
|
Caption = 'Default'
|
||||||
ParentColor = False
|
ParentColor = False
|
||||||
end
|
end
|
||||||
@ -122,7 +123,7 @@ object FormMessagesComposer: TFormMessagesComposer
|
|||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
Left = 5
|
Left = 5
|
||||||
Height = 9
|
Height = 9
|
||||||
Top = 243
|
Top = 241
|
||||||
Width = 269
|
Width = 269
|
||||||
BorderSpacing.Top = 6
|
BorderSpacing.Top = 6
|
||||||
Shape = bsTopLine
|
Shape = bsTopLine
|
||||||
@ -139,13 +140,13 @@ object FormMessagesComposer: TFormMessagesComposer
|
|||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
Left = 8
|
Left = 8
|
||||||
Height = 9
|
Height = 9
|
||||||
Top = 287
|
Top = 285
|
||||||
Width = 266
|
Width = 266
|
||||||
Shape = bsTopLine
|
Shape = bsTopLine
|
||||||
end
|
end
|
||||||
object KindMessageLabel: TLabel
|
object KindMessageLabel: TLabel
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 16
|
Height = 15
|
||||||
Top = 6
|
Top = 6
|
||||||
Width = 572
|
Width = 572
|
||||||
Align = alTop
|
Align = alTop
|
||||||
@ -160,7 +161,7 @@ object FormMessagesComposer: TFormMessagesComposer
|
|||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 23
|
Height = 23
|
||||||
Top = 89
|
Top = 88
|
||||||
Width = 136
|
Width = 136
|
||||||
BorderSpacing.Top = 3
|
BorderSpacing.Top = 3
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
@ -171,7 +172,7 @@ object FormMessagesComposer: TFormMessagesComposer
|
|||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
Left = 154
|
Left = 154
|
||||||
Height = 23
|
Height = 23
|
||||||
Top = 89
|
Top = 88
|
||||||
Width = 120
|
Width = 120
|
||||||
BorderSpacing.Top = 3
|
BorderSpacing.Top = 3
|
||||||
ItemHeight = 15
|
ItemHeight = 15
|
||||||
@ -192,7 +193,7 @@ object FormMessagesComposer: TFormMessagesComposer
|
|||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
Left = 8
|
Left = 8
|
||||||
Height = 23
|
Height = 23
|
||||||
Top = 315
|
Top = 312
|
||||||
Width = 61
|
Width = 61
|
||||||
BorderSpacing.Top = 3
|
BorderSpacing.Top = 3
|
||||||
MaxValue = 9999
|
MaxValue = 9999
|
||||||
@ -203,7 +204,7 @@ object FormMessagesComposer: TFormMessagesComposer
|
|||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
Left = 103
|
Left = 103
|
||||||
Height = 23
|
Height = 23
|
||||||
Top = 315
|
Top = 312
|
||||||
Width = 171
|
Width = 171
|
||||||
BorderSpacing.Top = 3
|
BorderSpacing.Top = 3
|
||||||
TabOrder = 3
|
TabOrder = 3
|
||||||
@ -214,9 +215,9 @@ object FormMessagesComposer: TFormMessagesComposer
|
|||||||
AnchorSideLeft.Side = asrBottom
|
AnchorSideLeft.Side = asrBottom
|
||||||
AnchorSideTop.Control = PositionBevel
|
AnchorSideTop.Control = PositionBevel
|
||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
Left = 18
|
Left = 17
|
||||||
Height = 23
|
Height = 23
|
||||||
Top = 258
|
Top = 256
|
||||||
Width = 66
|
Width = 66
|
||||||
BorderSpacing.Left = 4
|
BorderSpacing.Left = 4
|
||||||
BorderSpacing.Top = 6
|
BorderSpacing.Top = 6
|
||||||
@ -228,9 +229,9 @@ object FormMessagesComposer: TFormMessagesComposer
|
|||||||
AnchorSideLeft.Side = asrBottom
|
AnchorSideLeft.Side = asrBottom
|
||||||
AnchorSideTop.Control = XSpinEdit
|
AnchorSideTop.Control = XSpinEdit
|
||||||
AnchorSideTop.Side = asrCenter
|
AnchorSideTop.Side = asrCenter
|
||||||
Left = 104
|
Left = 102
|
||||||
Height = 23
|
Height = 23
|
||||||
Top = 258
|
Top = 256
|
||||||
Width = 66
|
Width = 66
|
||||||
BorderSpacing.Left = 4
|
BorderSpacing.Left = 4
|
||||||
TabOrder = 5
|
TabOrder = 5
|
||||||
@ -240,7 +241,7 @@ object FormMessagesComposer: TFormMessagesComposer
|
|||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
Left = 8
|
Left = 8
|
||||||
Height = 23
|
Height = 23
|
||||||
Top = 363
|
Top = 359
|
||||||
Width = 244
|
Width = 244
|
||||||
DialogOptions = []
|
DialogOptions = []
|
||||||
FilterIndex = 0
|
FilterIndex = 0
|
||||||
@ -256,7 +257,7 @@ object FormMessagesComposer: TFormMessagesComposer
|
|||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
Left = 16
|
Left = 16
|
||||||
Height = 23
|
Height = 23
|
||||||
Top = 444
|
Top = 443
|
||||||
Width = 164
|
Width = 164
|
||||||
BorderSpacing.Top = 3
|
BorderSpacing.Top = 3
|
||||||
TabOrder = 7
|
TabOrder = 7
|
||||||
@ -267,7 +268,7 @@ object FormMessagesComposer: TFormMessagesComposer
|
|||||||
AnchorSideTop.Side = asrCenter
|
AnchorSideTop.Side = asrCenter
|
||||||
Left = 191
|
Left = 191
|
||||||
Height = 19
|
Height = 19
|
||||||
Top = 446
|
Top = 445
|
||||||
Width = 76
|
Width = 76
|
||||||
Caption = 'MaskInput'
|
Caption = 'MaskInput'
|
||||||
TabOrder = 8
|
TabOrder = 8
|
||||||
@ -277,7 +278,7 @@ object FormMessagesComposer: TFormMessagesComposer
|
|||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
Left = 16
|
Left = 16
|
||||||
Height = 23
|
Height = 23
|
||||||
Top = 497
|
Top = 496
|
||||||
Width = 112
|
Width = 112
|
||||||
BorderSpacing.Top = 3
|
BorderSpacing.Top = 3
|
||||||
TabOrder = 9
|
TabOrder = 9
|
||||||
@ -288,7 +289,7 @@ object FormMessagesComposer: TFormMessagesComposer
|
|||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
Left = 138
|
Left = 138
|
||||||
Height = 23
|
Height = 23
|
||||||
Top = 497
|
Top = 496
|
||||||
Width = 136
|
Width = 136
|
||||||
BorderSpacing.Top = 3
|
BorderSpacing.Top = 3
|
||||||
TabOrder = 10
|
TabOrder = 10
|
||||||
@ -300,7 +301,7 @@ object FormMessagesComposer: TFormMessagesComposer
|
|||||||
Top = 264
|
Top = 264
|
||||||
Width = 285
|
Width = 285
|
||||||
Caption = 'SourceWrapperGroupBox'
|
Caption = 'SourceWrapperGroupBox'
|
||||||
ClientHeight = 238
|
ClientHeight = 236
|
||||||
ClientWidth = 281
|
ClientWidth = 281
|
||||||
TabOrder = 12
|
TabOrder = 12
|
||||||
object IfThenRadioButton: TRadioButton
|
object IfThenRadioButton: TRadioButton
|
||||||
@ -364,7 +365,7 @@ object FormMessagesComposer: TFormMessagesComposer
|
|||||||
object SourceNotebook: TNotebook
|
object SourceNotebook: TNotebook
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 152
|
Height = 152
|
||||||
Top = 86
|
Top = 84
|
||||||
Width = 281
|
Width = 281
|
||||||
PageIndex = 0
|
PageIndex = 0
|
||||||
Align = alBottom
|
Align = alBottom
|
||||||
@ -373,9 +374,9 @@ object FormMessagesComposer: TFormMessagesComposer
|
|||||||
object PageIf: TPage
|
object PageIf: TPage
|
||||||
object Label1: TLabel
|
object Label1: TLabel
|
||||||
Left = 7
|
Left = 7
|
||||||
Height = 16
|
Height = 15
|
||||||
Top = 6
|
Top = 6
|
||||||
Width = 61
|
Width = 60
|
||||||
Caption = '"if" RESULT'
|
Caption = '"if" RESULT'
|
||||||
ParentColor = False
|
ParentColor = False
|
||||||
end
|
end
|
||||||
@ -384,7 +385,7 @@ object FormMessagesComposer: TFormMessagesComposer
|
|||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
Left = 7
|
Left = 7
|
||||||
Height = 23
|
Height = 23
|
||||||
Top = 25
|
Top = 24
|
||||||
Width = 175
|
Width = 175
|
||||||
BorderSpacing.Top = 3
|
BorderSpacing.Top = 3
|
||||||
ItemHeight = 15
|
ItemHeight = 15
|
||||||
@ -416,6 +417,8 @@ object FormMessagesComposer: TFormMessagesComposer
|
|||||||
ChildSizing.ShrinkVertical = crsScaleChilds
|
ChildSizing.ShrinkVertical = crsScaleChilds
|
||||||
ChildSizing.Layout = cclLeftToRightThenTopToBottom
|
ChildSizing.Layout = cclLeftToRightThenTopToBottom
|
||||||
ChildSizing.ControlsPerLine = 3
|
ChildSizing.ControlsPerLine = 3
|
||||||
|
ClientHeight = 128
|
||||||
|
ClientWidth = 238
|
||||||
Columns = 3
|
Columns = 3
|
||||||
Items.Strings = (
|
Items.Strings = (
|
||||||
'mbOK'
|
'mbOK'
|
||||||
@ -455,46 +458,32 @@ object FormMessagesComposer: TFormMessagesComposer
|
|||||||
object KindMessageComboBox: TComboBox
|
object KindMessageComboBox: TComboBox
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 23
|
Height = 23
|
||||||
Top = 26
|
Top = 25
|
||||||
Width = 572
|
Width = 572
|
||||||
Align = alTop
|
Align = alTop
|
||||||
BorderSpacing.Left = 6
|
BorderSpacing.Left = 6
|
||||||
BorderSpacing.Top = 4
|
BorderSpacing.Top = 4
|
||||||
BorderSpacing.Right = 6
|
BorderSpacing.Right = 6
|
||||||
ItemHeight = 15
|
ItemHeight = 15
|
||||||
ItemIndex = 0
|
|
||||||
Items.Strings = (
|
Items.Strings = (
|
||||||
'MessageDlg[Msg, DlgType, Buttons(TMsgDlgButtons), HelpCtx]'
|
'{Filled @runtime}'
|
||||||
'MessageDlg[Caption, Msg, DlgType, Buttons(TMsgDlgButtons), HelpCtx]'
|
|
||||||
'MessageDlg[Caption, Msg, DlgType, Buttons(TMsgDlgButtons), HelpKeyword]'
|
|
||||||
'MessageDlgPos[Msg, DlgType, Buttons(TMsgDlgButtons), HelpCtx, X, Y]'
|
|
||||||
'MessageDlgPosHelp[Msg, DlgType, Buttons(TMsgDlgButtons), HelpCtx, X, Y, HelpFileName]'
|
|
||||||
'QuestionDlg[Caption, Msg, DlgType, Buttons(array of const), HelpCtx]'
|
|
||||||
'QuestionDlg[Caption, Msg, DlgType, Buttons(array of const), HelpKeyword]'
|
|
||||||
'ShowMessage[Msg: string];'
|
|
||||||
'ShowMessageFmt[Msg, Params(array of const)];'
|
|
||||||
'ShowMessagePos[Msg, X, Y];'
|
|
||||||
'InputQuery[Caption, Prompt, MaskInput(Boolean), Value(String)]'
|
|
||||||
'InputQuery[Caption, Prompt, Value(String)]'
|
|
||||||
'InputBox[Caption, Prompt, Default]'
|
|
||||||
'PasswordBox[Caption, Prompt]'
|
|
||||||
)
|
)
|
||||||
OnChange = MessageSetupExecute
|
OnChange = MessageSetupExecute
|
||||||
Style = csDropDownList
|
Style = csDropDownList
|
||||||
TabOrder = 14
|
TabOrder = 14
|
||||||
Text = 'MessageDlg[Msg, DlgType, Buttons(TMsgDlgButtons), HelpCtx]'
|
|
||||||
end
|
end
|
||||||
object MsgMemo: TMemo
|
object MsgMemo: TMemo
|
||||||
AnchorSideTop.Control = MsgLabel
|
AnchorSideTop.Control = MsgLabel
|
||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 94
|
Height = 94
|
||||||
Top = 143
|
Top = 141
|
||||||
Width = 268
|
Width = 268
|
||||||
BorderSpacing.Top = 3
|
BorderSpacing.Top = 3
|
||||||
Lines.Strings = (
|
Lines.Strings = (
|
||||||
'MsgLabel'
|
'MsgLabel'
|
||||||
)
|
)
|
||||||
|
OnChange = GetParamsFmtExecute
|
||||||
OnEditingDone = GetParamsFmtExecute
|
OnEditingDone = GetParamsFmtExecute
|
||||||
ScrollBars = ssAutoVertical
|
ScrollBars = ssAutoVertical
|
||||||
TabOrder = 11
|
TabOrder = 11
|
||||||
@ -525,6 +514,8 @@ object FormMessagesComposer: TFormMessagesComposer
|
|||||||
ChildSizing.ShrinkVertical = crsScaleChilds
|
ChildSizing.ShrinkVertical = crsScaleChilds
|
||||||
ChildSizing.Layout = cclLeftToRightThenTopToBottom
|
ChildSizing.Layout = cclLeftToRightThenTopToBottom
|
||||||
ChildSizing.ControlsPerLine = 2
|
ChildSizing.ControlsPerLine = 2
|
||||||
|
ClientHeight = 157
|
||||||
|
ClientWidth = 281
|
||||||
Columns = 2
|
Columns = 2
|
||||||
Items.Strings = (
|
Items.Strings = (
|
||||||
'mbYes'
|
'mbYes'
|
||||||
@ -620,7 +611,6 @@ object FormMessagesComposer: TFormMessagesComposer
|
|||||||
Width = 128
|
Width = 128
|
||||||
Action = AddConst
|
Action = AddConst
|
||||||
Align = alLeft
|
Align = alLeft
|
||||||
NumGlyphs = 0
|
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
end
|
end
|
||||||
object BitBtn2: TBitBtn
|
object BitBtn2: TBitBtn
|
||||||
@ -630,7 +620,6 @@ object FormMessagesComposer: TFormMessagesComposer
|
|||||||
Width = 128
|
Width = 128
|
||||||
Action = DelConst
|
Action = DelConst
|
||||||
Align = alRight
|
Align = alRight
|
||||||
NumGlyphs = 0
|
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -675,7 +664,6 @@ object FormMessagesComposer: TFormMessagesComposer
|
|||||||
Default = True
|
Default = True
|
||||||
Kind = bkOK
|
Kind = bkOK
|
||||||
ModalResult = 1
|
ModalResult = 1
|
||||||
NumGlyphs = 0
|
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
end
|
end
|
||||||
object CancelButton: TBitBtn
|
object CancelButton: TBitBtn
|
||||||
@ -695,7 +683,6 @@ object FormMessagesComposer: TFormMessagesComposer
|
|||||||
Constraints.MinWidth = 100
|
Constraints.MinWidth = 100
|
||||||
Kind = bkCancel
|
Kind = bkCancel
|
||||||
ModalResult = 2
|
ModalResult = 2
|
||||||
NumGlyphs = 0
|
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -15,7 +15,8 @@
|
|||||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
Abstract:
|
Abstract:
|
||||||
This unit is a message dialog composer for Lazarus/FPC. It take in account all message dialogs platform indipendent.
|
This unit is a message dialog composer for Lazarus/FPC.
|
||||||
|
It takes into account all message dialogs platform indpendently.
|
||||||
}
|
}
|
||||||
|
|
||||||
unit MessageComposer;
|
unit MessageComposer;
|
||||||
@ -26,7 +27,7 @@ interface
|
|||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, LResources, LCLType, Forms, Controls, Graphics, Dialogs,
|
Classes, SysUtils, LResources, LCLType, Forms, Controls, Graphics, Dialogs,
|
||||||
StdCtrls, ExtCtrls, Spin, Grids, ActnList, ComCtrls, Buttons, EditBtn,
|
StdCtrls, ExtCtrls, Spin, Grids, ActnList, Buttons, EditBtn,
|
||||||
IDECommands, MenuIntf, LazIDEIntf, SrcEditorIntf;
|
IDECommands, MenuIntf, LazIDEIntf, SrcEditorIntf;
|
||||||
|
|
||||||
type
|
type
|
||||||
@ -101,9 +102,9 @@ type
|
|||||||
XSpinEdit: TSpinEdit;
|
XSpinEdit: TSpinEdit;
|
||||||
YSpinEdit: TSpinEdit;
|
YSpinEdit: TSpinEdit;
|
||||||
procedure AddConstExecute(Sender: TObject);
|
procedure AddConstExecute(Sender: TObject);
|
||||||
procedure ButtonsCheckGroupItemClick(Sender: TObject; Index: integer);
|
procedure ButtonsCheckGroupItemClick(Sender: TObject; {%H-}Index: integer);
|
||||||
procedure ButtonsStringGridSelectEditor(Sender: TObject; aCol,
|
procedure ButtonsStringGridSelectEditor(Sender: TObject; aCol,
|
||||||
aRow: Integer; var Editor: TWinControl);
|
{%H-}aRow: Integer; var Editor: TWinControl);
|
||||||
procedure DelConstExecute(Sender: TObject);
|
procedure DelConstExecute(Sender: TObject);
|
||||||
procedure GetMessageForSourceExecute(Sender: TObject);
|
procedure GetMessageForSourceExecute(Sender: TObject);
|
||||||
procedure GetParamsFmtExecute(Sender: TObject);
|
procedure GetParamsFmtExecute(Sender: TObject);
|
||||||
@ -130,6 +131,47 @@ implementation
|
|||||||
const
|
const
|
||||||
cMessageComposer = 'Message Composer';
|
cMessageComposer = 'Message Composer';
|
||||||
DoubleSpace = ' ';
|
DoubleSpace = ' ';
|
||||||
|
idxPageIf = 0;
|
||||||
|
idxPageCase = 1;
|
||||||
|
idxPageString = 2;
|
||||||
|
|
||||||
|
type
|
||||||
|
TComposedMsgKind = (
|
||||||
|
cmkMsgDlgSimple, //MessageDlg[Msg, DlgType, Buttons(TMsgDlgButtons), HelpCtx]
|
||||||
|
cmkMsgDlgCaption, //MessageDlg[Caption, Msg, DlgType, Buttons(TMsgDlgButtons), HelpCtx]
|
||||||
|
cmkMsgDlgCaptionHelpKeyWord, //MessageDlg[Caption, Msg, DlgType, Buttons(TMsgDlgButtons), HelpKeyword]
|
||||||
|
cmkMsgDlgPosSimple, //MessageDlgPos[Msg, DlgType, Buttons(TMsgDlgButtons), HelpCtx, X, Y]
|
||||||
|
cmkMsgDlgPosHelpSimple, //MessageDlgPosHelp[Msg, DlgType, Buttons(TMsgDlgButtons), HelpCtx, X, Y, HelpFileName]
|
||||||
|
cmkQDlgHelpCtx, //QuestionDlg[Caption, Msg, DlgType, Buttons(array of const), HelpCtx]
|
||||||
|
cmkQDlgHelpKeyword, //QuestionDlg[Caption, Msg, DlgType, Buttons(array of const), HelpKeyword]
|
||||||
|
cmkShowMsg, //ShowMessage[Msg: string];
|
||||||
|
cmkShowMsgFmt, //ShowMessageFmt[Msg, Params(array of const)];
|
||||||
|
cmkShowMsgPos, //ShowMessagePos[Msg, X, Y];
|
||||||
|
cmkInpQMask, //InputQuery[Caption, Prompt, MaskInput(Boolean), Value(String)]
|
||||||
|
cmkInpQSimple, //InputQuery[Caption, Prompt, Value(String)]
|
||||||
|
cmkInpBox, //InputBox[Caption, Prompt, Default]
|
||||||
|
cmkPasswBox //PasswordBox[Caption, Prompt]
|
||||||
|
);
|
||||||
|
|
||||||
|
const ComposedMsgStrings: array[TComposedMsgKind] of string = (
|
||||||
|
'MessageDlg[Msg, DlgType, Buttons(TMsgDlgButtons), HelpCtx]',
|
||||||
|
'MessageDlg[Caption, Msg, DlgType, Buttons(TMsgDlgButtons), HelpCtx]',
|
||||||
|
'MessageDlg[Caption, Msg, DlgType, Buttons(TMsgDlgButtons), HelpKeyword]',
|
||||||
|
'MessageDlgPos[Msg, DlgType, Buttons(TMsgDlgButtons), HelpCtx, X, Y]',
|
||||||
|
'MessageDlgPosHelp[Msg, DlgType, Buttons(TMsgDlgButtons), HelpCtx, X, Y, HelpFileName]',
|
||||||
|
'QuestionDlg[Caption, Msg, DlgType, Buttons(array of const), HelpCtx]',
|
||||||
|
'QuestionDlg[Caption, Msg, DlgType, Buttons(array of const), HelpKeyword]',
|
||||||
|
'ShowMessage[Msg: string];',
|
||||||
|
'ShowMessageFmt[Msg, Params(array of const)];',
|
||||||
|
'ShowMessagePos[Msg, X, Y];',
|
||||||
|
'InputQuery[Caption, Prompt, MaskInput(Boolean), Value(String)]',
|
||||||
|
'InputQuery[Caption, Prompt, Value(String)]',
|
||||||
|
'InputBox[Caption, Prompt, Default]',
|
||||||
|
'PasswordBox[Caption, Prompt]'
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
resourcestring
|
resourcestring
|
||||||
SMessageComposerMenuCaption = 'Message Composer ...';
|
SMessageComposerMenuCaption = 'Message Composer ...';
|
||||||
@ -224,10 +266,13 @@ end;
|
|||||||
|
|
||||||
procedure TFormMessagesComposer.ButtonsStringGridSelectEditor(Sender: TObject; aCol,
|
procedure TFormMessagesComposer.ButtonsStringGridSelectEditor(Sender: TObject; aCol,
|
||||||
aRow: Integer; var Editor: TWinControl);
|
aRow: Integer; var Editor: TWinControl);
|
||||||
|
var
|
||||||
|
ComposedMsgKind: TComposedMsgKind;
|
||||||
begin
|
begin
|
||||||
if aCol<>1 then exit;
|
if aCol<>1 then exit;
|
||||||
case KindMessageComboBox.ItemIndex of
|
ComposedMsgKind := TComposedMsgKind(KindMessageComboBox.ItemIndex);
|
||||||
5, 6: begin
|
case ComposedMsgKind of
|
||||||
|
cmkQDlgHelpCtx, cmkQDlgHelpKeyword: begin
|
||||||
Editor := TStringGrid(Sender).EditorByStyle(cbsPickList);
|
Editor := TStringGrid(Sender).EditorByStyle(cbsPickList);
|
||||||
TPickListCellEditor(Editor).Style := csDropDownList;
|
TPickListCellEditor(Editor).Style := csDropDownList;
|
||||||
TPickListCellEditor(Editor).Clear;
|
TPickListCellEditor(Editor).Clear;
|
||||||
@ -243,7 +288,7 @@ begin
|
|||||||
TPickListCellEditor(Editor).Items.Add(ModalResultStr[mrNoToAll]);
|
TPickListCellEditor(Editor).Items.Add(ModalResultStr[mrNoToAll]);
|
||||||
TPickListCellEditor(Editor).Items.Add(ModalResultStr[mrYesToAll]);
|
TPickListCellEditor(Editor).Items.Add(ModalResultStr[mrYesToAll]);
|
||||||
end;
|
end;
|
||||||
8: begin
|
cmkShowMsgFmt: begin
|
||||||
Editor := TStringGrid(Sender).EditorByStyle(cbsAuto);
|
Editor := TStringGrid(Sender).EditorByStyle(cbsAuto);
|
||||||
//D Decimal format. Precision digits in it
|
//D Decimal format. Precision digits in it
|
||||||
//E Scientific format. Args is a Floating point value. Precision is used to specify the total number of decimals (exponent is3 digits)
|
//E Scientific format. Args is a Floating point value. Precision is used to specify the total number of decimals (exponent is3 digits)
|
||||||
@ -274,7 +319,11 @@ var Msg, MsgCaption, MsgHelpKeyword, HelpFileName, Prompt, MsgDefault,
|
|||||||
i: integer;
|
i: integer;
|
||||||
intParam: integer;
|
intParam: integer;
|
||||||
floatParam: double;
|
floatParam: double;
|
||||||
|
ComposedMsgKind: TComposedMsgKind;
|
||||||
|
const
|
||||||
|
BoolS: Array[Boolean] of String = ('False','True');
|
||||||
begin
|
begin
|
||||||
|
ComposedMsgKind := TComposedMsgKind(KindMessageComboBox.ItemIndex);
|
||||||
Msg := QuotedStr(MsgMemo.Lines.Text);
|
Msg := QuotedStr(MsgMemo.Lines.Text);
|
||||||
|
|
||||||
if Copy(Msg,Length(Msg)-Length(LineEnding),Length(LineEnding))=LineEnding then
|
if Copy(Msg,Length(Msg)-Length(LineEnding),Length(LineEnding))=LineEnding then
|
||||||
@ -314,7 +363,7 @@ begin
|
|||||||
if ButtonsCheckGroup.Checked[11] then
|
if ButtonsCheckGroup.Checked[11] then
|
||||||
MsgButtons := MsgButtons+' mbClose,';
|
MsgButtons := MsgButtons+' mbClose,';
|
||||||
end else begin //maybe QuestionDlg() or ShowMessageFmt();
|
end else begin //maybe QuestionDlg() or ShowMessageFmt();
|
||||||
if KindMessageComboBox.ItemIndex=8 then begin //ShowMessageFmt();
|
if ComposedMsgKind=cmkShowMsgFmt then begin //ShowMessageFmt();
|
||||||
for i := 1 to ButtonsStringGrid.RowCount-1 do begin
|
for i := 1 to ButtonsStringGrid.RowCount-1 do begin
|
||||||
//'D', 'E', 'F', 'G', 'M', 'N', 'P', 'S', 'U', 'X' format
|
//'D', 'E', 'F', 'G', 'M', 'N', 'P', 'S', 'U', 'X' format
|
||||||
strParam := #32;
|
strParam := #32;
|
||||||
@ -371,34 +420,34 @@ begin
|
|||||||
Prompt := QuotedStr(PromptEdit.Text);
|
Prompt := QuotedStr(PromptEdit.Text);
|
||||||
MsgDefault := QuotedStr(DefaultEdit.Text);
|
MsgDefault := QuotedStr(DefaultEdit.Text);
|
||||||
Value := ValueEdit.Text;//user must knows Value var in his source
|
Value := ValueEdit.Text;//user must knows Value var in his source
|
||||||
case KindMessageComboBox.ItemIndex of
|
case ComposedMsgKind of
|
||||||
0: srcMessage := 'MessageDlg('+Msg+', '+DlgType+', '+MsgButtons+','+HelpCtx+')';
|
cmkMsgDlgSimple: srcMessage := 'MessageDlg('+Msg+', '+DlgType+', '+MsgButtons+','+HelpCtx+')';
|
||||||
1: srcMessage := 'MessageDlg('+MsgCaption+', '+Msg+', '+DlgType+', '+
|
cmkMsgDlgCaption: srcMessage := 'MessageDlg('+MsgCaption+', '+Msg+', '+DlgType+', '+
|
||||||
MsgButtons+', '+HelpCtx+')';
|
MsgButtons+', '+HelpCtx+')';
|
||||||
2: srcMessage := 'MessageDlg('+MsgCaption+', '+Msg+', '+DlgType+', '+
|
cmkMsgDlgCaptionHelpKeyWord: srcMessage := 'MessageDlg('+MsgCaption+', '+Msg+', '+DlgType+', '+
|
||||||
MsgButtons+', '+MsgHelpKeyword+')';
|
MsgButtons+', '+MsgHelpKeyword+')';
|
||||||
3: srcMessage := 'MessageDlgPos('+Msg+', '+DlgType+', '+MsgButtons+', '+
|
cmkMsgDlgPosSimple: srcMessage := 'MessageDlgPos('+Msg+', '+DlgType+', '+MsgButtons+', '+
|
||||||
HelpCtx+', '+X+', '+Y+')';
|
HelpCtx+', '+X+', '+Y+')';
|
||||||
4: srcMessage := 'MessageDlgPosHelp('+Msg+', '+DlgType+', '+MsgButtons+', '+
|
cmkMsgDlgPosHelpSimple: srcMessage := 'MessageDlgPosHelp('+Msg+', '+DlgType+', '+MsgButtons+', '+
|
||||||
HelpCtx+', '+X+', '+Y+', '+HelpFileName+')';
|
HelpCtx+', '+X+', '+Y+', '+HelpFileName+')';
|
||||||
5: srcMessage := 'QuestionDlg('+MsgCaption+', '+Msg+', '+DlgType+', '+
|
cmkQDlgHelpCtx: srcMessage := 'QuestionDlg('+MsgCaption+', '+Msg+', '+DlgType+', '+
|
||||||
MsgButtons+', '+HelpCtx+')';
|
MsgButtons+', '+HelpCtx+')';
|
||||||
6: srcMessage := 'QuestionDlg('+MsgCaption+', '+Msg+', '+DlgType+', '+
|
cmkQDlgHelpKeyword: srcMessage := 'QuestionDlg('+MsgCaption+', '+Msg+', '+DlgType+', '+
|
||||||
MsgButtons+', '+MsgHelpKeyword+')';
|
MsgButtons+', '+MsgHelpKeyword+')';
|
||||||
7: srcMessage := 'ShowMessage('+Msg+')';
|
cmkShowMsg: srcMessage := 'ShowMessage('+Msg+')';
|
||||||
8: srcMessage := 'ShowMessageFmt('+Msg+', '+MsgButtons+')';
|
cmkShowMsgFmt: srcMessage := 'ShowMessageFmt('+Msg+', '+MsgButtons+')';
|
||||||
9: srcMessage := 'ShowMessagePos('+Msg+', '+X+', '+Y+')';
|
cmkShowMsgPos: srcMessage := 'ShowMessagePos('+Msg+', '+X+', '+Y+')';
|
||||||
10: srcMessage := 'InputQuery('+MsgCaption+', '+Prompt+', '+
|
cmkInpQMask: srcMessage := 'InputQuery('+MsgCaption+', '+Prompt+', '+
|
||||||
LowerCase(BoolToStr(MaskInputCheckBox.Checked))+', '+Value+')';
|
BoolS[MaskInputCheckBox.Checked]+', '+Value+')';
|
||||||
11: srcMessage := 'InputQuery('+MsgCaption+', '+Prompt+', '+Value+')';
|
cmkInpQSimple: srcMessage := 'InputQuery('+MsgCaption+', '+Prompt+', '+Value+')';
|
||||||
12: srcMessage := 'InputBox('+MsgCaption+', '+Prompt+', '+MsgDefault+')';
|
cmkInpBox: srcMessage := 'InputBox('+MsgCaption+', '+Prompt+', '+MsgDefault+')';
|
||||||
13: srcMessage := 'PasswordBox('+MsgCaption+', '+Prompt+')'
|
cmkPasswBox: srcMessage := 'PasswordBox('+MsgCaption+', '+Prompt+')'
|
||||||
end;
|
end;
|
||||||
|
|
||||||
if SourceWrapperGroupBox.Enabled then begin //no showmessages
|
if SourceWrapperGroupBox.Enabled then begin //no showmessages
|
||||||
if (IfThenRadioButton.Checked)or(IfThenElseRadioButton.Checked) then begin
|
if (IfThenRadioButton.Checked)or(IfThenElseRadioButton.Checked) then begin
|
||||||
srcMessage := 'if '+srcMessage+' = ';
|
srcMessage := 'if '+srcMessage+' = ';
|
||||||
if IfResultComboBox.Enabled then
|
if SourceNoteBook.PageIndex <> idxPageString then
|
||||||
srcMessage := srcMessage+IfResultComboBox.Text
|
srcMessage := srcMessage+IfResultComboBox.Text
|
||||||
else
|
else
|
||||||
srcMessage := srcMessage+QuotedStr(StringResultEdit.Text);
|
srcMessage := srcMessage+QuotedStr(StringResultEdit.Text);
|
||||||
@ -450,8 +499,10 @@ var strtmp: string;
|
|||||||
ListParams: TStringList;
|
ListParams: TStringList;
|
||||||
indx: integer;
|
indx: integer;
|
||||||
chrtmp: Char;
|
chrtmp: Char;
|
||||||
|
ComposedMsgKind: TComposedMsgKind;
|
||||||
begin
|
begin
|
||||||
if KindMessageComboBox.ItemIndex<>8 then exit;
|
ComposedMsgKind := TComposedMsgKind(KindMessageComboBox.ItemIndex);
|
||||||
|
if ComposedMsgKind<>cmkShowMsgFmt then exit;
|
||||||
ButtonsStringGrid.Cells[0, 0] := 'Params (array of const)';
|
ButtonsStringGrid.Cells[0, 0] := 'Params (array of const)';
|
||||||
ButtonsStringGrid.Cells[1, 0] := 'Values';
|
ButtonsStringGrid.Cells[1, 0] := 'Values';
|
||||||
ButtonsStringGrid.FixedCols := 1;
|
ButtonsStringGrid.FixedCols := 1;
|
||||||
@ -482,14 +533,21 @@ end;
|
|||||||
procedure TFormMessagesComposer.MessageSetupExecute(Sender: TObject);
|
procedure TFormMessagesComposer.MessageSetupExecute(Sender: TObject);
|
||||||
var indx: integer;
|
var indx: integer;
|
||||||
ListResult: TStringList;
|
ListResult: TStringList;
|
||||||
|
ComposedMsgKind: TComposedMsgKind;
|
||||||
begin
|
begin
|
||||||
if KindMessageComboBox.ItemIndex in [0,1,2,3,4] then
|
ComposedMsgKind := TComposedMsgKind(KindMessageComboBox.ItemIndex);
|
||||||
|
if ComposedMsgKind in [cmkMsgDlgSimple,cmkMsgDlgCaption,cmkMsgDlgCaptionHelpKeyWord,
|
||||||
|
cmkMsgDlgPosSimple,cmkMsgDlgPosHelpSimple] then
|
||||||
ButtonsNotebook.PageIndex := 0 // ButtonsCheckGroup
|
ButtonsNotebook.PageIndex := 0 // ButtonsCheckGroup
|
||||||
else
|
else
|
||||||
ButtonsNotebook.PageIndex := 1; // ButtonsPanel
|
ButtonsNotebook.PageIndex := 1; // ButtonsPanel
|
||||||
//Msg
|
//Msg
|
||||||
case KindMessageComboBox.ItemIndex of
|
case ComposedMsgKind of
|
||||||
0,1,2,3,4,5,6,7,8,9: begin
|
cmkMsgDlgSimple,cmkMsgDlgCaption,cmkMsgDlgCaptionHelpKeyWord,
|
||||||
|
cmkMsgDlgPosSimple,cmkMsgDlgPosHelpSimple,
|
||||||
|
cmkQDlgHelpCtx,cmkQDlgHelpKeyword,cmkShowMsg,
|
||||||
|
cmkShowMsgFmt,cmkShowMsgPos:
|
||||||
|
begin
|
||||||
MsgMemo.Color := clWindow;
|
MsgMemo.Color := clWindow;
|
||||||
MsgMemo.Enabled := true;
|
MsgMemo.Enabled := true;
|
||||||
end;
|
end;
|
||||||
@ -499,8 +557,15 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
//Caption
|
//Caption
|
||||||
case KindMessageComboBox.ItemIndex of
|
case ComposedMsgKind of
|
||||||
1,2,5,6,10,11,12,13: begin
|
cmkMsgDlgCaption,
|
||||||
|
cmkMsgDlgCaptionHelpKeyWord,
|
||||||
|
cmkQDlgHelpCtx,
|
||||||
|
cmkQDlgHelpKeyword,
|
||||||
|
cmkInpQMask,
|
||||||
|
cmkInpQSimple,
|
||||||
|
cmkInpBox,
|
||||||
|
cmkPasswBox: begin
|
||||||
CaptionEdit.Color := clWindow;
|
CaptionEdit.Color := clWindow;
|
||||||
CaptionEdit.Enabled := true;
|
CaptionEdit.Enabled := true;
|
||||||
end;
|
end;
|
||||||
@ -510,8 +575,14 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
//DlgType;
|
//DlgType;
|
||||||
case KindMessageComboBox.ItemIndex of
|
case ComposedMsgKind of
|
||||||
0,1,2,3,4,5,6: begin
|
cmkMsgDlgSimple,
|
||||||
|
cmkMsgDlgCaption,
|
||||||
|
cmkMsgDlgCaptionHelpKeyWord,
|
||||||
|
cmkMsgDlgPosSimple,
|
||||||
|
cmkMsgDlgPosHelpSimple,
|
||||||
|
cmkQDlgHelpCtx,
|
||||||
|
cmkQDlgHelpKeyword: begin
|
||||||
DlgTypeComboBox.Color := clWindow;
|
DlgTypeComboBox.Color := clWindow;
|
||||||
DlgTypeComboBox.Enabled := true;
|
DlgTypeComboBox.Enabled := true;
|
||||||
end;
|
end;
|
||||||
@ -521,8 +592,12 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
//HelpContext
|
//HelpContext
|
||||||
case KindMessageComboBox.ItemIndex of
|
case ComposedMsgKind of
|
||||||
0,1,3,4,5: begin
|
cmkMsgDlgSimple,
|
||||||
|
cmkMsgDlgCaption,
|
||||||
|
cmkMsgDlgPosSimple,
|
||||||
|
cmkMsgDlgPosHelpSimple,
|
||||||
|
cmkQDlgHelpCtx: begin
|
||||||
HelpContextSpinEdit.Color := clWindow;
|
HelpContextSpinEdit.Color := clWindow;
|
||||||
HelpContextSpinEdit.Enabled := true;
|
HelpContextSpinEdit.Enabled := true;
|
||||||
end;
|
end;
|
||||||
@ -532,8 +607,9 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
//HelpKeyword
|
//HelpKeyword
|
||||||
case KindMessageComboBox.ItemIndex of
|
case ComposedMsgKind of
|
||||||
2,6: begin
|
cmkMsgDlgCaptionHelpKeyWord,
|
||||||
|
cmkQDlgHelpKeyword: begin
|
||||||
HelpKeyWordEdit.Color := clWindow;
|
HelpKeyWordEdit.Color := clWindow;
|
||||||
HelpKeyWordEdit.Enabled := true;
|
HelpKeyWordEdit.Enabled := true;
|
||||||
end;
|
end;
|
||||||
@ -543,8 +619,10 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
//Position X Y
|
//Position X Y
|
||||||
case KindMessageComboBox.ItemIndex of
|
case ComposedMsgKind of
|
||||||
3,4,9: begin
|
cmkMsgDlgPosSimple,
|
||||||
|
cmkMsgDlgPosHelpSimple,
|
||||||
|
cmkShowMsgPos: begin
|
||||||
XSpinEdit.Color := clWindow;
|
XSpinEdit.Color := clWindow;
|
||||||
XSpinEdit.Enabled := true;
|
XSpinEdit.Enabled := true;
|
||||||
YSpinEdit.Color := clWindow;
|
YSpinEdit.Color := clWindow;
|
||||||
@ -558,8 +636,8 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
//HelpFileName
|
//HelpFileName
|
||||||
case KindMessageComboBox.ItemIndex of
|
case ComposedMsgKind of
|
||||||
4: begin
|
cmkMsgDlgPosHelpSimple: begin
|
||||||
HelpFileNameEdit.Color := clWindow;
|
HelpFileNameEdit.Color := clWindow;
|
||||||
HelpFileNameEdit.Enabled := true;
|
HelpFileNameEdit.Enabled := true;
|
||||||
end;
|
end;
|
||||||
@ -569,8 +647,8 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
//Params (array of const)
|
//Params (array of const)
|
||||||
case KindMessageComboBox.ItemIndex of
|
case ComposedMsgKind of
|
||||||
8: begin
|
cmkShowMsgFmt: begin
|
||||||
GetParamsFmt.Execute;
|
GetParamsFmt.Execute;
|
||||||
end;
|
end;
|
||||||
else begin
|
else begin
|
||||||
@ -581,8 +659,11 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
//Prompt
|
//Prompt
|
||||||
case KindMessageComboBox.ItemIndex of
|
case ComposedMsgKind of
|
||||||
10,11,12,13: begin
|
cmkInpQMask,
|
||||||
|
cmkInpQSimple,
|
||||||
|
cmkInpBox,
|
||||||
|
cmkPasswBox: begin
|
||||||
PromptEdit.Color := clWindow;
|
PromptEdit.Color := clWindow;
|
||||||
PromptEdit.Enabled := true;
|
PromptEdit.Enabled := true;
|
||||||
end;
|
end;
|
||||||
@ -592,8 +673,8 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
//MaskInput
|
//MaskInput
|
||||||
case KindMessageComboBox.ItemIndex of
|
case ComposedMsgKind of
|
||||||
10: begin
|
cmkInpQMask: begin
|
||||||
MaskInputCheckBox.Enabled := true;
|
MaskInputCheckBox.Enabled := true;
|
||||||
end;
|
end;
|
||||||
else begin
|
else begin
|
||||||
@ -601,8 +682,9 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
//Value
|
//Value
|
||||||
case KindMessageComboBox.ItemIndex of
|
case ComposedMsgKind of
|
||||||
10,11: begin
|
cmkInpQMask,
|
||||||
|
cmkInpQSimple: begin
|
||||||
ValueEdit.Color := clWindow;
|
ValueEdit.Color := clWindow;
|
||||||
ValueEdit.Enabled := true;
|
ValueEdit.Enabled := true;
|
||||||
end;
|
end;
|
||||||
@ -612,8 +694,8 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
//Default
|
//Default
|
||||||
case KindMessageComboBox.ItemIndex of
|
case ComposedMsgKind of
|
||||||
12: begin
|
cmkInpBox: begin
|
||||||
DefaultEdit.Color := clWindow;
|
DefaultEdit.Color := clWindow;
|
||||||
DefaultEdit.Enabled := true;
|
DefaultEdit.Enabled := true;
|
||||||
end;
|
end;
|
||||||
@ -626,9 +708,14 @@ begin
|
|||||||
///// Results and Source Wrapper for message //////
|
///// Results and Source Wrapper for message //////
|
||||||
|
|
||||||
//InputBox(); PasswordBox();
|
//InputBox(); PasswordBox();
|
||||||
case KindMessageComboBox.ItemIndex of
|
case ComposedMsgKind of
|
||||||
12,13: begin
|
cmkInpBox,
|
||||||
SourceNotebook.PageIndex := 2;
|
cmkPasswBox: begin
|
||||||
|
SourceNotebook.PageIndex := idxPageString;
|
||||||
|
if CaseOfEndRadioButton.Checked then IfThenRadioButton.Checked := True;
|
||||||
|
if CaseOfEndElseRadioButton.Checked then IfThenElseRadioButton.Checked := True;
|
||||||
|
CaseOfEndRadioButton.Enabled := False;
|
||||||
|
CaseOfEndElseRadioButton.Enabled := False;
|
||||||
//StringResultEdit.Enabled := true;
|
//StringResultEdit.Enabled := true;
|
||||||
//StringResultEdit.Color := clWindow;
|
//StringResultEdit.Color := clWindow;
|
||||||
//IfResultComboBox.Enabled := false;
|
//IfResultComboBox.Enabled := false;
|
||||||
@ -638,10 +725,12 @@ begin
|
|||||||
//CaseOfEndRadioButton.Enabled := false;
|
//CaseOfEndRadioButton.Enabled := false;
|
||||||
end;
|
end;
|
||||||
else begin
|
else begin
|
||||||
|
CaseOfEndRadioButton.Enabled := True;
|
||||||
|
CaseOfEndElseRadioButton.Enabled := True;
|
||||||
if IfThenRadioButton.Checked or IfThenElseRadioButton.Checked then
|
if IfThenRadioButton.Checked or IfThenElseRadioButton.Checked then
|
||||||
SourceNotebook.PageIndex := 0
|
SourceNotebook.PageIndex := idxPageIf
|
||||||
else
|
else
|
||||||
SourceNotebook.PageIndex := 1;
|
SourceNotebook.PageIndex := idxPageCase;
|
||||||
//StringResultEdit.Enabled := false;
|
//StringResultEdit.Enabled := false;
|
||||||
//StringResultEdit.Color := clBtnFace;
|
//StringResultEdit.Color := clBtnFace;
|
||||||
//IfResultComboBox.Enabled := true;
|
//IfResultComboBox.Enabled := true;
|
||||||
@ -653,15 +742,21 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
//ShowMessage(); ShowMessageFmt(); ShowMessagePos();
|
//ShowMessage(); ShowMessageFmt(); ShowMessagePos();
|
||||||
case KindMessageComboBox.ItemIndex of
|
case ComposedMsgKind of
|
||||||
7,8,9: SourceWrapperGroupBox.Enabled := false;
|
cmkShowMsg,
|
||||||
|
cmkShowMsgFmt,
|
||||||
|
cmkShowMsgPos: SourceWrapperGroupBox.Enabled := false;
|
||||||
else
|
else
|
||||||
SourceWrapperGroupBox.Enabled := true;
|
SourceWrapperGroupBox.Enabled := true;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
//MessageDlg() Result
|
//MessageDlg() Result
|
||||||
case KindMessageComboBox.ItemIndex of
|
case ComposedMsgKind of
|
||||||
0,1,2,3,4: begin
|
cmkMsgDlgSimple,
|
||||||
|
cmkMsgDlgCaption,
|
||||||
|
cmkMsgDlgCaptionHelpKeyWord,
|
||||||
|
cmkMsgDlgPosSimple,
|
||||||
|
cmkMsgDlgPosHelpSimple: begin
|
||||||
ListResult := TStringList.Create;
|
ListResult := TStringList.Create;
|
||||||
for indx := 0 to ButtonsCheckGroup.Items.Count-1 do
|
for indx := 0 to ButtonsCheckGroup.Items.Count-1 do
|
||||||
if ButtonsCheckGroup.Checked[indx] then begin
|
if ButtonsCheckGroup.Checked[indx] then begin
|
||||||
@ -702,8 +797,9 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
//QuestionDlg() Result
|
//QuestionDlg() Result
|
||||||
case KindMessageComboBox.ItemIndex of
|
case ComposedMsgKind of
|
||||||
5,6: begin
|
cmkQDlgHelpCtx,
|
||||||
|
cmkQDlgHelpKeyword: begin
|
||||||
ListResult := TStringList.Create;
|
ListResult := TStringList.Create;
|
||||||
ListResult.Assign(ButtonsStringGrid.Cols[1]);
|
ListResult.Assign(ButtonsStringGrid.Cols[1]);
|
||||||
ListResult.Delete(0);
|
ListResult.Delete(0);
|
||||||
@ -720,8 +816,9 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
//InputQuery() Result
|
//InputQuery() Result
|
||||||
case KindMessageComboBox.ItemIndex of
|
case ComposedMsgKind of
|
||||||
10,11: if CaseResultCheckGroup.Items[0]<>'false' then begin
|
cmkInpQMask,
|
||||||
|
cmkInpQSimple: if (CaseResultCheckGroup.Items.Count=0) or (CaseResultCheckGroup.Items[0]<>'false') then begin
|
||||||
CaseResultCheckGroup.Items.Clear;
|
CaseResultCheckGroup.Items.Clear;
|
||||||
CaseResultCheckGroup.Items.Add('false');
|
CaseResultCheckGroup.Items.Add('false');
|
||||||
CaseResultCheckGroup.Items.Add('true');
|
CaseResultCheckGroup.Items.Add('true');
|
||||||
@ -731,6 +828,8 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
ButtonsStringGrid.AutoAdjustColumns;
|
ButtonsStringGrid.AutoAdjustColumns;
|
||||||
|
ButtonsPanel.Visible := not (ComposedMsgKind in [cmkShowMsg,cmkShowMsgPos,
|
||||||
|
cmkInpQMask,cmkInpQSimple,cmkInpBox,cmkPasswBox]);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TFormMessagesComposer.MessagesInitExecute(Sender: TObject);
|
procedure TFormMessagesComposer.MessagesInitExecute(Sender: TObject);
|
||||||
@ -743,6 +842,9 @@ begin
|
|||||||
XSpinEdit.Width := 60;
|
XSpinEdit.Width := 60;
|
||||||
YSpinEdit.Width := 60;
|
YSpinEdit.Width := 60;
|
||||||
|
|
||||||
|
KindMessageComboBox.Clear;
|
||||||
|
KindMessageCombobox.Items.AddStrings(ComposedMsgStrings);
|
||||||
|
KindMessageComboBox.ItemIndex := 0;
|
||||||
Caption := SMessageComposerCaption;
|
Caption := SMessageComposerCaption;
|
||||||
CaptionLabel.Caption := SDlgCaption;
|
CaptionLabel.Caption := SDlgCaption;
|
||||||
DlgTypeLabel.Caption := SDlgType;
|
DlgTypeLabel.Caption := SDlgType;
|
||||||
@ -770,13 +872,15 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TFormMessagesComposer.SetIfOrCaseExecute(Sender: TObject);
|
procedure TFormMessagesComposer.SetIfOrCaseExecute(Sender: TObject);
|
||||||
|
var
|
||||||
|
ComposedMsgKind: TComposedMsgKind;
|
||||||
begin
|
begin
|
||||||
if (KindMessageComboBox.ItemIndex = 12)or
|
ComposedMsgKind := TComposedMsgKind(KindMessageComboBox.ItemIndex);
|
||||||
(KindMessageComboBox.ItemIndex = 13) then exit;
|
if (ComposedMsgKind in [cmkInpBox, cmkPasswBox]) then exit;
|
||||||
if IfThenRadioButton.Checked or IfThenElseRadioButton.Checked then
|
if IfThenRadioButton.Checked or IfThenElseRadioButton.Checked then
|
||||||
SourceNotebook.PageIndex := 0
|
SourceNotebook.PageIndex := idxPageIf
|
||||||
else
|
else
|
||||||
SourceNotebook.PageIndex := 1;
|
SourceNotebook.PageIndex := idxPageCase;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TFormMessagesComposer.TestExecute(Sender: TObject);
|
procedure TFormMessagesComposer.TestExecute(Sender: TObject);
|
||||||
@ -786,6 +890,7 @@ var Msg, MsgCaption, MsgHelpKeyword, HelpFileName, Prompt,
|
|||||||
MsgButtons: TMsgDlgButtons;
|
MsgButtons: TMsgDlgButtons;
|
||||||
HelpCtx: Longint;
|
HelpCtx: Longint;
|
||||||
X, Y: integer;
|
X, Y: integer;
|
||||||
|
ComposedMsgKind: TComposedMsgKind;
|
||||||
begin
|
begin
|
||||||
Msg := MsgMemo.Lines.Text;
|
Msg := MsgMemo.Lines.Text;
|
||||||
DlgType := TMsgDlgType(DlgTypeComboBox.ItemIndex);
|
DlgType := TMsgDlgType(DlgTypeComboBox.ItemIndex);
|
||||||
@ -824,23 +929,24 @@ begin
|
|||||||
Value := ValueEdit.Text;
|
Value := ValueEdit.Text;
|
||||||
HelpFileName:='';
|
HelpFileName:='';
|
||||||
MsgHelpKeyword:='';
|
MsgHelpKeyword:='';
|
||||||
case KindMessageComboBox.ItemIndex of
|
ComposedMsgKind := TComposedMsgKind(KindMessageComboBox.ItemIndex);
|
||||||
0: MessageDlg(Msg, DlgType, MsgButtons, HelpCtx);
|
case ComposedMsgKind of
|
||||||
1: MessageDlg(MsgCaption, Msg, DlgType, MsgButtons, HelpCtx);
|
cmkMsgDlgSimple: MessageDlg(Msg, DlgType, MsgButtons, HelpCtx);
|
||||||
2: MessageDlg(MsgCaption, Msg, DlgType, MsgButtons, MsgHelpKeyword);
|
cmkMsgDlgCaption: MessageDlg(MsgCaption, Msg, DlgType, MsgButtons, HelpCtx);
|
||||||
3: MessageDlgPos(Msg, DlgType, MsgButtons, HelpCtx, X, Y);
|
cmkMsgDlgCaptionHelpKeyWord: MessageDlg(MsgCaption, Msg, DlgType, MsgButtons, MsgHelpKeyword);
|
||||||
4: MessageDlgPosHelp(Msg, DlgType, MsgButtons, HelpCtx, X, Y, HelpFileName);
|
cmkMsgDlgPosSimple: MessageDlgPos(Msg, DlgType, MsgButtons, HelpCtx, X, Y);
|
||||||
5: QuestionDlg(MsgCaption, Msg+' ('+SNotImplementedYet+')', DlgType, [mrYes, 'Yes', mrNo, 'No',
|
cmkMsgDlgPosHelpSimple: MessageDlgPosHelp(Msg, DlgType, MsgButtons, HelpCtx, X, Y, HelpFileName);
|
||||||
|
cmkQDlgHelpCtx: QuestionDlg(MsgCaption, Msg+' ('+SNotImplementedYet+')', DlgType, [mrYes, 'Yes', mrNo, 'No',
|
||||||
mrCancel, 'Cancel'], HelpCtx);
|
mrCancel, 'Cancel'], HelpCtx);
|
||||||
6: QuestionDlg(MsgCaption, Msg+' ('+SNotImplementedYet+')', DlgType, [mrYes, 'Yes', mrNo, 'No',
|
cmkQDlgHelpKeyword: QuestionDlg(MsgCaption, Msg+' ('+SNotImplementedYet+')', DlgType, [mrYes, 'Yes', mrNo, 'No',
|
||||||
mrCancel, 'Cancel'], HelpKeyword);
|
mrCancel, 'Cancel'], HelpKeyword);
|
||||||
7: ShowMessage(Msg);
|
cmkShowMsg: ShowMessage(Msg);
|
||||||
8: ShowMessageFmt(Msg+' ('+SNotImplementedYet+')', ['Yes','No','Cancel']);
|
cmkShowMsgFmt: ShowMessageFmt(Msg+' ('+SNotImplementedYet+')', ['Yes','No','Cancel']);
|
||||||
9: ShowMessagePos(Msg, X, Y);
|
cmkShowMsgPos: ShowMessagePos(Msg, X, Y);
|
||||||
10: InputQuery(MsgCaption, Prompt, MaskInputCheckBox.Checked, Value);
|
cmkInpQMask: InputQuery(MsgCaption, Prompt, MaskInputCheckBox.Checked, Value);
|
||||||
11: InputQuery(MsgCaption, Prompt, Value);
|
cmkInpQSimple: InputQuery(MsgCaption, Prompt, Value);
|
||||||
12: InputBox(Caption, Prompt, MsgDefault);
|
cmkInpBox: InputBox(Caption, Prompt, MsgDefault);
|
||||||
13: PasswordBox(MsgCaption, Prompt)
|
cmkPasswBox: PasswordBox(MsgCaption, Prompt)
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user