public MainWindow() { ConfigsSystem.Check_Start.Check(); var MyIni = new IniFile(PathFinding.CONFIGFILE); InitializeComponent(); this.MouseLeftButtonDown += delegate { DragMove(); }; string privatecy = MyIni.Read("PrivatePolicy", "System"); priv = Boolean.Parse(privatecy); string music = MyIni.Read("Music", "Audio"); string Discordss = MyIni.Read("DiscordRPC", "System").ToString(); string AutoLogin = MyIni.Read("AutoLogin", "System").ToString(); bool Discord = Boolean.Parse(Discordss); bool AutoLogins = Boolean.Parse(AutoLogin); priv2 = Boolean.Parse(music); if (!priv) { var msg = new ModernMessageBox(welcome(), "Azusa Password Manager", ModernMessageboxIcons.Info, "Okay") { Button1Key = Key.D1, CheckboxText = "Okey", CheckboxVisibility = Visibility.Visible, }; msg.ShowDialog(); if (msg.CheckboxChecked == true) { MyIni.Write("PrivatePolicy", "true", "System"); } else { System.Environment.Exit(1); } } if (priv2) { BackgroundSysteme.MusicSysteme.play(true); } if (Discord) { DiscordRPC.Discord_Stages.login(); } if (AutoLogins) { Algorythmen.Auth_Class_System.password_crypt = sugar + MeisXOR.XORConverter.MeiXORDecrypt(MyIni.Read("PSW2", "PasswortFileSystem").ToString(), pw) + pepper; Algorythmen.Auth_Class_System.salt_key = MeisXOR.XORConverter.MeiXORDecrypt(MyIni.Read("PIN", "PasswortFileSystem").ToString(), pw); UI_Management.ControlScreen data = new UI_Management.ControlScreen(); data.Show(); this.Close(); } rename(); }
private void Login_Button_Click(object sender, RoutedEventArgs e) { bool checker = false; if (PasswordCrypter.Password.Length < 15) { QModernMessageBox.Show("Your password is not long enough", "Application Error", QModernMessageBox.QModernMessageBoxButtons.Ok, ModernMessageboxIcons.Info); return; } if (PasswordCrypter.Password.Length > 15) { Algorythmen.Auth_Class_System.password_crypt = sugar + PasswordCrypter.Password + pepper; } if (Secure_key.Password != "") { Algorythmen.Auth_Class_System.salt_key = Secure_key.Password; } if (Secure_key.Password == "" && PasswordCrypter.Password == "") { checker = false; QModernMessageBox.Show("Please fill in all fields!", "Application Error", QModernMessageBox.QModernMessageBoxButtons.Ok, ModernMessageboxIcons.Info); return; } else { checker = true; } if (checker) { SChecked(Algorythmen.Auth_Class_System.password_crypt, Algorythmen.Auth_Class_System.salt_key.ToString()); UI_Management.ControlScreen data = new UI_Management.ControlScreen(); data.Show(); this.Hide(); } }