From 9da3e0256092cc21398bda66b96b996a0de55dd3 Mon Sep 17 00:00:00 2001 From: Victoria Plitt Date: Tue, 13 Jul 2021 12:21:32 +0300 Subject: RML Extension changes --- .../Views/AddItemDialog.xaml | 21 ++++ .../Views/AddItemDialog.xaml.cs | 28 +++++ .../Views/ComboboxEditable.xaml | 39 +++++++ .../Views/ComboboxEditable.xaml.cs | 89 +++++++++++++++ .../Views/RMLExtensionView.xaml | 10 ++ .../Views/RMLExtensionsView.xaml | 38 +------ .../Views/ThreadCharacteristicsView.xaml | 121 ++++++++++++++++++--- 7 files changed, 294 insertions(+), 52 deletions(-) create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/AddItemDialog.xaml create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/AddItemDialog.xaml.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ComboboxEditable.xaml create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ComboboxEditable.xaml.cs (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views') diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/AddItemDialog.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/AddItemDialog.xaml new file mode 100644 index 000000000..c529eabe0 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/AddItemDialog.xaml @@ -0,0 +1,21 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/AddItemDialog.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/AddItemDialog.xaml.cs new file mode 100644 index 000000000..6bd81343e --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/AddItemDialog.xaml.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; + +namespace Tango.MachineStudio.ThreadExtensions.Views +{ + /// + /// Interaction logic for AddItemDialog.xaml + /// + public partial class AddItemDialog : UserControl + { + public AddItemDialog() + { + InitializeComponent(); + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ComboboxEditable.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ComboboxEditable.xaml new file mode 100644 index 000000000..88b1bbc62 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ComboboxEditable.xaml @@ -0,0 +1,39 @@ + + + + + + + + + + + + + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ComboboxEditable.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ComboboxEditable.xaml.cs new file mode 100644 index 000000000..e5b542f45 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ComboboxEditable.xaml.cs @@ -0,0 +1,89 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; +using Tango.Core.Commands; + +namespace Tango.MachineStudio.ThreadExtensions.Views +{ + /// + /// Interaction logic for ComboboxEditable.xaml + /// + public partial class ComboboxEditable : UserControl + { + public ComboboxEditable() + { + InitializeComponent(); + } + + + public IEnumerable ItemsSource + { + get { return (IEnumerable)GetValue(ItemsSourceProperty); } + set { SetValue(ItemsSourceProperty, value); } + } + + // Using a DependencyProperty as the backing store for ItemsSource. This enables animation, styling, binding, etc... + public static readonly DependencyProperty ItemsSourceProperty = + DependencyProperty.Register("ItemsSource", typeof(IEnumerable), typeof(ComboboxEditable), new PropertyMetadata(null)); + + + + public object SelectedItem + { + get { return (object)GetValue(SelectedItemProperty); } + set { SetValue(SelectedItemProperty, value); } + } + + // Using a DependencyProperty as the backing store for SelectedItem. This enables animation, styling, binding, etc... + public static readonly DependencyProperty SelectedItemProperty = + DependencyProperty.Register("SelectedItem", typeof(object), typeof(ComboboxEditable), new FrameworkPropertyMetadata(null, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault)); + + + + + + public RelayCommand AddCommand + { + get { return (RelayCommand)GetValue(AddCommandProperty); } + set { SetValue(AddCommandProperty, value); } + } + + // Using a DependencyProperty as the backing store for DeleteCommand. This enables animation, styling, binding, etc... + public static readonly DependencyProperty AddCommandProperty = + DependencyProperty.Register("AddCommand", typeof(RelayCommand), typeof(ComboboxEditable)); + + public RelayCommand EditCommand + { + get { return (RelayCommand)GetValue(EditCommandProperty); } + set { SetValue(EditCommandProperty, value); } + } + + // Using a DependencyProperty as the backing store for DeleteCommand. This enables animation, styling, binding, etc... + public static readonly DependencyProperty EditCommandProperty = + DependencyProperty.Register("EditCommand", typeof(RelayCommand), typeof(ComboboxEditable)); + + public RelayCommand DeleteCommand + { + get { return (RelayCommand)GetValue(DeleteCommandProperty); } + set { SetValue(DeleteCommandProperty, value); } + } + + // Using a DependencyProperty as the backing store for DeleteCommand. This enables animation, styling, binding, etc... + public static readonly DependencyProperty DeleteCommandProperty = + DependencyProperty.Register("DeleteCommand", typeof(RelayCommand), typeof(ComboboxEditable)); + + + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/RMLExtensionView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/RMLExtensionView.xaml index 7e9d85f49..cd131d76d 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/RMLExtensionView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/RMLExtensionView.xaml @@ -18,6 +18,7 @@ + @@ -43,6 +44,15 @@ + + + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/RMLExtensionsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/RMLExtensionsView.xaml index 6a1436348..b2bff1dae 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/RMLExtensionsView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/RMLExtensionsView.xaml @@ -33,26 +33,6 @@ -