我这边 打开一个新功能的时候 确实可以响应
但是如果在上图中 的 TAB 页切换就不响应了
点击功能树中的'功能'是可以响应的
目前我需要对一个 MainForm 处理 2 个事件, OnEnterForm,OnExitForm
平台是否考虑将这2个事件 做入标准版?
目前我自己的修改方法 :修改 ShowContiner() 过程
procedure TSTANDARDSTYLEMAINFORM.ShowContainer(AContainer: TFuncContainer);
var
OldCurrent: TFuncContainer;
begin
if FCurrentFuncContainer = AContainer then
Exit;
//steven add
//ExitFunc
if FCurrentFuncContainer <> nil then
if FCurrentFuncContainer.FFunc <> nil then
try
ObjectHelper.CallMethod(FCurrentFuncContainer.FFunc.MainForm, 'OnExitForm', []);
except
end;
//end add
{//shl07 IE方式,Business的热键都失效了(200608017979)。}
if AContainer.FFunc <> nil then
UpdateActionLists(AContainer.FFunc.MainForm.ActionLists);
{//2006-8-30}
OldCurrent := FCurrentFuncContainer;
if OldCurrent <> nil then
OldCurrent.MyDisableAlign;
try
if AContainer = nil then
FCurrentFuncContainer := nil
else
begin
if AContainer.Func = nil then
begin
if FClosing then
Exit;
UIRunFunc(TSystemCore.Operator.Context, '', AContainer.FuncURL, '', True, nil, False);
Exit;
end;
// 这样做是为在后面加载好了再切换
AContainer.SendToBack;
AContainer.Show;
AContainer.SetFocus;
//AContainer.Realign; // 这行是否有必要?现在在System登录的功能中有问题。
MergeMainMenu(AContainer.Func.MainForm);
FCurrentFuncContainer := AContainer;
// 这行必须在 FCurrentFuncContainer 赋值之后
ReloadRelevancyNavBar;
ReloadDocRelevancyNavBar; //add by wdx 20060724
ReloadEditLogNavBar;
FCurrentFuncContainer.MyEnableAlign;
CheckTabButton(FCurrentFuncContainer, True);
end;
if OldCurrent <> nil then
begin
FFuncContainerActiveStack.Remove(OldCurrent);
FFuncContainerActiveStack.Add(OldCurrent);
OldCurrent.Hide;
CheckTabButton(OldCurrent, False);
end;
//steven add
//EnterFunc
if AContainer <> nil then
if AContainer.FFunc <> nil then
try
ObjectHelper.CallMethod(AContainer.FFunc.MainForm, 'OnEnterForm', []);
except
end;
//end add
except
if OldCurrent <> nil then
begin
CheckTabButton(OldCurrent, True);
OldCurrent.MyEnableAlign;
end;
raise;
end;
end;
不知道是否妥当? |