예제 #1
0
        private void ExplorerAgentButton_Click(object sender, RoutedEventArgs e)
        {
            ApplicationAgent AG = (ApplicationAgent)((Button)sender).DataContext;

            if (AG.Agent != null)
            {
                if (((Agent)AG.Agent).Status == Agent.eStatus.NotStarted)
                {
                    StartAppAgent(AG);
                }
                //TODO: Temporary to launch Web service window, till we merge web services to window explorer
                if (((Agent)AG.Agent).Driver is WebServicesDriver)
                {
                    ((WebServicesDriver)((Agent)AG.Agent).Driver).LauncDriverWindow();
                    return;
                }

                //if (((Agent)AG.Agent).Driver is IWindowExplorer)
                //Once all the driver implementing IwindowExplorer are ready, simply checking is IWindowExplorer will server the purpose and flag IsWindowExplorerSupportReady can be removed
                if (((Agent)AG.Agent).IsWindowExplorerSupportReady)
                {
                    WindowExplorerPage WEP = new WindowExplorerPage(AG, mContext);
                    WEP.ShowAsWindow();
                }
                else
                {
                    Reporter.ToUser(eUserMsgKey.DriverNotSupportingWindowExplorer, ((Agent)AG.Agent).DriverType);
                }
            }
        }
        private void StartAppAgent(Agent agent)
        {
            AutoLogProxy.UserOperationStart("StartAgentButton_Click");
            Reporter.ToGingerHelper(eGingerHelperMsgKey.StartAgent, null, agent.Name, "AppName"); //Yuval: change app name to be taken from current app
            if (agent.Status == Agent.eStatus.Running)
            {
                agent.Close();
            }

            agent.StartDriver();
            if (agent.IsShowWindowExplorerOnStart && agent.Status == Agent.eStatus.Running)
            {
                WindowExplorerPage WEP = new WindowExplorerPage(new ApplicationAgent());
                WEP.ShowAsWindow();
            }

            Reporter.CloseGingerHelper();
            AutoLogProxy.UserOperationEnd();
        }
예제 #3
0
        private void StartAppAgent(ApplicationAgent AG)
        {
            AutoLogProxy.UserOperationStart("StartAgentButton_Click");
            Reporter.ToStatus(eStatusMsgKey.StartAgent, null, AG.AgentName, AG.AppName);
            if (((Agent)AG.Agent).Status == Agent.eStatus.Running)
            {
                ((Agent)AG.Agent).Close();
            }

            ((Agent)AG.Agent).ProjEnvironment = mContext.Environment;
            ((Agent)AG.Agent).BusinessFlow    = mContext.BusinessFlow;
            ((Agent)AG.Agent).SolutionFolder  = WorkSpace.Instance.Solution.Folder;
            ((Agent)AG.Agent).DSList          = WorkSpace.Instance.SolutionRepository.GetAllRepositoryItems <DataSourceBase>();
            ((Agent)AG.Agent).StartDriver();
            //For ASCF, launch explorer automatically when launching Agent
            if (((Agent)AG.Agent).IsShowWindowExplorerOnStart && ((Agent)AG.Agent).Status == Agent.eStatus.Running)
            {
                WindowExplorerPage WEP = new WindowExplorerPage(AG, mContext);
                WEP.ShowAsWindow();
            }

            Reporter.HideStatusMessage();
            AutoLogProxy.UserOperationEnd();
        }
예제 #4
0
        private void StartAppAgent(ApplicationAgent AG)
        {
            AutoLogProxy.UserOperationStart("StartAgentButton_Click");
            Reporter.ToGingerHelper(eGingerHelperMsgKey.StartAgent, null, AG.AgentName, AG.AppName);
            if (AG.Agent.Status == Agent.eStatus.Running)
            {
                AG.Agent.Close();
            }

            AG.Agent.ProjEnvironment = App.AutomateTabEnvironment;
            AG.Agent.BusinessFlow    = App.BusinessFlow;;
            AG.Agent.SolutionFolder  = App.UserProfile.Solution.Folder;
            AG.Agent.DSList          = App.LocalRepository.GetSolutionDataSources();
            AG.Agent.StartDriver();
            //For ASCF, launch explorer automatically when launching Agent
            if (AG.Agent.IsShowWindowExplorerOnStart && AG.Agent.Status == Agent.eStatus.Running)
            {
                WindowExplorerPage WEP = new WindowExplorerPage(AG);
                WEP.ShowAsWindow();
            }

            Reporter.CloseGingerHelper();
            AutoLogProxy.UserOperationEnd();
        }