mirror of
https://github.com/paleotronic/microm8-gui.git
synced 2025-02-18 07:31:07 +00:00
confirmation on reboot/profile reboots
This commit is contained in:
parent
5cd1e5ccb8
commit
d7d5a1d45e
@ -10435,7 +10435,7 @@ object GUIForm: TGUIForm
|
||||
end
|
||||
object CheckTimer: TTimer
|
||||
Enabled = False
|
||||
Interval = 125
|
||||
Interval = 50
|
||||
OnTimer = CheckTimerTimer
|
||||
left = 168
|
||||
top = 104
|
||||
|
@ -654,7 +654,7 @@ begin
|
||||
else
|
||||
begin
|
||||
lastFocusLostTime:=Now();
|
||||
StatusBar1.SimpleText:='focus';
|
||||
//StatusBar1.SimpleText:='focus';
|
||||
// send fake mouse button state change
|
||||
SimpleGet( baseUrl + '/api/control/mouse/buttonstate/1' );
|
||||
end;
|
||||
@ -692,7 +692,7 @@ procedure TGUIForm.Image1MouseUp(Sender: TObject; Button: TMouseButton;
|
||||
Shift: TShiftState; X, Y: Integer);
|
||||
var
|
||||
p, q: TPoint;
|
||||
py, bi: integer;
|
||||
py, bi, reply: integer;
|
||||
begin
|
||||
if inPopup then
|
||||
exit;
|
||||
@ -771,7 +771,12 @@ begin
|
||||
end
|
||||
else
|
||||
begin
|
||||
SimpleGet(baseUrl + '/api/control/system/reboot');
|
||||
RepaintWindow;
|
||||
HideM8;
|
||||
reply := Application.MessageBox('Reboot the VM?', 'Reboot', MB_ICONQUESTION + MB_YESNO );
|
||||
if reply = idYes then
|
||||
SimpleGet(baseUrl + '/api/control/system/reboot');
|
||||
ShowM8;
|
||||
end;
|
||||
|
||||
end;
|
||||
@ -1267,23 +1272,50 @@ begin
|
||||
end;
|
||||
|
||||
procedure TGUIForm.miPRFIIeClick(Sender: TObject);
|
||||
var
|
||||
reply: integer;
|
||||
begin
|
||||
SimpleGet( baseUrl+'/api/control/system/profile/set/apple2e' );
|
||||
RepaintWindow;
|
||||
HideM8;
|
||||
reply := Application.MessageBox('Reboot the VM?', 'Reboot', MB_ICONQUESTION + MB_YESNO );
|
||||
if reply = idYes then
|
||||
SimpleGet( baseUrl+'/api/control/system/profile/set/apple2e' );
|
||||
ShowM8;
|
||||
end;
|
||||
|
||||
procedure TGUIForm.miPRFIIeEnhancedClick(Sender: TObject);
|
||||
var
|
||||
reply: integer;
|
||||
begin
|
||||
RepaintWindow;
|
||||
HideM8;
|
||||
reply := Application.MessageBox('Reboot the VM?', 'Reboot', MB_ICONQUESTION + MB_YESNO );
|
||||
if reply = idYes then
|
||||
SimpleGet( baseUrl+'/api/control/system/profile/set/apple2e-en' );
|
||||
ShowM8;
|
||||
|
||||
end;
|
||||
|
||||
procedure TGUIForm.miPRFIIeEnhancedSoftcardClick(Sender: TObject);
|
||||
var
|
||||
reply: integer;
|
||||
begin
|
||||
RepaintWindow;
|
||||
HideM8;
|
||||
reply := Application.MessageBox('Reboot the VM?', 'Reboot', MB_ICONQUESTION + MB_YESNO );
|
||||
if reply = idYes then
|
||||
SimpleGet( baseUrl+'/api/control/system/profile/set/apple2e-en-cpm' );
|
||||
ShowM8;
|
||||
end;
|
||||
|
||||
procedure TGUIForm.miPRFIIplusClick(Sender: TObject);
|
||||
begin
|
||||
SimpleGet( baseUrl+'/api/control/system/profile/set/apple2-plus' );
|
||||
RepaintWindow;
|
||||
HideM8;
|
||||
reply := Application.MessageBox('Reboot the VM?', 'Reboot', MB_ICONQUESTION + MB_YESNO );
|
||||
if reply = idYes then
|
||||
SimpleGet( baseUrl+'/api/control/system/profile/set/apple2-plus' );
|
||||
ShowM8;
|
||||
end;
|
||||
|
||||
procedure TGUIForm.miPrinterPDFClick(Sender: TObject);
|
||||
@ -2470,7 +2502,7 @@ begin
|
||||
SimpleGet( baseUrl + '/api/control/mouse/buttonstate/0' );
|
||||
|
||||
//Application.Restore;
|
||||
StatusBar1.SimpleText := 'trying to focus '+DateTimeToStr(Now);
|
||||
//StatusBar1.SimpleText := 'trying to focus '+DateTimeToStr(Now);
|
||||
Application.BringToFront;
|
||||
{$IFDEF WINDOWS}
|
||||
SetForegroundWindow(Application.MainForm.Handle);
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
46
main.pas
46
main.pas
@ -654,7 +654,7 @@ begin
|
||||
else
|
||||
begin
|
||||
lastFocusLostTime:=Now();
|
||||
StatusBar1.SimpleText:='focus';
|
||||
//StatusBar1.SimpleText:='focus';
|
||||
// send fake mouse button state change
|
||||
SimpleGet( baseUrl + '/api/control/mouse/buttonstate/1' );
|
||||
end;
|
||||
@ -692,7 +692,7 @@ procedure TGUIForm.Image1MouseUp(Sender: TObject; Button: TMouseButton;
|
||||
Shift: TShiftState; X, Y: Integer);
|
||||
var
|
||||
p, q: TPoint;
|
||||
py, bi: integer;
|
||||
py, bi, reply: integer;
|
||||
begin
|
||||
if inPopup then
|
||||
exit;
|
||||
@ -771,7 +771,12 @@ begin
|
||||
end
|
||||
else
|
||||
begin
|
||||
SimpleGet(baseUrl + '/api/control/system/reboot');
|
||||
RepaintWindow;
|
||||
HideM8;
|
||||
reply := Application.MessageBox('Reboot the VM?', 'Reboot', MB_ICONQUESTION + MB_YESNO );
|
||||
if reply = idYes then
|
||||
SimpleGet(baseUrl + '/api/control/system/reboot');
|
||||
ShowM8;
|
||||
end;
|
||||
|
||||
end;
|
||||
@ -1267,23 +1272,52 @@ begin
|
||||
end;
|
||||
|
||||
procedure TGUIForm.miPRFIIeClick(Sender: TObject);
|
||||
var
|
||||
reply: integer;
|
||||
begin
|
||||
SimpleGet( baseUrl+'/api/control/system/profile/set/apple2e' );
|
||||
RepaintWindow;
|
||||
HideM8;
|
||||
reply := Application.MessageBox('Reboot the VM?', 'Reboot', MB_ICONQUESTION + MB_YESNO );
|
||||
if reply = idYes then
|
||||
SimpleGet( baseUrl+'/api/control/system/profile/set/apple2e' );
|
||||
ShowM8;
|
||||
end;
|
||||
|
||||
procedure TGUIForm.miPRFIIeEnhancedClick(Sender: TObject);
|
||||
var
|
||||
reply: integer;
|
||||
begin
|
||||
RepaintWindow;
|
||||
HideM8;
|
||||
reply := Application.MessageBox('Reboot the VM?', 'Reboot', MB_ICONQUESTION + MB_YESNO );
|
||||
if reply = idYes then
|
||||
SimpleGet( baseUrl+'/api/control/system/profile/set/apple2e-en' );
|
||||
ShowM8;
|
||||
|
||||
end;
|
||||
|
||||
procedure TGUIForm.miPRFIIeEnhancedSoftcardClick(Sender: TObject);
|
||||
var
|
||||
reply: integer;
|
||||
begin
|
||||
RepaintWindow;
|
||||
HideM8;
|
||||
reply := Application.MessageBox('Reboot the VM?', 'Reboot', MB_ICONQUESTION + MB_YESNO );
|
||||
if reply = idYes then
|
||||
SimpleGet( baseUrl+'/api/control/system/profile/set/apple2e-en-cpm' );
|
||||
ShowM8;
|
||||
end;
|
||||
|
||||
procedure TGUIForm.miPRFIIplusClick(Sender: TObject);
|
||||
var
|
||||
reply: integer;
|
||||
begin
|
||||
SimpleGet( baseUrl+'/api/control/system/profile/set/apple2-plus' );
|
||||
RepaintWindow;
|
||||
HideM8;
|
||||
reply := Application.MessageBox('Reboot the VM?', 'Reboot', MB_ICONQUESTION + MB_YESNO );
|
||||
if reply = idYes then
|
||||
SimpleGet( baseUrl+'/api/control/system/profile/set/apple2-plus' );
|
||||
ShowM8;
|
||||
end;
|
||||
|
||||
procedure TGUIForm.miPrinterPDFClick(Sender: TObject);
|
||||
@ -2470,7 +2504,7 @@ begin
|
||||
SimpleGet( baseUrl + '/api/control/mouse/buttonstate/0' );
|
||||
|
||||
//Application.Restore;
|
||||
StatusBar1.SimpleText := 'trying to focus '+DateTimeToStr(Now);
|
||||
//StatusBar1.SimpleText := 'trying to focus '+DateTimeToStr(Now);
|
||||
Application.BringToFront;
|
||||
{$IFDEF WINDOWS}
|
||||
SetForegroundWindow(Application.MainForm.Handle);
|
||||
|
Loading…
x
Reference in New Issue
Block a user