예제 #1
0
        async Task <bool> isVERIFED()
        {
            bool _passed = false;;

            //this.Invoke((Action)(async () =>
            //{

            if (RegCalls.GetREG(@"SOFTWARE\DERM", "GamePath") != null)
            {
                timer1.Stop();
                if (Directory.Exists(RegCalls.GetREG(@"SOFTWARE\DERM", "GamePath")))
                {
                    saveDirectoryPath      = RegCalls.GetREG(@"SOFTWARE\DERM", "GamePath");
                    steamLBL.ForeColor     = Color.ForestGreen;
                    steamLBL.Text          = "Steam Already Verified!";
                    steamSTATUS.Image      = DeReplaysManager.Properties.Resources.dotgreen;
                    cbPATCH.Enabled        = true;
                    kryptonButton1.Enabled = true;


                    var      versionInfo = FileVersionInfo.GetVersionInfo(saveDirectoryPath + @"\AoE2DE_s.exe");
                    string   version     = versionInfo.FileVersion;
                    string[] sver        = version.Split('.');
                    label1.Text = "Current Version: " + sver[2];
                    timer1.Stop();
                    _passed = true;
                }
            }

            //}));

            return(_passed);
        }
예제 #2
0
        async Task <bool> cmdDEPOT(string depot, string manifest)
        {
            try
            {
                NameValueCollection sAll;
                sAll = ConfigurationManager.AppSettings;
                string _downldCNT = RegCalls.GetREG(@"SOFTWARE\DERM", "Downloads") == null ? "8" : RegCalls.GetREG(@"SOFTWARE\DERM", "Downloads");

                if (autoSTEAM.Checked)
                {
                    /*Editted this line to request -beta. The Compiled binary uses a steam account*/
                    argz = "/c dotnet \"" + System.AppDomain.CurrentDomain.BaseDirectory + "\\DepotDownloader.dll\" -app 813780 -depot " + depot + " -manifest " + manifest + " -dir " + "\"" + SaveDirectoryPath() + "\"" + " -beta " + "-filelist " + "\"" + System.AppDomain.CurrentDomain.BaseDirectory + "exclude.txt" + "\" -validate -beta -max-downloads " + _downldCNT + " & exit";
                }
                else
                {
                    argz = "/c dotnet \"" + System.AppDomain.CurrentDomain.BaseDirectory + "\\DepotDownloader.dll\" -app 813780 -depot " + depot + " -manifest " + manifest + " -dir " + "\"" + SaveDirectoryPath() + "\"" + " -username " + userBOX.Text + " -password " + "\"" + passBOX.Text + "\"" + " -remember-password -filelist " + "\"" + System.AppDomain.CurrentDomain.BaseDirectory + "exclude.txt" + "\" -validate -max-downloads " + _downldCNT + " & exit";
                }
                //output proccess lines

                Process mypr = new Process();
                await OUTproc(argz, mypr);

                return(true);
            }
            catch (SystemException)
            {
                return(false);
            }
        }
예제 #3
0
        private async void timer1_Tick(object sender, EventArgs e)
        {
            try
            {
                //var tsk = await isVERIFED();
                //bool verify = tsk;

                if (!SteamAPI.Init())
                {
                    if (SteamAPI.IsSteamRunning())
                    {
                        steamLBL.ForeColor = Color.DarkBlue;
                        steamLBL.Text      = "Steam Running..";
                        steamSTATUS.Image  = DeReplaysManager.Properties.Resources.dotred;
                    }
                    else
                    {
                        steamLBL.ForeColor = Color.Gold;
                        await Task.Delay(200);

                        steamLBL.Text = "Steam OFF";
                        await Task.Delay(100);

                        steamLBL.ForeColor = Color.Maroon;
                        steamSTATUS.Image  = DeReplaysManager.Properties.Resources.dotred;
                    }

                    //SteamUtils.GetAppID();
                }
                else
                {
                    steamLBL.ForeColor     = Color.ForestGreen;
                    steamLBL.Text          = "Steam ON";
                    steamSTATUS.Image      = DeReplaysManager.Properties.Resources.dotgreen;
                    cbPATCH.Enabled        = true;
                    kryptonButton1.Enabled = true;
                    await Task.Delay(200);

                    bool IsDE = SteamApps.BIsAppInstalled(new AppId_t(813780));
                    if (!IsDE)
                    {
                        MessageBox.Show("Please Buy or Install Age of Empires II: Definitive Edition before you proceed!", "Game Missing");
                        cbPATCH.Enabled = false;
                        timer1.Stop();
                    }

                    var      versionInfo = FileVersionInfo.GetVersionInfo(SaveDirectoryPath() + @"\AoE2DE_s.exe");
                    string   version     = versionInfo.FileVersion;
                    string[] sver        = version.Split('.');
                    label1.Text = "Current Version: " + sver[2];
                    RegCalls.AddREG(SaveDirectoryPath(), @"SOFTWARE\DERM", "GamePath");
                    timer1.Stop();
                }
            }
            catch (SystemException)
            {
                steamLBL.ForeColor = Color.Black;
                steamLBL.Text      = "Steam OFF";
                steamSTATUS.Image  = DeReplaysManager.Properties.Resources.dotred;
            }
        }