починил редактирование интеграций
This commit is contained in:
+45
-5
@@ -44,6 +44,8 @@ type
|
||||
public
|
||||
{ Public declarations }
|
||||
isEdit: boolean;
|
||||
oldPort: integer;
|
||||
procedure setRecord(aRec: TOBSNotify);
|
||||
end;
|
||||
|
||||
var
|
||||
@@ -75,6 +77,44 @@ begin
|
||||
result := Format('rgba(%d, %d, %d, %.2f)', [r, G, B, A], FS);
|
||||
end;
|
||||
|
||||
procedure TfCreateNotify.setRecord(aRec: TOBSNotify);
|
||||
var
|
||||
SavedColor: TAlphaColor;
|
||||
begin
|
||||
with aRec do
|
||||
begin
|
||||
fCreateNotify.edtESImage.Text := Picture;
|
||||
fCreateNotify.edtESSound.Text := Sound;
|
||||
|
||||
if TryStrToUInt('$' + ColorBlock, Cardinal(SavedColor)) then
|
||||
fCreateNotify.frColorSettings1.cpStyleBlockColor.Color := SavedColor
|
||||
else
|
||||
fCreateNotify.frColorSettings1.cpStyleBlockColor.Color :=
|
||||
TAlphaColorRec.Black;
|
||||
|
||||
fCreateNotify.frColorSettings1.sbStyleBlockBorderSize.Value := SolidBorder;
|
||||
fCreateNotify.frColorSettings1.sbStyleBlockPadding.Value := Paddings;
|
||||
fCreateNotify.frColorSettings1.ccbStyleBorderColor.ItemIndex := ColorBorder;
|
||||
fCreateNotify.frColorSettings1.ccbBColor.ItemIndex := ColorBackground;
|
||||
|
||||
fCreateNotify.edtESTitle.Text := HeaderText;
|
||||
fCreateNotify.frFontSettings2.ccbFontColor.ItemIndex := HeaderColorFont;
|
||||
fCreateNotify.frFontSettings2.sbFontSize.Value := HeaderSizeFont;
|
||||
fCreateNotify.frFontSettings2.cbFontStyleDefault.ItemIndex :=
|
||||
HeaderStyleFont;
|
||||
|
||||
fCreateNotify.edtESMessage.Text := MessText;
|
||||
fCreateNotify.frFontSettings3.ccbFontColor.ItemIndex := MessColorFont;
|
||||
fCreateNotify.frFontSettings3.sbFontSize.Value := MessSizeFont;
|
||||
fCreateNotify.frFontSettings3.cbFontStyleDefault.ItemIndex := MessStyleFont;
|
||||
|
||||
fCreateNotify.sbTimeMsg.Value := TimeMess;
|
||||
fCreateNotify.cbEventsType.ItemIndex := TypeEvent;
|
||||
fCreateNotify.edtIF.Text := TypeEdit;
|
||||
fCreateNotify.sbWebServerPort.Value := port;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfCreateNotify.btnCreateEventClick(Sender: TObject);
|
||||
var
|
||||
OBSNotify: TOBSNotify;
|
||||
@@ -104,10 +144,10 @@ begin
|
||||
TimeMess := round(sbTimeMsg.Value);
|
||||
TypeEvent := cbEventsType.ItemIndex;
|
||||
TypeEdit := edtIF.Text;
|
||||
Port := round(sbWebServerPort.Value);
|
||||
port := round(sbWebServerPort.Value);
|
||||
end;
|
||||
if isEdit then
|
||||
TTW_Bot.frOBS1.EdtNotify(OBSNotify)
|
||||
TTW_Bot.frOBS1.EdtNotify(OBSNotify, oldPort)
|
||||
else
|
||||
TTW_Bot.frOBS1.AddNotify(OBSNotify);
|
||||
close;
|
||||
@@ -115,7 +155,7 @@ end;
|
||||
|
||||
procedure TfCreateNotify.FormCreate(Sender: TObject);
|
||||
var
|
||||
i: Integer;
|
||||
i: integer;
|
||||
SavedColor: TAlphaColor;
|
||||
c: TComponent;
|
||||
ColorStr: string;
|
||||
@@ -254,11 +294,11 @@ procedure TfCreateNotify.FormShow(Sender: TObject);
|
||||
begin
|
||||
if isEdit then
|
||||
begin
|
||||
btnCreateEvent.Text:='Èçìåíèòü îïîâåùåíèå';
|
||||
btnCreateEvent.Text := 'Èçìåíèòü îïîâåùåíèå';
|
||||
end
|
||||
else
|
||||
begin
|
||||
btnCreateEvent.Text:='Ñîçäàòü îïîâåùåíèå';
|
||||
btnCreateEvent.Text := 'Ñîçäàòü îïîâåùåíèå';
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user