private void CheckCustomizeInput(TextBox localfolder_box, TextBox localrepopath_box, TextBlock localfolder_error_label) { string error = Controller.CheckRepoPathAndName(localrepopath_box.Text, localfolder_box.Text); if (!String.IsNullOrEmpty(error)) { localfolder_error_label.Text = error; localfolder_error_label.Visibility = Visibility.Visible; localfolder_error_label.Foreground = Brushes.Red; } else { try { Controller.CheckRepoPathExists(localrepopath_box.Text); localfolder_error_label.Visibility = Visibility.Hidden; } catch (ArgumentException e) { localfolder_error_label.Visibility = Visibility.Visible; localfolder_error_label.Foreground = Brushes.Orange; localfolder_error_label.Text = e.Message; } } }
private void CheckCustomizeInput(NSTextField localfolder_box, NSTextField localrepopath_box, NSTextField localfolder_error_label) { string error = Controller.CheckRepoPathAndName(localrepopath_box.StringValue, localfolder_box.StringValue); if (!String.IsNullOrEmpty(error)) { localfolder_error_label.StringValue = error; localfolder_error_label.TextColor = NSColor.Red; } else { try { Controller.CheckRepoPathExists(localrepopath_box.StringValue); localfolder_error_label.StringValue = ""; } catch (ArgumentException e) { localfolder_error_label.TextColor = NSColor.Orange; localfolder_error_label.StringValue = e.Message; } } }