private void DownloadBtn_Click(object sender, RoutedEventArgs e)
        {
            IniHandler VersionInfo_BnS = new IniHandler(Path.Combine(SystemConfig.SYS.BNS_DIR, (Globals.BnS_Region)ACCOUNT_CONFIG.ACCOUNTS.REGION == Globals.BnS_Region.KR ? "VersionInfo_BNS_KOR.ini" : "VersionInfo_BnS.ini"));

            localVersion             = VersionInfo_BnS.Read("VersionInfo", "GlobalVersion");
            DownloadBtn.IsEnabled    = false;
            ProgressGrid.Visibility  = Visibility.Visible;
            PatchingLabel.Visibility = Visibility.Hidden;
            patchWorker.RunWorkerAsync();
        }
示例#2
0
        public static void GameVersionCheck()
        {
            IniHandler VersionInfo_BnS = new IniHandler(Path.Combine(SystemConfig.SYS.BNS_DIR, (BnS_Region)ACCOUNT_CONFIG.ACCOUNTS.REGION == BnS_Region.KR ? "VersionInfo_BNS_KOR.ini" : "VersionInfo_BnS.ini"));

            localBnSVersion  = VersionInfo_BnS.Read("VersionInfo", "GlobalVersion");
            onlineBnSVersion = onlineVersionNumber();

            if (onlineBnSVersion == "")
            {
                onlineBnSVersion = localBnSVersion;
            }
        }
        private void Page_Loaded(object sender, RoutedEventArgs e)
        {
            if ((Globals.BnS_Region)ACCOUNT_CONFIG.ACCOUNTS.REGION == Globals.BnS_Region.KR)
            {
                BASE_URL = @"http://bnskor.ncupdate.com/BNS_KOR/";
            }
            else
            {
                BASE_URL = @"http://live.patcher.bladeandsoul.com/BnS/";
            }

            IniHandler VersionInfo_BnS = new IniHandler(Path.Combine(SystemConfig.SYS.BNS_DIR, (Globals.BnS_Region)ACCOUNT_CONFIG.ACCOUNTS.REGION == Globals.BnS_Region.KR ? "VersionInfo_BNS_KOR.ini" : "VersionInfo_BnS.ini"));

            localVersion  = VersionInfo_BnS.Read("VersionInfo", "GlobalVersion");
            onlineVersion = Globals.onlineVersionNumber();
            //onlineVersion = "164";

            localVersionLabel.Content   = localVersion.ToString();
            currentVersionLabel.Content = String.Format("{0}", (onlineVersion == "") ? "Error" : onlineVersion);

            //Redundant..? Doing it cause f**k it.
            if (onlineVersion == "")
            {
                OnlineGameLbl.Foreground = Brushes.Red;
                onlineVersion            = localVersion;
            }
            else
            {
                OnlineGameLbl.Foreground = Brushes.Green;
            }

            if (onlineVersion != localVersion)
            {
                LocalGameLbl.Foreground = Brushes.Red;
            }
            else
            {
                LocalGameLbl.Foreground = Brushes.Green;
                DownloadBtn.Content     = "File Check";
            }
        }