public AgentApp()
        {
            AgentPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData), "Battle.net", "Agent", "Agent.exe");

            StartProcess();

            AgentEndpoint   = new AgentEndpoint(Requester);
            InstallEndpoint = new InstallEndpoint(Requester);
            UpdateEndpoint  = new UpdateEndpoint(Requester);
            RepairEndpoint  = new RepairEndpoint(Requester);
            GameEndpoint    = new GameEndpoint(Requester);
            VersionEndpoint = new VersionEndpoint(Requester);
        }
Пример #2
0
        public AgentApp()
        {
            AgentPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData), "Battle.net", "Agent", "Agent.exe");

            if (!StartProcess())
            {
                Console.WriteLine("Please ensure Battle.net is installed and has recently been opened.");
                Environment.Exit(0);
            }

            AgentEndpoint   = new AgentEndpoint(Requester);
            InstallEndpoint = new InstallEndpoint(Requester);
            UpdateEndpoint  = new UpdateEndpoint(Requester);
            RepairEndpoint  = new RepairEndpoint(Requester);
            GameEndpoint    = new GameEndpoint(Requester);
            VersionEndpoint = new VersionEndpoint(Requester);
        }