private void Parser_OnNewData(object arg1, string arg2) { try { if (string.IsNullOrEmpty(arg2)) { InfoMessage.ShowInfo("ERROR", "Checking updates has been not correct!"); Logs.WriteLog("ERROR-Checking updates has been not correct!"); Progress = 0; Message = "ERROR, Click at 'Cancel' button to continue..."; } else { if (arg2.Contains(App.Version.Replace("v", ""))) { Progress = 0; Message = "Your application has the current version. Click at 'Cancel' button to continue..."; Logs.WriteLog("A new version of app not found. Your application has the current version."); } else { Logs.WriteLog("Update file has been finded!"); Progress = 0; CheckSize(); } } } catch (Exception ex) { ErrorWriter.WriteError(ex); Progress = 0; Message = "ERROR, Click at 'Cancel' button to continue..."; } }
private void Continue(object sender, RoutedEventArgs e) { try { string arrarar = settings.ASSKOP(); if (Password.Password != null) { exehs = Convert.ToBase64String(App.md5.ComputeHash(Encoding.UTF8.GetBytes(Password.Password))); } if (exehs == arrarar) { Logs.WriteLog("Password was entered correctly!"); this.Close(); } else { SystemSounds.Hand.Play(); InfoMessage.ShowInfo("ERROR!", "Password was entered incorrectly!"); Logs.WriteLog("ERROR-Password was entered incorrectly!"); return; } } catch (Exception ex) { ErrorWriter.WriteError(ex); } }