/* ----------------------------------------------------------------- */ /// /// BindCore /// /// <summary> /// Invokes the binding settings. /// </summary> /// /// <param name="vm">VM object to bind.</param> /// /* ----------------------------------------------------------------- */ private void BindCore(CompressSettingViewModel vm) { var src = Behaviors.Hook(new BindingSource(vm, "")); src.Bind(nameof(vm.Executable), ExecuteButton, nameof(Enabled)); src.Bind(nameof(vm.Destination), DestinationTextBox, nameof(TextBox.Text)); src.Bind(nameof(vm.Format), FormatComboBox, nameof(ComboBox.SelectedValue)); src.Bind(nameof(vm.CompressionLevel), CompressionLevelComboBox, nameof(ComboBox.SelectedValue)); src.Bind(nameof(vm.CompressionMethod), CompressionMethodComboBox, nameof(ComboBox.SelectedValue)); src.Bind(nameof(vm.ThreadCount), ThreadNumeric, nameof(NumericUpDown.Value)); src.Bind(nameof(vm.MaximumThreadCount), ThreadNumeric, nameof(ThreadNumeric.Maximum)); src.Bind(nameof(vm.EncryptionSupported), EncryptionGroupBox, nameof(Enabled)); src.Bind(nameof(vm.EncryptionEnabled), EncryptionCheckBox, nameof(CheckBox.Checked)); src.Bind(nameof(vm.EncryptionEnabled), EncryptionPanel, nameof(Enabled)); src.Bind(nameof(vm.EncryptionMethod), EncryptionMethodComboBox, nameof(ComboBox.SelectedValue)); src.Bind(nameof(vm.EncryptionMethodEnabled), EncryptionMethodComboBox, nameof(Enabled)); src.Bind(nameof(vm.Password), PasswordTextBox, nameof(TextBox.Text)); src.Bind(nameof(vm.PasswordConfirmation), ConfirmTextBox, nameof(TextBox.Text)); src.Bind(nameof(vm.PasswordVisible), ShowPasswordCheckBox, nameof(CheckBox.Checked)); FormatComboBox.Bind(Resource.Formats); EncryptionMethodComboBox.Bind(Resource.EncryptionMethods); CompressionLevelComboBox.Bind(Resource.CompressionLevels); CompressionMethodComboBox.Bind(Resource.GetCompressionMethods(vm.Format)); CompressionMethodComboBox.SelectedIndex = 0; PathToolTip.ToolTipTitle = Properties.Resources.MessageInvalidChars; }
void ReleaseDesignerOutlets() { if (RemoveButton != null) { RemoveButton.Dispose(); RemoveButton = null; } if (AddButton != null) { AddButton.Dispose(); AddButton = null; } if (RemoveAllButton != null) { RemoveAllButton.Dispose(); RemoveAllButton = null; } if (AllReturnAttrCheckBox != null) { AllReturnAttrCheckBox.Dispose(); AllReturnAttrCheckBox = null; } if (AttributeToExportComboBox != null) { AttributeToExportComboBox.Dispose(); AttributeToExportComboBox = null; } if (AttributeToExportTableView != null) { AttributeToExportTableView.Dispose(); AttributeToExportTableView = null; } if (FormatComboBox != null) { FormatComboBox.Dispose(); FormatComboBox = null; } if (ScopeComboBox != null) { ScopeComboBox.Dispose(); ScopeComboBox = null; } }
public override void AwakeFromNib() { base.AwakeFromNib(); _attrToExportDs = new AttributeTableViewDataSource(); AttributeToExportTableView.DataSource = _attrToExportDs; foreach (var item in _returnedAttrList) { AttributeToExportComboBox.Add((NSString)item); } foreach (var item in VMDirConstants.ResultExportFormatList) { FormatComboBox.Add((NSString)item); } foreach (var item in VMDirConstants.ResultExportScopeList) { ScopeComboBox.Add((NSString)item); } AttributeToExportComboBox.SelectItem(0); FormatComboBox.SelectItem(0); ScopeComboBox.SelectItem(0); SetVisibility(false); }