public override bool ValidateChildren() { if (NameEdit.Text.IsValidName() == false) { Resources.EnterValidName.ShowError(); MainTabControl.SelectTab(GeneralTabPage); NameEdit.Focus(); return(false); } if (string.IsNullOrWhiteSpace(RequestUriEdit.Text)) { Resources.RequestUriCannotBeNullOrWhiteSpace.ShowError(); MainTabControl.SelectTab(GeneralTabPage); RequestUriEdit.Focus(); return(false); } if (string.IsNullOrWhiteSpace(MethodEdit.Text)) { Resources.SelectMethod.ShowError(); MainTabControl.SelectTab(GeneralTabPage); MethodEdit.Focus(); return(false); } if (DataSchemaEdit.ValidateChildren() == false) { MainTabControl.SelectTab(DataSchemaTabPage); DataSchemaEdit.Focus(); return(false); } return(true); }
public override bool ValidateChildren() { if (NameEdit.Text.IsValidName() == false) { Resources.EnterValidName.ShowError(); MainTabControl.SelectTab(GeneralTabPage); NameEdit.Focus(); return(false); } if (string.IsNullOrWhiteSpace(ConnectionStringEdit.Text)) { Resources.ConnectionStringCannotBeNullOrWhiteSpace.ShowError(); MainTabControl.SelectTab(GeneralTabPage); ConnectionStringEdit.Focus(); return(false); } if (string.IsNullOrWhiteSpace(SelectCommandEdit.Text)) { Resources.SelectCommandCannotBeNullOrWhiteSpace.ShowError(); MainTabControl.SelectTab(GeneralTabPage); SelectCommandEdit.Focus(); return(false); } if (DataSchemaEdit.ValidateChildren() == false) { MainTabControl.SelectTab(DataSchemaTabPage); DataSchemaEdit.Focus(); return(false); } return(true); }
public override bool ValidateChildren() { if (string.IsNullOrWhiteSpace(DataTypeEdit.Text)) { Resources.SelectDataType.ShowError(); MainTabControl.SelectTab(GeneralTabPage); DataTypeEdit.Focus(); return(false); } if (NameEdit.Text.IsValidName() == false) { Resources.EnterValidName.ShowError(); MainTabControl.SelectTab(GeneralTabPage); NameEdit.Focus(); return(false); } if (AvailableValuesEdit.ValidateChildren() == false) { MainTabControl.SelectTab(AvailableValuesTabPage); AvailableValuesEdit.Focus(); return(false); } if (DefaultValuesEdit.ValidateChildren() == false) { MainTabControl.SelectTab(DefaultValuesTabPage); DefaultValuesEdit.Focus(); return(false); } return(true); }
private void AddNewProfile(WorkingProfile workingProfile) { IsEnabled = false; var nameEdit = new NameEdit((ne, value) => { AddNewProfile(value, ne.IsChecked); IsEnabled = true; }, ne => IsEnabled = true) { Watermark = "Enter a profile name <Required>", CheckboxText = "Copy Settings from current Profile", HasCheckbox = true, AcceptText = "Add" }; GetService <MainViewModel>().ExtraContent = nameEdit; }
public override bool ValidateChildren() { if (string.IsNullOrWhiteSpace(DataTypeEdit.Text)) { Resources.SelectDataType.ShowError(); DataTypeEdit.Focus(); return(false); } if (NameEdit.Text.IsValidName() == false) { Resources.EnterValidName.ShowError(); NameEdit.Focus(); return(false); } return(true); }
public override bool ValidateChildren() { if (NameEdit.Text.IsValidName() == false) { Resources.EnterValidName.ShowError(); MainTabControl.SelectTab(GeneralTabPage); NameEdit.Focus(); return(false); } if (DataSchemaEdit.ValidateChildren() == false) { MainTabControl.SelectTab(DataSchemaTabPage); DataSchemaEdit.Focus(); return(false); } return(true); }
public void DeleteProfile(WorkingProfile profile) { if (profile != null && !profile.IsDefault) { var toDelete = profile; IsEnabled = false; var nameEdit = new NameEdit((ne, value) => { Profiles.Remove(toDelete); WorkingProfile.SaveProfiles(Profiles); SelectedProfile = Profiles.FirstOrDefault(); IsEnabled = true; RaisePropertyChanged(() => HasProfiles); }, ne => IsEnabled = true) { IsReadOnly = true, Value = $"Profile '{SelectedProfile.Name}' will be deleted!", AcceptText = "Delete" }; GetService <MainViewModel>().ExtraContent = nameEdit; } }
public override bool ValidateChildren() { if (NameEdit.Text.IsValidName() == false) { Resources.EnterValidName.ShowError(); NameEdit.Focus(); return(false); } if (TotalFuncEdit.SelectedItem == null) { Resources.SelectTotalFunc.ShowError(); TotalFuncEdit.Focus(); return(false); } if (DataBandEdit.SelectedItem == null) { Resources.SelectDataBand.ShowError(); DataBandEdit.Focus(); return(false); } if (ExpressionEdit.ValidateChildren() == false) { Resources.SpecifyExpression.ShowError(); ExpressionEdit.Focus(); return(false); } if (PrintBandEdit.SelectedItem == null) { Resources.SelectPrintBand.ShowError(); PrintBandEdit.Focus(); return(false); } return(true); }
private void AddEmployee_Load(object sender, EventArgs e) { NameEdit.Focus(); }