|
发表于 2007-2-12 19:21:19
|
显示全部楼层
插一下, ,楼主可以看看系统初始话的这段代码:
procedure TInit.DoRun;
var
lContext: TContext;
lOperator: TOperator;
lClassURL: TBizClassURL;
begin
inherited DoRun;
lClassURL := TBizClassURL.Create;
try
lClassURL.BizURL.URL := 'Biz:\COLLABORATION\TaskServiceFunc.Func';
if BizSys.BizSystem.URLExists(lClassURL.BizURL) then
begin
FCMPlatform := BizSys.BizService.CreateBizObject(lClassURL, Context) as TFunc;
FCMPlatform.Run('');
end
else
FCMPlatform := nil;
finally
lClassURL.Free;
end;
lContext := Context.FindParentContext(BizSys.IL_PERSON);
if lContext <> nil then
lOperator := lContext.Owner as TOperator;
if lOperator <> nil then
TSystemCore.SetOperator(lOperator);
if TSystemCore.Operator = nil then //满足这个条件才执行TSystemCore.Logon方法
begin
FLogoned := InternalLogon;
if not FLogoned then
begin
Terminate;
Exit;
end;
end;
{ 给公共组件库中的当前用户属性赋值 }
TCommonComponentLibrary.UserSystem.CurrentUser := TSystemCore.Operator;
{ 调用系统接口方法创建主窗体 }
MainForm := TSystemCore.SystemInterface.CreateMainForm(Context);
end; |
|