예제 #1
0
파일: CBiz.cs 프로젝트: KwonJaeMin/WHTM_EPM
        private void AddCommand()
        {
            string            controlName1 = "EPM01";
            string            controlName2 = "INDEXER01";
            CControlComponent componet1    = _main.GetComponent(controlName1);
            CControlComponent componet2    = _main.GetComponent(controlName2);

            ACommand     command = null;
            ObjectHandle oh      = null;

            oh      = Activator.CreateInstanceFrom("YANGSYS.Biz.WHTM.dll", "YANGSYS.Biz.CommandHandler.CMenuGroupCommand");
            command = oh.Unwrap() as ACommand;
            command.AddArgs(new object[] { _main, componet1 }, false);
            command.Init(); CUIManager.Inst.AddCommand(command);
            oh      = Activator.CreateInstanceFrom("YANGSYS.Biz.WHTM.dll", "YANGSYS.Biz.CommandHandler.CShutdownCommand");
            command = oh.Unwrap() as ACommand;
            command.AddArgs(new object[] { _main, componet1 }, false);
            command.Init(); CUIManager.Inst.AddCommand(command);
            oh      = Activator.CreateInstanceFrom("YANGSYS.Biz.WHTM.dll", "YANGSYS.Biz.CommandHandler.CTitleGroupCommand");
            command = oh.Unwrap() as ACommand;
            command.AddArgs(new object[] { _main, componet1 }, false);
            command.Init(); CUIManager.Inst.AddCommand(command);
            oh      = Activator.CreateInstanceFrom("YANGSYS.Biz.WHTM.dll", "YANGSYS.Biz.CommandHandler.CRequestGroupCommand");
            command = oh.Unwrap() as ACommand;
            command.AddArgs(new object[] { _main, componet1 }, false);
            command.Init(); CUIManager.Inst.AddCommand(command);
        }