📄 demomode.mc
字号:
/*-------------------------------------------------------------------------------+
| Copyright(c)1991,Mach N.Dinh-Vu,All Rights Reserved |
| Program : viewonly.mc |
| Revision : 1.0.a |
| UpdateToV8 : MicroStationFan |
+--------------------------------------------------------------------------------+
| Set the file into DEMO mode using the VIEWONLY facilities |
+-------------------------------------------------------------------------------*/
/*-------------------------------------------------------------------------------+
| Include Files |
+-------------------------------------------------------------------------------*/
#include <userfnc.h>
#include <cmdclass.h>
#include <msinput.fdf>
#include <msmisc.fdf>
#include <mssystem.fdf>
#include <msoutput.fdf>
#define TICK 1
#define ASECOND (60*TICK)
#define AMINUTE (60*ASECOND)
#define DEMOPERIOD ( 5*AMINUTE)
Private int timerHandle;
/*--------------------------------------------------------------------------+
| name commandFilter |
+--------------------------------------------------------------------------*/
Private int commandFilter
(
Inputq_element *queueElementP
)
{
switch (queueElementP->u.cmd.commandClass)
{
case VIEWING:
case MEASURE:
case VIEWPARAM:
case VIEWIMMED:
case INPUT:
return INPUT_COMMAND_ACCEPT;
break;
default:
mdlUtil_beep(1);
mdlOutput_error ("WARNING: This is a VIEW only file.");
return INPUT_COMMAND_REJECT;
}
}
/*--------------------------------------------------------------------------+
| name demoExpired |
+--------------------------------------------------------------------------*/
Private void demoExpired (void)
{
mdlSystem_cancelTimer (timerHandle);
mdlSystem_pauseTicks (5*ASECOND);
mdlSystem_closeDesignFile ();
}
/*--------------------------------------------------------------------------+
| name main |
+--------------------------------------------------------------------------*/
Private void main (void)
{
mdlSystem_setTimerFunction (&timerHandle, DEMOPERIOD, demoExpired, 0, TRUE);
mdlInput_setFunction (INPUT_COMMAND_FILTER, commandFilter);
mdlOutput_prompt("file set to VIEW ONLY");
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -