Пример #1
0
        public List <ITreeViewItem> Childrens()
        {
            List <ITreeViewItem> Childrens = new List <ITreeViewItem>();

            MFDriver = (MainFrameDriver)App.AutomateTabGingerRunner.ApplicationAgents[0].Agent.Driver;
            XMLScreen XMLS = MFDriver.GetRenderedScreen();

            foreach (XMLScreenField xf in XMLS.Fields)
            {
                MainframeControlTreeItem MFTI = new MainframeControlTreeItem();
                MFTI.Name = xf.Text;
                MFTI.XSF  = xf;
                MFTI.Path = xf.Location.left + "/" + xf.Location.top;
                Childrens.Add(MFTI);
            }
            return(Childrens);
        }
        public List <ITreeViewItem> Childrens()
        {
            List <ITreeViewItem> Childrens = new List <ITreeViewItem>();
            //TODO: improve below to use really automate page used mainfram driver
            Agent agent = WorkSpace.Instance.SolutionRepository.GetAllRepositoryItems <Agent>().Where(x => x.DriverType == Agent.eDriverType.MainFrame3270 && ((AgentOperations)x.AgentOperations).Status == Agent.eStatus.Running).FirstOrDefault();

            if (agent != null)
            {
                MFDriver = (MainFrameDriver)((AgentOperations)agent.AgentOperations).Driver;
                XMLScreen XMLS = MFDriver.GetRenderedScreen();
                foreach (XMLScreenField xf in XMLS.Fields)
                {
                    MainframeControlTreeItem MFTI = new MainframeControlTreeItem();
                    MFTI.Name = xf.Text;
                    MFTI.XSF  = xf;
                    MFTI.Path = xf.Location.left + "/" + xf.Location.top;
                    Childrens.Add(MFTI);
                }
            }
            return(Childrens);
        }