⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 wizards_2.htm

📁 对于学习很有帮助
💻 HTM
📖 第 1 页 / 共 2 页
字号:
&nbsp;&nbsp;&nbsp;&nbsp;function&nbsp;OpenFile(const&nbsp;FileName:&nbsp;string):&nbsp;Boolean;&nbsp;virtual;&nbsp;export;&nbsp;&nbsp;<br>
abstract; &nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;function&nbsp;ReloadFile(const&nbsp;FileName:&nbsp;string):&nbsp;Boolean;&nbsp;virtual;&nbsp;export;&nbsp;&nbsp;<br>
abstract; &nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;function&nbsp;ModalDialogBox(Instance:&nbsp;THandle;&nbsp;TemplateName:&nbsp;PChar;&nbsp;&nbsp;&nbsp;<br>
WndParent:&nbsp;HWnd; &nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;DialogFunc:&nbsp;TFarProc;&nbsp;InitParam:&nbsp;LongInt):&nbsp;Integer;&nbsp;virtual;&nbsp;export;&nbsp;&nbsp;<br>
abstract; &nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;function&nbsp;CreateModule(const&nbsp;ModuleName:&nbsp;string;&nbsp;Source,&nbsp;Form:&nbsp;TIStream; 
&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CreateFlags:&nbsp;TCreateModuleFlags):&nbsp;Boolean;&nbsp;virtual;&nbsp;export;&nbsp;abstract; 
&nbsp;<br>
&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;Project/UI&nbsp;information&nbsp;} &nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;function&nbsp;GetParentHandle:&nbsp;HWND;&nbsp;virtual;&nbsp;export;&nbsp;abstract; 
&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;function&nbsp;GetProjectName:&nbsp;string;&nbsp;virtual;&nbsp;export;&nbsp;abstract; 
&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;function&nbsp;GetUnitCount:&nbsp;Integer;&nbsp;virtual;&nbsp;export;&nbsp;abstract; 
&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;function&nbsp;GetUnitName(Index:&nbsp;Integer):&nbsp;string;&nbsp;virtual;&nbsp;export;&nbsp;abstract; 
&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;function&nbsp;GetFormCount:&nbsp;Integer;&nbsp;virtual;&nbsp;export;&nbsp;abstract; 
&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;function&nbsp;GetFormName(Index:&nbsp;Integer):&nbsp;string;&nbsp;virtual;&nbsp;export;&nbsp;abstract; 
&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;function&nbsp;GetCurrentFile:&nbsp;string;&nbsp;virtual;&nbsp;export;&nbsp;abstract; 
&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;function&nbsp;IsFileOpen(const&nbsp;FileName:&nbsp;string):&nbsp;Boolean;&nbsp;virtual;&nbsp;export;&nbsp;&nbsp;<br>
abstract; &nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;function&nbsp;GetNewModuleName(var&nbsp;UnitIdent,&nbsp;FileName:&nbsp;string):&nbsp;Boolean; 
&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;virtual;&nbsp;export;&nbsp;abstract; 
&nbsp;<br>
&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;Component&nbsp;Library&nbsp;interface&nbsp;} &nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;function&nbsp;GetModuleCount:&nbsp;Integer;&nbsp;virtual;&nbsp;export;&nbsp;abstract; 
&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;function&nbsp;GetModuleName(Index:&nbsp;Integer):&nbsp;string;&nbsp;virtual;&nbsp;export;&nbsp;&nbsp;<br>
abstract; &nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;function&nbsp;GetComponentCount(ModIndex:&nbsp;Integer):&nbsp;Integer;&nbsp;virtual;&nbsp;export;&nbsp;&nbsp;<br>
abstract; &nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;function&nbsp;GetComponentName(ModIndex,CompIndex:&nbsp;Integer):&nbsp;string;&nbsp;virtual;&nbsp;&nbsp;<br>
export;&nbsp;abstract; &nbsp;<br>
&nbsp;<br>
&nbsp;&nbsp;&nbsp;{function&nbsp;InstallModule(const&nbsp;ModuleName:&nbsp;string):&nbsp;Boolean;&nbsp;virtual;&nbsp;&nbsp;<br>
export;&nbsp;abstract; &nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;function&nbsp;CompileLibrary:&nbsp;Boolean;&nbsp;virtual;&nbsp;export;&nbsp;abstract; 
&nbsp;<br>
&nbsp;&nbsp;&nbsp;} &nbsp;<br>
&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;Error&nbsp;handling&nbsp;} &nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;procedure&nbsp;RaiseException(const&nbsp;Message:&nbsp;string);&nbsp;virtual;&nbsp;export;&nbsp;&nbsp;<br>
abstract; &nbsp;<br>
&nbsp;&nbsp;end; &nbsp;<br>
&nbsp;<br>
implementation &nbsp;<br>
&nbsp;<br>
The&nbsp;Tool&nbsp;services&nbsp;object&nbsp;is&nbsp;created&nbsp;on&nbsp;the&nbsp;application&nbsp;(Delphi/C++Builder)&nbsp;&nbsp;<br>
side,&nbsp;and&nbsp;is&nbsp;passed&nbsp;to&nbsp;the&nbsp;VCS/Expert&nbsp;Manager&nbsp;DLL&nbsp;during&nbsp;initialization.&nbsp;Note&nbsp;&nbsp;<br>
that&nbsp;the&nbsp;application&nbsp;(Delphi/C++Builder)&nbsp;is&nbsp;responsible&nbsp;for&nbsp;creating&nbsp;and&nbsp;&nbsp;<br>
freeing&nbsp;the&nbsp;interface&nbsp;object,&nbsp;and&nbsp;the&nbsp;client&nbsp;should&nbsp;never&nbsp;free&nbsp;the&nbsp;interface.&nbsp;&nbsp;<br>
&nbsp;<br>
The&nbsp;following&nbsp;ToolServices&nbsp;functions&nbsp;are&nbsp;available&nbsp;to&nbsp;the&nbsp;client&nbsp;(for&nbsp;Delphi&nbsp;&nbsp;<br>
1.0&nbsp;as&nbsp;well&nbsp;as&nbsp;2.0x&nbsp;and&nbsp;3):&nbsp; &nbsp;<br>
&nbsp;<br>
&nbsp;<br>
Actions&nbsp; &nbsp;<br>
CloseProject &nbsp;<br>
returns&nbsp;True&nbsp;if&nbsp;no&nbsp;project&nbsp;open,&nbsp;or&nbsp;if&nbsp;the&nbsp;currently&nbsp;open&nbsp;project&nbsp;can&nbsp;be&nbsp;&nbsp;<br>
closed.&nbsp; &nbsp;<br>
OpenProject &nbsp;<br>
returns&nbsp;True&nbsp;if&nbsp;the&nbsp;named&nbsp;project&nbsp;can&nbsp;be&nbsp;opened.&nbsp;You&nbsp;have&nbsp;to&nbsp;pass&nbsp;an&nbsp;empty&nbsp;&nbsp;<br>
string&nbsp;to&nbsp;create&nbsp;a&nbsp;new&nbsp;project&nbsp;and&nbsp;main&nbsp;form.&nbsp; 
&nbsp;<br>
OpenProjectInfo &nbsp;<br>
returns&nbsp;True&nbsp;if&nbsp;the&nbsp;named&nbsp;project&nbsp;file&nbsp;can&nbsp;be&nbsp;opened.&nbsp;This&nbsp;routine&nbsp;bypasses&nbsp;&nbsp;<br>
all&nbsp;the&nbsp;normal&nbsp;project&nbsp;load&nbsp;features&nbsp;(such&nbsp;as&nbsp;loading&nbsp;a&nbsp;desktop&nbsp;file,&nbsp;showing&nbsp;&nbsp;<br>
the&nbsp;source&nbsp;code,&nbsp;etc),&nbsp;and&nbsp;simply&nbsp;opens&nbsp;the&nbsp;.DPR&nbsp;and&nbsp;.OPT&nbsp;files.&nbsp; 
&nbsp;<br>
SaveProject &nbsp;<br>
returns&nbsp;True&nbsp;if&nbsp;the&nbsp;project&nbsp;is&nbsp;unmodified,&nbsp;if&nbsp;there&nbsp;is&nbsp;no&nbsp;project&nbsp;open,&nbsp;or&nbsp;if&nbsp;&nbsp;<br>
the&nbsp;open&nbsp;project&nbsp;can&nbsp;be&nbsp;saved.&nbsp; &nbsp;<br>
CloseFile &nbsp;<br>
returns&nbsp;True&nbsp;if&nbsp;the&nbsp;specified&nbsp;file&nbsp;is&nbsp;not&nbsp;currently&nbsp;open,&nbsp;or&nbsp;if&nbsp;it&nbsp;can&nbsp;be&nbsp;&nbsp;<br>
closed.&nbsp; &nbsp;<br>
OpenFile &nbsp;<br>
returns&nbsp;True&nbsp;if&nbsp;the&nbsp;specified&nbsp;file&nbsp;is&nbsp;already&nbsp;open&nbsp;or&nbsp;can&nbsp;be&nbsp;opened.&nbsp; 
&nbsp;<br>
ReloadFile &nbsp;<br>
returns&nbsp;True&nbsp;if&nbsp;the&nbsp;file&nbsp;is&nbsp;already&nbsp;open&nbsp;and&nbsp;was&nbsp;reloaded&nbsp;from&nbsp;disk.&nbsp;(NOTE:&nbsp;&nbsp;<br>
This&nbsp;will&nbsp;not&nbsp;perform&nbsp;any&nbsp;checking&nbsp;of&nbsp;the&nbsp;current&nbsp;editor&nbsp;state).&nbsp; 
&nbsp;<br>
RefreshBuffers &nbsp;<br>
causes&nbsp;the&nbsp;IDE&nbsp;to&nbsp;check&nbsp;the&nbsp;time/date&nbsp;stamp&nbsp;of&nbsp;each&nbsp;open&nbsp;file&nbsp;to&nbsp;determine&nbsp;if&nbsp;&nbsp;<br>
the&nbsp;file&nbsp;has&nbsp;changed&nbsp;on&nbsp;disk.&nbsp;If&nbsp;so,&nbsp;the&nbsp;file&nbsp;is&nbsp;re-read.&nbsp; 
&nbsp;<br>
ModalDialogBox &nbsp;<br>
used&nbsp;by&nbsp;non-VCL&nbsp;DLL's&nbsp;to&nbsp;present&nbsp;a&nbsp;dialog&nbsp;box&nbsp;which&nbsp;is&nbsp;modal.&nbsp;Note&nbsp;that&nbsp;DLLs&nbsp;&nbsp;<br>
written&nbsp;using&nbsp;VCL&nbsp;can&nbsp;simply&nbsp;call&nbsp;a&nbsp;form's&nbsp;ShowModal&nbsp;function.&nbsp; 
&nbsp;<br>
CreateModule &nbsp;<br>
Will&nbsp;create&nbsp;new&nbsp;module&nbsp;from&nbsp;memory&nbsp;images&nbsp;of&nbsp;the&nbsp;source&nbsp;and,&nbsp;optionally,&nbsp;the&nbsp;&nbsp;<br>
form&nbsp;file.&nbsp; &nbsp;<br>
The&nbsp;TCreateModuleFlags&nbsp;are:&nbsp; &nbsp;<br>
cmAddToProject:&nbsp;Add&nbsp;the&nbsp;new&nbsp;module&nbsp;to&nbsp;the&nbsp;currently&nbsp;open&nbsp;project.&nbsp; 
&nbsp;<br>
cmShowSource:&nbsp;Show&nbsp;the&nbsp;source&nbsp;file&nbsp;in&nbsp;the&nbsp;top-most&nbsp;editor&nbsp;window.&nbsp; 
&nbsp;<br>
cmShowForm:&nbsp;If&nbsp;a&nbsp;form&nbsp;is&nbsp;created,&nbsp;show&nbsp;it&nbsp;above&nbsp;the&nbsp;source.&nbsp; 
&nbsp;<br>
cmUnNamed:&nbsp;Will&nbsp;mark&nbsp;the&nbsp;module&nbsp;as&nbsp;unnamed&nbsp;which&nbsp;will&nbsp;cause&nbsp;the&nbsp;SaveAs&nbsp;dialog&nbsp;&nbsp;<br>
to&nbsp;show&nbsp;the&nbsp;first&nbsp;time&nbsp;the&nbsp;user&nbsp;attempts&nbsp;to&nbsp;save&nbsp;the&nbsp;file.&nbsp; 
&nbsp;<br>
cmNewUnit:&nbsp;Creates&nbsp;a&nbsp;new&nbsp;unit&nbsp;and&nbsp;adds&nbsp;it&nbsp;to&nbsp;the&nbsp;current&nbsp;project.&nbsp;NOTE:&nbsp;all&nbsp;&nbsp;<br>
other&nbsp;parameters&nbsp;are&nbsp;ignored.&nbsp; &nbsp;<br>
cmNewForm:&nbsp;Creates&nbsp;a&nbsp;new&nbsp;form&nbsp;and&nbsp;adds&nbsp;it&nbsp;to&nbsp;the&nbsp;current&nbsp;project.&nbsp;NOTE:&nbsp;all&nbsp;&nbsp;<br>
other&nbsp;parameters&nbsp;are&nbsp;ignored.&nbsp; &nbsp;<br>
cmMainForm:&nbsp;If&nbsp;the&nbsp;module&nbsp;includes&nbsp;a&nbsp;form,&nbsp;make&nbsp;it&nbsp;the&nbsp;main&nbsp;form&nbsp;of&nbsp;the&nbsp;&nbsp;<br>
currently&nbsp;open&nbsp;project.&nbsp;Only&nbsp;valid&nbsp;with&nbsp;the&nbsp;cmAddToProject&nbsp;option.&nbsp; 
&nbsp;<br>
cmMarkModified:&nbsp;Will&nbsp;insure&nbsp;that&nbsp;the&nbsp;new&nbsp;module&nbsp;is&nbsp;marked&nbsp;as&nbsp;modified.&nbsp; 
&nbsp;<br>
Informational&nbsp; &nbsp;<br>
&nbsp;<br>
GetParentHandle &nbsp;<br>
returns&nbsp;a&nbsp;HWND&nbsp;which&nbsp;should&nbsp;be&nbsp;used&nbsp;as&nbsp;the&nbsp;parent&nbsp;for&nbsp;windows&nbsp;created&nbsp;by&nbsp;the&nbsp;&nbsp;<br>
client.&nbsp; &nbsp;<br>
GetProjectName &nbsp;<br>
returns&nbsp;a&nbsp;fully&nbsp;qualified&nbsp;path&nbsp;name&nbsp;of&nbsp;the&nbsp;currently&nbsp;open&nbsp;project&nbsp;file,&nbsp;or&nbsp;an&nbsp;&nbsp;<br>
empty&nbsp;string&nbsp;if&nbsp;no&nbsp;project&nbsp;is&nbsp;open.&nbsp; &nbsp;<br>
GetUnitCount &nbsp;<br>
returns&nbsp;the&nbsp;current&nbsp;number&nbsp;of&nbsp;units&nbsp;belonging&nbsp;to&nbsp;the&nbsp;project.&nbsp; 
&nbsp;<br>
GetUnitName &nbsp;<br>
returns&nbsp;a&nbsp;fully&nbsp;qualified&nbsp;name&nbsp;of&nbsp;the&nbsp;specified&nbsp;unit.&nbsp; 
&nbsp;<br>
GetFormCount &nbsp;<br>
returns&nbsp;the&nbsp;current&nbsp;number&nbsp;of&nbsp;forms&nbsp;belonging&nbsp;to&nbsp;the&nbsp;project.&nbsp; 
&nbsp;<br>
GetFormName &nbsp;<br>
returns&nbsp;a&nbsp;fully&nbsp;qualified&nbsp;name&nbsp;of&nbsp;the&nbsp;specified&nbsp;form&nbsp;file.&nbsp; 
&nbsp;<br>
GetCurrentFile &nbsp;<br>
returns&nbsp;a&nbsp;fully&nbsp;qualified&nbsp;name&nbsp;of&nbsp;the&nbsp;current&nbsp;file,&nbsp;which&nbsp;could&nbsp;either&nbsp;be&nbsp;a&nbsp;&nbsp;<br>
form&nbsp;or&nbsp;unit&nbsp;(.PAS).&nbsp;Returns&nbsp;a&nbsp;blank&nbsp;string&nbsp;if&nbsp;no&nbsp;file&nbsp;is&nbsp;currently&nbsp;selected.&nbsp;&nbsp;<br>
&nbsp;<br>
IsFileOpen </p>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -