добавил режим изменения
This commit is contained in:
@@ -13,6 +13,7 @@ object frOBS: TfrOBS
|
|||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
RowCount = 0
|
RowCount = 0
|
||||||
Options = [ColumnResize, ColumnMove, ColLines, RowLines, Tabs, Header, HeaderClick, AutoDisplacement]
|
Options = [ColumnResize, ColumnMove, ColLines, RowLines, Tabs, Header, HeaderClick, AutoDisplacement]
|
||||||
|
OnCellDblClick = sgWebChatsCellDblClick
|
||||||
Viewport.Width = 685.000000000000000000
|
Viewport.Width = 685.000000000000000000
|
||||||
Viewport.Height = 164.000000000000000000
|
Viewport.Height = 164.000000000000000000
|
||||||
object IntegerColumn1: TIntegerColumn
|
object IntegerColumn1: TIntegerColumn
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ type
|
|||||||
procedure btnCreateOBSKandinskyClick(Sender: TObject);
|
procedure btnCreateOBSKandinskyClick(Sender: TObject);
|
||||||
procedure btnCreateOBSChatClick(Sender: TObject);
|
procedure btnCreateOBSChatClick(Sender: TObject);
|
||||||
procedure btnCreateOBSNotifyClick(Sender: TObject);
|
procedure btnCreateOBSNotifyClick(Sender: TObject);
|
||||||
|
procedure sgWebChatsCellDblClick(const Column: TColumn; const Row: Integer);
|
||||||
private
|
private
|
||||||
{ Private declarations }
|
{ Private declarations }
|
||||||
public
|
public
|
||||||
@@ -34,11 +35,11 @@ type
|
|||||||
|
|
||||||
procedure UpdateGridFromArray;
|
procedure UpdateGridFromArray;
|
||||||
procedure AddChat(newRecord: TOBSChat);
|
procedure AddChat(newRecord: TOBSChat);
|
||||||
procedure EdtChat(aPort: Integer);
|
procedure EdtChat(newRecord: TOBSChat);
|
||||||
procedure DelChat(aPort: Integer);
|
procedure DelChat(aPort: Integer);
|
||||||
|
|
||||||
procedure AddNotify(newRecord: TOBSNotify);
|
procedure AddNotify(newRecord: TOBSNotify);
|
||||||
procedure EdtNotify(aPort: Integer);
|
procedure EdtNotify(newRecord: TOBSNotify);
|
||||||
procedure DelNotify(aPort: Integer);
|
procedure DelNotify(aPort: Integer);
|
||||||
|
|
||||||
procedure AddKandinsky(newRecord: TOBSKandinsky);
|
procedure AddKandinsky(newRecord: TOBSKandinsky);
|
||||||
@@ -89,6 +90,7 @@ begin
|
|||||||
dport := strtoint(sgWebChats.Cells[0, i]) + 1;
|
dport := strtoint(sgWebChats.Cells[0, i]) + 1;
|
||||||
end;
|
end;
|
||||||
fCreateChat.sbWebServerPort.Value := dport;
|
fCreateChat.sbWebServerPort.Value := dport;
|
||||||
|
fCreateChat.isEdit:=false;
|
||||||
fCreateChat.Show;
|
fCreateChat.Show;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@@ -120,6 +122,7 @@ begin
|
|||||||
dport := strtoint(sgWebChats.Cells[0, i]) + 1;
|
dport := strtoint(sgWebChats.Cells[0, i]) + 1;
|
||||||
end;
|
end;
|
||||||
fCreateNotify.sbWebServerPort.Value := dport;
|
fCreateNotify.sbWebServerPort.Value := dport;
|
||||||
|
fCreateNotify.isEdit:=false;
|
||||||
fCreateNotify.Show;
|
fCreateNotify.Show;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@@ -207,25 +210,13 @@ begin
|
|||||||
db.SaveRecordArray<TOBSNotify>('listNotify', listNotify);
|
db.SaveRecordArray<TOBSNotify>('listNotify', listNotify);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrOBS.EdtChat(aPort: Integer);
|
procedure TfrOBS.EdtChat(newRecord: TOBSChat);
|
||||||
var
|
var
|
||||||
rChat: TOBSChat;
|
rChat: TOBSChat;
|
||||||
i: Integer;
|
|
||||||
f: boolean;
|
|
||||||
SavedColor: TAlphaColor;
|
SavedColor: TAlphaColor;
|
||||||
begin
|
begin
|
||||||
f := false;
|
rChat:= newRecord;
|
||||||
for i := 0 to High(listChats) - 1 do
|
|
||||||
begin
|
|
||||||
if listChats[i].port = aPort then
|
|
||||||
begin
|
|
||||||
rChat := listChats[i];
|
|
||||||
f := true;
|
|
||||||
Break;
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
if not f then
|
|
||||||
exit;
|
|
||||||
if TryStrToUInt('$' + rChat.ColorBlock, Cardinal(SavedColor)) then
|
if TryStrToUInt('$' + rChat.ColorBlock, Cardinal(SavedColor)) then
|
||||||
fCreateChat.frChatSettings1.cpStyleBlockColor.Color := SavedColor
|
fCreateChat.frChatSettings1.cpStyleBlockColor.Color := SavedColor
|
||||||
else
|
else
|
||||||
@@ -246,25 +237,12 @@ begin
|
|||||||
fCreateChat.Show;
|
fCreateChat.Show;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrOBS.EdtNotify(aPort: Integer);
|
procedure TfrOBS.EdtNotify(newRecord: TOBSNotify);
|
||||||
var
|
var
|
||||||
OBSNotify: TOBSNotify;
|
OBSNotify: TOBSNotify;
|
||||||
i: Integer;
|
|
||||||
SavedColor: TAlphaColor;
|
SavedColor: TAlphaColor;
|
||||||
f: boolean;
|
|
||||||
begin
|
begin
|
||||||
f := false;
|
OBSNotify:=newRecord;
|
||||||
for i := 0 to High(listNotify) - 1 do
|
|
||||||
begin
|
|
||||||
if listNotify[i].port = aPort then
|
|
||||||
begin
|
|
||||||
OBSNotify := listNotify[i];
|
|
||||||
f := true;
|
|
||||||
Break;
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
if not f then
|
|
||||||
exit;
|
|
||||||
with OBSNotify do
|
with OBSNotify do
|
||||||
begin
|
begin
|
||||||
fCreateNotify.edtESImage.Text := Picture;
|
fCreateNotify.edtESImage.Text := Picture;
|
||||||
@@ -300,6 +278,21 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TfrOBS.sgWebChatsCellDblClick(const Column: TColumn;
|
||||||
|
const Row: Integer);
|
||||||
|
begin
|
||||||
|
if sgWebChats.Cells[1,row] = 'Îïîâåùåíèå' then
|
||||||
|
begin
|
||||||
|
fCreateNotify.isEdit:=true;
|
||||||
|
fCreateNotify.Show;
|
||||||
|
end;
|
||||||
|
if sgWebChats.Cells[1,row] = '×àò' then
|
||||||
|
begin
|
||||||
|
fCreateChat.isEdit:=true;
|
||||||
|
fCreateChat.Show;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TfrOBS.UpdateGridFromArray;
|
procedure TfrOBS.UpdateGridFromArray;
|
||||||
var
|
var
|
||||||
i, rowIndex: Integer;
|
i, rowIndex: Integer;
|
||||||
|
|||||||
+11
-4
@@ -8,6 +8,7 @@ object fCreateChat: TfCreateChat
|
|||||||
FormFactor.Height = 480
|
FormFactor.Height = 480
|
||||||
FormFactor.Devices = [Desktop]
|
FormFactor.Devices = [Desktop]
|
||||||
OnCreate = FormCreate
|
OnCreate = FormCreate
|
||||||
|
OnShow = FormShow
|
||||||
DesignerMasterStyle = 0
|
DesignerMasterStyle = 0
|
||||||
object GroupBox1: TGroupBox
|
object GroupBox1: TGroupBox
|
||||||
Position.X = 8.000000000000000000
|
Position.X = 8.000000000000000000
|
||||||
@@ -24,7 +25,7 @@ object fCreateChat: TfCreateChat
|
|||||||
Size.Height = 251.000000000000000000
|
Size.Height = 251.000000000000000000
|
||||||
Size.PlatformDefault = False
|
Size.PlatformDefault = False
|
||||||
inherited ccbStyleBorderColor: TColorComboBox
|
inherited ccbStyleBorderColor: TColorComboBox
|
||||||
TabOrder = 33
|
TabOrder = 32
|
||||||
end
|
end
|
||||||
inherited Label40: TLabel
|
inherited Label40: TLabel
|
||||||
TabOrder = 8
|
TabOrder = 8
|
||||||
@@ -42,7 +43,7 @@ object fCreateChat: TfCreateChat
|
|||||||
TabOrder = 37
|
TabOrder = 37
|
||||||
end
|
end
|
||||||
inherited sbStyleBlockPadding: TSpinBox
|
inherited sbStyleBlockPadding: TSpinBox
|
||||||
TabOrder = 46
|
TabOrder = 45
|
||||||
end
|
end
|
||||||
inherited Label1: TLabel
|
inherited Label1: TLabel
|
||||||
TabOrder = 34
|
TabOrder = 34
|
||||||
@@ -69,6 +70,9 @@ object fCreateChat: TfCreateChat
|
|||||||
Size.Width = 240.000000000000000000
|
Size.Width = 240.000000000000000000
|
||||||
Size.Height = 125.000000000000000000
|
Size.Height = 125.000000000000000000
|
||||||
Size.PlatformDefault = False
|
Size.PlatformDefault = False
|
||||||
|
inherited Label41: TLabel
|
||||||
|
TabOrder = 6
|
||||||
|
end
|
||||||
inherited Label46: TLabel
|
inherited Label46: TLabel
|
||||||
TabOrder = 39
|
TabOrder = 39
|
||||||
end
|
end
|
||||||
@@ -134,7 +138,7 @@ object fCreateChat: TfCreateChat
|
|||||||
Size.Width = 112.000000000000000000
|
Size.Width = 112.000000000000000000
|
||||||
Size.Height = 19.000000000000000000
|
Size.Height = 19.000000000000000000
|
||||||
Size.PlatformDefault = False
|
Size.PlatformDefault = False
|
||||||
TabOrder = 37
|
TabOrder = 38
|
||||||
Text = #1042#1077#1095#1085#1086
|
Text = #1042#1077#1095#1085#1086
|
||||||
end
|
end
|
||||||
object sbWebServerPort: TSpinBox
|
object sbWebServerPort: TSpinBox
|
||||||
@@ -168,8 +172,11 @@ object fCreateChat: TfCreateChat
|
|||||||
TextSettings.Trimming = None
|
TextSettings.Trimming = None
|
||||||
end
|
end
|
||||||
object btnCreateWebChat: TButton
|
object btnCreateWebChat: TButton
|
||||||
Position.X = 721.000000000000000000
|
Position.X = 704.000000000000000000
|
||||||
Position.Y = 257.000000000000000000
|
Position.Y = 257.000000000000000000
|
||||||
|
Size.Width = 97.000000000000000000
|
||||||
|
Size.Height = 22.000000000000000000
|
||||||
|
Size.PlatformDefault = False
|
||||||
TabOrder = 4
|
TabOrder = 4
|
||||||
Text = #1057#1086#1079#1076#1072#1090#1100' '#1095#1072#1090
|
Text = #1057#1086#1079#1076#1072#1090#1100' '#1095#1072#1090
|
||||||
TextSettings.Trimming = None
|
TextSettings.Trimming = None
|
||||||
|
|||||||
@@ -28,11 +28,13 @@ type
|
|||||||
btnCreateWebChat: TButton;
|
btnCreateWebChat: TButton;
|
||||||
procedure FormCreate(Sender: TObject);
|
procedure FormCreate(Sender: TObject);
|
||||||
procedure btnCreateWebChatClick(Sender: TObject);
|
procedure btnCreateWebChatClick(Sender: TObject);
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
private
|
private
|
||||||
{ Private declarations }
|
{ Private declarations }
|
||||||
function GetColorFromColorPanel(aColor: TAlphaColor): string;
|
function GetColorFromColorPanel(aColor: TAlphaColor): string;
|
||||||
public
|
public
|
||||||
{ Public declarations }
|
{ Public declarations }
|
||||||
|
isEdit:boolean;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
var
|
var
|
||||||
@@ -144,9 +146,18 @@ procedure TfCreateChat.FormCreate(Sender: TObject);
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
|
isEdit:=false;
|
||||||
LoadChatOBSSettings;
|
LoadChatOBSSettings;
|
||||||
LoadFontList;
|
LoadFontList;
|
||||||
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TfCreateChat.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if isEdit then
|
||||||
|
btnCreateWebChat.Text:='Èçìåíèòü ÷àò'
|
||||||
|
else
|
||||||
|
btnCreateWebChat.Text:='Ñîçäàòü ÷àò';
|
||||||
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|||||||
+16
-9
@@ -8,6 +8,7 @@ object fCreateNotify: TfCreateNotify
|
|||||||
FormFactor.Height = 480
|
FormFactor.Height = 480
|
||||||
FormFactor.Devices = [Desktop]
|
FormFactor.Devices = [Desktop]
|
||||||
OnCreate = FormCreate
|
OnCreate = FormCreate
|
||||||
|
OnShow = FormShow
|
||||||
DesignerMasterStyle = 0
|
DesignerMasterStyle = 0
|
||||||
object btnESImageOpen: TButton
|
object btnESImageOpen: TButton
|
||||||
Hint = #1050#1072#1088#1090#1080#1085#1082#1080'|*.jpg; *.jpeg; *.gif; *.webp'
|
Hint = #1050#1072#1088#1090#1080#1085#1082#1080'|*.jpg; *.jpeg; *.gif; *.webp'
|
||||||
@@ -73,6 +74,12 @@ object fCreateNotify: TfCreateNotify
|
|||||||
Size.Width = 311.000000000000000000
|
Size.Width = 311.000000000000000000
|
||||||
Size.Height = 258.000000000000000000
|
Size.Height = 258.000000000000000000
|
||||||
Size.PlatformDefault = False
|
Size.PlatformDefault = False
|
||||||
|
inherited ccbStyleBorderColor: TColorComboBox
|
||||||
|
TabOrder = 36
|
||||||
|
end
|
||||||
|
inherited Label42: TLabel
|
||||||
|
TabOrder = 37
|
||||||
|
end
|
||||||
inherited Label44: TLabel
|
inherited Label44: TLabel
|
||||||
TabOrder = 38
|
TabOrder = 38
|
||||||
end
|
end
|
||||||
@@ -139,7 +146,7 @@ object fCreateNotify: TfCreateNotify
|
|||||||
Position.X = 8.000000000000000000
|
Position.X = 8.000000000000000000
|
||||||
Position.Y = 135.000000000000000000
|
Position.Y = 135.000000000000000000
|
||||||
Text = #1057#1086#1073#1099#1090#1080#1077
|
Text = #1057#1086#1073#1099#1090#1080#1077
|
||||||
TabOrder = 59
|
TabOrder = 51
|
||||||
end
|
end
|
||||||
object cbEventsType: TComboBox
|
object cbEventsType: TComboBox
|
||||||
Items.Strings = (
|
Items.Strings = (
|
||||||
@@ -153,17 +160,17 @@ object fCreateNotify: TfCreateNotify
|
|||||||
Size.Width = 192.000000000000000000
|
Size.Width = 192.000000000000000000
|
||||||
Size.Height = 22.000000000000000000
|
Size.Height = 22.000000000000000000
|
||||||
Size.PlatformDefault = False
|
Size.PlatformDefault = False
|
||||||
TabOrder = 60
|
TabOrder = 52
|
||||||
end
|
end
|
||||||
object Label3: TLabel
|
object Label3: TLabel
|
||||||
Position.X = 8.000000000000000000
|
Position.X = 8.000000000000000000
|
||||||
Position.Y = 190.000000000000000000
|
Position.Y = 190.000000000000000000
|
||||||
Text = #1059#1089#1083#1086#1074#1080#1077' '#1089#1091#1084#1084#1099
|
Text = #1059#1089#1083#1086#1074#1080#1077' '#1089#1091#1084#1084#1099
|
||||||
TabOrder = 61
|
TabOrder = 53
|
||||||
end
|
end
|
||||||
object edtIF: TEdit
|
object edtIF: TEdit
|
||||||
Touch.InteractiveGestures = [LongTap, DoubleTap]
|
Touch.InteractiveGestures = [LongTap, DoubleTap]
|
||||||
TabOrder = 62
|
TabOrder = 54
|
||||||
Position.X = 8.000000000000000000
|
Position.X = 8.000000000000000000
|
||||||
Position.Y = 215.000000000000000000
|
Position.Y = 215.000000000000000000
|
||||||
Size.Width = 192.000000000000000000
|
Size.Width = 192.000000000000000000
|
||||||
@@ -217,6 +224,9 @@ object fCreateNotify: TfCreateNotify
|
|||||||
Size.Width = 241.000000000000000000
|
Size.Width = 241.000000000000000000
|
||||||
Size.Height = 115.000000000000000000
|
Size.Height = 115.000000000000000000
|
||||||
Size.PlatformDefault = False
|
Size.PlatformDefault = False
|
||||||
|
inherited Label41: TLabel
|
||||||
|
TabOrder = 6
|
||||||
|
end
|
||||||
inherited Label46: TLabel
|
inherited Label46: TLabel
|
||||||
TabOrder = 39
|
TabOrder = 39
|
||||||
end
|
end
|
||||||
@@ -239,11 +249,8 @@ object fCreateNotify: TfCreateNotify
|
|||||||
Size.Width = 241.000000000000000000
|
Size.Width = 241.000000000000000000
|
||||||
Size.Height = 115.000000000000000000
|
Size.Height = 115.000000000000000000
|
||||||
Size.PlatformDefault = False
|
Size.PlatformDefault = False
|
||||||
inherited ccbFontColor: TColorComboBox
|
inherited Label41: TLabel
|
||||||
TabOrder = 37
|
TabOrder = 6
|
||||||
end
|
|
||||||
inherited Label49: TLabel
|
|
||||||
TabOrder = 36
|
|
||||||
end
|
end
|
||||||
inherited Label46: TLabel
|
inherited Label46: TLabel
|
||||||
TabOrder = 38
|
TabOrder = 38
|
||||||
|
|||||||
+29
-11
@@ -3,7 +3,8 @@ unit uCreateNotify;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants,
|
System.SysUtils, System.Types, System.UITypes, System.Classes,
|
||||||
|
System.Variants,
|
||||||
FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, fFontSettings,
|
FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, fFontSettings,
|
||||||
fColorSettings, FMX.StdCtrls, FMX.Edit, FMX.Controls.Presentation,
|
fColorSettings, FMX.StdCtrls, FMX.Edit, FMX.Controls.Presentation,
|
||||||
FMX.ListBox, FMX.EditBox, FMX.SpinBox, FMX.Colors, uRecords;
|
FMX.ListBox, FMX.EditBox, FMX.SpinBox, FMX.Colors, uRecords;
|
||||||
@@ -36,11 +37,13 @@ type
|
|||||||
edtESMessage: TEdit;
|
edtESMessage: TEdit;
|
||||||
procedure FormCreate(Sender: TObject);
|
procedure FormCreate(Sender: TObject);
|
||||||
procedure btnCreateEventClick(Sender: TObject);
|
procedure btnCreateEventClick(Sender: TObject);
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
private
|
private
|
||||||
{ Private declarations }
|
{ Private declarations }
|
||||||
function GetColorFromColorPanel(aColor: TAlphaColor): string;
|
function GetColorFromColorPanel(aColor: TAlphaColor): string;
|
||||||
public
|
public
|
||||||
{ Public declarations }
|
{ Public declarations }
|
||||||
|
isEdit: boolean;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
var
|
var
|
||||||
@@ -81,18 +84,19 @@ begin
|
|||||||
Picture := edtESImage.Text;
|
Picture := edtESImage.Text;
|
||||||
Sound := edtESSound.Text;
|
Sound := edtESSound.Text;
|
||||||
|
|
||||||
ColorBlock:= GetColorFromColorPanel(frColorSettings1.cpStyleBlockColor.Color);
|
ColorBlock := GetColorFromColorPanel
|
||||||
|
(frColorSettings1.cpStyleBlockColor.Color);
|
||||||
SolidBorder := round(frColorSettings1.sbStyleBlockBorderSize.Value);
|
SolidBorder := round(frColorSettings1.sbStyleBlockBorderSize.Value);
|
||||||
Paddings := round(frColorSettings1.sbStyleBlockPadding.Value);
|
Paddings := round(frColorSettings1.sbStyleBlockPadding.Value);
|
||||||
ColorBorder := frColorSettings1.ccbStyleBorderColor.ItemIndex;
|
ColorBorder := frColorSettings1.ccbStyleBorderColor.ItemIndex;
|
||||||
ColorBackground := frColorSettings1.ccbBColor.ItemIndex;
|
ColorBackground := frColorSettings1.ccbBColor.ItemIndex;
|
||||||
|
|
||||||
HeaderText:=edtESTitle.text;
|
HeaderText := edtESTitle.Text;
|
||||||
HeaderColorFont := frFontSettings2.ccbFontColor.ItemIndex;
|
HeaderColorFont := frFontSettings2.ccbFontColor.ItemIndex;
|
||||||
HeaderSizeFont := round(frFontSettings2.sbFontSize.Value);
|
HeaderSizeFont := round(frFontSettings2.sbFontSize.Value);
|
||||||
HeaderStyleFont := frFontSettings2.cbFontStyleDefault.ItemIndex;
|
HeaderStyleFont := frFontSettings2.cbFontStyleDefault.ItemIndex;
|
||||||
|
|
||||||
MessText:=edtESMessage.text;
|
MessText := edtESMessage.Text;
|
||||||
MessColorFont := frFontSettings3.ccbFontColor.ItemIndex;
|
MessColorFont := frFontSettings3.ccbFontColor.ItemIndex;
|
||||||
MessSizeFont := round(frFontSettings3.sbFontSize.Value);
|
MessSizeFont := round(frFontSettings3.sbFontSize.Value);
|
||||||
MessStyleFont := frFontSettings3.cbFontStyleDefault.ItemIndex;
|
MessStyleFont := frFontSettings3.cbFontStyleDefault.ItemIndex;
|
||||||
@@ -102,7 +106,9 @@ begin
|
|||||||
TypeEdit := edtIF.Text;
|
TypeEdit := edtIF.Text;
|
||||||
Port := round(sbWebServerPort.Value);
|
Port := round(sbWebServerPort.Value);
|
||||||
end;
|
end;
|
||||||
|
if isEdit then
|
||||||
|
TTW_Bot.frOBS1.EdtNotify(OBSNotify)
|
||||||
|
else
|
||||||
TTW_Bot.frOBS1.AddNotify(OBSNotify);
|
TTW_Bot.frOBS1.AddNotify(OBSNotify);
|
||||||
close;
|
close;
|
||||||
end;
|
end;
|
||||||
@@ -114,6 +120,7 @@ var
|
|||||||
c: TComponent;
|
c: TComponent;
|
||||||
ColorStr: string;
|
ColorStr: string;
|
||||||
begin
|
begin
|
||||||
|
isEdit := false;
|
||||||
for i := 0 to frColorSettings1.ComponentCount - 1 do
|
for i := 0 to frColorSettings1.ComponentCount - 1 do
|
||||||
begin
|
begin
|
||||||
c := frColorSettings1.Components[i];
|
c := frColorSettings1.Components[i];
|
||||||
@@ -129,7 +136,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
if c is TSpinBox then
|
if c is TSpinBox then
|
||||||
begin
|
begin
|
||||||
TSpinBox(c).text := DB.ReadSetting(TSpinBox(c).Name, '1');
|
TSpinBox(c).Text := DB.ReadSetting(TSpinBox(c).Name, '1');
|
||||||
end;
|
end;
|
||||||
if c is TColorPanel then
|
if c is TColorPanel then
|
||||||
begin
|
begin
|
||||||
@@ -142,7 +149,7 @@ begin
|
|||||||
if c is TEdit then
|
if c is TEdit then
|
||||||
begin
|
begin
|
||||||
if TEdit(c).Name <> 'edtPortServer' then
|
if TEdit(c).Name <> 'edtPortServer' then
|
||||||
TEdit(c).text := DB.ReadSetting(TEdit(c).Name, '0');
|
TEdit(c).Text := DB.ReadSetting(TEdit(c).Name, '0');
|
||||||
end;
|
end;
|
||||||
if c is TCheckBox then
|
if c is TCheckBox then
|
||||||
begin
|
begin
|
||||||
@@ -164,7 +171,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
if c is TSpinBox then
|
if c is TSpinBox then
|
||||||
begin
|
begin
|
||||||
TSpinBox(c).text := DB.ReadSetting(TSpinBox(c).Name, '1');
|
TSpinBox(c).Text := DB.ReadSetting(TSpinBox(c).Name, '1');
|
||||||
end;
|
end;
|
||||||
if c is TColorPanel then
|
if c is TColorPanel then
|
||||||
begin
|
begin
|
||||||
@@ -177,7 +184,7 @@ begin
|
|||||||
if c is TEdit then
|
if c is TEdit then
|
||||||
begin
|
begin
|
||||||
if TEdit(c).Name <> 'edtPortServer' then
|
if TEdit(c).Name <> 'edtPortServer' then
|
||||||
TEdit(c).text := DB.ReadSetting(TEdit(c).Name, '0');
|
TEdit(c).Text := DB.ReadSetting(TEdit(c).Name, '0');
|
||||||
end;
|
end;
|
||||||
if c is TCheckBox then
|
if c is TCheckBox then
|
||||||
begin
|
begin
|
||||||
@@ -200,7 +207,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
if c is TSpinBox then
|
if c is TSpinBox then
|
||||||
begin
|
begin
|
||||||
TSpinBox(c).text := DB.ReadSetting(TSpinBox(c).Name, '1');
|
TSpinBox(c).Text := DB.ReadSetting(TSpinBox(c).Name, '1');
|
||||||
end;
|
end;
|
||||||
if c is TColorPanel then
|
if c is TColorPanel then
|
||||||
begin
|
begin
|
||||||
@@ -213,7 +220,7 @@ begin
|
|||||||
if c is TEdit then
|
if c is TEdit then
|
||||||
begin
|
begin
|
||||||
if TEdit(c).Name <> 'edtPortServer' then
|
if TEdit(c).Name <> 'edtPortServer' then
|
||||||
TEdit(c).text := DB.ReadSetting(TEdit(c).Name, '0');
|
TEdit(c).Text := DB.ReadSetting(TEdit(c).Name, '0');
|
||||||
end;
|
end;
|
||||||
if c is TCheckBox then
|
if c is TCheckBox then
|
||||||
begin
|
begin
|
||||||
@@ -241,7 +248,18 @@ begin
|
|||||||
until FindNext(SearchRec) <> 0;
|
until FindNext(SearchRec) <> 0;
|
||||||
ChDir('..');
|
ChDir('..');
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfCreateNotify.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if isEdit then
|
||||||
|
begin
|
||||||
|
btnCreateEvent.Text:='Èçìåíèòü îïîâåùåíèå';
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
btnCreateEvent.Text:='Ñîçäàòü îïîâåùåíèå';
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|||||||
Reference in New Issue
Block a user