Sequencers
Revision as of 04:07, 18 March 2017 by Ivan denisov (talk | contribs)
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
How to disable the window close
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;