private void FillStackPanels() { void FillColumn(Control first, Control sec, Control third) { var customFill = new Control(); customFill.Margin.SetTopAndBottom(5); _firstColumnStack.Add(first ?? new Control()); _secColumnStack.Add(sec ?? customFill); _thirdColumnStack.Add(third ?? customFill); } FillColumn(_encryptionCheckBox, null, null); FillColumn(_pbeCheckBox, null, null); FillColumn(_passwordLabel, _passwordInput, _pbeFill); FillColumn(_pbeSpecLabel, _pbeSpecComboBox, new Control()); FillColumn(_pbeDigestLabel, _pbeDigestInfo, new Control()); FillColumn(_cipherAlgorithmLabel, _cipherAlgorithmComboBox, _cipherKeyLengthComboBox); FillColumn(_blockModeLabel, _blockModeComboBox, new Control()); FillColumn(_paddingLabel, _paddingComboBox, new Control()); FillColumn(_integrityCheckBox, null, null); FillColumn(_integrityLabel, _integrityComboBox, new Control()); FillColumn(_integritySpecLabel, _integritySpecComboBox, new Control()); }
private void FillStackPanels() { void FillRow(Control first, Control sec) { _firstColumnStack.Add(first ?? new Control()); _secColumnStack.Add(sec ?? new Control()); } FillRow(GetLabel("Current DIR"), GetLabel(SteHelper.WorkingDirectory)); FillRow(GetLabel("Filename"), _filenameInput); FillRow(GetLabel("Password"), _passwordInput); }
public void Add(string message) { _stackPanel.Add(new WrapPanel { Content = new HorizontalStackPanel { Children = new[] { new TextBlock { Text = $"[{DateTime.Now.ToLongTimeString()}] ", Color = new Color(200, 20, 20) }, new TextBlock { Text = message } } } }); }