#include "ActionListCall.h"
#include "Runtime.h"
#include "Gui.h"
#include "Server.h"
/*
unsigned int ActList_0_Call(unsigned char aActList)
{
	if(aActList == 0){
		CommonPanel.GuiLoginIIShow();
		MainMenu.aPanel = &CtlPanelLite;
		//SystemPermission = 2;
		//MainMenu.LoadPermission(SystemPermission);
		return 1;
	}
	if(aActList == 1){
		CommonPanel.GuiLoginIIIShow();
		MainMenu.aPanel = &CtlPanelLite;
		//SystemPermission = 3;
		//MainMenu.LoadPermission(SystemPermission);
		return 1;
	}
	if(aActList == 2){
		MessageBox.Init(0, 36, 800, 406, 0, 0, clMoneyGreen) ;
		MessageBox.SetReturnValue(guiMsgNone, guiMsgOkAndReturn, guiMsgReturn,guiMsgNone);
		MessageBox.SetBtnOkCancel();
		MessageBox.Show();
		MessageBox.DoWait4ExitLogin();
		return 1;
	}	
	return 0;
}
*/

/*
		QueryCfg.Init(0, 36, 800, 406, 0, 0, clNearWhite) ;
		QueryCfg.LoadThisCfg();
		QueryCfg.Show();
		return 1;
		
		QueryCfg.Init(0, 36, 800, 406, 0, 0, clNearWhite) ;
		QueryCfg.LoadNetworkCfg();
		QueryCfg.Show();
		return 1;
		
		//查询联动编程
		LinkageProgram.Init(0, 36, 800, 406, 0, 0, clMoneyGreen);
		LinkageProgram.IsProgram = 0;
		LinkageProgram.aPanel = &CommonPanel;
		LinkageProgram.Show();
		LinkageProgram.InitPanel();
		return 1;
		
		//查询总线盘联动编程
		BusPadLnk.Init(0, 36, 800, 406, 0, 0, clMoneyGreen);
		BusPadLnk.IsProgram =0;
		BusPadLnk.aPanel = &CommonPanel;
		BusPadLnk.Show();
		BusPadLnk.InitPanel();
		return 1;
		
		
		//查询多线盘配置信息
		DirectPadCfg.Init(0, 36, 800, 406, 0, 0, clFrmFace);
		DirectPadCfg.IsProgram =0;
		DirectPadCfg.aPanel = &CommonPanel;
		DirectPadCfg.Show();
		DirectPadCfg.InitPanel();
		return 1;
		
		
		RealTimeData.Init(0, 36, 800, 406, 0, 0, clFrmFace) ;
		RealTimeData.aPanel = &CommonPanel;
		RealTimeData.Show();
		RealTimeData.InitPanel();
		return 1;
*/
unsigned int  ActList_0_Call(unsigned char aActList)
{
	if(aActList == 0){
		HwInf.Init() ;
		HwInf.IList = &ItemList;
		HwInf.Show();
		return 1;		
	}else
	if(aActList ==  1){
		//查询电源信息
		PowerSuplyInf.Init();
		PowerSuplyInf.Show();
		return 1;
	}else
	if(aActList == 2){
		//设置打印机
		PrinterSet.Init();
		PrinterSet.LoadSysCfg();
		PrinterSet.Show();
		PrinterSet.DrawTip();
		return 1;
	}else 
	if(aActList == 3){
		//设置日期时间
		DateTimeCfg.Init() ;
		DateTimeCfg.Show();
		//DateTimeSet.SetEditStart();
		return 1;
	}else
	if(aActList == 4){
		PasswdChange.Init() ;
		PasswdChange.aPanel = &CommonPanel;
		PasswdChange.InitPanel();
		PasswdChange.Show();
		return 1;
	}else
	if(aActList == 5){
		//设置屏保时间
		ScreenSaveCfg.Init();
		ScreenSaveCfg.LoadData();
		ScreenSaveCfg.Show();
		return 1;
	}else
	if(aActList == 6){
		//Set Language
		LanguageCfg.Init();
		LanguageCfg.Show();
		return 1;
	}	
	return 0;
}

unsigned int  ActList_1_Call(unsigned char aActList)
{
	if(aActList == 0){
		QueryMsg.Init(0, 36, 800, 406, 0, 0, clMoneyGreen); 
		QueryMsg.MsgFire = &QueryMessageFire;
		QueryMsg.MsgLinkage = &QueryMsgLinkage;
		QueryMsg.MsgSv = &QueryMsgSv;
		QueryMsg.MsgFault = &QueryMsgFault;
		QueryMsg.MsgOperate = &QueryMsgOperate;
		QueryMsg.LoadData();
		QueryMsg.Show();
		return 1;
	}else
	if(aActList == 1){
		QueryMessageFire.Init(0, 36, 800, 406, 0, 0, clMoneyGreen); 
		QueryMessageFire.LoadData();
		QueryMessageFire.Show();
		return 1;
	}else 
	if(aActList == 2){
		QueryMsgLinkage.Init(0, 36, 800, 406, 0, 0, clMoneyGreen); 
		QueryMsgLinkage.LoadData();
		QueryMsgLinkage.Show();
		return 1;
	}else 
	if(aActList == 3 ){QueryMsgSv.Init(0, 36, 800, 406, 0, 0, clMoneyGreen); 
		QueryMsgSv.LoadData();
		QueryMsgSv.Show();
		return 1;
	}else 
	if(aActList == 4){
		QueryMsgFault.Init(0, 36, 800, 406, 0, 0, clMoneyGreen); 
		QueryMsgFault.LoadData();
		QueryMsgFault.Show();
		return 1;
	}else 
	if(aActList ==   5){ 
		QueryMsgOperate.Init(0, 36, 800, 406, 0, 0, clMoneyGreen); 
		QueryMsgOperate.LoadData();
		QueryMsgOperate.Show();
		return 1;
	}else
	if(aActList == 6){
		PrintInf.Init(0, 36, 800, 406, 0, 0, clNearWhite) ;
		PrintInf.pMsg = &QueryMsg;
		PrintInf.pMsg->InitBackEnd();
		
		PrintInf.pMsg->MsgFire = &QueryMessageFire;
		PrintInf.pMsg->MsgLinkage = &QueryMsgLinkage;
		PrintInf.pMsg->MsgSv = &QueryMsgSv;
		PrintInf.pMsg->MsgFault = &QueryMsgFault;
		PrintInf.pMsg->MsgOperate = &QueryMsgOperate;
		
		PrintInf.pMsg->MsgFire->InitBackEnd();
		PrintInf.pMsg->MsgLinkage->InitBackEnd();
		PrintInf.pMsg->MsgSv->InitBackEnd();
		PrintInf.pMsg->MsgFault->InitBackEnd();
		PrintInf.pMsg->MsgOperate->InitBackEnd();
		
		PrintInf.Show();
		return 1;
	}
	return 0;
}

unsigned int  ActList_2_Call(unsigned char aActList)
{
	if(aActList == 0){	
		//设置工程名称
		ProjectSet.Init();
		ProjectSet.pDpt = &DesignPrmSet;
		ProjectSet.aPanel = &CommonPanel;
		ProjectSet.Show();
		ProjectSet.pDpt->Init();
		ProjectSet.ShowDesignedCount();
		return 1;
	}else
	if(aActList ==  1){
		Maintain.Init() ;
		Maintain.aPanel = &CommonPanel;
		Maintain.InitPanel();
		Maintain.Show();
		Maintain.LoadData();
		return 1;
	}else
	if(aActList == 2){
		//设置运行模式
		RunModeCfg.Init() ;
		RunModeCfg.aPanel = &CommonPanel;
		RunModeCfg.InitPanel();
		RunModeCfg.Show();
		RunModeCfg.LoadData();
		return 1;
	}else
	if(aActList == 3){
		DevAuthorize.Init() ;
		DevAuthorize.aPanel = &CommonPanel;
		DevAuthorize.Show();
		DevAuthorize.InitPanel();
		DevAuthorize.LoadData();
		return 1;
	}else 
	if(aActList == 4){
		//设计数量
		DesignPrmSet.Init() ;
		DesignPrmSet.IconList = &ImageList;
		DesignPrmSet.aPanel = &CommonPanel;
		DesignPrmSet.LoadBaseTypeList();
		DesignPrmSet.Show();
		DesignPrmSet.InitPanel();
		return 1;
	}else
	if(aActList == 5){
		DevOutputCfg.Init();
		DevOutputCfg.IList = &ItemList;
		DevOutputCfg.KeepOnMeJustEnter = KeepInUiJustEnter;
		DevOutputCfg.KeepUiOnMe = KeepInUiOperating;
		DevOutputCfg.Show();
		return 1;
	}else
	if(aActList == 6){
		DevSensitiveCfg.Init();
		DevSensitiveCfg.IList = &ItemList;
		DevSensitiveCfg.KeepOnMeJustEnter = KeepInUiJustEnter;
		DevSensitiveCfg.KeepUiOnMe = KeepInUiOperating;
		DevSensitiveCfg.Show();
		return 1;
	}else
	if(aActList == 7){
		DevVaCfg.Init();
		DevVaCfg.IList = &ItemList;
		DevVaCfg.KeepOnMeJustEnter = KeepInUiJustEnter;
		DevVaCfg.KeepUiOnMe = KeepInUiOperating;
		DevVaCfg.Show();
		return 1;
	}else
	if(aActList == 8){
		DisplayPadDescpDownload.pPanel = &CommonPanel;
		DisplayPadDescpDownload.Show();
		return 1;
	}
	return 0;
}

unsigned int  ActList_3_Call(unsigned char aActList)
{
	if(aActList == 0){
		ListViewDevice.Init();
		ListViewDevice.ClearPath();
		ListViewDevice.ViewPath = 0;
		ListViewDevice.LoadPath0();
		ListViewDevice.LoadPath0Item();
		ListViewDevice.aPanel = &CommonPanel;
		ListViewDevice.IList = &ItemList;
		ListViewDevice.DevProperty = &DevProperty;
		ListViewDevice.Show();
		return 1;
	}else
	if(aActList == 1){
		LiteIconOverViewDev.Init(0, 36, 800, 406, 0, 0, clNearWhite);
		LiteIconOverViewDev.SetIconPosition();
		LiteIconOverViewDev.ClearPath();
		LiteIconOverViewDev.LoadPath0();
		LiteIconOverViewDev.ViewPath = 0;
		LiteIconOverViewDev.Show();
		return 1;
	}else
	if(aActList == 2){
		DevProperty.Init(TDevProperty::htNoType, 0);
		DevProperty.aPanel = &CommonPanel;
		DevProperty.IList = &ItemList;
		DevProperty.IList->RealtimeData.Reset();
		DevProperty.IList->TextOutClear();
		DevProperty.SetPath(MainCtl.fData.Split.MyNum, 1, 1);
		DevProperty.Show();
		DevProperty.Init4DType();
		DevProperty.DrawCommonInfTitle();
		DevProperty.RenewCommonInf();
		
		//CircuitCfg.Init(0, 36, 800, 406, 0, 0, clMoneyGreen) ;
		//CircuitCfg.aPanel = &CommonPanel;
		//CircuitCfg.Show();
		//CircuitCfg.InitPanel();
		return 1;
	}else
	if(aActList == 3){
		DevStartStop.Init(TDevProperty::htNoType, 0) ;
		DevStartStop.aPanel = &CommonPanel;
		DevStartStop.IList = &ItemList;
		DevStartStop.IList->RealtimeData.Reset();
		DevStartStop.IList->TextOutClear();
		DevStartStop.SetPath(MainCtl.fData.Split.MyNum, 1, 1);
		DevStartStop.Show();
		DevStartStop.Init4DType();
		DevStartStop.DrawCommonInfTitle();
		DevStartStop.RenewCommonInf();
		return 1;
	}else
	if(aActList == 4){
		//回路设备自动注册
		Register.Init() ;
		Register.IList = &ItemList;
		Register.aMc = &MainCtlReg;
		Register.Show();
		//Register.aMc->Init();
		return 1;
	}else
	if(aActList == 5){
		//回路设备手动注册
		RegisterManual.Init() ;
		RegisterManual.IList = &ItemList;
		RegisterManual.Show();
		return 1;
	}else
	if(aActList == 6){
		//设置设备屏蔽
		DevMask.Init();
		DevMask.IList = &ItemList;
		DevMask.Show();
		return 1;
	}else
	if(aActList == 7){
		DuplicateCheck.Init() ;
		DuplicateCheck.KeepOnMeJustEnter = KeepInUiJustEnter;
		DuplicateCheck.KeepUiOnMe = KeepInUiOperating;
		DuplicateCheck.Show();
		return 1;
	}else
	if(aActList == 8){
		DevCount.Init();
		DevCount.Show();
		return 1;
	}
	if(aActList == 9){
		//注释设置
		DescpWrite.Init();
		DescpWrite.aPanel = &CommonPanel;
		DescpWrite.IList = &ItemList;
		DescpWrite.IList->RealtimeData.Reset();
		DescpWrite.IList->TextOutClear();
		DescpWrite.Show();
		return 1;
	}
	
	return 0;
}

unsigned int  ActList_4_Call(unsigned char aActList)
{
	if(aActList == 0){
		PadInf.Init();
		PadInf.BusPad = &BusPadLnk;
		PadInf.DirectPad = &DirectPadCfg;
		PadInf.LoadItem();
		PadInf.Show();
		return 1;
	}else
	if(aActList == 1){
		//设置多线盘
		DirectPadCfg.Init(0);
		DirectPadCfg.aPanel = &CommonPanel;
		DirectPadCfg.IList = &ItemList;
		DirectPadCfg.Show();
		DirectPadCfg.SetPath(0,1,1);
		return 1;
	}else
	if(aActList == 2){
		//设置总线盘联动编程
		BusPadLnk.Init(0);
		BusPadLnk.aPanel = &CommonPanel;
		BusPadLnk.IList = &ItemList;
		BusPadLnk.Show();
		BusPadLnk.SetPath(0,1,1);
		return 1;
	}	
	return 0;
}


unsigned int ActList_5_Call(unsigned char aActList)
{
	if(aActList == 0){
		//设置联动编程
		LinkageList.Init();
		LinkageList.Show();
		return 1;
	}else
	if(aActList == 1){
		//设置联动编程
		LinkageProgram.Init();
		LinkageProgram.EnterMethod = 0;
		LinkageProgram.Show();
		//LinkageProgram.DrawTip();
		LinkageProgram.InitPanel();
		return 1;
	}else
	if(aActList == 2){
		//声光与广播交替
		BroadcastCfg.Init();
		BroadcastCfg.IList = &ItemList;
		BroadcastCfg.Show();
		BroadcastCfg.InitPanel();
		return 1;
	}else
	if(aActList == 3){
		//允许与禁止
		Allow.Init(0, 36, 800, 406, 0, 0, clNearWhite);
		Allow.IList = &ItemList;
		Allow.Show();
		Allow.InitPanel();
		return 1;
	}else
	if(aActList == 4){
		return 0;
		//FECBus
		LnkFecBusCfg.Init() ;
		LnkFecBusCfg.Show();
		LnkFecBusCfg.InitPanel();
		return 1;
	}else
	if(aActList == 5){
		//Area Assign
		AreaCfg.Init();
		AreaCfg.IList = &ItemList;
		AreaCfg.aPanel = &CommonPanel;
		AreaCfg.Show();
		AreaCfg.LoadData();
		return 1;
		//清除组网机器
		//PowerSuplyCfg.Init(0, 36, 800, 406, 0, 0, clMoneyGreen) ;
		//PowerSuplyCfg.aPanel = &CommonPanel;
		//PowerSuplyCfg.Show();
		//PowerSuplyCfg.InitPanel();
		//return 1;
	}else
	if(aActList == 6){
		//用户码设置
		//DeviceSetup.Init(0, 36, 800, 406, 0, 0, clMoneyGreen);
		//DeviceSetup.aPanel = &CommonPanel;
		//DeviceSetup.Show();
		//DeviceSetup.InitPanel();
		UserCodeSet.Init();
		UserCodeSet.IList = &ItemList;
		UserCodeSet.aPanel = &CommonPanel;
		UserCodeSet.Show();
		UserCodeSet.LoadData();
		return 1;
	}else
	if(aActList == 7){
		UserCodeSetByArea.Init();
		UserCodeSetByArea.IList = &ItemList;
		UserCodeSetByArea.aPanel = &CommonPanel;
		UserCodeSetByArea.Show();
		UserCodeSetByArea.LoadData();
		return 1;
	}
	
	return 0;
}

unsigned int ActList_6_Call(unsigned char aActList)
{
	if(aActList == 0){
		//ECanNetwork.Init(0, 36, 800, 406, 0, 0, clMoneyGreen) ;
		//ECanNetwork.LoadSysCfg();
		//ECanNetwork.Show();
		//ECanNetwork.aPanel = &CommonPanel;
		//ECanNetwork.InitPanel();
		//ECanNetwork.DrawAllItems();
		CanNetworkInf.Init();
		CanNetworkInf.Show();
		return 1;
	}
	if(aActList == 1){
		//组网机器自动注册
		//fNetworkReg.Init(0, 36, 800, 406, 0, 0, clMoneyGreen) ;
		//fNetworkReg.aPanel = &CommonPanel;
		//fNetworkReg.Show();
		//fNetworkReg.InitPanel();
		CanNetworkRegister.Init();
		CanNetworkRegister.IList = &ItemList;
		CanNetworkRegister.Show();
		return 1;
	}
	if(aActList == 2){
		CanNetworkMask.Init();
		CanNetworkMask.IList = &ItemList;
		CanNetworkMask.Show();
		return 1;
	}
	if(aActList == 3){
		//图形显示装置配置
		GraphDevCfg.Init();
		GraphDevCfg.IList = &ItemList;
		GraphDevCfg.Show();
		return 1;
	}	
	return 0;
}

unsigned int ActList_7_Call(unsigned char aActList)
{
	if(aActList == 0){
		//在线系统安装调试
		OnlineCtrl.Init();
		OnlineCtrl.Show();
		return 1;
	}else
	if(aActList == 1){
		//U盘
		uInportExport.Init() ;
		uInportExport.Show();
		return 1;
	}else
	if(aActList == 2){
		BlueTooth.Init() ;
		BlueTooth.Show();
		return 1;
	}else
	if(aActList == 3){
		//AuthorizeState.Init(0, 36, 800, 406, 0, 0, clMoneyGreen) ;
		//AuthorizeState.Show();
		//return 1;
		WifiConn.Init() ;
		WifiConn.Show();
		return 1;
	}else
	if(aActList == 4){
		//aBefore.Init(0, 36, 800, 406, 0, 0, clMoneyGreen) ;
		//aBefore.aPanel = &CommonPanel;
		//aBefore.Show();
		//aBefore.InitPanel();
		//return 1;
		TransmiteDev.Init();
		TransmiteDev.Show();
		return 1;
	}else
	if(aActList == 5){
		FwUpgrade.Init() ;
		FwUpgrade.Show();
		return 1;
	}
	return 0;
}

unsigned int ActList_8_Call(unsigned char aActList)
{
	if(aActList == 0){
		ClearRegistedInf.Init() ;
		ClearRegistedInf.sIList = &ItemList;
		ClearRegistedInf.Show();
		return 1;
	}else
	if(aActList == 1){
		ClearLinkageCfg.Init();
		ClearLinkageCfg.sIList = &ItemList;
		ClearLinkageCfg.Show();
		return 1;
	}else
	if(aActList == 2){
		ClearDescp.Init();
		ClearDescp.Show();
		return 1;
	}else
	if(aActList == 3){
		RecoverAll.Init();
		RecoverAll.DoRecover = SysDoRecover;
		RecoverAll.Show();
		return 1;
	}else
	if(aActList == 4){
		
	}		
	return 0;
}

unsigned int ActList_9_Call(unsigned char aActList)
{
	if(aActList == 0){
		AboutUs.Init(0, 36, 800, 406, 0, 0, clMoneyGreen) ;
		AboutUs.Show();
		return 1;
	}
	if(aActList == 1){
		
	}
	if(aActList == 2){

	}
	if(aActList == 3){

	}	
	return 0;
}

//_________________________________________________________________________________________
/*/
TGuiMsgReturn ActList_0_ToDo(unsigned char aKey)
{
	TGuiMsgReturn aGMR = guiMsgNone;
	
	if(ActList_0 == 0){
		aGMR = CommonPanel.GuiLoginII_KeyIn(aKey);
		CommonPanel.Edit[0].Show();
		if(aGMR == guiMsgOkAndReturn){
			SystemPermission = 2;
			MainMenu.LoadPermission(SystemPermission);
			aGMR = guiMsgReturn;
		}
	}else
	if(ActList_0 == 1){
		aGMR = CommonPanel.GuiLoginIII_KeyIn(aKey);
		CommonPanel.Edit[0].Show();
		if(aGMR == guiMsgOkAndReturn){
			SystemPermission = 3;
			MainMenu.LoadPermission(SystemPermission);
			aGMR = guiMsgReturn;
		}
	}else
	if(ActList_0 == 2){
		aGMR = MessageBox.KeyIn(aKey);
		if(aGMR == guiMsgOkAndReturn){
			SystemPermission = 1;
			MainMenu.LoadPermission(SystemPermission);
			aGMR = guiMsgReturn;
		}
	}
	return aGMR;
}
*/
/*

		//回路设备运行电压
		aGMR = RootDevVoltage.KeyIn(aKey);

		aGMR = RealTimeData.KeyIn(aKey);

		//探测器模拟曲线
		aGMR = DetectorCurve.KeyIn(aKey);
		
		
				aGMR = SimRun.KeyIn(aKey);
		
		
		
		
		//楼层显示
		aGMR = DisplayPadCfg.KeyIn(aKey);
		
		
		
		
		//查询注释
		aGMR = DescpWrite.KeyIn(aKey);
		//aGMR = UserSet.KeyIn(aKey);
		
		
		//查询本机配置
		aGMR = QueryCfg.KeyIn(aKey);
		
			
		//查询网络配置
		aGMR = QueryCfg.KeyIn(aKey);
		
		aGMR = aBefore.KeyIn(aKey);
		aGMR = AuthorizeState.KeyIn(aKey);
*/

TGuiMsgReturn ActList_0_ToDo(unsigned char aKey)
{
	TGuiMsgReturn aGMR = guiMsgNone;
	if(ActList_0 == 0){
		aGMR = HwInf.KeyIn(aKey);
	}else
	if(ActList_0 == 1){
		aGMR = PowerSuplyInf.KeyIn(aKey);
	}else
	if(ActList_0 == 2){
		//设置打印机
		//设置打印事件
		aGMR = PrinterSet.KeyIn(aKey);
	}else 
	if(ActList_0 == 3){
		aGMR = DateTimeCfg.KeyIn(aKey);
	}else
	if(ActList_0 == 4){
		aGMR = PasswdChange.KeyIn(aKey);	
	}else
	if(ActList_0 == 5){
		//设置屏保时间
		aGMR = ScreenSaveCfg.KeyIn(aKey);
	}else
	if(ActList_0 == 6){
		//Language
		aGMR = LanguageCfg.KeyIn(aKey);
	}
	return aGMR;	
}

TGuiMsgReturn ActList_1_ToDo(unsigned char aKey)
{
	TGuiMsgReturn aGMR = guiMsgNone;
	if(ActList_1 == 0){
		aGMR = QueryMsg.KeyIn(aKey);
	}else
	if(ActList_1 ==  1){
		aGMR = QueryMessageFire.KeyIn(aKey);
	}else
	if(ActList_1 == 2){
		aGMR = QueryMsgLinkage.KeyIn(aKey); 
	}else
	if(ActList_1 == 3){ 
		aGMR = QueryMsgSv.KeyIn(aKey); 
	}else 
	if(ActList_1 == 4){
		aGMR = QueryMsgFault.KeyIn(aKey);
	}else
	if(ActList_1 == 5){
		aGMR = QueryMsgOperate.KeyIn(aKey); 
	}else
	if(ActList_1 == 6){
		aGMR = PrintInf.KeyIn(aKey);
	}
	return aGMR;	
}

TGuiMsgReturn ActList_2_ToDo(unsigned char aKey)
{
	TGuiMsgReturn aGMR = guiMsgNone;
	if(ActList_2 == 0){
		//设置工程
		aGMR = ProjectSet.KeyIn(aKey);
	}else
	if(ActList_2 ==  1){
		aGMR = Maintain.KeyIn(aKey);
	}else
	if(ActList_2 == 2){
		//设置运行模式
		aGMR = RunModeCfg.KeyIn(aKey);
	}else
	if(ActList_2 == 3){
		aGMR = DevAuthorize.KeyIn(aKey);
	}else 
	if(ActList_2 == 4){
		aGMR = DesignPrmSet.KeyIn(aKey);
	}else
	if(ActList_2 == 5){
		aGMR = DevOutputCfg.KeyIn(aKey);
	}else
	if(ActList_2 == 6){
		aGMR = DevSensitiveCfg.KeyIn(aKey);
	}else
	if(ActList_2 == 7){
		aGMR = DevVaCfg.KeyIn(aKey);
	}else
	if(ActList_2 == 8){
		aGMR = DisplayPadDescpDownload.KeyIn(aKey);
	}
	
	return aGMR;	
}

TGuiMsgReturn ActList_3_ToDo(unsigned char aKey)
{
	TGuiMsgReturn aGMR = guiMsgNone;
	if(ActList_3 == 0){
		aGMR = ListViewDevice.KeyIn(aKey);
	}else
	if(ActList_3 == 1){
		aGMR = LiteIconOverViewDev.KeyIn(aKey);	
	}else
	if(ActList_3 == 2){
		//回路设备在线配置
		aGMR = DevProperty.KeyIn(aKey);
		//aGMR = CircuitCfg.KeyIn(aKey);
	}else
	if(ActList_3 == 3){
		aGMR = DevStartStop.KeyIn(aKey);
	}else 
	if(ActList_3 == 4){
		aGMR = Register.KeyIn(aKey);
	}else
	if(ActList_3 == 5){
		aGMR = RegisterManual.KeyIn(aKey);
	}else
	if(ActList_3 == 6){
		aGMR = DevMask.KeyIn(aKey);
	}else
	if(ActList_3 == 7){
		//回路重号检测
		aGMR = DuplicateCheck.KeyIn(aKey);
	}else
	if(ActList_3 == 8){
		aGMR = DevCount.KeyIn(aKey);
	}else
	if(ActList_3 == 9){
		aGMR = DescpWrite.KeyIn(aKey);
	}
	return aGMR;	
}

TGuiMsgReturn ActList_4_ToDo(unsigned char aKey)
{
	TGuiMsgReturn aGMR = guiMsgNone;
	if(ActList_4 == 0){
		aGMR = PadInf.KeyIn(aKey);
	}else
	if(ActList_4 == 1){
		aGMR = DirectPadCfg.KeyIn(aKey);
	}else
	if(ActList_4 == 2){
		aGMR = BusPadLnk.KeyIn(aKey);
	}
	return aGMR;	
}



TGuiMsgReturn ActList_5_ToDo(unsigned char aKey)
{
	TGuiMsgReturn aGMR = guiMsgNone;
	if(ActList_5 == 0){
		//查询联动编程
		aGMR = LinkageList.KeyIn(aKey);
	}else
	if(ActList_5 ==  1){
		//联动编程
		aGMR = LinkageProgram.KeyIn(aKey);
	}else
	if(ActList_5 == 2){
		//声光与广播交替
		aGMR = BroadcastCfg.KeyIn(aKey);
	}else
	if(ActList_5 == 3){
		//允许与禁止
		aGMR = Allow.KeyIn(aKey);
	}else 
	if(ActList_5 == 4){
		aGMR = LnkFecBusCfg.KeyIn(aKey);
	}else
	if(ActList_5 == 5){
		aGMR = AreaCfg.KeyIn(aKey);
	}else
	if(ActList_5 == 6){
		//aGMR = DeviceSetup.KeyIn(aKey);
		//aGMR = uInportExport.KeyIn(aKey);
		aGMR = UserCodeSet.KeyIn(aKey);
	}else
	if(ActList_5 == 7){
		//aGMR = DeviceSetup.KeyIn(aKey);
		//aGMR = uInportExport.KeyIn(aKey);
		aGMR = UserCodeSetByArea.KeyIn(aKey);
	}else
	if(ActList_5 == 8){
		//清除处理
		aGMR = CleanUp.KeyIn(aKey);
	}
	return aGMR;	
}

TGuiMsgReturn ActList_6_ToDo(unsigned char aKey)
{
	TGuiMsgReturn aGMR = guiMsgNone;
	if(ActList_6 == 0){
		//aGMR = ECanNetwork.KeyIn(aKey);
		aGMR = CanNetworkInf.KeyIn(aKey);
	}else
	if(ActList_6 == 1){
		aGMR = CanNetworkRegister.KeyIn(aKey);
	}else
	if(ActList_6 == 2){
		aGMR = CanNetworkMask.KeyIn(aKey);
	}else
	if(ActList_6 == 3){
		aGMR = GraphDevCfg.KeyIn(aKey);
	}
	return aGMR;	
}

TGuiMsgReturn ActList_7_ToDo(unsigned char aKey)
{
	TGuiMsgReturn aGMR = guiMsgNone;
	if(ActList_7 == 0){
		aGMR = OnlineCtrl.KeyIn(aKey);
	}else
	if(ActList_7 == 1){
		aGMR = uInportExport.KeyIn(aKey);
	}else
	if(ActList_7 == 2){
		aGMR = BlueTooth.KeyIn(aKey);
	}else
	if(ActList_7 == 3){
		aGMR = WifiConn.KeyIn(aKey);
	}else
	if(ActList_7 == 4){
		aGMR = TransmiteDev.KeyIn(aKey);
	}else
	if(ActList_7 == 5){
		aGMR = FwUpgrade.KeyIn(aKey);
	}
	return aGMR;	
}

TGuiMsgReturn ActList_8_ToDo(unsigned char aKey)
{
	TGuiMsgReturn aGMR = guiMsgNone;
	
	if(ActList_8 == 0){
		aGMR = ClearRegistedInf.KeyIn(aKey);
	}else
	if(ActList_8 == 1){
		aGMR = ClearLinkageCfg.KeyIn(aKey);
	}else
	if(ActList_8 == 2){
		aGMR = ClearDescp.KeyIn(aKey);
	}else
	if(ActList_8 == 3){
		aGMR = RecoverAll.KeyIn(aKey);
	}else
	if(ActList_8 == 4){
		//aGMR = ClearRegistedInf.KeyIn(aKey);
	}
	return aGMR;	
}


TGuiMsgReturn ActList_9_ToDo(unsigned char aKey)
{
	TGuiMsgReturn aGMR = guiMsgNone;
	
	if(ActList_9 == 0){

	}else
	if(ActList_9 == 1){
			
	}else
	if(ActList_9 == 2){
			
	}else
	if(ActList_9 == 3){
			
	}
	return aGMR;	
}

/*


		//探测器模拟曲线
		aRb = DetectorCurve.ExtRequst(Prm);

		aRb = RealTimeData.ExtRequst(Prm);

		
		


		


		//查询注释
		aRb = DescpWrite.ExtRequst(Prm);


		


		//楼层显示
		aRb = DisplayPadCfg.ExtRequst(Prm);
		
		
		


		//查询本机配置
		aRb = QueryCfg.ExtRequst(Prm);
		
		//查询网络配置
		aRb = QueryCfg.ExtRequst(Prm);
		
		aRb = AuthorizeState.ExtRequst(Prm);
		aRb = aBefore.ExtRequst(Prm);
*/

int ActList_0_CallBack(unsigned char Prm)
{
	int aRb = -1;
	if(ActList_0 == 0){
		aRb = HwInf.ExtRequst(Prm);
	}else
	if(ActList_0 == 1){
		aRb = PowerSuplyInf.ExtRequst(Prm);
	}else
	if(ActList_0 == 2){
		//设置打印机
		//设置打印事件
		aRb = PrinterSet.ExtRequst(Prm);
	}else 
	if(ActList_0 == 3){
		aRb = DateTimeCfg.ExtRequst(Prm);
	}else
	if(ActList_0 == 4){
		aRb = PasswdChange.ExtRequst(Prm);
	}else
	if(ActList_0 == 5){
		//设置屏保时间
		aRb = ScreenSaveCfg.ExtRequst(Prm);
	}else
	if(ActList_0 == 6){
		aRb = LanguageCfg.ExtRequst(Prm);
	}
	return aRb;	
}

int ActList_1_CallBack(unsigned char Prm)
{
	int aRb = -1;
	if(ActList_1 == 0){
		aRb = QueryMsg.ExtRequst(Prm);
	}else
	if(ActList_1 ==  1){
		aRb = QueryMessageFire.ExtRequst(Prm);
	}else
	if(ActList_1 == 2){
		aRb = QueryMsgLinkage.ExtRequst(Prm); 
	}else
	if(ActList_1 == 3){
		aRb = QueryMsgSv.ExtRequst(Prm); 
	}else 
	if(ActList_1 == 4){
		aRb = QueryMsgFault.ExtRequst(Prm); 
	}else
	if(ActList_1 == 5){
		aRb = QueryMsgOperate.ExtRequst(Prm); 
	}else
	if(ActList_1 == 6){
		aRb = PrintInf.ExtRequst(Prm);
	}
	return aRb;	
}

int ActList_2_CallBack(unsigned char Prm)
{
	int aRb =-1;
	if(ActList_2 == 0){
		//设置工程
		aRb = ProjectSet.ExtRequst(Prm);
	}else
	if(ActList_2 ==  1){
		aRb = Maintain.ExtRequst(Prm);
	}else
	if(ActList_2 == 2){
		aRb = RunModeCfg.ExtRequst(Prm);
	}else
	if(ActList_2 == 3){
		
		aRb = DevAuthorize.ExtRequst(Prm);
	}else 
	if(ActList_2 == 4){
		aRb = DesignPrmSet.ExtRequst(Prm);
	}else
	if(ActList_2 == 5){
		aRb = DevOutputCfg.ExtRequst(Prm);
	}else
	if(ActList_2 == 6){
		aRb = DevSensitiveCfg.ExtRequst(Prm);
	}else
	if(ActList_2 == 7){
		aRb = DevVaCfg.ExtRequst(Prm);
	}else
	if(ActList_2 == 8){
		aRb = DisplayPadDescpDownload.ExtRequst(Prm);
	}
	
	
	return aRb;	
}

//		aRb = SimRun.ExtRequst(Prm);
//		//设备地址变更
		//aRb = AddrAssign.ExtRequst(Prm);
//
		//回路设备运行电压
		//aRb = RootDevVoltage.ExtRequst(Prm);

int ActList_3_CallBack(unsigned char Prm)
{
	int aRb = -1;
	if(ActList_3 == 0){
		aRb = ListViewDevice.ExtRequst(Prm);
	}else
	if(ActList_3 == 1){
		aRb = LiteIconOverViewDev.ExtRequst(Prm);
	}else
	if(ActList_3 == 2){
		//回路设备在线配置
		aRb = DevProperty.ExtRequst(Prm);
		//aRb = CircuitCfg.ExtRequst(Prm);
	}else
	if(ActList_3 == 3){
		aRb = DevStartStop.ExtRequst(Prm);
	}else 
	if(ActList_3 == 4){
		aRb = Register.ExtRequst(Prm);
	}else
	if(ActList_3 == 5){
		aRb = RegisterManual.ExtRequst(Prm);
	}else
	if(ActList_3 == 6){
		aRb = DevMask.ExtRequst(Prm);
	}else
	if(ActList_3 == 7){
		//回路重号检测
		aRb = DuplicateCheck.ExtRequst(Prm);
	}else
	if(ActList_3 == 8){
		aRb = DevCount.ExtRequst(Prm);
	}else
	if(ActList_3 == 9){
		aRb = DescpWrite.ExtRequst(Prm);
	}
	return aRb;	
}

int ActList_4_CallBack(unsigned char Prm)
{
	int aRb = -1;
	if(ActList_4 == 0){
		aRb = PadInf.ExtRequst(Prm);
	}else
	if(ActList_4 == 1){
		aRb = DirectPadCfg.ExtRequst(Prm);
	}else
	if(ActList_4 == 2){
		aRb = BusPadLnk.ExtRequst(Prm);
	}
	return aRb; 	
}

int ActList_5_CallBack(unsigned char Prm)
{
	int aRb = -1;
	if(ActList_5 == 0){
		//查询联动编程
		aRb = LinkageList.ExtRequst(Prm);
	}else
	if(ActList_5 ==  1){
		//联动编程
		aRb = LinkageProgram.ExtRequst(Prm);
	}else
	if(ActList_5 == 2){
		//声光与广播交替
		aRb = BroadcastCfg.ExtRequst(Prm);
	}else
	if(ActList_5 == 3){
		//允许与禁止
		aRb = Allow.ExtRequst(Prm);
	}else 
	if(ActList_5 == 4){
		aRb =LnkFecBusCfg.ExtRequst(Prm);
	}else
	if(ActList_5 == 5){
		aRb =AreaCfg.ExtRequst(Prm);
	}else
	if(ActList_5 == 6){
		//aRb = DeviceSetup.ExtRequst(Prm);
		//aRb = uInportExport.ExtRequst(Prm);
		aRb =UserCodeSet.ExtRequst(Prm);
	}else
	if(ActList_5 == 7){
		//aRb = DeviceSetup.ExtRequst(Prm);
		//aRb = uInportExport.ExtRequst(Prm);
		aRb =UserCodeSetByArea.ExtRequst(Prm);
	}else
	if(ActList_5 == 8){
		//清除处理
		aRb = CleanUp.ExtRequst(Prm);
	}
	return aRb;	
}

int ActList_6_CallBack(unsigned char Prm)
{
	int aRb = -1;
	if(ActList_6 == 0){
		//aRb = ECanNetwork.ExtRequst(Prm);
		aRb = CanNetworkInf.ExtRequst(Prm);
	}else
	if(ActList_6 == 1){	
		aRb = CanNetworkRegister.ExtRequst(Prm);
	}else
	if(ActList_6 == 2){
		aRb = CanNetworkMask.ExtRequst(Prm);
	}else
	if(ActList_6 == 3){
		aRb = GraphDevCfg.ExtRequst(Prm);
	}
	return aRb;	
}

int ActList_7_CallBack(unsigned char Prm)
{
	int aRb = -1;
	if(ActList_7 == 0){
		aRb = OnlineCtrl.ExtRequst(Prm);
	}else
	if(ActList_7 == 1){
		aRb = uInportExport.ExtRequst(Prm);
	}else
	if(ActList_7 == 2){
		aRb = BlueTooth.ExtRequst(Prm);
	}else
	if(ActList_7 == 3){
		aRb = WifiConn.ExtRequst(Prm);
	}else
	if(ActList_7 == 4){
		aRb = TransmiteDev.ExtRequst(Prm);
	}else
	if(ActList_7 == 5){
		aRb = FwUpgrade.ExtRequst(Prm);
	}
	return aRb;	
}

int ActList_8_CallBack(unsigned char Prm)
{
	int aRb = -1;
	
	if(ActList_8 == 0){
		aRb = ClearRegistedInf.ExtRequst(Prm);
	}else
	if(ActList_8 == 1){
		aRb = ClearLinkageCfg.ExtRequst(Prm);
	}else
	if(ActList_8 == 2){
		aRb = ClearDescp.ExtRequst(Prm);
	}else
	if(ActList_8 == 3){
		aRb = RecoverAll.ExtRequst(Prm);
	}else
	if(ActList_8 == 4){
		aRb = -1;
	}
	return aRb;	
}

int ActList_9_CallBack(unsigned char Prm)
{
	int aRb = -1;
	
	if(ActList_9 == 0){

	}else
	if(ActList_9 == 1){
			
	}else
	if(ActList_9 == 2){
			
	}else
	if(ActList_9 == 3){
			
	}
	return aRb;	
}

/*

		RealTimeData.FullRedraw(Prm);

		
		//探测器模拟曲线
		DetectorCurve.FullRedraw(Prm);




		//查询本机配置
		QueryCfg.FullRedraw(Prm);


		

		//楼层显示
		DisplayPadCfg.FullRedraw(Prm);

AuthorizeState.FullRedraw(Prm);
		aBefore.FullRedraw(Prm);

*/

int ActList_0_RedrawCallBack(unsigned char Prm)
{
	int aRb = -1;
	if(ActList_0 == 0){
		HwInf.FullRedraw(Prm);
	}else
	if(ActList_0 == 1){
		PowerSuplyInf.FullRedraw(Prm);
	}else
	if(ActList_0 == 2){
		//设置打印机
		//设置打印事件
		PrinterSet.FullRedraw(Prm);
	}else 
	if(ActList_0 == 3){
		DateTimeCfg.FullRedraw(Prm);
	}else
	if(ActList_0 == 4){
		PasswdChange.FullRedraw(Prm);		
	}else
	if(ActList_0 == 5){
		//设置屏保时间
		ScreenSaveCfg.FullRedraw(Prm);
	}else
	if(ActList_0 == 6){
		LanguageCfg.FullRedraw(Prm);
	}
	return aRb;	
}

int ActList_1_RedrawCallBack(unsigned char Prm)
{
	int aRb = -1;
	if(ActList_1 == 0){
		QueryMsg.FullRedraw(Prm);
	}else
	if(ActList_1 ==  1){
		QueryMessageFire.FullRedraw(Prm);
	}else
	if(ActList_1 == 2){
		QueryMsgLinkage.FullRedraw(Prm);
	}else
	if(ActList_1 == 3){
		QueryMsgSv.FullRedraw(Prm);
	}else 
	if(ActList_1 == 4){
		QueryMsgFault.FullRedraw(Prm); 
	}else
	if(ActList_1 == 5){
		QueryMsgOperate.FullRedraw(Prm); 
	}else
	if(ActList_1 == 6){
		PrintInf.FullRedraw(Prm);
	}
	return aRb;	
}

int ActList_2_RedrawCallBack(unsigned char Prm)
{
	int aRb =-1;
	if(ActList_2 == 0){
		//设置工程名称
		ProjectSet.FullRedraw(Prm);	
	}else
	if(ActList_2 ==  1){
		Maintain.FullRedraw(Prm);
	}else
	if(ActList_2 == 2){
		//设置运行模式
		RunModeCfg.FullRedraw(Prm);
	}else
	if(ActList_2 == 3){
		DevAuthorize.FullRedraw(Prm);
	}else 
	if(ActList_2 == 4){
		DesignPrmSet.FullRedraw(Prm);
	}else 
	if(ActList_2 == 5){
		DevOutputCfg.FullRedraw(Prm);
	} else 
	if(ActList_2 == 6){
		DevSensitiveCfg.FullRedraw(Prm);
	}else
	if(ActList_2 == 7){
		DevSensitiveCfg.FullRedraw(Prm);
	}else
	if(ActList_2 == 8){
		DisplayPadDescpDownload.FullRedraw(Prm);
	}		
	
	
	return aRb;	
}


int ActList_3_RedrawCallBack(unsigned char Prm)
{
	int aRb = -1;
	if(ActList_3 == 0){
		ListViewDevice.FullRedraw(Prm);
	}else
	if(ActList_3 == 1){
		LiteIconOverViewDev.FullRedraw(Prm);
	}else
	if(ActList_3 == 2){
		//回路设备在线配置
		DevProperty.FullRedraw(Prm);
		//CircuitCfg.FullRedraw(Prm);
	}else
	if(ActList_3 == 3){
		DevStartStop.FullRedraw(Prm);
	}else 
	if(ActList_3 == 4){
		Register.FullRedraw(Prm);
	}else
	if(ActList_3 == 5){
		RegisterManual.FullRedraw(Prm);
	}else
	if(ActList_3 == 6){
		DevMask.FullRedraw(Prm);
	}else
	if(ActList_3 == 7){
		//回路重号检测
		DuplicateCheck.FullRedraw(Prm);
	}else
	if(ActList_3 == 8){
		//SimRun.FullRedraw(Prm);
		DevCount.FullRedraw(Prm);
	}else
	if(ActList_3 == 9){
		//SimRun.FullRedraw(Prm);
		DescpWrite.FullRedraw(Prm);
	}
	return aRb;	
}

int ActList_4_RedrawCallBack(unsigned char Prm)
{
	int aRb = -1;
	if(ActList_4 == 0){
		PadInf.FullRedraw(Prm);
	}else
	if(ActList_4 == 1){
		DirectPadCfg.FullRedraw(Prm);
	}else
	if(ActList_4 == 2){
		BusPadLnk.FullRedraw(Prm);
	}
	return aRb; 	
}

int ActList_5_RedrawCallBack(unsigned char Prm)
{
	int aRb = -1;
	if(ActList_5 == 0){
		//查询联动编程
		LinkageList.FullRedraw(Prm);
	}else
	if(ActList_5 ==  1){	
		//联动编程
		LinkageProgram.FullRedraw(Prm);
	}else
	if(ActList_5 == 2){
		//声光与广播交替
		BroadcastCfg.FullRedraw(Prm);
	}else
	if(ActList_5 == 3){
		//允许与禁止
		Allow.FullRedraw(Prm);
	}else 
	if(ActList_5 == 4){
		LnkFecBusCfg.FullRedraw(Prm);
	}else
	if(ActList_5 == 5){
		AreaCfg.FullRedraw(Prm);
	}else
	if(ActList_5 == 6){
		//DeviceSetup.FullRedraw(Prm);
		//uInportExport.FullRedraw(Prm);
		UserCodeSet.FullRedraw(Prm);
	}else
	if(ActList_5 == 7){
		//DeviceSetup.FullRedraw(Prm);
		//uInportExport.FullRedraw(Prm);
		UserCodeSetByArea.FullRedraw(Prm);
	}
	return aRb;	
}

int ActList_6_RedrawCallBack(unsigned char Prm)
{
	int aRb = -1;
	if(ActList_6 == 0){
		//ECanNetwork.FullRedraw(Prm);
		CanNetworkInf.FullRedraw(Prm);
	}else
	if(ActList_6 == 1){
		CanNetworkRegister.FullRedraw(Prm);
	}else
	if(ActList_6 == 2){
		CanNetworkMask.FullRedraw(Prm);
	}else
	if(ActList_6 == 3){
		GraphDevCfg.FullRedraw(Prm);
	}
	return aRb;	
}

int ActList_7_RedrawCallBack(unsigned char Prm)
{
	int aRb = -1;
	if(ActList_7 == 0){
		OnlineCtrl.FullRedraw(Prm);
	}else
	if(ActList_7 == 1){
		uInportExport.FullRedraw(Prm);
	}else
	if(ActList_7 == 2){
		BlueTooth.FullRedraw(Prm);
	}else
	if(ActList_7 == 3){
		WifiConn.FullRedraw(Prm);
	}else
	if(ActList_7 == 4){
		TransmiteDev.FullRedraw(Prm);
	}else
	if(ActList_7 == 5){
		FwUpgrade.FullRedraw(Prm);
	}
	return aRb;	
}

int ActList_8_RedrawCallBack(unsigned char Prm)
{
	int aRb = -1;
	
	if(ActList_8 == 0){
		//清除处理
		ClearRegistedInf.FullRedraw(Prm);
		//AboutUs.FullRedraw(Prm);
	}else
	if(ActList_8 == 1){
		//清除处理
		ClearLinkageCfg.FullRedraw(Prm);
	}else
	if(ActList_8 == 2){
		//清除处理
		ClearDescp.FullRedraw(Prm);
	}else
	if(ActList_8 == 3){
		//恢复出厂设置
		RecoverAll.FullRedraw(Prm);

	}
	
	return aRb;	
}


int ActList_9_RedrawCallBack(unsigned char Prm)
{
	int aRb;
	
	if(ActList_9 == 0){

	}else
	if(ActList_9 == 1){
			
	}else
	if(ActList_9 == 2){
			
	}else
	if(ActList_9 == 3){
			
	}
	return aRb;	
}

