paste api
This commit is contained in:
parent
e0cb4b3d75
commit
4bd6263c04
|
@ -6022,6 +6022,13 @@ object GUIForm: TGUIForm
|
|||
OnClick = miINPMMOffClick
|
||||
end
|
||||
end
|
||||
object N12: TMenuItem
|
||||
Caption = '-'
|
||||
end
|
||||
object miPasteText: TMenuItem
|
||||
Caption = 'Paste'
|
||||
OnClick = miPasteTextClick
|
||||
end
|
||||
end
|
||||
object miAudio: TMenuItem
|
||||
Caption = 'Audio'
|
||||
|
|
|
@ -7,6 +7,7 @@ interface
|
|||
uses
|
||||
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, Menus, ComCtrls,
|
||||
ExtCtrls, StdCtrls, fphttpclient, LCLType, Buttons, AsyncProcess, DateUtils,
|
||||
Clipbrd,
|
||||
{$IFDEF WINDOWS}
|
||||
Windows,
|
||||
{$ENDIF}
|
||||
|
@ -21,6 +22,8 @@ type
|
|||
{ TGUIForm }
|
||||
|
||||
TGUIForm = class(TForm)
|
||||
miPasteText: TMenuItem;
|
||||
N12: TMenuItem;
|
||||
N11: TMenuItem;
|
||||
miDisableFocusStealing: TMenuItem;
|
||||
miDisk2WPToggle: TMenuItem;
|
||||
|
@ -405,6 +408,7 @@ type
|
|||
procedure miMonoVoxelsClick(Sender: TObject);
|
||||
procedure miMVOL000Click(Sender: TObject);
|
||||
procedure miOpenFreezeClick(Sender: TObject);
|
||||
procedure miPasteTextClick(Sender: TObject);
|
||||
procedure miPDFTO5sClick(Sender: TObject);
|
||||
procedure miPRFIIeClick(Sender: TObject);
|
||||
procedure miPRFIIeEnhancedClick(Sender: TObject);
|
||||
|
@ -1200,6 +1204,13 @@ begin
|
|||
ShowM8;
|
||||
end;
|
||||
|
||||
procedure TGUIForm.miPasteTextClick(Sender: TObject);
|
||||
var
|
||||
s: string;
|
||||
begin
|
||||
s := ClipBoard.AsText;
|
||||
end;
|
||||
|
||||
procedure TGUIForm.miPDFTO5sClick(Sender: TObject);
|
||||
begin
|
||||
UpdateConfig( 'hardware/init.printer.timeout', TMenuItem(sender).Caption, true );
|
||||
|
@ -1432,7 +1443,7 @@ const
|
|||
begin
|
||||
// SimpleGet(baseUrl + '/api/control/input/meta/key/i/value/'+TMenuItem(Sender).Caption);
|
||||
UpdateConfig( 'video/init.video.scanline', values[StrToInt(TMenuItem(Sender).Caption)], true );
|
||||
UpdateConfig( 'video/init.video.scanlinedisable', '0', false )
|
||||
UpdateConfig( 'video/init.video.scanlinedisable', '0', false );
|
||||
end;
|
||||
|
||||
procedure TGUIForm.miSNDMasterClick(Sender: TObject);
|
||||
|
|
|
@ -6022,6 +6022,13 @@ object GUIForm: TGUIForm
|
|||
OnClick = miINPMMOffClick
|
||||
end
|
||||
end
|
||||
object N12: TMenuItem
|
||||
Caption = '-'
|
||||
end
|
||||
object miPasteText: TMenuItem
|
||||
Caption = 'Paste'
|
||||
OnClick = miPasteTextClick
|
||||
end
|
||||
end
|
||||
object miAudio: TMenuItem
|
||||
Caption = 'Audio'
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
7
main.lfm
7
main.lfm
|
@ -6022,6 +6022,13 @@ object GUIForm: TGUIForm
|
|||
OnClick = miINPMMOffClick
|
||||
end
|
||||
end
|
||||
object N12: TMenuItem
|
||||
Caption = '-'
|
||||
end
|
||||
object miPasteText: TMenuItem
|
||||
Caption = 'Paste'
|
||||
OnClick = miPasteTextClick
|
||||
end
|
||||
end
|
||||
object miAudio: TMenuItem
|
||||
Caption = 'Audio'
|
||||
|
|
16
main.pas
16
main.pas
|
@ -7,6 +7,7 @@ interface
|
|||
uses
|
||||
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, Menus, ComCtrls,
|
||||
ExtCtrls, StdCtrls, fphttpclient, LCLType, Buttons, AsyncProcess, DateUtils,
|
||||
Clipbrd,
|
||||
{$IFDEF WINDOWS}
|
||||
Windows,
|
||||
{$ENDIF}
|
||||
|
@ -21,6 +22,8 @@ type
|
|||
{ TGUIForm }
|
||||
|
||||
TGUIForm = class(TForm)
|
||||
miPasteText: TMenuItem;
|
||||
N12: TMenuItem;
|
||||
N11: TMenuItem;
|
||||
miDisableFocusStealing: TMenuItem;
|
||||
miDisk2WPToggle: TMenuItem;
|
||||
|
@ -405,6 +408,7 @@ type
|
|||
procedure miMonoVoxelsClick(Sender: TObject);
|
||||
procedure miMVOL000Click(Sender: TObject);
|
||||
procedure miOpenFreezeClick(Sender: TObject);
|
||||
procedure miPasteTextClick(Sender: TObject);
|
||||
procedure miPDFTO5sClick(Sender: TObject);
|
||||
procedure miPRFIIeClick(Sender: TObject);
|
||||
procedure miPRFIIeEnhancedClick(Sender: TObject);
|
||||
|
@ -1200,6 +1204,18 @@ begin
|
|||
ShowM8;
|
||||
end;
|
||||
|
||||
procedure TGUIForm.miPasteTextClick(Sender: TObject);
|
||||
var
|
||||
s: string;
|
||||
Respo: TStringStream;
|
||||
begin
|
||||
s := ClipBoard.AsText;
|
||||
if length(s) > 0 then
|
||||
begin
|
||||
SimpleFormPost(baseUrl+'/api/control/paste', s, Respo);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TGUIForm.miPDFTO5sClick(Sender: TObject);
|
||||
begin
|
||||
UpdateConfig( 'hardware/init.printer.timeout', TMenuItem(sender).Caption, true );
|
||||
|
|
Loading…
Reference in New Issue