forked from RWS/Sdl-Community
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Studio Views: Added UI elements and updated filters
- Loading branch information
1 parent
df9d1bd
commit f64bb6b
Showing
28 changed files
with
2,251 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
namespace StudioViews.Model | ||
{ | ||
public class AnalysisBand | ||
{ | ||
public int MinimumMatchValue { get; set; } | ||
|
||
public int MaximumMatchValue { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
namespace StudioViews.Model | ||
{ | ||
public class ConfirmationStatus | ||
{ | ||
public string Id { get; set; } | ||
|
||
public string Name { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,167 @@ | ||
using System; | ||
using System.Drawing; | ||
using System.Windows.Media.Imaging; | ||
using System.Xml.Serialization; | ||
using Sdl.MultiSelectComboBox.API; | ||
using StudioViews.ViewModel; | ||
|
||
namespace StudioViews.Model | ||
{ | ||
public class FilterItem : BaseModel, IItemEnabledAware, IItemGroupAware | ||
{ | ||
private string _id; | ||
private string _name; | ||
private bool _isEnabled; | ||
private int _selectedOrder; | ||
private IItemGroup _group; | ||
private BitmapImage _image; | ||
private Size _imageSize; | ||
|
||
public FilterItem() | ||
{ | ||
_isEnabled = true; | ||
_selectedOrder = -1; | ||
_imageSize = new Size(2, 24); | ||
} | ||
|
||
/// <summary> | ||
/// Unique id in the collection | ||
/// </summary> | ||
public string Id | ||
{ | ||
get => _id; | ||
set | ||
{ | ||
if (_id != null && string.Compare(_id, value, StringComparison.InvariantCulture) == 0) | ||
{ | ||
return; | ||
} | ||
|
||
_id = value; | ||
OnPropertyChanged(nameof(Id)); | ||
} | ||
} | ||
|
||
/// <summary> | ||
/// The item name. | ||
/// | ||
/// The filter criteria is applied on this property when using the default filter service. | ||
/// </summary> | ||
public string Name | ||
{ | ||
get => _name; | ||
set | ||
{ | ||
if (_name != null && string.Compare(_name, value, StringComparison.InvariantCulture) == 0) | ||
{ | ||
return; | ||
} | ||
|
||
_name = value; | ||
OnPropertyChanged(nameof(Name)); | ||
} | ||
} | ||
|
||
/// <summary> | ||
/// Identifies whether the item is enabled or not. | ||
/// | ||
/// When the item is not enabled, then it will not be selectable from the dropdown list and removed | ||
/// from the selected items automatically. | ||
/// </summary> | ||
public bool IsEnabled | ||
{ | ||
get => _isEnabled; | ||
set | ||
{ | ||
if (_isEnabled.Equals(value)) | ||
{ | ||
return; | ||
} | ||
|
||
_isEnabled = value; | ||
OnPropertyChanged(nameof(IsEnabled)); | ||
} | ||
} | ||
|
||
/// <summary> | ||
/// The order in which the items are added to the selected collection. | ||
/// | ||
/// This order is independent to the group and sort order of the items in the collection. This selected | ||
/// order is visible in each of the selected items from the dropdown list and visually represented by | ||
/// the order of the items in the Selected Items Panel. | ||
/// </summary> | ||
public int SelectedOrder | ||
{ | ||
get => _selectedOrder; | ||
set | ||
{ | ||
if (_selectedOrder.Equals(value)) | ||
{ | ||
return; | ||
} | ||
|
||
_selectedOrder = value; | ||
OnPropertyChanged(nameof(SelectedOrder)); | ||
} | ||
} | ||
|
||
/// <summary> | ||
/// Identifies the name and order of the group header | ||
/// </summary> | ||
public IItemGroup Group | ||
{ | ||
get => _group; | ||
set | ||
{ | ||
if (_group != null && _group.Equals(value)) | ||
{ | ||
return; | ||
} | ||
|
||
_group = value; | ||
OnPropertyChanged(nameof(Group)); | ||
} | ||
} | ||
|
||
/// <summary> | ||
/// The item Image. | ||
/// | ||
/// Use the ImageSize to identify the space required to display the image in the view. | ||
/// </summary> | ||
[XmlIgnore] | ||
public BitmapImage Image | ||
{ | ||
get => _image; | ||
set | ||
{ | ||
_image = value; | ||
OnPropertyChanged(nameof(Image)); | ||
} | ||
} | ||
|
||
/// <summary> | ||
/// The image size. | ||
/// | ||
/// Measures the width and height that is required to display the image. | ||
/// </summary> | ||
public Size ImageSize | ||
{ | ||
get => _imageSize; | ||
set | ||
{ | ||
if (_imageSize.Equals(value)) | ||
{ | ||
return; | ||
} | ||
|
||
_imageSize = value; | ||
OnPropertyChanged(nameof(ImageSize)); | ||
} | ||
} | ||
|
||
public override string ToString() | ||
{ | ||
return Name; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
using Sdl.MultiSelectComboBox.API; | ||
using StudioViews.ViewModel; | ||
|
||
namespace StudioViews.Model | ||
{ | ||
public class FilterItemGroup : BaseModel, IItemGroup | ||
{ | ||
private int _order; | ||
|
||
public FilterItemGroup(int index, string name) | ||
{ | ||
Order = index; | ||
Name = name; | ||
} | ||
|
||
public int Order | ||
{ | ||
get => _order; | ||
set | ||
{ | ||
if (_order.Equals(value)) | ||
{ | ||
return; | ||
} | ||
|
||
_order = value; | ||
OnPropertyChanged(nameof(Order)); | ||
} | ||
} | ||
|
||
public string Name { get; } | ||
|
||
public override string ToString() | ||
{ | ||
return Name; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.