Difference between revisions of "Sequencers"

From BlackBox Framework Wiki
Jump to navigation Jump to search
Line 5: Line 5:


  TYPE
  TYPE
CloseNotifier = POINTER TO RECORD (Sequencers.Notifier) END;
CloseNotifier = POINTER TO RECORD (Sequencers.Notifier) END;
 
PROCEDURE (n: CloseNotifier) Notify (VAR msg: Sequencers.Message);
PROCEDURE (n: CloseNotifier) Notify (VAR msg: Sequencers.Message);
VAR res: INTEGER;
VAR res: INTEGER;
BEGIN
BEGIN
WITH
WITH
| msg: Sequencers.CloseMsg DO
| msg: Sequencers.CloseMsg DO
Dialog.Beep;
Dialog.Beep;
Dialog.GetOK("#Mondig:ATTENTION: Exit will stop data recording!!! Stop anyway? ", "", "", "", {Dialog.yes, Dialog.no, Dialog.cancel}, res);
Dialog.GetOK("#Mondig:ATTENTION: Exit will stop data recording!!! Stop anyway? ", "", "", "", {Dialog.yes, Dialog.no, Dialog.cancel}, res);
IF ~(res = Dialog.yes) THEN
IF ~(res = Dialog.yes) THEN
msg.sticky := TRUE;
msg.sticky := TRUE;
END;
END;
ELSE
ELSE
END;
END;
END Notify;
END Notify;
 
PROCEDURE MakeSticky*;
PROCEDURE MakeSticky*;
VAR n: CloseNotifier;
VAR n: CloseNotifier;
BEGIN
BEGIN
IF stickyDialog = NIL THEN
IF stickyDialog = NIL THEN
HostWindows.dir.minimized := TRUE;
HostWindows.dir.minimized := TRUE;
HostWindows.dir.minimized := FALSE;
HostWindows.dir.minimized := FALSE;
HostWindows.dir.l := 1100; HostWindows.dir.t := 600;
HostWindows.dir.l := 1100; HostWindows.dir.t := 600;
HostWindows.dir.r := 1400; HostWindows.dir.b := 900;
HostWindows.dir.r := 1400; HostWindows.dir.b := 900;
StdApi.OpenAuxDialog('Mondata/Rsrc/HPM-Tool', '#Mondata:StorageForwarder', stickyDialog);
StdApi.OpenAuxDialog('Mondata/Rsrc/HPM-Tool', '#Mondata:StorageForwarder', stickyDialog);
NEW(n);
NEW(n);
stickyDialog.Domain().GetSequencer()(Sequencers.Sequencer).InstallNotifier(n);
stickyDialog.Domain().GetSequencer()(Sequencers.Sequencer).InstallNotifier(n);
END;
END;
END MakeSticky;
END MakeSticky;

Revision as of 04:06, 18 March 2017


Marco Ciot

TYPE
	CloseNotifier = POINTER TO RECORD (Sequencers.Notifier) END;

	PROCEDURE (n: CloseNotifier) Notify (VAR msg: Sequencers.Message);
	VAR res: INTEGER;
	BEGIN
		WITH
		| msg: Sequencers.CloseMsg DO
			Dialog.Beep;
			Dialog.GetOK("#Mondig:ATTENTION: Exit will stop data recording!!! Stop anyway? ", "", "", "", {Dialog.yes, Dialog.no, Dialog.cancel}, res);
			IF ~(res = Dialog.yes) THEN
				msg.sticky := TRUE;
			END;
		ELSE
		END;
	END Notify;

	PROCEDURE MakeSticky*;
	VAR n: CloseNotifier;
	BEGIN
		IF stickyDialog = NIL THEN
			HostWindows.dir.minimized := TRUE;
			HostWindows.dir.minimized := FALSE;
			HostWindows.dir.l := 1100; HostWindows.dir.t := 600;
			HostWindows.dir.r := 1400; HostWindows.dir.b := 900;
			StdApi.OpenAuxDialog('Mondata/Rsrc/HPM-Tool', '#Mondata:StorageForwarder', stickyDialog);
			NEW(n);
			stickyDialog.Domain().GetSequencer()(Sequencers.Sequencer).InstallNotifier(n);
		END;
	END MakeSticky;