private void InitializeComponent() { _ = this.WhenActivated((CompositeDisposable disposable) => { }); AvaloniaXamlLoader.Load(this); _passwordSection = this.FindControl <StackPanel>("PasswordSection"); _reminderSection = this.FindControl <StackPanel>("ReminderSection"); _bankCartSection = this.FindControl <StackPanel>("BankCartSection"); _personalDataSection = this.FindControl <StackPanel>("PersonalDataSection"); _txtPassword = this.FindControl <TextBox>("txtPassword"); _pbHard = this.FindControl <ProgressBar>("pbHard"); _txtStartTime = this.FindControl <TextBox>("tbStartTime"); _cbType = this.FindControl <ComboBox>("cbType"); _bColor = this.FindControl <Border>("bColor"); _pColorPicker = this.FindControl <Popup>("pColorPicker"); _colorPicker = this.FindControl <ColorPicker>("colorPicker"); _tbColor = this.FindControl <TextBox>("tbColor"); _txtPassword.GetObservable(TextBox.TextProperty).Subscribe(value => PasswordUtils.DeterminingPasswordComplexity(_pbHard, value)); _cbType.SelectionChanged += SectionChanged; _tbColor.Text = ((Color)Application.Current.FindResource("ThemeSelectedControlColor")).ToString(); _argbColorViewModel = new ArgbColorViewModel { Hex = _tbColor.Text }; _pColorPicker.DataContext = _argbColorViewModel; _bColor.Background = new SolidColorBrush(ColorHelpers.FromHexColor(_tbColor.Text)); _colorPicker.ChangeColor += _colorPicker_ChangeColor; }
private void InitializeComponent() { AvaloniaXamlLoader.Load(this); _tbNewPassword = this.FindControl <TextBox>("tbNewPassword"); _pbHard = this.FindControl <ProgressBar>("pbHard"); _tbNewPassword.GetObservable(TextBox.TextProperty).Subscribe(value => PasswordUtils.DeterminingPasswordComplexity(_pbHard, value)); }
private void InitializeComponent() { AvaloniaXamlLoader.Load(this); TbPassword = this.FindControl <TextBox>("tbPassword"); TbPathDatabase = this.FindControl <TextBox>("tbPathDatabase"); TbIteration = this.FindControl <TextBox>("tbIteration"); TbNumberOfEncryptionProcedures = this.FindControl <TextBox>("tbNumberOfEncryptionProcedures"); _pbHard = this.FindControl <ProgressBar>("pbHard"); CbUseTrash = this.FindControl <CheckBox>("cbUseTrash"); CbUseCompression = this.FindControl <CheckBox>("cbUseCompression"); TbPassword.GetObservable(TextBox.TextProperty).Subscribe(value => PasswordUtils.DeterminingPasswordComplexity(_pbHard, value)); }
private void InitializeComponent() { this.WhenActivated((CompositeDisposable disposable) => { }); AvaloniaXamlLoader.Load(this); _txtPassword = this.FindControl <TextBox>("txtPassword"); _pbHard = this.FindControl <ProgressBar>("pbHard"); _bColor = this.FindControl <Border>("bColor"); _tbColor = this.FindControl <TextBox>("tbColor"); _pColorPicker = this.FindControl <Popup>("pColorPicker"); _colorPicker = this.FindControl <ColorPicker>("colorPicker"); _colorPicker.ChangeColor += _colorPicker_ChangeColor; _txtPassword.GetObservable(TextBox.TextProperty).Subscribe(value => PasswordUtils.DeterminingPasswordComplexity(_pbHard, value)); _tbColor.GetObservable(TextBox.TextProperty).Subscribe(_ => ChangeColorTextBox()); }