Class TemplateDuplicateCheckQueryViewModel
Represents the view model for editing a duplicate checking query for a template.
Inherited Members
Namespace: Phoenix.Aruba
Assembly: Phoenix.Plugin.Aruba.dll
Syntax
public class TemplateDuplicateCheckQueryViewModel : BindableBase, INotifyPropertyChanged, IDataErrorInfo
Constructors
View SourceTemplateDuplicateCheckQueryViewModel(TemplateDefinition, List<string>, DuplicateCheckerOptions)
Initializes a new instance of the TemplateDuplicateCheckQueryViewModel class.
Declaration
public TemplateDuplicateCheckQueryViewModel(TemplateDefinition template, List<string> fieldNames, DuplicateCheckerOptions settings)
Parameters
Type | Name | Description |
---|---|---|
TemplateDefinition | template | The template that is being edited. |
List<string> | fieldNames | The names of the fields attached to this template. This is for the TemplateFields property. |
DuplicateCheckerOptions | settings | The Aruba module settings. |
Properties
View SourceAreSettingsValid
Gets a value indicating whether the Aruba settings were valid.
Declaration
public bool AreSettingsValid { get; }
Property Value
Type | Description |
---|---|
bool |
Remarks
This variable is bound to the visibility of the main view and the error message text.
ConfidenceMatchThreshold
Gets or sets the text for the confidence match threshold text box field.
Declaration
public string ConfidenceMatchThreshold { get; set; }
Property Value
Type | Description |
---|---|
string |
CurrentQueryDefinition
Gets the current state of the query definition based on what is reflected in the view.
Declaration
public DuplicateCheckQueryDefinition CurrentQueryDefinition { get; }
Property Value
Type | Description |
---|---|
DuplicateCheckQueryDefinition |
DaysAgoFieldNameSelectedIndex
Gets or sets the selected index of the days ago field name ComboBox in the view.
Declaration
public int DaysAgoFieldNameSelectedIndex { get; set; }
Property Value
Type | Description |
---|---|
int |
DaysAgoText
Gets or sets the text for the "Days Ago" text box field.
Declaration
public string DaysAgoText { get; set; }
Property Value
Type | Description |
---|---|
string |
HasUnsavedChanges
Gets a value indicating whether the user has any unsaved changes in the view.
Declaration
public bool HasUnsavedChanges { get; }
Property Value
Type | Description |
---|---|
bool |
this[string]
Gets the error message for the property with the given name.
Declaration
public string this[string columnName] { get; }
Parameters
Type | Name | Description |
---|---|---|
string | columnName | The name of the property whose error message to get. |
Property Value
Type | Description |
---|---|
string | The error message for the property. The default is an empty string (""). |
MissingFieldDataError
Gets the text to show to the user if there was a problem with the configuration file.
Declaration
public static string MissingFieldDataError { get; }
Property Value
Type | Description |
---|---|
string |
Remarks
TODO: Dupe checker documentation needs to be written. Once it is, update this text whenever to a more specific URL that points to the right fragment.
SavedQueryDefinition
Gets or sets the saved query definition for this given template.
Declaration
public DuplicateCheckQueryDefinition SavedQueryDefinition { get; set; }
Property Value
Type | Description |
---|---|
DuplicateCheckQueryDefinition |
TemplateFields
Gets the list of fields for this template.
Declaration
public Dictionary<string, bool?> TemplateFields { get; }
Property Value
Type | Description |
---|---|
Dictionary<string, bool?> |
Remarks
This property is meant to be bound to a xaml Checkbox. The key corresponds to the text shown on the checkbox field, and the value is the whether the checkbox is checked or not. A checkbox "IsChecked" property is of type bool?.
ValidDateFields
Gets the valid date fields that apply to a query.
Declaration
public List<string> ValidDateFields { get; }
Property Value
Type | Description |
---|---|
List<string> |
ValidWorkItemStates
Gets the valid work item states that apply to a query.
Declaration
public Dictionary<string, bool?> ValidWorkItemStates { get; }
Property Value
Type | Description |
---|---|
Dictionary<string, bool?> |
Remarks
This property is meant to be bound to a xaml Checkbox. The key corresponds to the text shown on the checkbox field, and the value is the whether the checkbox is checked or not. A checkbox "IsChecked" property is of type bool?.
ValidWorkItemTypes
Gets the valid work item types that apply to a query.
Declaration
public Dictionary<string, bool?> ValidWorkItemTypes { get; }
Property Value
Type | Description |
---|---|
Dictionary<string, bool?> |
Remarks
This property is meant to be bound to a xaml Checkbox. The key corresponds to the text shown on the checkbox field, and the value is the whether the checkbox is checked or not. A checkbox "IsChecked" property is of type bool?.
WindowTitle
Gets or sets the title of the window.
Declaration
public string WindowTitle { get; set; }
Property Value
Type | Description |
---|---|
string |
Methods
View SourceCheckForUnsavedChanges()
Determines if there are unsaved changes.
Declaration
public void CheckForUnsavedChanges()