aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB
diff options
context:
space:
mode:
authorAvi Levkovich <avi@twine-s.com>2017-12-19 12:28:20 +0200
committerAvi Levkovich <avi@twine-s.com>2017-12-19 12:28:20 +0200
commit76aa983631df4fa5b16b170e2f6dd845c5ac9531 (patch)
tree6b2b4d0776c54536ec07aabc6be94857dcee91fc /Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB
parent6bf71c81050b824398dc82ce4b69cdf71fb4a2f7 (diff)
parentb421701fd5cf000a16cab9b1fe9eda812ccce8c3 (diff)
downloadTango-76aa983631df4fa5b16b170e2f6dd845c5ac9531.tar.gz
Tango-76aa983631df4fa5b16b170e2f6dd845c5ac9531.zip
Merge branch 'master' of https://twinetfs.visualstudio.com/_git/Tango
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB')
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/App.config13
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Controls/DbTableView.xaml41
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Controls/DbTableView.xaml.cs38
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Controls/TableGrid.cs58
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Converters/RolesPermissionsToStringConverter.cs37
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Converters/UsersRolesToStringConverter.cs37
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/CustomAttributes/DBViewAttribute.cs12
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/DBModule.cs45
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ExtensionMethods/INotificationProviderExtensions.cs30
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Images/db.pngbin0 -> 60118 bytes
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Images/moduleImage.pngbin0 -> 46565 bytes
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Images/seamless-grid.jpgbin0 -> 12022 bytes
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Managers/RegisteredView.cs58
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Managers/ViewsManager.cs31
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Messages/CloseEntityEditViewMessage.cs13
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Messages/OpenEntityEditViewMessage.cs28
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Properties/AssemblyInfo.cs18
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Properties/Resources.Designer.cs62
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Properties/Resources.resx117
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Properties/Settings.Designer.cs30
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Properties/Settings.settings7
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Tango.MachineStudio.DB.csproj508
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModelLocator.cs222
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/AddressesViewVM.cs17
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/ApplicationDisplayPanelVersionsViewVM.cs17
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/ApplicationFirmwareVersionsViewVM.cs17
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/ApplicationOsVersionsViewVM.cs17
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/ApplicationVersionsViewVM.cs17
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/CartridgeTypesViewVM.cs17
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/CartridgesViewVM.cs18
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/ConfigurationsViewVM.cs24
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/DbTableViewModel.cs320
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/DialogOpenMode.cs14
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/DispenserTypesViewVM.cs17
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/DispensersViewVM.cs18
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/EmbeddedFirmwareVersionsViewVM.cs17
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/EmbeddedSoftwareVersionsViewVM.cs17
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/EntityViewModel.cs31
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/HardwareVersionsViewVM.cs17
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/IdsPacksViewVM.cs18
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/LiquidsViewVM.cs17
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/MachineVersionsViewVM.cs18
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/MachinesViewVM.cs26
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/MainViewVM.cs18
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/MultiComboVM.cs44
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/OrganizationsViewVM.cs17
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/PermissionsViewVM.cs17
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/RolesViewVM.cs77
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/UsersViewVM.cs95
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/AddressView.xaml34
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/AddressView.xaml.cs28
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/AddressesView.xaml28
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/AddressesView.xaml.cs31
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationDisplayPanelVersionView.xaml25
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationDisplayPanelVersionView.xaml.cs28
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationDisplayPanelVersionsView.xaml23
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationDisplayPanelVersionsView.xaml.cs32
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationFirmwareVersionView.xaml25
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationFirmwareVersionView.xaml.cs28
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationFirmwareVersionsView.xaml23
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationFirmwareVersionsView.xaml.cs32
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationOsVersionView.xaml25
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationOsVersionView.xaml.cs28
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationOsVersionsView.xaml23
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationOsVersionsView.xaml.cs32
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationVersionView.xaml25
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationVersionView.xaml.cs28
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationVersionsView.xaml23
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationVersionsView.xaml.cs32
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/CartridgeTypeView.xaml29
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/CartridgeTypeView.xaml.cs28
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/CartridgeTypesView.xaml24
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/CartridgeTypesView.xaml.cs32
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/CartridgeView.xaml29
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/CartridgeView.xaml.cs28
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/CartridgesView.xaml24
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/CartridgesView.xaml.cs32
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ConfigurationView.xaml53
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ConfigurationView.xaml.cs28
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ConfigurationsView.xaml30
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ConfigurationsView.xaml.cs32
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DispenserTypeView.xaml29
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DispenserTypeView.xaml.cs28
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DispenserTypesView.xaml24
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DispenserTypesView.xaml.cs32
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DispenserView.xaml29
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DispenserView.xaml.cs28
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DispensersView.xaml24
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DispensersView.xaml.cs32
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EmbeddedFirmwareVersionView.xaml25
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EmbeddedFirmwareVersionView.xaml.cs28
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EmbeddedFirmwareVersionsView.xaml23
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EmbeddedFirmwareVersionsView.xaml.cs32
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EmbeddedSoftwareVersionView.xaml25
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EmbeddedSoftwareVersionView.xaml.cs28
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EmbeddedSoftwareVersionsView.xaml23
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EmbeddedSoftwareVersionsView.xaml.cs32
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/HardwareVersionView.xaml25
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/HardwareVersionView.xaml.cs28
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/HardwareVersionsView.xaml23
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/HardwareVersionsView.xaml.cs32
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/IdsPackView.xaml64
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/IdsPackView.xaml.cs28
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/IdsPacksView.xaml57
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/IdsPacksView.xaml.cs32
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/LiquidView.xaml42
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/LiquidView.xaml.cs28
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/LiquidsView.xaml41
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/LiquidsView.xaml.cs32
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MachineVersionView.xaml27
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MachineVersionView.xaml.cs28
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MachineVersionsView.xaml24
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MachineVersionsView.xaml.cs32
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MachineView.xaml30
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MachineView.xaml.cs28
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MachinesView.xaml26
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MachinesView.xaml.cs32
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/OrganizationView.xaml26
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/OrganizationView.xaml.cs28
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/OrganizationsView.xaml27
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/OrganizationsView.xaml.cs30
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/PermissionView.xaml27
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/PermissionView.xaml.cs28
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/PermissionsView.xaml24
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/PermissionsView.xaml.cs31
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/RoleView.xaml45
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/RoleView.xaml.cs34
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/RolesView.xaml30
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/RolesView.xaml.cs31
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/UserView.xaml48
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/UserView.xaml.cs34
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/UsersView.xaml33
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/UsersView.xaml.cs30
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/MainDBView.xaml157
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/MainDBView.xaml.cs79
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Windows/DBDialogWindow.xaml32
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Windows/DBDialogWindow.xaml.cs68
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/packages.config13
138 files changed, 5225 insertions, 0 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/App.config b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/App.config
new file mode 100644
index 000000000..2fb423e8b
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/App.config
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<configuration>
+ <configSections>
+ <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
+ <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
+ </configSections>
+ <entityFramework>
+ <defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
+ <providers>
+ <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
+ </providers>
+ </entityFramework>
+</configuration> \ No newline at end of file
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Controls/DbTableView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Controls/DbTableView.xaml
new file mode 100644
index 000000000..d1c62ed7e
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Controls/DbTableView.xaml
@@ -0,0 +1,41 @@
+<UserControl x:Class="Tango.MachineStudio.DB.Controls.DbTableView"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
+ mc:Ignorable="d"
+ d:DesignHeight="720" d:DesignWidth="1280">
+ <Grid>
+
+ <Grid>
+ <Grid.RowDefinitions>
+ <RowDefinition Height="60"/>
+ <RowDefinition Height="1*"/>
+ </Grid.RowDefinitions>
+
+ <Grid Background="#E9E9E9">
+ <StackPanel Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="10">
+ <materialDesign:PackIcon VerticalAlignment="Center" Width="24" Height="24" Foreground="{Binding ElementName=txtSearch, Path=BorderBrush}" Kind="AccountSearch" />
+ <TextBox x:Name="txtSearch" Text="{Binding Filter,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" materialDesign:HintAssist.Hint="Search" Width="200" FontSize="14" />
+ </StackPanel>
+
+ <StackPanel HorizontalAlignment="Right" VerticalAlignment="Center" Orientation="Horizontal" Margin="0 0 10 0">
+ <Button Style="{StaticResource MaterialDesignFloatingActionDarkButton}" ToolTip="Remove" Command="{Binding DeleteCommand}" Width="40" Height="40">
+ <materialDesign:PackIcon Width="20" Height="20" Kind="Delete" />
+ </Button>
+ <Button Style="{StaticResource MaterialDesignFloatingActionDarkButton}" ToolTip="Edit" Command="{Binding EditCommand}" Margin="10 0 0 0" Width="40" Height="40">
+ <materialDesign:PackIcon Width="20" Height="20" Kind="Pencil" />
+ </Button>
+ <Button Style="{StaticResource MaterialDesignFloatingActionDarkButton}" ToolTip="Add" Command="{Binding AddCommand}" Margin="10 0 0 0" Width="40" Height="40">
+ <materialDesign:PackIcon Width="20" Height="20" Kind="Plus" />
+ </Button>
+ </StackPanel>
+ </Grid>
+
+ <Grid Grid.Row="1">
+ <ContentControl Content="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=MainContent}" Margin="0 60 0 0"></ContentControl>
+ </Grid>
+ </Grid>
+ </Grid>
+</UserControl>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Controls/DbTableView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Controls/DbTableView.xaml.cs
new file mode 100644
index 000000000..9ae14952b
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Controls/DbTableView.xaml.cs
@@ -0,0 +1,38 @@
+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.Markup;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+
+namespace Tango.MachineStudio.DB.Controls
+{
+ /// <summary>
+ /// Interaction logic for DbTableView.xaml
+ /// </summary>
+ [ContentProperty(nameof(MainContent))]
+ public partial class DbTableView : UserControl
+ {
+ public FrameworkElement MainContent
+ {
+ get { return (FrameworkElement)GetValue(MainContentProperty); }
+ set { SetValue(MainContentProperty, value); }
+ }
+ public static readonly DependencyProperty MainContentProperty =
+ DependencyProperty.Register("MainContent", typeof(FrameworkElement), typeof(DbTableView), new PropertyMetadata(null));
+
+ public DbTableView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Controls/TableGrid.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Controls/TableGrid.cs
new file mode 100644
index 000000000..53a990d4d
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Controls/TableGrid.cs
@@ -0,0 +1,58 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+
+namespace Tango.MachineStudio.DB.Controls
+{
+ public class TableGrid : Grid
+ {
+ public TableGrid()
+ {
+ ColumnDefinitions.Add(new ColumnDefinition() { Width = new GridLength(1, GridUnitType.Auto) });
+ ColumnDefinitions.Add(new ColumnDefinition() { Width = new GridLength(1, GridUnitType.Star) });
+ this.Loaded += TableGrid_Loaded;
+ }
+
+ private void TableGrid_Loaded(object sender, RoutedEventArgs e)
+ {
+ InvalidateGrid();
+ }
+
+ protected override void OnVisualChildrenChanged(DependencyObject visualAdded, DependencyObject visualRemoved)
+ {
+ base.OnVisualChildrenChanged(visualAdded, visualRemoved);
+ }
+
+ protected override Size ArrangeOverride(Size arrangeSize)
+ {
+ return base.ArrangeOverride(arrangeSize);
+ }
+
+ private void InvalidateGrid()
+ {
+ RowDefinitions.Clear();
+ RowDefinitions.Add(new RowDefinition() { Height = new GridLength(50, GridUnitType.Pixel) });
+
+ int currentRow = 0;
+
+ for (int i = 0; i < Children.Count; i++)
+ {
+ SetRow(Children[i], currentRow);
+
+ if (i % 2 != 0)
+ {
+ SetColumn(Children[i], 1);
+ (Children[i] as FrameworkElement).Margin = new Thickness(20, 0, 0, 0);
+ currentRow++;
+ RowDefinitions.Add(new RowDefinition() { Height = new GridLength(50, GridUnitType.Pixel) });
+ }
+
+ (Children[i] as FrameworkElement).VerticalAlignment = VerticalAlignment.Bottom;
+ }
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Converters/RolesPermissionsToStringConverter.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Converters/RolesPermissionsToStringConverter.cs
new file mode 100644
index 000000000..7a301bd12
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Converters/RolesPermissionsToStringConverter.cs
@@ -0,0 +1,37 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Data;
+using Tango.DAL.Observables;
+using Tango.MachineStudio.DB.ViewModels;
+
+namespace Tango.MachineStudio.DB.Converters
+{
+ public class RolesPermissionsToStringConverter : IValueConverter
+ {
+ public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ if (value == null) return "";
+
+ if (value is IEnumerable<RolesPermission>)
+ {
+ IEnumerable<RolesPermission> rolesPermissions = value as IEnumerable<RolesPermission>;
+ return String.Join(", ", rolesPermissions.Where(x => !x.Deleted).Select(x => x.Permission.Name));
+ }
+ else
+ {
+ IEnumerable<MultiComboVM<Permission>> rolesPermissions = value as IEnumerable<MultiComboVM<Permission>>;
+ return String.Join(", ", rolesPermissions.Where(x => x.IsSelected).Select(x => x.Entity.Name));
+ }
+ }
+
+ public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ throw new NotImplementedException();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Converters/UsersRolesToStringConverter.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Converters/UsersRolesToStringConverter.cs
new file mode 100644
index 000000000..5f820d41d
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Converters/UsersRolesToStringConverter.cs
@@ -0,0 +1,37 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Data;
+using Tango.DAL.Observables;
+using Tango.MachineStudio.DB.ViewModels;
+
+namespace Tango.MachineStudio.DB.Converters
+{
+ public class UsersRolesToStringConverter : IValueConverter
+ {
+ public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ if (value == null) return "";
+
+ if (value is IEnumerable<UsersRole>)
+ {
+ IEnumerable<UsersRole> userRoles = value as IEnumerable<UsersRole>;
+ return String.Join(", ", userRoles.Where(x => !x.Deleted).Select(x => x.Role.Name));
+ }
+ else
+ {
+ IEnumerable<MultiComboVM<Role>> userRoles = value as IEnumerable<MultiComboVM<Role>>;
+ return String.Join(", ", userRoles.Where(x => x.IsSelected).Select(x => x.Entity.Name));
+ }
+ }
+
+ public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ throw new NotImplementedException();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/CustomAttributes/DBViewAttribute.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/CustomAttributes/DBViewAttribute.cs
new file mode 100644
index 000000000..4bf920015
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/CustomAttributes/DBViewAttribute.cs
@@ -0,0 +1,12 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Tango.MachineStudio.DB.CustomAttributes
+{
+ public class DBViewAttribute : Attribute
+ {
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/DBModule.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/DBModule.cs
new file mode 100644
index 000000000..0928d2a1f
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/DBModule.cs
@@ -0,0 +1,45 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Media.Imaging;
+using Tango.DAL.Observables;
+using Tango.MachineStudio.Common;
+using Tango.MachineStudio.DB.Views;
+
+namespace Tango.MachineStudio.DB
+{
+ public class DBModule : IStudioModule
+ {
+ private bool _isInitialized;
+
+ public string Name => "Data Base";
+
+ public string Description => "Provides access to raw database tables.";
+
+ public BitmapSource Image => SharedUI.Helpers.ResourceHelper.GetImageFromResources("Images/db.png");
+
+ public FrameworkElement MainView => new MainDBView();
+
+ public bool IsInitialized => _isInitialized;
+
+ public Permissions Permission => Permissions.RunDataBaseModule;
+
+ public void Dispose()
+ {
+ throw new NotImplementedException();
+ }
+
+ public void Initialize()
+ {
+ if (!_isInitialized)
+ {
+ //Initialize
+
+ _isInitialized = true;
+ }
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ExtensionMethods/INotificationProviderExtensions.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ExtensionMethods/INotificationProviderExtensions.cs
new file mode 100644
index 000000000..8d95bb38e
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ExtensionMethods/INotificationProviderExtensions.cs
@@ -0,0 +1,30 @@
+using MaterialDesignThemes.Wpf;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using Tango.DAL.Observables;
+using Tango.MachineStudio.Common.Notifications;
+using Tango.MachineStudio.DB.ViewModels;
+using Tango.MachineStudio.DB.Views.DBViews;
+using Tango.MachineStudio.DB.Windows;
+
+namespace Tango.MachineStudio.DB.ExtensionMethods
+{
+ public static class INotificationProviderExtensions
+ {
+ public static bool ShowDialog<T>(this INotificationProvider provider, DialogOpenMode mode, DbTableViewModel<T> context) where T : class, IObservableEntity
+ {
+ Type viewType = typeof(INotificationProviderExtensions).Assembly.GetType(typeof(OrganizationView).Namespace + "." + typeof(T).Name + "View");
+
+ DBDialogWindow window = new DBDialogWindow(Activator.CreateInstance(viewType) as FrameworkElement);
+ window.IconKind = (mode == DialogOpenMode.Editing ? PackIconKind.TableEdit : PackIconKind.Plus);
+ window.InnerTitle = (mode == DialogOpenMode.Editing ? "Edit " : "Add New ") + typeof(T).Name;
+ window.DataContext = context;
+
+ return provider.ShowModalWindow(window).Value;
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Images/db.png b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Images/db.png
new file mode 100644
index 000000000..6fdb177da
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Images/db.png
Binary files differ
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Images/moduleImage.png b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Images/moduleImage.png
new file mode 100644
index 000000000..531f8945b
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Images/moduleImage.png
Binary files differ
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Images/seamless-grid.jpg b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Images/seamless-grid.jpg
new file mode 100644
index 000000000..59bb9c370
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Images/seamless-grid.jpg
Binary files differ
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Managers/RegisteredView.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Managers/RegisteredView.cs
new file mode 100644
index 000000000..fc9051edb
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Managers/RegisteredView.cs
@@ -0,0 +1,58 @@
+using MaterialDesignThemes.Wpf;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using Tango.Core.Commands;
+using Tango.MachineStudio.Common.Controls;
+
+namespace Tango.MachineStudio.DB.Managers
+{
+ public class RegisteredView : MdiChild
+ {
+ private static Random rnd = new Random();
+
+ public RelayCommand AddCommand { get; set; }
+
+ public RegisteredView(String header, FrameworkElement view, Action action)
+ {
+ Location = new Point(rnd.Next(30, 200), rnd.Next(30, 200));
+ Icon = PackIconKind.Table;
+ Header = header;
+ View = view;
+
+ if (action != null)
+ {
+ AddCommand = new RelayCommand(action);
+ }
+ else
+ {
+ AddCommand = new RelayCommand(() =>
+ {
+ if (!ViewsManager.DisplayedViews.Contains(this))
+ {
+ ViewsManager.DisplayedViews.Add(this);
+ }
+ else
+ {
+ View.BringIntoView();
+ View.Focus();
+ }
+ });
+ }
+ }
+
+ public RegisteredView(String header, FrameworkElement view) : this(header, view, null)
+ {
+ Header = header;
+ View = view;
+ }
+
+ public override string ToString()
+ {
+ return Header;
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Managers/ViewsManager.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Managers/ViewsManager.cs
new file mode 100644
index 000000000..2bb5969bc
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Managers/ViewsManager.cs
@@ -0,0 +1,31 @@
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using Tango.Core.Commands;
+using Tango.MachineStudio.DB.CustomAttributes;
+using Tango.MachineStudio.DB.Views.DBViews;
+
+namespace Tango.MachineStudio.DB.Managers
+{
+ public static class ViewsManager
+ {
+ public static ObservableCollection<RegisteredView> DisplayedViews { get; set; }
+
+ public static ObservableCollection<RegisteredView> DbViews { get; set; }
+
+ static ViewsManager()
+ {
+ DisplayedViews = new ObservableCollection<RegisteredView>();
+ DbViews = new ObservableCollection<RegisteredView>();
+
+ foreach (var type in typeof(ViewsManager).Assembly.GetTypes().Where(x => x.CustomAttributes.Count() > 0 && x.CustomAttributes.First().AttributeType == typeof(DBViewAttribute)).OrderBy(x => x.Name))
+ {
+ DbViews.Add(new RegisteredView(type.Name.Replace("View", "").ToTitle(), Activator.CreateInstance(type) as FrameworkElement));
+ }
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Messages/CloseEntityEditViewMessage.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Messages/CloseEntityEditViewMessage.cs
new file mode 100644
index 000000000..97e5cf21c
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Messages/CloseEntityEditViewMessage.cs
@@ -0,0 +1,13 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.MachineStudio.Common.Messages;
+
+namespace Tango.MachineStudio.DB.Messages
+{
+ public class CloseEntityEditViewMessage : IStudioMessage
+ {
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Messages/OpenEntityEditViewMessage.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Messages/OpenEntityEditViewMessage.cs
new file mode 100644
index 000000000..b3bf53f93
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Messages/OpenEntityEditViewMessage.cs
@@ -0,0 +1,28 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.DAL.Observables;
+using Tango.MachineStudio.Common.Messages;
+using Tango.MachineStudio.DB.ViewModels;
+using Tango.SharedUI;
+
+namespace Tango.MachineStudio.DB.Messages
+{
+ public class OpenEntityEditViewMessage : IStudioMessage
+ {
+ public DialogOpenMode DialogOpenMode { get; set; }
+
+ public ViewModel Context { get; set; }
+
+ public Type EntityType { get; set; }
+
+ public OpenEntityEditViewMessage(DialogOpenMode mode, ViewModel context, Type entityType)
+ {
+ DialogOpenMode = mode;
+ Context = context;
+ EntityType = entityType;
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Properties/AssemblyInfo.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Properties/AssemblyInfo.cs
new file mode 100644
index 000000000..73a5c7c86
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Properties/AssemblyInfo.cs
@@ -0,0 +1,18 @@
+using System.Reflection;
+using System.Resources;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using System.Windows;
+
+[assembly: AssemblyTitle("Tango - Machine Studio DB Module")]
+
+[assembly: ComVisible(false)]
+
+[assembly:ThemeInfo(
+ ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
+ //(used if a resource is not found in the page,
+ // or application resource dictionaries)
+ ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
+ //(used if a resource is not found in the page,
+ // app, or any theme specific resource dictionaries)
+)]
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Properties/Resources.Designer.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Properties/Resources.Designer.cs
new file mode 100644
index 000000000..02b7b332e
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Properties/Resources.Designer.cs
@@ -0,0 +1,62 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.42000
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace Tango.MachineStudio.DB.Properties {
+
+
+ /// <summary>
+ /// A strongly-typed resource class, for looking up localized strings, etc.
+ /// </summary>
+ // This class was auto-generated by the StronglyTypedResourceBuilder
+ // class via a tool like ResGen or Visual Studio.
+ // To add or remove a member, edit your .ResX file then rerun ResGen
+ // with the /str option, or rebuild your VS project.
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ internal class Resources {
+
+ private static global::System.Resources.ResourceManager resourceMan;
+
+ private static global::System.Globalization.CultureInfo resourceCulture;
+
+ [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+ internal Resources() {
+ }
+
+ /// <summary>
+ /// Returns the cached ResourceManager instance used by this class.
+ /// </summary>
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Resources.ResourceManager ResourceManager {
+ get {
+ if ((resourceMan == null)) {
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Tango.MachineStudio.DB.Properties.Resources", typeof(Resources).Assembly);
+ resourceMan = temp;
+ }
+ return resourceMan;
+ }
+ }
+
+ /// <summary>
+ /// Overrides the current thread's CurrentUICulture property for all
+ /// resource lookups using this strongly typed resource class.
+ /// </summary>
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Globalization.CultureInfo Culture {
+ get {
+ return resourceCulture;
+ }
+ set {
+ resourceCulture = value;
+ }
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Properties/Resources.resx b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Properties/Resources.resx
new file mode 100644
index 000000000..af7dbebba
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Properties/Resources.resx
@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 2.0
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">2.0</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>[base64 mime encoded serialized .NET Framework object]</value>
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+ <comment>This is a comment</comment>
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ : System.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : and then encoded with base64 encoding.
+ -->
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="metadata">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" />
+ <xsd:attribute name="type" type="xsd:string" />
+ <xsd:attribute name="mimetype" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="assembly">
+ <xsd:complexType>
+ <xsd:attribute name="alias" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>2.0</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+</root> \ No newline at end of file
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Properties/Settings.Designer.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Properties/Settings.Designer.cs
new file mode 100644
index 000000000..6699c6cbf
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Properties/Settings.Designer.cs
@@ -0,0 +1,30 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.42000
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace Tango.MachineStudio.DB.Properties
+{
+
+
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
+ internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
+ {
+
+ private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
+
+ public static Settings Default
+ {
+ get
+ {
+ return defaultInstance;
+ }
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Properties/Settings.settings b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Properties/Settings.settings
new file mode 100644
index 000000000..033d7a5e9
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Properties/Settings.settings
@@ -0,0 +1,7 @@
+<?xml version='1.0' encoding='utf-8'?>
+<SettingsFile xmlns="uri:settings" CurrentProfile="(Default)">
+ <Profiles>
+ <Profile Name="(Default)" />
+ </Profiles>
+ <Settings />
+</SettingsFile> \ No newline at end of file
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Tango.MachineStudio.DB.csproj b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Tango.MachineStudio.DB.csproj
new file mode 100644
index 000000000..bb52ecb86
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Tango.MachineStudio.DB.csproj
@@ -0,0 +1,508 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProjectGuid>{94F7ACF8-55E1-4A02-B9BC-A818413FDBBF}</ProjectGuid>
+ <OutputType>library</OutputType>
+ <RootNamespace>Tango.MachineStudio.DB</RootNamespace>
+ <AssemblyName>Tango.MachineStudio.DB</AssemblyName>
+ <TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>..\..\..\Build\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="Dragablz, Version=0.0.3.197, Culture=neutral, processorArchitecture=MSIL">
+ <HintPath>..\..\..\packages\Dragablz.0.0.3.197\lib\net45\Dragablz.dll</HintPath>
+ </Reference>
+ <Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
+ <HintPath>..\..\..\packages\EntityFramework.6.0.0\lib\net45\EntityFramework.dll</HintPath>
+ </Reference>
+ <Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
+ <HintPath>..\..\..\packages\EntityFramework.6.0.0\lib\net45\EntityFramework.SqlServer.dll</HintPath>
+ </Reference>
+ <Reference Include="GalaSoft.MvvmLight, Version=5.3.0.19026, Culture=neutral, PublicKeyToken=e7570ab207bcb616, processorArchitecture=MSIL">
+ <HintPath>..\..\..\packages\MvvmLightLibs.5.3.0.0\lib\net45\GalaSoft.MvvmLight.dll</HintPath>
+ </Reference>
+ <Reference Include="GalaSoft.MvvmLight.Extras, Version=5.3.0.19032, Culture=neutral, PublicKeyToken=669f0b5e8f868abf, processorArchitecture=MSIL">
+ <HintPath>..\..\..\packages\MvvmLightLibs.5.3.0.0\lib\net45\GalaSoft.MvvmLight.Extras.dll</HintPath>
+ </Reference>
+ <Reference Include="GalaSoft.MvvmLight.Platform, Version=5.3.0.19032, Culture=neutral, PublicKeyToken=5f873c45e98af8a1, processorArchitecture=MSIL">
+ <HintPath>..\..\..\packages\MvvmLightLibs.5.3.0.0\lib\net45\GalaSoft.MvvmLight.Platform.dll</HintPath>
+ </Reference>
+ <Reference Include="MahApps.Metro, Version=1.5.0.23, Culture=neutral, PublicKeyToken=f4fb5a3c4d1e5b4f, processorArchitecture=MSIL">
+ <HintPath>..\..\..\packages\MahApps.Metro.1.5.0\lib\net45\MahApps.Metro.dll</HintPath>
+ </Reference>
+ <Reference Include="MaterialDesignColors, Version=1.1.2.0, Culture=neutral, processorArchitecture=MSIL">
+ <HintPath>..\..\..\packages\MaterialDesignColors.1.1.2\lib\net45\MaterialDesignColors.dll</HintPath>
+ </Reference>
+ <Reference Include="MaterialDesignThemes.Wpf, Version=2.3.1.953, Culture=neutral, processorArchitecture=MSIL">
+ <HintPath>..\..\..\packages\MaterialDesignThemes.2.3.1.953\lib\net45\MaterialDesignThemes.Wpf.dll</HintPath>
+ </Reference>
+ <Reference Include="Microsoft.Practices.ServiceLocation, Version=1.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+ <HintPath>..\..\..\packages\CommonServiceLocator.1.3\lib\portable-net4+sl5+netcore45+wpa81+wp8\Microsoft.Practices.ServiceLocation.dll</HintPath>
+ </Reference>
+ <Reference Include="SimpleValidator, Version=0.6.1.0, Culture=neutral, processorArchitecture=MSIL">
+ <HintPath>..\..\..\packages\SimpleValidator.0.6.1.0\lib\net40\SimpleValidator.dll</HintPath>
+ </Reference>
+ <Reference Include="System" />
+ <Reference Include="System.ComponentModel.DataAnnotations" />
+ <Reference Include="System.Data" />
+ <Reference Include="System.Windows.Interactivity, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+ <HintPath>..\..\..\packages\MahApps.Metro.1.5.0\lib\net45\System.Windows.Interactivity.dll</HintPath>
+ </Reference>
+ <Reference Include="System.Xml" />
+ <Reference Include="Microsoft.CSharp" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Xml.Linq" />
+ <Reference Include="System.Data.DataSetExtensions" />
+ <Reference Include="System.Net.Http" />
+ <Reference Include="System.Xaml">
+ <RequiredTargetFramework>4.0</RequiredTargetFramework>
+ </Reference>
+ <Reference Include="WindowsBase" />
+ <Reference Include="PresentationCore" />
+ <Reference Include="PresentationFramework" />
+ <Reference Include="WriteableBitmapEx.Wpf, Version=1.5.0.0, Culture=neutral, PublicKeyToken=50375ca6144f1c69, processorArchitecture=MSIL">
+ <HintPath>..\..\..\packages\WriteableBitmapEx.1.5.0.0\lib\net40\WriteableBitmapEx.Wpf.dll</HintPath>
+ </Reference>
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Converters\RolesPermissionsToStringConverter.cs" />
+ <Compile Include="DBModule.cs" />
+ <Compile Include="ExtensionMethods\INotificationProviderExtensions.cs" />
+ <Compile Include="Messages\CloseEntityEditViewMessage.cs" />
+ <Compile Include="Messages\OpenEntityEditViewMessage.cs" />
+ <Compile Include="ViewModels\AddressesViewVM.cs" />
+ <Compile Include="ViewModels\ApplicationDisplayPanelVersionsViewVM.cs" />
+ <Compile Include="ViewModels\ApplicationFirmwareVersionsViewVM.cs" />
+ <Compile Include="ViewModels\ApplicationOsVersionsViewVM.cs" />
+ <Compile Include="ViewModels\ApplicationVersionsViewVM.cs" />
+ <Compile Include="ViewModels\CartridgesViewVM.cs" />
+ <Compile Include="ViewModels\CartridgeTypesViewVM.cs" />
+ <Compile Include="ViewModels\ConfigurationsViewVM.cs" />
+ <Compile Include="ViewModels\DbTableViewModel.cs" />
+ <Compile Include="ViewModels\DialogOpenMode.cs" />
+ <Compile Include="ViewModels\DispenserTypesViewVM.cs" />
+ <Compile Include="ViewModels\DispensersViewVM.cs" />
+ <Compile Include="ViewModels\EmbeddedFirmwareVersionsViewVM.cs" />
+ <Compile Include="ViewModels\EmbeddedSoftwareVersionsViewVM.cs" />
+ <Compile Include="ViewModels\HardwareVersionsViewVM.cs" />
+ <Compile Include="ViewModels\IdsPacksViewVM.cs" />
+ <Compile Include="ViewModels\LiquidsViewVM.cs" />
+ <Compile Include="ViewModels\MachinesViewVM.cs" />
+ <Compile Include="ViewModels\MachineVersionsViewVM.cs" />
+ <Compile Include="ViewModels\MultiComboVM.cs" />
+ <Compile Include="ViewModels\OrganizationsViewVM.cs" />
+ <Compile Include="ViewModels\PermissionsViewVM.cs" />
+ <Compile Include="ViewModels\RolesViewVM.cs" />
+ <Compile Include="ViewModels\UsersViewVM.cs" />
+ <Compile Include="ViewModels\EntityViewModel.cs" />
+ <Compile Include="ViewModels\MainViewVM.cs" />
+ <Compile Include="ViewModelLocator.cs" />
+ <Compile Include="Views\DBViews\IdsPacksView.xaml.cs">
+ <DependentUpon>IdsPacksView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\CartridgeTypesView.xaml.cs">
+ <DependentUpon>CartridgeTypesView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\CartridgesView.xaml.cs">
+ <DependentUpon>CartridgesView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\DispensersView.xaml.cs">
+ <DependentUpon>DispensersView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\DispenserTypesView.xaml.cs">
+ <DependentUpon>DispenserTypesView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\CartridgeTypeView.xaml.cs">
+ <DependentUpon>CartridgeTypeView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\CartridgeView.xaml.cs">
+ <DependentUpon>CartridgeView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\DispenserView.xaml.cs">
+ <DependentUpon>DispenserView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\DispenserTypeView.xaml.cs">
+ <DependentUpon>DispenserTypeView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\IdsPackView.xaml.cs">
+ <DependentUpon>IdsPackView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\LiquidView.xaml.cs">
+ <DependentUpon>LiquidView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\LiquidsView.xaml.cs">
+ <DependentUpon>LiquidsView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\HardwareVersionView.xaml.cs">
+ <DependentUpon>HardwareVersionView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\EmbeddedSoftwareVersionView.xaml.cs">
+ <DependentUpon>EmbeddedSoftwareVersionView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\EmbeddedFirmwareVersionView.xaml.cs">
+ <DependentUpon>EmbeddedFirmwareVersionView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\ApplicationVersionView.xaml.cs">
+ <DependentUpon>ApplicationVersionView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\ApplicationOsVersionView.xaml.cs">
+ <DependentUpon>ApplicationOsVersionView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\ApplicationFirmwareVersionView.xaml.cs">
+ <DependentUpon>ApplicationFirmwareVersionView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\HardwareVersionsView.xaml.cs">
+ <DependentUpon>HardwareVersionsView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\EmbeddedSoftwareVersionsView.xaml.cs">
+ <DependentUpon>EmbeddedSoftwareVersionsView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\EmbeddedFirmwareVersionsView.xaml.cs">
+ <DependentUpon>EmbeddedFirmwareVersionsView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\ApplicationVersionsView.xaml.cs">
+ <DependentUpon>ApplicationVersionsView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\ApplicationOsVersionsView.xaml.cs">
+ <DependentUpon>ApplicationOsVersionsView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\ApplicationFirmwareVersionsView.xaml.cs">
+ <DependentUpon>ApplicationFirmwareVersionsView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\ConfigurationsView.xaml.cs">
+ <DependentUpon>ConfigurationsView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\ApplicationDisplayPanelVersionsView.xaml.cs">
+ <DependentUpon>ApplicationDisplayPanelVersionsView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\MachineVersionsView.xaml.cs">
+ <DependentUpon>MachineVersionsView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\ApplicationDisplayPanelVersionView.xaml.cs">
+ <DependentUpon>ApplicationDisplayPanelVersionView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\MachineVersionView.xaml.cs">
+ <DependentUpon>MachineVersionView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\ConfigurationView.xaml.cs">
+ <DependentUpon>ConfigurationView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\PermissionView.xaml.cs">
+ <DependentUpon>PermissionView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\PermissionsView.xaml.cs">
+ <DependentUpon>PermissionsView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\RoleView.xaml.cs">
+ <DependentUpon>RoleView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\RolesView.xaml.cs">
+ <DependentUpon>RolesView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\AddressesView.xaml.cs">
+ <DependentUpon>AddressesView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\AddressView.xaml.cs">
+ <DependentUpon>AddressView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\MachinesView.xaml.cs">
+ <DependentUpon>MachinesView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\MachineView.xaml.cs">
+ <DependentUpon>MachineView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\OrganizationsView.xaml.cs">
+ <DependentUpon>OrganizationsView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\OrganizationView.xaml.cs">
+ <DependentUpon>OrganizationView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\UsersView.xaml.cs">
+ <DependentUpon>UsersView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DBViews\UserView.xaml.cs">
+ <DependentUpon>UserView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\MainDBView.xaml.cs">
+ <DependentUpon>MainDBView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Windows\DBDialogWindow.xaml.cs">
+ <DependentUpon>DBDialogWindow.xaml</DependentUpon>
+ </Compile>
+ <Page Include="Controls\DbTableView.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </Page>
+ <Compile Include="..\..\..\Versioning\GlobalVersionInfo.cs">
+ <Link>GlobalVersionInfo.cs</Link>
+ </Compile>
+ <Compile Include="Controls\DbTableView.xaml.cs">
+ <DependentUpon>DbTableView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Controls\TableGrid.cs" />
+ <Compile Include="Converters\UsersRolesToStringConverter.cs" />
+ <Compile Include="CustomAttributes\DBViewAttribute.cs" />
+ <Compile Include="Managers\RegisteredView.cs" />
+ <Compile Include="Managers\ViewsManager.cs" />
+ <Page Include="Views\DBViews\IdsPacksView.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </Page>
+ <Page Include="Views\DBViews\CartridgeTypesView.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </Page>
+ <Page Include="Views\DBViews\CartridgesView.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </Page>
+ <Page Include="Views\DBViews\DispensersView.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </Page>
+ <Page Include="Views\DBViews\DispenserTypesView.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </Page>
+ <Page Include="Views\DBViews\CartridgeTypeView.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </Page>
+ <Page Include="Views\DBViews\CartridgeView.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </Page>
+ <Page Include="Views\DBViews\DispenserView.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </Page>
+ <Page Include="Views\DBViews\DispenserTypeView.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </Page>
+ <Page Include="Views\DBViews\IdsPackView.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </Page>
+ <Page Include="Views\DBViews\LiquidView.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </Page>
+ <Page Include="Views\DBViews\LiquidsView.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </Page>
+ <Page Include="Views\DBViews\HardwareVersionView.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </Page>
+ <Page Include="Views\DBViews\EmbeddedSoftwareVersionView.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </Page>
+ <Page Include="Views\DBViews\EmbeddedFirmwareVersionView.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </Page>
+ <Page Include="Views\DBViews\ApplicationVersionView.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </Page>
+ <Page Include="Views\DBViews\ApplicationOsVersionView.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </Page>
+ <Page Include="Views\DBViews\ApplicationFirmwareVersionView.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </Page>
+ <Page Include="Views\DBViews\HardwareVersionsView.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </Page>
+ <Page Include="Views\DBViews\EmbeddedSoftwareVersionsView.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </Page>
+ <Page Include="Views\DBViews\EmbeddedFirmwareVersionsView.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </Page>
+ <Page Include="Views\DBViews\ApplicationVersionsView.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </Page>
+ <Page Include="Views\DBViews\ApplicationOsVersionsView.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </Page>
+ <Page Include="Views\DBViews\ApplicationFirmwareVersionsView.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </Page>
+ <Page Include="Views\DBViews\ConfigurationsView.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </Page>
+ <Page Include="Views\DBViews\ApplicationDisplayPanelVersionsView.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </Page>
+ <Page Include="Views\DBViews\MachineVersionsView.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </Page>
+ <Page Include="Views\DBViews\ApplicationDisplayPanelVersionView.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </Page>
+ <Page Include="Views\DBViews\MachineVersionView.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </Page>
+ <Page Include="Views\DBViews\ConfigurationView.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </Page>
+ <Page Include="Views\DBViews\PermissionView.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </Page>
+ <Page Include="Views\DBViews\PermissionsView.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </Page>
+ <Page Include="Views\DBViews\RoleView.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </Page>
+ <Page Include="Views\DBViews\RolesView.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </Page>
+ <Page Include="Views\DBViews\AddressesView.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </Page>
+ <Page Include="Views\DBViews\AddressView.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </Page>
+ <Page Include="Views\DBViews\MachinesView.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </Page>
+ <Page Include="Views\DBViews\MachineView.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </Page>
+ <Page Include="Views\DBViews\OrganizationsView.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </Page>
+ <Page Include="Views\DBViews\OrganizationView.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </Page>
+ <Page Include="Views\DBViews\UsersView.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </Page>
+ <Page Include="Views\DBViews\UserView.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </Page>
+ <Page Include="Views\MainDBView.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </Page>
+ <Page Include="Windows\DBDialogWindow.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </Page>
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Properties\AssemblyInfo.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Properties\Resources.Designer.cs">
+ <AutoGen>True</AutoGen>
+ <DesignTime>True</DesignTime>
+ <DependentUpon>Resources.resx</DependentUpon>
+ </Compile>
+ <Compile Include="Properties\Settings.Designer.cs">
+ <AutoGen>True</AutoGen>
+ <DependentUpon>Settings.settings</DependentUpon>
+ <DesignTimeSharedInput>True</DesignTimeSharedInput>
+ </Compile>
+ <EmbeddedResource Include="Properties\Resources.resx">
+ <Generator>ResXFileCodeGenerator</Generator>
+ <LastGenOutput>Resources.Designer.cs</LastGenOutput>
+ </EmbeddedResource>
+ <None Include="App.config" />
+ <None Include="packages.config" />
+ <None Include="Properties\Settings.settings">
+ <Generator>SettingsSingleFileGenerator</Generator>
+ <LastGenOutput>Settings.Designer.cs</LastGenOutput>
+ </None>
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\Tango.ColorPicker\Tango.ColorPicker.csproj">
+ <Project>{a2f5af44-29ff-45d6-9d25-ecda5cce88b5}</Project>
+ <Name>Tango.ColorPicker</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\Tango.Core\Tango.Core.csproj">
+ <Project>{a34ee0f0-649d-41c8-8489-b6f1cc6924ee}</Project>
+ <Name>Tango.Core</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\Tango.DAL.Observables\Tango.DAL.Observables.csproj">
+ <Project>{0ecd6da8-7aa6-48d9-8b65-279d176ad9af}</Project>
+ <Name>Tango.DAL.Observables</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\Tango.DAL.Remote\Tango.DAL.Remote.csproj">
+ <Project>{38197109-8610-4d3f-92b9-16d48df94d7c}</Project>
+ <Name>Tango.DAL.Remote</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\Tango.SharedUI\Tango.SharedUI.csproj">
+ <Project>{8491d07b-c1f6-4b62-a412-41b9fd2d6538}</Project>
+ <Name>Tango.SharedUI</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\Tango.MachineStudio.Common\Tango.MachineStudio.Common.csproj">
+ <Project>{cb0b0aa2-bb24-4bca-a720-45e397684e12}</Project>
+ <Name>Tango.MachineStudio.Common</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <Resource Include="Images\moduleImage.png" />
+ </ItemGroup>
+ <ItemGroup>
+ <Resource Include="Images\db.png" />
+ </ItemGroup>
+ <ItemGroup>
+ <Resource Include="Images\seamless-grid.jpg" />
+ </ItemGroup>
+ <ItemGroup />
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+</Project> \ No newline at end of file
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModelLocator.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModelLocator.cs
new file mode 100644
index 000000000..48175ed17
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModelLocator.cs
@@ -0,0 +1,222 @@
+using GalaSoft.MvvmLight;
+using GalaSoft.MvvmLight.Ioc;
+using Microsoft.Practices.ServiceLocation;
+using Tango.MachineStudio.DB.ViewModels;
+
+namespace Tango.MachineStudio.DB
+{
+ /// <summary>
+ /// This class contains static references to all the view models in the
+ /// application and provides an entry point for the bindings.
+ /// </summary>
+ public static class ViewModelLocator
+ {
+ /// <summary>
+ /// Initializes a new instance of the ViewModelLocator class.
+ /// </summary>
+ static ViewModelLocator()
+ {
+ ServiceLocator.SetLocatorProvider(() => SimpleIoc.Default);
+ SimpleIoc.Default.Register<MainViewVM>();
+ SimpleIoc.Default.Register<MachinesViewVM>();
+ SimpleIoc.Default.Register<OrganizationsViewVM>();
+ SimpleIoc.Default.Register<AddressesViewVM>();
+ SimpleIoc.Default.Register<UsersViewVM>();
+ SimpleIoc.Default.Register<RolesViewVM>();
+ SimpleIoc.Default.Register<PermissionsViewVM>();
+ SimpleIoc.Default.Register<MachineVersionsViewVM>();
+ SimpleIoc.Default.Register<ConfigurationsViewVM>();
+
+ SimpleIoc.Default.Register<ApplicationDisplayPanelVersionsViewVM>();
+ SimpleIoc.Default.Register<ApplicationFirmwareVersionsViewVM>();
+ SimpleIoc.Default.Register<ApplicationOsVersionsViewVM>();
+ SimpleIoc.Default.Register<ApplicationVersionsViewVM>();
+ SimpleIoc.Default.Register<EmbeddedFirmwareVersionsViewVM>();
+ SimpleIoc.Default.Register<EmbeddedSoftwareVersionsViewVM>();
+ SimpleIoc.Default.Register<HardwareVersionsViewVM>();
+
+ SimpleIoc.Default.Register<IdsPacksViewVM>();
+ SimpleIoc.Default.Register<DispensersViewVM>();
+ SimpleIoc.Default.Register<DispenserTypesViewVM>();
+ SimpleIoc.Default.Register<LiquidsViewVM>();
+ SimpleIoc.Default.Register<CartridgesViewVM>();
+ SimpleIoc.Default.Register<CartridgeTypesViewVM>();
+ }
+
+ public static MainViewVM MainViewVM
+ {
+ get
+ {
+ return ServiceLocator.Current.GetInstance<MainViewVM>();
+ }
+ }
+
+ public static MachinesViewVM MachinesViewVM
+ {
+ get
+ {
+ return ServiceLocator.Current.GetInstance<MachinesViewVM>();
+ }
+ }
+
+ public static OrganizationsViewVM OrganizationsViewVM
+ {
+ get
+ {
+ return ServiceLocator.Current.GetInstance<OrganizationsViewVM>();
+ }
+ }
+
+ public static AddressesViewVM AddressesViewVM
+ {
+ get
+ {
+ return ServiceLocator.Current.GetInstance<AddressesViewVM>();
+ }
+ }
+
+ public static UsersViewVM UsersViewVM
+ {
+ get
+ {
+ return ServiceLocator.Current.GetInstance<UsersViewVM>();
+ }
+ }
+
+ public static RolesViewVM RolesViewVM
+ {
+ get
+ {
+ return ServiceLocator.Current.GetInstance<RolesViewVM>();
+ }
+ }
+
+ public static PermissionsViewVM PermissionsViewVM
+ {
+ get
+ {
+ return ServiceLocator.Current.GetInstance<PermissionsViewVM>();
+ }
+ }
+
+ public static MachineVersionsViewVM MachineVersionsViewVM
+ {
+ get
+ {
+ return ServiceLocator.Current.GetInstance<MachineVersionsViewVM>();
+ }
+ }
+
+ public static ConfigurationsViewVM ConfigurationsViewVM
+ {
+ get
+ {
+ return ServiceLocator.Current.GetInstance<ConfigurationsViewVM>();
+ }
+ }
+
+ public static ApplicationDisplayPanelVersionsViewVM ApplicationDisplayPanelVersionsViewVM
+ {
+ get
+ {
+ return ServiceLocator.Current.GetInstance<ApplicationDisplayPanelVersionsViewVM>();
+ }
+ }
+
+ public static ApplicationFirmwareVersionsViewVM ApplicationFirmwareVersionsViewVM
+ {
+ get
+ {
+ return ServiceLocator.Current.GetInstance<ApplicationFirmwareVersionsViewVM>();
+ }
+ }
+
+ public static ApplicationOsVersionsViewVM ApplicationOsVersionsViewVM
+ {
+ get
+ {
+ return ServiceLocator.Current.GetInstance<ApplicationOsVersionsViewVM>();
+ }
+ }
+
+ public static ApplicationVersionsViewVM ApplicationVersionsViewVM
+ {
+ get
+ {
+ return ServiceLocator.Current.GetInstance<ApplicationVersionsViewVM>();
+ }
+ }
+
+ public static EmbeddedFirmwareVersionsViewVM EmbeddedFirmwareVersionsViewVM
+ {
+ get
+ {
+ return ServiceLocator.Current.GetInstance<EmbeddedFirmwareVersionsViewVM>();
+ }
+ }
+
+ public static EmbeddedSoftwareVersionsViewVM EmbeddedSoftwareVersionsViewVM
+ {
+ get
+ {
+ return ServiceLocator.Current.GetInstance<EmbeddedSoftwareVersionsViewVM>();
+ }
+ }
+
+ public static HardwareVersionsViewVM HardwareVersionsViewVM
+ {
+ get
+ {
+ return ServiceLocator.Current.GetInstance<HardwareVersionsViewVM>();
+ }
+ }
+
+ public static IdsPacksViewVM IdsPacksViewVM
+ {
+ get
+ {
+ return ServiceLocator.Current.GetInstance<IdsPacksViewVM>();
+ }
+ }
+
+ public static DispensersViewVM DispensersViewVM
+ {
+ get
+ {
+ return ServiceLocator.Current.GetInstance<DispensersViewVM>();
+ }
+ }
+
+ public static DispenserTypesViewVM DispenserTypesViewVM
+ {
+ get
+ {
+ return ServiceLocator.Current.GetInstance<DispenserTypesViewVM>();
+ }
+ }
+
+ public static LiquidsViewVM LiquidsViewVM
+ {
+ get
+ {
+ return ServiceLocator.Current.GetInstance<LiquidsViewVM>();
+ }
+ }
+
+ public static CartridgesViewVM CartridgesViewVM
+ {
+ get
+ {
+ return ServiceLocator.Current.GetInstance<CartridgesViewVM>();
+ }
+ }
+
+ public static CartridgeTypesViewVM CartridgeTypesViewVM
+ {
+ get
+ {
+ return ServiceLocator.Current.GetInstance<CartridgeTypesViewVM>();
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/AddressesViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/AddressesViewVM.cs
new file mode 100644
index 000000000..41eab1c37
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/AddressesViewVM.cs
@@ -0,0 +1,17 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.DAL.Observables;
+using Tango.MachineStudio.Common.Notifications;
+
+namespace Tango.MachineStudio.DB.ViewModels
+{
+ public class AddressesViewVM : DbTableViewModel<Address>
+ {
+ public AddressesViewVM(INotificationProvider notification) : base(notification)
+ {
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/ApplicationDisplayPanelVersionsViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/ApplicationDisplayPanelVersionsViewVM.cs
new file mode 100644
index 000000000..be458136a
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/ApplicationDisplayPanelVersionsViewVM.cs
@@ -0,0 +1,17 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.DAL.Observables;
+using Tango.MachineStudio.Common.Notifications;
+
+namespace Tango.MachineStudio.DB.ViewModels
+{
+ public class ApplicationDisplayPanelVersionsViewVM : DbTableViewModel<ApplicationDisplayPanelVersion>
+ {
+ public ApplicationDisplayPanelVersionsViewVM(INotificationProvider notification) : base(notification)
+ {
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/ApplicationFirmwareVersionsViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/ApplicationFirmwareVersionsViewVM.cs
new file mode 100644
index 000000000..0814988ba
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/ApplicationFirmwareVersionsViewVM.cs
@@ -0,0 +1,17 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.DAL.Observables;
+using Tango.MachineStudio.Common.Notifications;
+
+namespace Tango.MachineStudio.DB.ViewModels
+{
+ public class ApplicationFirmwareVersionsViewVM : DbTableViewModel<ApplicationFirmwareVersion>
+ {
+ public ApplicationFirmwareVersionsViewVM(INotificationProvider notification) : base(notification)
+ {
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/ApplicationOsVersionsViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/ApplicationOsVersionsViewVM.cs
new file mode 100644
index 000000000..3cdd8acb7
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/ApplicationOsVersionsViewVM.cs
@@ -0,0 +1,17 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.DAL.Observables;
+using Tango.MachineStudio.Common.Notifications;
+
+namespace Tango.MachineStudio.DB.ViewModels
+{
+ public class ApplicationOsVersionsViewVM : DbTableViewModel<ApplicationOsVersion>
+ {
+ public ApplicationOsVersionsViewVM(INotificationProvider notification) : base(notification)
+ {
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/ApplicationVersionsViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/ApplicationVersionsViewVM.cs
new file mode 100644
index 000000000..6e25fe321
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/ApplicationVersionsViewVM.cs
@@ -0,0 +1,17 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.DAL.Observables;
+using Tango.MachineStudio.Common.Notifications;
+
+namespace Tango.MachineStudio.DB.ViewModels
+{
+ public class ApplicationVersionsViewVM : DbTableViewModel<ApplicationVersion>
+ {
+ public ApplicationVersionsViewVM(INotificationProvider notification) : base(notification)
+ {
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/CartridgeTypesViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/CartridgeTypesViewVM.cs
new file mode 100644
index 000000000..c8c6ba00b
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/CartridgeTypesViewVM.cs
@@ -0,0 +1,17 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.DAL.Observables;
+using Tango.MachineStudio.Common.Notifications;
+
+namespace Tango.MachineStudio.DB.ViewModels
+{
+ public class CartridgeTypesViewVM : DbTableViewModel<CartridgeType>
+ {
+ public CartridgeTypesViewVM(INotificationProvider notification) : base(notification)
+ {
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/CartridgesViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/CartridgesViewVM.cs
new file mode 100644
index 000000000..8db217013
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/CartridgesViewVM.cs
@@ -0,0 +1,18 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.DAL.Observables;
+using Tango.MachineStudio.Common.Notifications;
+
+namespace Tango.MachineStudio.DB.ViewModels
+{
+ public class CartridgesViewVM : DbTableViewModel<Cartridge>
+ {
+ public CartridgesViewVM(INotificationProvider notification) : base(notification)
+ {
+
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/ConfigurationsViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/ConfigurationsViewVM.cs
new file mode 100644
index 000000000..617faab31
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/ConfigurationsViewVM.cs
@@ -0,0 +1,24 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.DAL.Observables;
+using Tango.MachineStudio.Common.Notifications;
+
+namespace Tango.MachineStudio.DB.ViewModels
+{
+ public class ConfigurationsViewVM : DbTableViewModel<Configuration>
+ {
+ public ConfigurationsViewVM(INotificationProvider notification) : base(notification)
+ {
+
+ }
+
+ protected override void InitializeEntity(Configuration entity)
+ {
+ base.InitializeEntity(entity);
+ entity.CreationDate = DateTime.Now;
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/DbTableViewModel.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/DbTableViewModel.cs
new file mode 100644
index 000000000..b6d77748e
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/DbTableViewModel.cs
@@ -0,0 +1,320 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.Core.Commands;
+using Tango.DAL.Observables;
+using Tango.MachineStudio.Common.Notifications;
+using Tango.MachineStudio.DB.Managers;
+using Tango.SharedUI;
+using Tango.MachineStudio.DB.ExtensionMethods;
+using System.Data.Entity.Infrastructure;
+using GalaSoft.MvvmLight.Messaging;
+using Tango.MachineStudio.DB.Messages;
+using System.Collections.ObjectModel;
+using System.Reflection;
+using Tango.MachineStudio.Common.StudioApplication;
+using System.ComponentModel;
+
+namespace Tango.MachineStudio.DB.ViewModels
+{
+ public abstract class DbTableViewModel<T> : ViewModel, IShutdownRequestBlocker where T : class, IObservableEntity
+ {
+ private INotificationProvider _notification;
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="DbTableViewModel"/> class.
+ /// </summary>
+ public DbTableViewModel(INotificationProvider notification) : base()
+ {
+ _notification = notification;
+ Adapter = ObservablesEntitiesAdapter.Instance;
+ ValidationErrors = new ObservableCollection<string>();
+
+ AddCommand = new RelayCommand(OnAdd);
+ EditCommand = new RelayCommand(OnEdit, (x) => SelectedEntity != null);
+ DeleteCommand = new RelayCommand(OnDelete, (x) => SelectedEntity != null);
+ DialogOKCommand = new RelayCommand(() => OnDialogOKPressed(DialogOpenMode, EditEntity));
+ DialogCancelCommand = new RelayCommand(() => OnDialogCancelPressed(DialogOpenMode, EditEntity));
+
+ IsDialogOpen = false;
+ }
+
+ private T _editEntity;
+ /// <summary>
+ /// Gets or sets the edit entity.
+ /// </summary>
+ public T EditEntity
+ {
+ get { return _editEntity; }
+ set { _editEntity = value; RaisePropertyChangedAuto(); }
+ }
+
+ private DialogOpenMode _dialogOpenMode;
+ /// <summary>
+ /// Gets or sets the dialog open mode.
+ /// </summary>
+ public DialogOpenMode DialogOpenMode
+ {
+ get { return _dialogOpenMode; }
+ set { _dialogOpenMode = value; RaisePropertyChangedAuto(); }
+ }
+
+ private bool _isDialogOpen;
+ /// <summary>
+ /// Gets or sets a value indicating whether this instance is dialog open.
+ /// </summary>
+ public bool IsDialogOpen
+ {
+ get { return _isDialogOpen; }
+ set { _isDialogOpen = value; RaisePropertyChangedAuto(); }
+ }
+
+ private ObservablesEntitiesAdapter _adapter;
+ /// <summary>
+ /// Gets or sets the DB adapter.
+ /// </summary>
+ public ObservablesEntitiesAdapter Adapter
+ {
+ get { return _adapter; }
+ set { _adapter = value; RaisePropertyChangedAuto(); }
+ }
+
+ private T _selectedEntity;
+ /// <summary>
+ /// Gets or sets the selected entity.
+ /// </summary>
+ public T SelectedEntity
+ {
+ get { return _selectedEntity; }
+ set { _selectedEntity = value; RaisePropertyChangedAuto(); InvalidateRelayCommands(); }
+ }
+
+ private String _filter;
+ /// <summary>
+ /// Gets or sets the search filter.
+ /// </summary>
+ public String Filter
+ {
+ get { return _filter; }
+ set { _filter = value; RaisePropertyChangedAuto(); OnFilterChanged(value); }
+ }
+
+ private ObservableCollection<String> _validationErrors;
+ /// <summary>
+ /// Gets or sets the validation errors.
+ /// </summary>
+ public ObservableCollection<String> ValidationErrors
+ {
+ get { return _validationErrors; }
+ set { _validationErrors = value; RaisePropertyChangedAuto(); }
+ }
+
+ /// <summary>
+ /// Gets or sets the dialog OK command.
+ /// </summary>
+ public RelayCommand DialogOKCommand { get; set; }
+
+ /// <summary>
+ /// Gets or sets the dialog cancel command.
+ /// </summary>
+ public RelayCommand DialogCancelCommand { get; set; }
+
+ /// <summary>
+ /// Gets or sets the add command.
+ /// </summary>
+ public RelayCommand AddCommand { get; set; }
+
+ /// <summary>
+ /// Gets or sets the edit command.
+ /// </summary>
+ public RelayCommand EditCommand { get; set; }
+
+ /// <summary>
+ /// Gets or sets the delete command.
+ /// </summary>
+ public RelayCommand DeleteCommand { get; set; }
+
+ protected override void OnValidating()
+ {
+ base.OnValidating();
+ ValidationErrors.Clear();
+
+ foreach (var prop in typeof(T).GetProperties(BindingFlags.Public | BindingFlags.Instance).Where(x => !x.PropertyType.IsGenericType && x.PropertyType.IsClass && !x.Name.Contains("Guid")))
+ {
+ if (prop.GetValue(EditEntity) == null)
+ {
+ ValidationErrors.Add(prop.Name + " is required");
+ }
+ }
+ }
+
+ /// <summary>
+ /// Called when delete command invoked.
+ /// </summary>
+ protected virtual async void OnDelete()
+ {
+ using (_notification.PushTaskItem("Saving changes to database..."))
+ {
+ var dependenctEntities = SelectedEntity.GetDependentEntitiesNameAndGuid();
+
+ if (dependenctEntities.Count > 0)
+ {
+ _notification.ShowError("The selected entity is being used by " + dependenctEntities.Count + " other entities." + Environment.NewLine + "Please delete any dependencies and try again." + Environment.NewLine + Environment.NewLine + String.Join(Environment.NewLine,dependenctEntities.Select(x => x.Key + ", ID: " + x.Value)));
+ return;
+ }
+
+ try
+ {
+ SelectedEntity.Deleted = true;
+ await SelectedEntity.SaveAsync();
+ }
+ catch (Exception ex)
+ {
+ SelectedEntity.Deleted = false;
+ Adapter.Invalidate();
+ _notification.ShowError("Could not delete entity.");
+ }
+
+ SelectedEntity = null;
+ }
+ }
+
+ /// <summary>
+ /// Called when edit command invoked.
+ /// </summary>
+ protected virtual void OnEdit()
+ {
+ ValidationErrors.Clear();
+ DialogOpenMode = DialogOpenMode.Editing;
+ EditEntity = GetEditableEntity(DialogOpenMode);
+ //_notification.ShowDialog(DialogOpenMode, this);
+ Messenger.Default.Send(new OpenEntityEditViewMessage(DialogOpenMode, this, typeof(T)));
+ IsDialogOpen = true;
+ }
+
+ /// <summary>
+ /// Called when add command invoked.
+ /// </summary>
+ protected virtual void OnAdd()
+ {
+ ValidationErrors.Clear();
+ DialogOpenMode = DialogOpenMode.Adding;
+ EditEntity = GetEditableEntity(DialogOpenMode);
+ //_notification.ShowDialog(DialogOpenMode, this);
+ Messenger.Default.Send(new OpenEntityEditViewMessage(DialogOpenMode, this, typeof(T)));
+ IsDialogOpen = true;
+ }
+
+ /// <summary>
+ /// Called when dialog closes with OK button.
+ /// </summary>
+ /// <param name="mode">The mode.</param>
+ protected virtual async void OnDialogOKPressed(DialogOpenMode mode, T entity)
+ {
+ if (!Validate()) return;
+
+ if (ValidationErrors.Count > 0) return;
+
+ Messenger.Default.Send(new CloseEntityEditViewMessage());
+
+ if (mode == DialogOpenMode.Editing)
+ {
+ entity.ShallowCopyTo(SelectedEntity);
+ entity = SelectedEntity;
+ }
+
+ OnBeforeEntitySave(mode, entity);
+
+ using (_notification.PushTaskItem("Saving changes to database..."))
+ {
+ try
+ {
+ await entity.SaveAsync();
+ }
+ catch (DbUpdateException ex)
+ {
+ Adapter.Invalidate();
+ _notification.ShowError("Could not save entity." + Environment.NewLine + ex.InnerException.InnerException != null ? ex.InnerException.InnerException.Message : ex.InnerException.Message);
+ }
+ catch (Exception ex)
+ {
+ Adapter.Invalidate();
+ _notification.ShowError("Could not save entity." + Environment.NewLine + "Please make sure all fields are properly populated.");
+ }
+ IsDialogOpen = false;
+ SelectedEntity = EditEntity;
+ SelectedEntity = null;
+ }
+ }
+
+ /// <summary>
+ /// Called when [before entity save].
+ /// </summary>
+ /// <param name="mode">The mode.</param>
+ /// <param name="entity">The entity.</param>
+ protected virtual void OnBeforeEntitySave(DialogOpenMode mode, T entity)
+ {
+
+ }
+
+ /// <summary>
+ /// Called when dialog closes with cancel button.
+ /// </summary>
+ /// <param name="mode">The mode.</param>
+ protected virtual void OnDialogCancelPressed(DialogOpenMode mode, T entity)
+ {
+ Messenger.Default.Send(new CloseEntityEditViewMessage());
+ IsDialogOpen = false;
+ }
+
+ /// <summary>
+ /// Gets the editable entity.
+ /// </summary>
+ /// <param name="mode">The mode.</param>
+ /// <returns></returns>
+ private T GetEditableEntity(DialogOpenMode mode)
+ {
+ if (mode == DialogOpenMode.Adding)
+ {
+ var newEntity = Activator.CreateInstance<T>();
+ InitializeEntity(newEntity);
+ return newEntity;
+ }
+ else
+ {
+ return SelectedEntity.ShallowClone();
+ }
+ }
+
+ protected virtual void OnFilterChanged(String filter)
+ {
+ String viewSourceName = this.GetType().Name.Replace("ViewVM", "ViewSource");
+ ICollectionView collectionView = Adapter.GetType().GetProperty(viewSourceName).GetValue(Adapter) as ICollectionView;
+
+ collectionView.Filter = (entity) =>
+ {
+ return
+ entity.
+ GetType().
+ GetProperties(BindingFlags.Public | BindingFlags.Instance).
+ Where(x => x.Name != "Deleted" && x.Name != "ID" && x.Name != "LastUpdated").
+ Where(x => !x.PropertyType.IsGenericType && (x.PropertyType.IsClass || x.PropertyType == typeof(String))).
+ Select(prop => prop.GetValue(entity).ToString()).
+ ToList().
+ Any(x => x.ToLower().Contains(filter.ToLower()));
+ };
+ }
+
+ protected virtual void InitializeEntity(T entity)
+ {
+
+ }
+
+ public Task<bool> OnShutdownRequest()
+ {
+ return Task.FromResult(true);
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/DialogOpenMode.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/DialogOpenMode.cs
new file mode 100644
index 000000000..0d46a9734
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/DialogOpenMode.cs
@@ -0,0 +1,14 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Tango.MachineStudio.DB.ViewModels
+{
+ public enum DialogOpenMode
+ {
+ Editing,
+ Adding,
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/DispenserTypesViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/DispenserTypesViewVM.cs
new file mode 100644
index 000000000..5ffe0d58c
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/DispenserTypesViewVM.cs
@@ -0,0 +1,17 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.DAL.Observables;
+using Tango.MachineStudio.Common.Notifications;
+
+namespace Tango.MachineStudio.DB.ViewModels
+{
+ public class DispenserTypesViewVM : DbTableViewModel<DispenserType>
+ {
+ public DispenserTypesViewVM(INotificationProvider notification) : base(notification)
+ {
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/DispensersViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/DispensersViewVM.cs
new file mode 100644
index 000000000..0242c1dc7
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/DispensersViewVM.cs
@@ -0,0 +1,18 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.DAL.Observables;
+using Tango.MachineStudio.Common.Notifications;
+
+namespace Tango.MachineStudio.DB.ViewModels
+{
+ public class DispensersViewVM : DbTableViewModel<Dispenser>
+ {
+ public DispensersViewVM(INotificationProvider notification) : base(notification)
+ {
+
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/EmbeddedFirmwareVersionsViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/EmbeddedFirmwareVersionsViewVM.cs
new file mode 100644
index 000000000..a248d919a
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/EmbeddedFirmwareVersionsViewVM.cs
@@ -0,0 +1,17 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.DAL.Observables;
+using Tango.MachineStudio.Common.Notifications;
+
+namespace Tango.MachineStudio.DB.ViewModels
+{
+ public class EmbeddedFirmwareVersionsViewVM : DbTableViewModel<EmbeddedFirmwareVersion>
+ {
+ public EmbeddedFirmwareVersionsViewVM(INotificationProvider notification) : base(notification)
+ {
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/EmbeddedSoftwareVersionsViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/EmbeddedSoftwareVersionsViewVM.cs
new file mode 100644
index 000000000..b6436203d
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/EmbeddedSoftwareVersionsViewVM.cs
@@ -0,0 +1,17 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.DAL.Observables;
+using Tango.MachineStudio.Common.Notifications;
+
+namespace Tango.MachineStudio.DB.ViewModels
+{
+ public class EmbeddedSoftwareVersionsViewVM : DbTableViewModel<EmbeddedSoftwareVersion>
+ {
+ public EmbeddedSoftwareVersionsViewVM(INotificationProvider notification) : base(notification)
+ {
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/EntityViewModel.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/EntityViewModel.cs
new file mode 100644
index 000000000..946a73088
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/EntityViewModel.cs
@@ -0,0 +1,31 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.Core.Commands;
+using Tango.SharedUI;
+
+namespace Tango.MachineStudio.DB.ViewModels
+{
+ public class EntityViewModel<T> : ViewModel
+ {
+ private T _entity;
+
+ public T Entity
+ {
+ get { return _entity; }
+ set { _entity = value; RaisePropertyChanged(nameof(Entity)); }
+ }
+
+ public EntityViewModel() : base()
+ {
+
+ }
+
+ public EntityViewModel(T entity) : this()
+ {
+ Entity = entity;
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/HardwareVersionsViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/HardwareVersionsViewVM.cs
new file mode 100644
index 000000000..02c90c442
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/HardwareVersionsViewVM.cs
@@ -0,0 +1,17 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.DAL.Observables;
+using Tango.MachineStudio.Common.Notifications;
+
+namespace Tango.MachineStudio.DB.ViewModels
+{
+ public class HardwareVersionsViewVM : DbTableViewModel<HardwareVersion>
+ {
+ public HardwareVersionsViewVM(INotificationProvider notification) : base(notification)
+ {
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/IdsPacksViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/IdsPacksViewVM.cs
new file mode 100644
index 000000000..202dd959f
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/IdsPacksViewVM.cs
@@ -0,0 +1,18 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.DAL.Observables;
+using Tango.MachineStudio.Common.Notifications;
+
+namespace Tango.MachineStudio.DB.ViewModels
+{
+ public class IdsPacksViewVM : DbTableViewModel<IdsPack>
+ {
+ public IdsPacksViewVM(INotificationProvider notification) : base(notification)
+ {
+
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/LiquidsViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/LiquidsViewVM.cs
new file mode 100644
index 000000000..e57f6606e
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/LiquidsViewVM.cs
@@ -0,0 +1,17 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.DAL.Observables;
+using Tango.MachineStudio.Common.Notifications;
+
+namespace Tango.MachineStudio.DB.ViewModels
+{
+ public class LiquidsViewVM : DbTableViewModel<Liquid>
+ {
+ public LiquidsViewVM(INotificationProvider notification) : base(notification)
+ {
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/MachineVersionsViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/MachineVersionsViewVM.cs
new file mode 100644
index 000000000..6a24f7d4c
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/MachineVersionsViewVM.cs
@@ -0,0 +1,18 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.DAL.Observables;
+using Tango.MachineStudio.Common.Notifications;
+
+namespace Tango.MachineStudio.DB.ViewModels
+{
+ public class MachineVersionsViewVM : DbTableViewModel<MachineVersion>
+ {
+ public MachineVersionsViewVM(INotificationProvider notification) : base(notification)
+ {
+
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/MachinesViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/MachinesViewVM.cs
new file mode 100644
index 000000000..fbec464bd
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/MachinesViewVM.cs
@@ -0,0 +1,26 @@
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.Core.Commands;
+using Tango.DAL.Observables;
+using Tango.MachineStudio.Common.Notifications;
+using Tango.SharedUI;
+
+namespace Tango.MachineStudio.DB.ViewModels
+{
+ public class MachinesViewVM : DbTableViewModel<Machine>
+ {
+ public MachinesViewVM(INotificationProvider notification) : base(notification)
+ {
+ }
+
+ protected override void InitializeEntity(Machine entity)
+ {
+ base.InitializeEntity(entity);
+ entity.ProductionDate = DateTime.Now;
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/MainViewVM.cs
new file mode 100644
index 000000000..a0ce93a5a
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/MainViewVM.cs
@@ -0,0 +1,18 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using Tango.SharedUI;
+
+namespace Tango.MachineStudio.DB.ViewModels
+{
+ public class MainViewVM : ViewModel
+ {
+ public MainViewVM() : base()
+ {
+
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/MultiComboVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/MultiComboVM.cs
new file mode 100644
index 000000000..d15ac6e11
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/MultiComboVM.cs
@@ -0,0 +1,44 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.SharedUI;
+
+namespace Tango.MachineStudio.DB.ViewModels
+{
+ public class MultiComboVM<T> : EntityViewModel<T>
+ {
+ private Action _onSelectionChanged;
+
+ public event EventHandler SelectionChanged;
+
+ public MultiComboVM(T entity) : base(entity)
+ {
+
+ }
+
+ public MultiComboVM(T entity, Action onSelectionChanged) : this(entity)
+ {
+ _onSelectionChanged = onSelectionChanged;
+ }
+
+ private bool _isSelected;
+
+ public bool IsSelected
+ {
+ get { return _isSelected; }
+ set { _isSelected = value; RaisePropertyChangedAuto(); OnSelectionChanged(); }
+ }
+
+ protected virtual void OnSelectionChanged()
+ {
+ if (_onSelectionChanged != null)
+ {
+ _onSelectionChanged();
+ }
+
+ SelectionChanged?.Invoke(this, new EventArgs());
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/OrganizationsViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/OrganizationsViewVM.cs
new file mode 100644
index 000000000..0327557f1
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/OrganizationsViewVM.cs
@@ -0,0 +1,17 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.DAL.Observables;
+using Tango.MachineStudio.Common.Notifications;
+
+namespace Tango.MachineStudio.DB.ViewModels
+{
+ public class OrganizationsViewVM : DbTableViewModel<Organization>
+ {
+ public OrganizationsViewVM(INotificationProvider notification) : base(notification)
+ {
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/PermissionsViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/PermissionsViewVM.cs
new file mode 100644
index 000000000..9a2d1c24d
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/PermissionsViewVM.cs
@@ -0,0 +1,17 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.DAL.Observables;
+using Tango.MachineStudio.Common.Notifications;
+
+namespace Tango.MachineStudio.DB.ViewModels
+{
+ public class PermissionsViewVM : DbTableViewModel<Permission>
+ {
+ public PermissionsViewVM(INotificationProvider notification) : base(notification)
+ {
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/RolesViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/RolesViewVM.cs
new file mode 100644
index 000000000..d09722ec9
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/RolesViewVM.cs
@@ -0,0 +1,77 @@
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.DAL.Observables;
+using Tango.MachineStudio.Common.Notifications;
+using Tango.MachineStudio.DB.ViewModels;
+
+namespace Tango.MachineStudio.DB.ViewModels
+{
+ public class RolesViewVM : DbTableViewModel<Role>
+ {
+ public RolesViewVM(INotificationProvider notification) : base(notification)
+ {
+ SelectedPermissions = new ObservableCollection<MultiComboVM<Permission>>();
+ }
+
+ private ObservableCollection<MultiComboVM<Permission>> _selectedPermissions;
+ public ObservableCollection<MultiComboVM<Permission>> SelectedPermissions
+ {
+ get { return _selectedPermissions; }
+ set { _selectedPermissions = value; RaisePropertyChangedAuto(); }
+ }
+
+ protected override void OnEdit()
+ {
+ SelectedPermissions = Adapter.Permissions.Select(x => new MultiComboVM<Permission>(x, () => RaisePropertyChanged(nameof(SelectedPermissions)))).ToObservableCollection();
+
+ foreach (var permission in SelectedPermissions)
+ {
+ if (SelectedEntity.RolesPermissions.ToList().Exists(x => x.Permission == permission.Entity && !x.Deleted))
+ {
+ permission.IsSelected = true;
+ }
+ }
+
+ base.OnEdit();
+ }
+
+ protected override void OnAdd()
+ {
+ SelectedPermissions = Adapter.Permissions.Select(x => new MultiComboVM<Permission>(x, () => RaisePropertyChanged(nameof(SelectedPermissions)))).ToObservableCollection();
+
+ base.OnAdd();
+ }
+
+ protected override void OnBeforeEntitySave(DialogOpenMode mode, Role role)
+ {
+ base.OnBeforeEntitySave(mode, role);
+
+ foreach (var permission in SelectedPermissions)
+ {
+ var rolePermission = role.RolesPermissions.SingleOrDefault(x => x.Permission == permission.Entity);
+
+ if (rolePermission != null)
+ {
+ rolePermission.Deleted = !permission.IsSelected;
+ }
+ else
+ {
+ if (permission.IsSelected)
+ {
+ role.RolesPermissions.Add(new RolesPermission()
+ {
+ Permission = permission.Entity,
+ Role = role,
+ PermissionGuid = permission.Entity.Guid,
+ RoleGuid = role.Guid
+ });
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/UsersViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/UsersViewVM.cs
new file mode 100644
index 000000000..6af1184aa
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/UsersViewVM.cs
@@ -0,0 +1,95 @@
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.DAL.Observables;
+using Tango.MachineStudio.Common.Notifications;
+using SimpleValidator.Extensions;
+
+namespace Tango.MachineStudio.DB.ViewModels
+{
+ public class UsersViewVM : DbTableViewModel<User>
+ {
+ public UsersViewVM(INotificationProvider notification) : base(notification)
+ {
+ SelectedRoles = new ObservableCollection<MultiComboVM<Role>>();
+ }
+
+ private ObservableCollection<MultiComboVM<Role>> _selectedRoles;
+ public ObservableCollection<MultiComboVM<Role>> SelectedRoles
+ {
+ get { return _selectedRoles; }
+ set { _selectedRoles = value; RaisePropertyChangedAuto(); }
+ }
+
+ protected override void OnEdit()
+ {
+ SelectedRoles = Adapter.Roles.Select(x => new MultiComboVM<Role>(x, () => RaisePropertyChanged(nameof(SelectedRoles)))).ToObservableCollection();
+
+ foreach (var role in SelectedRoles)
+ {
+ if (SelectedEntity.UsersRoles.ToList().Exists(x => x.Role == role.Entity && !x.Deleted))
+ {
+ role.IsSelected = true;
+ }
+ }
+
+ base.OnEdit();
+ }
+
+ protected override void OnAdd()
+ {
+ SelectedRoles = Adapter.Roles.Select(x => new MultiComboVM<Role>(x, () => RaisePropertyChanged(nameof(SelectedRoles)))).ToObservableCollection();
+
+ base.OnAdd();
+ }
+
+ protected override void OnBeforeEntitySave(DialogOpenMode mode, User user)
+ {
+ base.OnBeforeEntitySave(mode, user);
+
+ foreach (var role in SelectedRoles)
+ {
+ var userRole = user.UsersRoles.SingleOrDefault(x => x.Role == role.Entity);
+
+ if (userRole != null)
+ {
+ userRole.Deleted = !role.IsSelected;
+ }
+ else
+ {
+ if (role.IsSelected)
+ {
+ user.UsersRoles.Add(new UsersRole()
+ {
+ Role = role.Entity,
+ User = user,
+ RoleGuid = role.Entity.Guid,
+ UserGuid = user.Guid
+ });
+ }
+ }
+ }
+ }
+
+ protected override void OnValidating()
+ {
+ base.OnValidating();
+
+ if (EditEntity.Email != null)
+ {
+ if (Adapter.Users.ToList().Exists(x => x.Email.ToLower() == EditEntity.Email.ToLower()))
+ {
+ ValidationErrors.Add("Email already exist");
+ }
+ }
+
+ if (!EditEntity.Password.IsMinLength(4))
+ {
+ ValidationErrors.Add("Password must have at least 4 characters");
+ }
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/AddressView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/AddressView.xaml
new file mode 100644
index 000000000..9c132295b
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/AddressView.xaml
@@ -0,0 +1,34 @@
+<UserControl x:Class="Tango.MachineStudio.DB.Views.DBViews.AddressView"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:controls="clr-namespace:Tango.MachineStudio.DB.Controls"
+ xmlns:local="clr-namespace:Tango.MachineStudio.DB.Views.DBViews"
+ mc:Ignorable="d"
+ d:DesignHeight="300" d:DesignWidth="300">
+ <Grid>
+ <controls:TableGrid>
+ <TextBlock Text="ID:" FontWeight="Bold"></TextBlock>
+ <TextBox Text="{Binding EditEntity.ID}" IsReadOnly="True"></TextBox>
+ <TextBlock Text="GUID:" FontWeight="Bold"></TextBlock>
+ <TextBox Text="{Binding EditEntity.Guid}" IsReadOnly="True"></TextBox>
+ <TextBlock Text="Last Updated:" FontWeight="Bold"></TextBlock>
+ <TextBox Text="{Binding EditEntity.LastUpdated}" IsReadOnly="True"></TextBox>
+ <TextBlock Text="Address:" FontWeight="Bold"></TextBlock>
+ <TextBox Text="{Binding EditEntity.AddressString,Mode=TwoWay}"></TextBox>
+ <TextBlock Text="Locality:" FontWeight="Bold"></TextBlock>
+ <TextBox Text="{Binding EditEntity.Locality,Mode=TwoWay}"></TextBox>
+ <TextBlock Text="Country:" FontWeight="Bold"></TextBlock>
+ <TextBox Text="{Binding EditEntity.Country,Mode=TwoWay}"></TextBox>
+ <TextBlock Text="City:" FontWeight="Bold"></TextBlock>
+ <TextBox Text="{Binding EditEntity.City,Mode=TwoWay}"></TextBox>
+ <TextBlock Text="State:" FontWeight="Bold"></TextBlock>
+ <TextBox Text="{Binding EditEntity.State,Mode=TwoWay}"></TextBox>
+ <TextBlock Text="Country Code:" FontWeight="Bold"></TextBlock>
+ <TextBox Text="{Binding EditEntity.CountryCode,Mode=TwoWay}"></TextBox>
+ <TextBlock Text="Postal Code:" FontWeight="Bold"></TextBlock>
+ <TextBox Text="{Binding EditEntity.PostalCode,Mode=TwoWay}"></TextBox>
+ </controls:TableGrid>
+ </Grid>
+</UserControl>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/AddressView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/AddressView.xaml.cs
new file mode 100644
index 000000000..cc890eb26
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/AddressView.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.DB.Views.DBViews
+{
+ /// <summary>
+ /// Interaction logic for AddressView.xaml
+ /// </summary>
+ public partial class AddressView : UserControl
+ {
+ public AddressView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/AddressesView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/AddressesView.xaml
new file mode 100644
index 000000000..e338f3c0f
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/AddressesView.xaml
@@ -0,0 +1,28 @@
+<UserControl x:Class="Tango.MachineStudio.DB.Views.DBViews.AddressesView"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:global="clr-namespace:Tango.MachineStudio.DB"
+ xmlns:controls="clr-namespace:Tango.MachineStudio.DB.Controls"
+ xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
+ mc:Ignorable="d"
+ d:DesignHeight="720" d:DesignWidth="1280" Background="White" DataContext="{x:Static global:ViewModelLocator.AddressesViewVM}">
+ <Grid>
+ <controls:DbTableView>
+ <DataGrid Background="Transparent" ItemsSource="{Binding Adapter.AddressesViewSource}" SelectedItem="{Binding SelectedEntity}" AutoGenerateColumns="False" IsReadOnly="True">
+ <DataGrid.Columns>
+ <DataGridTextColumn Header="ID" Binding="{Binding ID}"></DataGridTextColumn>
+ <DataGridTextColumn Header="GUID" Binding="{Binding Guid}"></DataGridTextColumn>
+ <DataGridTextColumn Header="Address" Binding="{Binding AddressString}"></DataGridTextColumn>
+ <DataGridTextColumn Header="Locality" Binding="{Binding Locality}"></DataGridTextColumn>
+ <DataGridTextColumn Header="Country" Binding="{Binding Country}"></DataGridTextColumn>
+ <DataGridTextColumn Header="City" Binding="{Binding City}"></DataGridTextColumn>
+ <DataGridTextColumn Header="State" Binding="{Binding State}"></DataGridTextColumn>
+ <DataGridTextColumn Header="Country Code" Binding="{Binding CountryCode}"></DataGridTextColumn>
+ <DataGridTextColumn Header="Postal Code" Binding="{Binding PostalCode}"></DataGridTextColumn>
+ </DataGrid.Columns>
+ </DataGrid>
+ </controls:DbTableView>
+ </Grid>
+</UserControl>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/AddressesView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/AddressesView.xaml.cs
new file mode 100644
index 000000000..b6ead64e3
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/AddressesView.xaml.cs
@@ -0,0 +1,31 @@
+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;
+using Tango.MachineStudio.DB.CustomAttributes;
+using Tango.SharedUI.Controls;
+
+namespace Tango.MachineStudio.DB.Views.DBViews
+{
+ /// <summary>
+ /// Interaction logic for MachinesView.xaml
+ /// </summary>
+ [DBView]
+ public partial class AddressesView : UserControl
+ {
+ public AddressesView() : base()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationDisplayPanelVersionView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationDisplayPanelVersionView.xaml
new file mode 100644
index 000000000..a1c8d6d7e
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationDisplayPanelVersionView.xaml
@@ -0,0 +1,25 @@
+<UserControl x:Class="Tango.MachineStudio.DB.Views.DBViews.ApplicationDisplayPanelVersionView"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls"
+ xmlns:controls="clr-namespace:Tango.MachineStudio.DB.Controls"
+ xmlns:local="clr-namespace:Tango.MachineStudio.DB.Views.DBViews"
+ mc:Ignorable="d"
+ d:DesignHeight="300" d:DesignWidth="300">
+ <Grid>
+ <controls:TableGrid>
+ <TextBlock Text="ID:" FontWeight="Bold"></TextBlock>
+ <TextBox Text="{Binding EditEntity.ID}" IsReadOnly="True"></TextBox>
+ <TextBlock Text="GUID:" FontWeight="Bold"></TextBlock>
+ <TextBox Text="{Binding EditEntity.Guid}" IsReadOnly="True"></TextBox>
+ <TextBlock Text="Last Updated:" FontWeight="Bold"></TextBlock>
+ <TextBox Text="{Binding EditEntity.LastUpdated}" IsReadOnly="True"></TextBox>
+ <TextBlock Text="Version:" FontWeight="Bold"></TextBlock>
+ <mahapps:NumericUpDown Minimum="0" Maximum="1000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding EditEntity.Version,Mode=TwoWay}"></mahapps:NumericUpDown>
+ <TextBlock Text="Name:" FontWeight="Bold"></TextBlock>
+ <TextBox Text="{Binding EditEntity.Name,Mode=TwoWay}"></TextBox>
+ </controls:TableGrid>
+ </Grid>
+</UserControl>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationDisplayPanelVersionView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationDisplayPanelVersionView.xaml.cs
new file mode 100644
index 000000000..6d372eaf7
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationDisplayPanelVersionView.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.DB.Views.DBViews
+{
+ /// <summary>
+ /// Interaction logic for MachineView.xaml
+ /// </summary>
+ public partial class ApplicationDisplayPanelVersionView : UserControl
+ {
+ public ApplicationDisplayPanelVersionView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationDisplayPanelVersionsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationDisplayPanelVersionsView.xaml
new file mode 100644
index 000000000..704f5f5e2
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationDisplayPanelVersionsView.xaml
@@ -0,0 +1,23 @@
+<UserControl x:Class="Tango.MachineStudio.DB.Views.DBViews.ApplicationDisplayPanelVersionsView"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:global="clr-namespace:Tango.MachineStudio.DB"
+ xmlns:controls="clr-namespace:Tango.MachineStudio.DB.Controls"
+ xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
+ mc:Ignorable="d"
+ d:DesignHeight="720" d:DesignWidth="1280" Background="White" DataContext="{x:Static global:ViewModelLocator.ApplicationDisplayPanelVersionsViewVM}">
+ <Grid>
+ <controls:DbTableView>
+ <DataGrid Background="Transparent" ItemsSource="{Binding Adapter.ApplicationDisplayPanelVersionsViewSource}" SelectedItem="{Binding SelectedEntity}" AutoGenerateColumns="False" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" IsReadOnly="True">
+ <DataGrid.Columns>
+ <DataGridTextColumn Header="ID" Binding="{Binding ID}"></DataGridTextColumn>
+ <DataGridTextColumn Header="GUID" Binding="{Binding Guid}"></DataGridTextColumn>
+ <DataGridTextColumn Header="Version" Binding="{Binding Version}"></DataGridTextColumn>
+ <DataGridTextColumn Header="Name" Binding="{Binding Name}"></DataGridTextColumn>
+ </DataGrid.Columns>
+ </DataGrid>
+ </controls:DbTableView>
+ </Grid>
+</UserControl>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationDisplayPanelVersionsView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationDisplayPanelVersionsView.xaml.cs
new file mode 100644
index 000000000..e514117dd
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationDisplayPanelVersionsView.xaml.cs
@@ -0,0 +1,32 @@
+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;
+using Tango.MachineStudio.DB.CustomAttributes;
+using Tango.MachineStudio.DB.Managers;
+using Tango.SharedUI.Controls;
+
+namespace Tango.MachineStudio.DB.Views.DBViews
+{
+ /// <summary>
+ /// Interaction logic for MachinesView.xaml
+ /// </summary>
+ [DBView]
+ public partial class ApplicationDisplayPanelVersionsView : UserControl
+ {
+ public ApplicationDisplayPanelVersionsView() : base()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationFirmwareVersionView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationFirmwareVersionView.xaml
new file mode 100644
index 000000000..70fde065d
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationFirmwareVersionView.xaml
@@ -0,0 +1,25 @@
+<UserControl x:Class="Tango.MachineStudio.DB.Views.DBViews.ApplicationFirmwareVersionView"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls"
+ xmlns:controls="clr-namespace:Tango.MachineStudio.DB.Controls"
+ xmlns:local="clr-namespace:Tango.MachineStudio.DB.Views.DBViews"
+ mc:Ignorable="d"
+ d:DesignHeight="300" d:DesignWidth="300">
+ <Grid>
+ <controls:TableGrid>
+ <TextBlock Text="ID:" FontWeight="Bold"></TextBlock>
+ <TextBox Text="{Binding EditEntity.ID}" IsReadOnly="True"></TextBox>
+ <TextBlock Text="GUID:" FontWeight="Bold"></TextBlock>
+ <TextBox Text="{Binding EditEntity.Guid}" IsReadOnly="True"></TextBox>
+ <TextBlock Text="Last Updated:" FontWeight="Bold"></TextBlock>
+ <TextBox Text="{Binding EditEntity.LastUpdated}" IsReadOnly="True"></TextBox>
+ <TextBlock Text="Version:" FontWeight="Bold"></TextBlock>
+ <mahapps:NumericUpDown Minimum="0" Maximum="1000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding EditEntity.Version,Mode=TwoWay}"></mahapps:NumericUpDown>
+ <TextBlock Text="Name:" FontWeight="Bold"></TextBlock>
+ <TextBox Text="{Binding EditEntity.Name,Mode=TwoWay}"></TextBox>
+ </controls:TableGrid>
+ </Grid>
+</UserControl>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationFirmwareVersionView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationFirmwareVersionView.xaml.cs
new file mode 100644
index 000000000..b63b05ccf
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationFirmwareVersionView.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.DB.Views.DBViews
+{
+ /// <summary>
+ /// Interaction logic for MachineView.xaml
+ /// </summary>
+ public partial class ApplicationFirmwareVersionView : UserControl
+ {
+ public ApplicationFirmwareVersionView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationFirmwareVersionsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationFirmwareVersionsView.xaml
new file mode 100644
index 000000000..a216f4a1f
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationFirmwareVersionsView.xaml
@@ -0,0 +1,23 @@
+<UserControl x:Class="Tango.MachineStudio.DB.Views.DBViews.ApplicationFirmwareVersionsView"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:global="clr-namespace:Tango.MachineStudio.DB"
+ xmlns:controls="clr-namespace:Tango.MachineStudio.DB.Controls"
+ xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
+ mc:Ignorable="d"
+ d:DesignHeight="720" d:DesignWidth="1280" Background="White" DataContext="{x:Static global:ViewModelLocator.ApplicationFirmwareVersionsViewVM}">
+ <Grid>
+ <controls:DbTableView>
+ <DataGrid Background="Transparent" ItemsSource="{Binding Adapter.ApplicationFirmwareVersionsViewSource}" SelectedItem="{Binding SelectedEntity}" AutoGenerateColumns="False" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" IsReadOnly="True">
+ <DataGrid.Columns>
+ <DataGridTextColumn Header="ID" Binding="{Binding ID}"></DataGridTextColumn>
+ <DataGridTextColumn Header="GUID" Binding="{Binding Guid}"></DataGridTextColumn>
+ <DataGridTextColumn Header="Version" Binding="{Binding Version}"></DataGridTextColumn>
+ <DataGridTextColumn Header="Name" Binding="{Binding Name}"></DataGridTextColumn>
+ </DataGrid.Columns>
+ </DataGrid>
+ </controls:DbTableView>
+ </Grid>
+</UserControl>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationFirmwareVersionsView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationFirmwareVersionsView.xaml.cs
new file mode 100644
index 000000000..855e51523
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationFirmwareVersionsView.xaml.cs
@@ -0,0 +1,32 @@
+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;
+using Tango.MachineStudio.DB.CustomAttributes;
+using Tango.MachineStudio.DB.Managers;
+using Tango.SharedUI.Controls;
+
+namespace Tango.MachineStudio.DB.Views.DBViews
+{
+ /// <summary>
+ /// Interaction logic for MachinesView.xaml
+ /// </summary>
+ [DBView]
+ public partial class ApplicationFirmwareVersionsView : UserControl
+ {
+ public ApplicationFirmwareVersionsView() : base()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationOsVersionView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationOsVersionView.xaml
new file mode 100644
index 000000000..48f96597b
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationOsVersionView.xaml
@@ -0,0 +1,25 @@
+<UserControl x:Class="Tango.MachineStudio.DB.Views.DBViews.ApplicationOsVersionView"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls"
+ xmlns:controls="clr-namespace:Tango.MachineStudio.DB.Controls"
+ xmlns:local="clr-namespace:Tango.MachineStudio.DB.Views.DBViews"
+ mc:Ignorable="d"
+ d:DesignHeight="300" d:DesignWidth="300">
+ <Grid>
+ <controls:TableGrid>
+ <TextBlock Text="ID:" FontWeight="Bold"></TextBlock>
+ <TextBox Text="{Binding EditEntity.ID}" IsReadOnly="True"></TextBox>
+ <TextBlock Text="GUID:" FontWeight="Bold"></TextBlock>
+ <TextBox Text="{Binding EditEntity.Guid}" IsReadOnly="True"></TextBox>
+ <TextBlock Text="Last Updated:" FontWeight="Bold"></TextBlock>
+ <TextBox Text="{Binding EditEntity.LastUpdated}" IsReadOnly="True"></TextBox>
+ <TextBlock Text="Version:" FontWeight="Bold"></TextBlock>
+ <mahapps:NumericUpDown Minimum="0" Maximum="1000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding EditEntity.Version,Mode=TwoWay}"></mahapps:NumericUpDown>
+ <TextBlock Text="Name:" FontWeight="Bold"></TextBlock>
+ <TextBox Text="{Binding EditEntity.Name,Mode=TwoWay}"></TextBox>
+ </controls:TableGrid>
+ </Grid>
+</UserControl>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationOsVersionView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationOsVersionView.xaml.cs
new file mode 100644
index 000000000..019fd207e
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationOsVersionView.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.DB.Views.DBViews
+{
+ /// <summary>
+ /// Interaction logic for MachineView.xaml
+ /// </summary>
+ public partial class ApplicationOsVersionView : UserControl
+ {
+ public ApplicationOsVersionView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationOsVersionsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationOsVersionsView.xaml
new file mode 100644
index 000000000..f53c182c3
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationOsVersionsView.xaml
@@ -0,0 +1,23 @@
+<UserControl x:Class="Tango.MachineStudio.DB.Views.DBViews.ApplicationOsVersionsView"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:global="clr-namespace:Tango.MachineStudio.DB"
+ xmlns:controls="clr-namespace:Tango.MachineStudio.DB.Controls"
+ xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
+ mc:Ignorable="d"
+ d:DesignHeight="720" d:DesignWidth="1280" Background="White" DataContext="{x:Static global:ViewModelLocator.ApplicationOsVersionsViewVM}">
+ <Grid>
+ <controls:DbTableView>
+ <DataGrid Background="Transparent" ItemsSource="{Binding Adapter.ApplicationOsVersionsViewSource}" SelectedItem="{Binding SelectedEntity}" AutoGenerateColumns="False" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" IsReadOnly="True">
+ <DataGrid.Columns>
+ <DataGridTextColumn Header="ID" Binding="{Binding ID}"></DataGridTextColumn>
+ <DataGridTextColumn Header="GUID" Binding="{Binding Guid}"></DataGridTextColumn>
+ <DataGridTextColumn Header="Version" Binding="{Binding Version}"></DataGridTextColumn>
+ <DataGridTextColumn Header="Name" Binding="{Binding Name}"></DataGridTextColumn>
+ </DataGrid.Columns>
+ </DataGrid>
+ </controls:DbTableView>
+ </Grid>
+</UserControl>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationOsVersionsView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationOsVersionsView.xaml.cs
new file mode 100644
index 000000000..ca244d95b
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationOsVersionsView.xaml.cs
@@ -0,0 +1,32 @@
+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;
+using Tango.MachineStudio.DB.CustomAttributes;
+using Tango.MachineStudio.DB.Managers;
+using Tango.SharedUI.Controls;
+
+namespace Tango.MachineStudio.DB.Views.DBViews
+{
+ /// <summary>
+ /// Interaction logic for MachinesView.xaml
+ /// </summary>
+ [DBView]
+ public partial class ApplicationOsVersionsView : UserControl
+ {
+ public ApplicationOsVersionsView() : base()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationVersionView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationVersionView.xaml
new file mode 100644
index 000000000..c5e33f3fa
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationVersionView.xaml
@@ -0,0 +1,25 @@
+<UserControl x:Class="Tango.MachineStudio.DB.Views.DBViews.ApplicationVersionView"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls"
+ xmlns:controls="clr-namespace:Tango.MachineStudio.DB.Controls"
+ xmlns:local="clr-namespace:Tango.MachineStudio.DB.Views.DBViews"
+ mc:Ignorable="d"
+ d:DesignHeight="300" d:DesignWidth="300">
+ <Grid>
+ <controls:TableGrid>
+ <TextBlock Text="ID:" FontWeight="Bold"></TextBlock>
+ <TextBox Text="{Binding EditEntity.ID}" IsReadOnly="True"></TextBox>
+ <TextBlock Text="GUID:" FontWeight="Bold"></TextBlock>
+ <TextBox Text="{Binding EditEntity.Guid}" IsReadOnly="True"></TextBox>
+ <TextBlock Text="Last Updated:" FontWeight="Bold"></TextBlock>
+ <TextBox Text="{Binding EditEntity.LastUpdated}" IsReadOnly="True"></TextBox>
+ <TextBlock Text="Version:" FontWeight="Bold"></TextBlock>
+ <mahapps:NumericUpDown Minimum="0" Maximum="1000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding EditEntity.Version,Mode=TwoWay}"></mahapps:NumericUpDown>
+ <TextBlock Text="Name:" FontWeight="Bold"></TextBlock>
+ <TextBox Text="{Binding EditEntity.Name,Mode=TwoWay}"></TextBox>
+ </controls:TableGrid>
+ </Grid>
+</UserControl>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationVersionView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationVersionView.xaml.cs
new file mode 100644
index 000000000..bde27ee0d
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationVersionView.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.DB.Views.DBViews
+{
+ /// <summary>
+ /// Interaction logic for MachineView.xaml
+ /// </summary>
+ public partial class ApplicationVersionView : UserControl
+ {
+ public ApplicationVersionView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationVersionsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationVersionsView.xaml
new file mode 100644
index 000000000..09df0fee4
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationVersionsView.xaml
@@ -0,0 +1,23 @@
+<UserControl x:Class="Tango.MachineStudio.DB.Views.DBViews.ApplicationVersionsView"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:global="clr-namespace:Tango.MachineStudio.DB"
+ xmlns:controls="clr-namespace:Tango.MachineStudio.DB.Controls"
+ xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
+ mc:Ignorable="d"
+ d:DesignHeight="720" d:DesignWidth="1280" Background="White" DataContext="{x:Static global:ViewModelLocator.ApplicationVersionsViewVM}">
+ <Grid>
+ <controls:DbTableView>
+ <DataGrid Background="Transparent" ItemsSource="{Binding Adapter.ApplicationVersionsViewSource}" SelectedItem="{Binding SelectedEntity}" AutoGenerateColumns="False" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" IsReadOnly="True">
+ <DataGrid.Columns>
+ <DataGridTextColumn Header="ID" Binding="{Binding ID}"></DataGridTextColumn>
+ <DataGridTextColumn Header="GUID" Binding="{Binding Guid}"></DataGridTextColumn>
+ <DataGridTextColumn Header="Version" Binding="{Binding Version}"></DataGridTextColumn>
+ <DataGridTextColumn Header="Name" Binding="{Binding Name}"></DataGridTextColumn>
+ </DataGrid.Columns>
+ </DataGrid>
+ </controls:DbTableView>
+ </Grid>
+</UserControl>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationVersionsView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationVersionsView.xaml.cs
new file mode 100644
index 000000000..23cab4296
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationVersionsView.xaml.cs
@@ -0,0 +1,32 @@
+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;
+using Tango.MachineStudio.DB.CustomAttributes;
+using Tango.MachineStudio.DB.Managers;
+using Tango.SharedUI.Controls;
+
+namespace Tango.MachineStudio.DB.Views.DBViews
+{
+ /// <summary>
+ /// Interaction logic for MachinesView.xaml
+ /// </summary>
+ [DBView]
+ public partial class ApplicationVersionsView : UserControl
+ {
+ public ApplicationVersionsView() : base()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/CartridgeTypeView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/CartridgeTypeView.xaml
new file mode 100644
index 000000000..a81f05646
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/CartridgeTypeView.xaml
@@ -0,0 +1,29 @@
+<UserControl x:Class="Tango.MachineStudio.DB.Views.DBViews.CartridgeTypeView"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls"
+ xmlns:controls="clr-namespace:Tango.MachineStudio.DB.Controls"
+ xmlns:colorPicker="clr-namespace:Tango;assembly=Tango.ColorPicker"
+ xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
+ xmlns:vm="clr-namespace:Tango.MachineStudio.DB.ViewModels"
+ xmlns:local="clr-namespace:Tango.MachineStudio.DB.Views.DBViews"
+ mc:Ignorable="d"
+ d:DesignHeight="400" d:DesignWidth="300" d:DataContext="{d:DesignInstance Type=vm:CartridgeTypesViewVM, IsDesignTimeCreatable=False}">
+
+ <Grid>
+ <controls:TableGrid>
+ <TextBlock Text="ID:" FontWeight="Bold"></TextBlock>
+ <TextBox Text="{Binding EditEntity.ID}" IsReadOnly="True"></TextBox>
+ <TextBlock Text="GUID:" FontWeight="Bold"></TextBlock>
+ <TextBox Text="{Binding EditEntity.Guid}" IsReadOnly="True"></TextBox>
+ <TextBlock Text="Last Updated:" FontWeight="Bold"></TextBlock>
+ <TextBox Text="{Binding EditEntity.LastUpdated}" IsReadOnly="True"></TextBox>
+ <TextBlock Text="Code:" FontWeight="Bold"></TextBlock>
+ <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="False" HorizontalContentAlignment="Left" Value="{Binding EditEntity.Code,Mode=TwoWay}"></mahapps:NumericUpDown>
+ <TextBlock Text="Name:" FontWeight="Bold"></TextBlock>
+ <TextBox Text="{Binding EditEntity.Name,Mode=TwoWay}"></TextBox>
+ </controls:TableGrid>
+ </Grid>
+</UserControl>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/CartridgeTypeView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/CartridgeTypeView.xaml.cs
new file mode 100644
index 000000000..fc23e504e
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/CartridgeTypeView.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.DB.Views.DBViews
+{
+ /// <summary>
+ /// Interaction logic for MachineView.xaml
+ /// </summary>
+ public partial class CartridgeTypeView : UserControl
+ {
+ public CartridgeTypeView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/CartridgeTypesView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/CartridgeTypesView.xaml
new file mode 100644
index 000000000..d17f79c8d
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/CartridgeTypesView.xaml
@@ -0,0 +1,24 @@
+<UserControl x:Class="Tango.MachineStudio.DB.Views.DBViews.CartridgeTypesView"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:global="clr-namespace:Tango.MachineStudio.DB"
+ xmlns:controls="clr-namespace:Tango.MachineStudio.DB.Controls"
+ xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
+ xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
+ mc:Ignorable="d"
+ d:DesignHeight="720" d:DesignWidth="1280" Background="White" DataContext="{x:Static global:ViewModelLocator.CartridgeTypesViewVM}">
+ <Grid>
+ <controls:DbTableView>
+ <DataGrid Background="Transparent" ItemsSource="{Binding Adapter.CartridgeTypesViewSource}" SelectedItem="{Binding SelectedEntity}" AutoGenerateColumns="False" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" IsReadOnly="True">
+ <DataGrid.Columns>
+ <DataGridTextColumn Header="ID" Binding="{Binding ID}"></DataGridTextColumn>
+ <DataGridTextColumn Header="GUID" Binding="{Binding Guid}"></DataGridTextColumn>
+ <DataGridTextColumn Header="Code" Binding="{Binding Code}"></DataGridTextColumn>
+ <DataGridTextColumn Header="Name" Binding="{Binding Name}"></DataGridTextColumn>
+ </DataGrid.Columns>
+ </DataGrid>
+ </controls:DbTableView>
+ </Grid>
+</UserControl>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/CartridgeTypesView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/CartridgeTypesView.xaml.cs
new file mode 100644
index 000000000..428ebb296
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/CartridgeTypesView.xaml.cs
@@ -0,0 +1,32 @@
+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;
+using Tango.MachineStudio.DB.CustomAttributes;
+using Tango.MachineStudio.DB.Managers;
+using Tango.SharedUI.Controls;
+
+namespace Tango.MachineStudio.DB.Views.DBViews
+{
+ /// <summary>
+ /// Interaction logic for MachinesView.xaml
+ /// </summary>
+ [DBView]
+ public partial class CartridgeTypesView : UserControl
+ {
+ public CartridgeTypesView() : base()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/CartridgeView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/CartridgeView.xaml
new file mode 100644
index 000000000..98adef136
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/CartridgeView.xaml
@@ -0,0 +1,29 @@
+<UserControl x:Class="Tango.MachineStudio.DB.Views.DBViews.CartridgeView"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls"
+ xmlns:controls="clr-namespace:Tango.MachineStudio.DB.Controls"
+ xmlns:colorPicker="clr-namespace:Tango;assembly=Tango.ColorPicker"
+ xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
+ xmlns:vm="clr-namespace:Tango.MachineStudio.DB.ViewModels"
+ xmlns:local="clr-namespace:Tango.MachineStudio.DB.Views.DBViews"
+ mc:Ignorable="d"
+ d:DesignHeight="400" d:DesignWidth="300" d:DataContext="{d:DesignInstance Type=vm:CartridgesViewVM, IsDesignTimeCreatable=False}">
+
+ <Grid>
+ <controls:TableGrid>
+ <TextBlock Text="ID:" FontWeight="Bold"></TextBlock>
+ <TextBox Text="{Binding EditEntity.ID}" IsReadOnly="True"></TextBox>
+ <TextBlock Text="GUID:" FontWeight="Bold"></TextBlock>
+ <TextBox Text="{Binding EditEntity.Guid}" IsReadOnly="True"></TextBox>
+ <TextBlock Text="Last Updated:" FontWeight="Bold"></TextBlock>
+ <TextBox Text="{Binding EditEntity.LastUpdated}" IsReadOnly="True"></TextBox>
+ <TextBlock Text="Serial Number:" FontWeight="Bold"></TextBlock>
+ <TextBox Text="{Binding EditEntity.SerialNumber}"></TextBox>
+ <TextBlock Text="Cartridge Type:" FontWeight="Bold"></TextBlock>
+ <ComboBox ItemsSource="{Binding Adapter.CartridgeTypes}" SelectedItem="{Binding EditEntity.CartridgeTypes,Mode=TwoWay}" DisplayMemberPath="Name"></ComboBox>
+ </controls:TableGrid>
+ </Grid>
+</UserControl>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/CartridgeView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/CartridgeView.xaml.cs
new file mode 100644
index 000000000..d2402426c
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/CartridgeView.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.DB.Views.DBViews
+{
+ /// <summary>
+ /// Interaction logic for MachineView.xaml
+ /// </summary>
+ public partial class CartridgeView : UserControl
+ {
+ public CartridgeView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/CartridgesView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/CartridgesView.xaml
new file mode 100644
index 000000000..3fa7d0200
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/CartridgesView.xaml
@@ -0,0 +1,24 @@
+<UserControl x:Class="Tango.MachineStudio.DB.Views.DBViews.CartridgesView"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:global="clr-namespace:Tango.MachineStudio.DB"
+ xmlns:controls="clr-namespace:Tango.MachineStudio.DB.Controls"
+ xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
+ xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
+ mc:Ignorable="d"
+ d:DesignHeight="720" d:DesignWidth="1280" Background="White" DataContext="{x:Static global:ViewModelLocator.CartridgesViewVM}">
+ <Grid>
+ <controls:DbTableView>
+ <DataGrid Background="Transparent" ItemsSource="{Binding Adapter.CartridgesViewSource}" SelectedItem="{Binding SelectedEntity}" AutoGenerateColumns="False" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" IsReadOnly="True">
+ <DataGrid.Columns>
+ <DataGridTextColumn Header="ID" Binding="{Binding ID}"></DataGridTextColumn>
+ <DataGridTextColumn Header="GUID" Binding="{Binding Guid}"></DataGridTextColumn>
+ <DataGridTextColumn Header="Serial Number" Binding="{Binding SerialNumber}"></DataGridTextColumn>
+ <DataGridTextColumn Header="Cartridge Type" Binding="{Binding CartridgeTypes.Name}"></DataGridTextColumn>
+ </DataGrid.Columns>
+ </DataGrid>
+ </controls:DbTableView>
+ </Grid>
+</UserControl>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/CartridgesView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/CartridgesView.xaml.cs
new file mode 100644
index 000000000..27adfa44e
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/CartridgesView.xaml.cs
@@ -0,0 +1,32 @@
+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;
+using Tango.MachineStudio.DB.CustomAttributes;
+using Tango.MachineStudio.DB.Managers;
+using Tango.SharedUI.Controls;
+
+namespace Tango.MachineStudio.DB.Views.DBViews
+{
+ /// <summary>
+ /// Interaction logic for MachinesView.xaml
+ /// </summary>
+ [DBView]
+ public partial class CartridgesView : UserControl
+ {
+ public CartridgesView() : base()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ConfigurationView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ConfigurationView.xaml
new file mode 100644
index 000000000..afbaf660a
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ConfigurationView.xaml
@@ -0,0 +1,53 @@
+<UserControl x:Class="Tango.MachineStudio.DB.Views.DBViews.ConfigurationView"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:controls="clr-namespace:Tango.MachineStudio.DB.Controls"
+ xmlns:local="clr-namespace:Tango.MachineStudio.DB.Views.DBViews"
+ xmlns:vm="clr-namespace:Tango.MachineStudio.DB.ViewModels"
+ mc:Ignorable="d"
+ d:DesignHeight="300" d:DesignWidth="300" d:DataContext="{d:DesignInstance Type=vm:ConfigurationsViewVM, IsDesignTimeCreatable=False}">
+
+ <UserControl.Resources>
+ <DataTemplate x:Key="comTemplate">
+ <TextBlock><Run Text="{Binding Name}"></Run><Run>,</Run> <Run Text="{Binding Version}"></Run></TextBlock>
+ </DataTemplate>
+ </UserControl.Resources>
+
+ <Grid>
+ <controls:TableGrid>
+ <TextBlock Text="ID:" FontWeight="Bold"></TextBlock>
+ <TextBox Text="{Binding EditEntity.ID}" IsReadOnly="True"></TextBox>
+ <TextBlock Text="GUID:" FontWeight="Bold"></TextBlock>
+ <TextBox Text="{Binding EditEntity.Guid}" IsReadOnly="True"></TextBox>
+ <TextBlock Text="Last Updated:" FontWeight="Bold"></TextBlock>
+ <TextBox Text="{Binding EditEntity.LastUpdated}" IsReadOnly="True"></TextBox>
+ <TextBlock Text="Name:" FontWeight="Bold"></TextBlock>
+ <TextBox Text="{Binding EditEntity.Name,Mode=TwoWay}"></TextBox>
+ <TextBlock Text="Creation Date:" FontWeight="Bold"></TextBlock>
+ <TextBox Text="{Binding EditEntity.CreationDate,Mode=TwoWay}" IsReadOnly="True"></TextBox>
+ <TextBlock Text="Application Version:" FontWeight="Bold"></TextBlock>
+ <ComboBox ItemsSource="{Binding Adapter.ApplicationVersions}" SelectedItem="{Binding EditEntity.ApplicationVersions,Mode=TwoWay}" ItemTemplate="{StaticResource comTemplate}"></ComboBox>
+
+ <TextBlock Text="Application Firmware Version:" FontWeight="Bold"></TextBlock>
+ <ComboBox ItemsSource="{Binding Adapter.ApplicationFirmwareVersions}" SelectedItem="{Binding EditEntity.ApplicationFirmwareVersions,Mode=TwoWay}" ItemTemplate="{StaticResource comTemplate}"></ComboBox>
+
+ <TextBlock Text="Application OS Version:" FontWeight="Bold"></TextBlock>
+ <ComboBox ItemsSource="{Binding Adapter.ApplicationOsVersions}" SelectedItem="{Binding EditEntity.ApplicationOsVersions,Mode=TwoWay}" ItemTemplate="{StaticResource comTemplate}"></ComboBox>
+
+ <TextBlock Text="Display Panel Version:" FontWeight="Bold"></TextBlock>
+ <ComboBox ItemsSource="{Binding Adapter.ApplicationDisplayPanelVersions}" SelectedItem="{Binding EditEntity.ApplicationDisplayPanelVersions,Mode=TwoWay}" ItemTemplate="{StaticResource comTemplate}"></ComboBox>
+
+ <TextBlock Text="Embedded Firmware Version:" FontWeight="Bold"></TextBlock>
+ <ComboBox ItemsSource="{Binding Adapter.EmbeddedFirmwareVersions}" SelectedItem="{Binding EditEntity.EmbeddedFirmwareVersions,Mode=TwoWay}" ItemTemplate="{StaticResource comTemplate}"></ComboBox>
+
+ <TextBlock Text="Embedded Software Version:" FontWeight="Bold"></TextBlock>
+ <ComboBox ItemsSource="{Binding Adapter.EmbeddedSoftwareVersions}" SelectedItem="{Binding EditEntity.EmbeddedSoftwareVersions,Mode=TwoWay}" ItemTemplate="{StaticResource comTemplate}"></ComboBox>
+
+ <TextBlock Text="Hardware Version:" FontWeight="Bold"></TextBlock>
+ <ComboBox ItemsSource="{Binding Adapter.HardwareVersions}" SelectedItem="{Binding EditEntity.HardwareVersions,Mode=TwoWay}" ItemTemplate="{StaticResource comTemplate}"></ComboBox>
+
+ </controls:TableGrid>
+ </Grid>
+</UserControl>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ConfigurationView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ConfigurationView.xaml.cs
new file mode 100644
index 000000000..8772bbae9
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ConfigurationView.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.DB.Views.DBViews
+{
+ /// <summary>
+ /// Interaction logic for MachineView.xaml
+ /// </summary>
+ public partial class ConfigurationView : UserControl
+ {
+ public ConfigurationView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ConfigurationsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ConfigurationsView.xaml
new file mode 100644
index 000000000..235e49cc3
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ConfigurationsView.xaml
@@ -0,0 +1,30 @@
+<UserControl x:Class="Tango.MachineStudio.DB.Views.DBViews.ConfigurationsView"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:global="clr-namespace:Tango.MachineStudio.DB"
+ xmlns:controls="clr-namespace:Tango.MachineStudio.DB.Controls"
+ xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
+ mc:Ignorable="d"
+ d:DesignHeight="720" d:DesignWidth="1280" Background="White" DataContext="{x:Static global:ViewModelLocator.ConfigurationsViewVM}">
+ <Grid>
+ <controls:DbTableView>
+ <DataGrid Background="Transparent" ItemsSource="{Binding Adapter.ConfigurationsViewSource}" SelectedItem="{Binding SelectedEntity}" AutoGenerateColumns="False" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" IsReadOnly="True">
+ <DataGrid.Columns>
+ <DataGridTextColumn Header="ID" Binding="{Binding ID}"></DataGridTextColumn>
+ <DataGridTextColumn Header="GUID" Binding="{Binding Guid}"></DataGridTextColumn>
+ <DataGridTextColumn Header="Name" Binding="{Binding Name}"></DataGridTextColumn>
+ <DataGridTextColumn Header="Creation Date" Binding="{Binding CreationDate}"></DataGridTextColumn>
+ <DataGridTextColumn Header="Application Version" Binding="{Binding ApplicationVersions.Version}"></DataGridTextColumn>
+ <DataGridTextColumn Header="Application OS" Binding="{Binding ApplicationOsVersions.Name}"></DataGridTextColumn>
+ <DataGridTextColumn Header="Application Firmware Version" Binding="{Binding ApplicationFirmwareVersions.Version}"></DataGridTextColumn>
+ <DataGridTextColumn Header="Display Panel" Binding="{Binding ApplicationDisplayPanelVersions.Name}"></DataGridTextColumn>
+ <DataGridTextColumn Header="Embedded Firmware Version" Binding="{Binding EmbeddedFirmwareVersions.Version}"></DataGridTextColumn>
+ <DataGridTextColumn Header="Embedded Software Version" Binding="{Binding EmbeddedSoftwareVersions.Version}"></DataGridTextColumn>
+ <DataGridTextColumn Header="Hardware Version" Binding="{Binding HardwareVersions.Version}"></DataGridTextColumn>
+ </DataGrid.Columns>
+ </DataGrid>
+ </controls:DbTableView>
+ </Grid>
+</UserControl>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ConfigurationsView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ConfigurationsView.xaml.cs
new file mode 100644
index 000000000..de3fc9010
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ConfigurationsView.xaml.cs
@@ -0,0 +1,32 @@
+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;
+using Tango.MachineStudio.DB.CustomAttributes;
+using Tango.MachineStudio.DB.Managers;
+using Tango.SharedUI.Controls;
+
+namespace Tango.MachineStudio.DB.Views.DBViews
+{
+ /// <summary>
+ /// Interaction logic for MachinesView.xaml
+ /// </summary>
+ [DBView]
+ public partial class ConfigurationsView : UserControl
+ {
+ public ConfigurationsView() : base()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DispenserTypeView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DispenserTypeView.xaml
new file mode 100644
index 000000000..b6e3336b3
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DispenserTypeView.xaml
@@ -0,0 +1,29 @@
+<UserControl x:Class="Tango.MachineStudio.DB.Views.DBViews.DispenserTypeView"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls"
+ xmlns:controls="clr-namespace:Tango.MachineStudio.DB.Controls"
+ xmlns:colorPicker="clr-namespace:Tango;assembly=Tango.ColorPicker"
+ xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
+ xmlns:vm="clr-namespace:Tango.MachineStudio.DB.ViewModels"
+ xmlns:local="clr-namespace:Tango.MachineStudio.DB.Views.DBViews"
+ mc:Ignorable="d"
+ d:DesignHeight="400" d:DesignWidth="300" d:DataContext="{d:DesignInstance Type=vm:DispenserTypesViewVM, IsDesignTimeCreatable=False}">
+
+ <Grid>
+ <controls:TableGrid>
+ <TextBlock Text="ID:" FontWeight="Bold"></TextBlock>
+ <TextBox Text="{Binding EditEntity.ID}" IsReadOnly="True"></TextBox>
+ <TextBlock Text="GUID:" FontWeight="Bold"></TextBlock>
+ <TextBox Text="{Binding EditEntity.Guid}" IsReadOnly="True"></TextBox>
+ <TextBlock Text="Last Updated:" FontWeight="Bold"></TextBlock>
+ <TextBox Text="{Binding EditEntity.LastUpdated}" IsReadOnly="True"></TextBox>
+ <TextBlock Text="Code:" FontWeight="Bold"></TextBlock>
+ <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="False" HorizontalContentAlignment="Left" Value="{Binding EditEntity.Code,Mode=TwoWay}"></mahapps:NumericUpDown>
+ <TextBlock Text="Name:" FontWeight="Bold"></TextBlock>
+ <TextBox Text="{Binding EditEntity.Name,Mode=TwoWay}"></TextBox>
+ </controls:TableGrid>
+ </Grid>
+</UserControl>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DispenserTypeView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DispenserTypeView.xaml.cs
new file mode 100644
index 000000000..f13875714
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DispenserTypeView.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.DB.Views.DBViews
+{
+ /// <summary>
+ /// Interaction logic for MachineView.xaml
+ /// </summary>
+ public partial class DispenserTypeView : UserControl
+ {
+ public DispenserTypeView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DispenserTypesView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DispenserTypesView.xaml
new file mode 100644
index 000000000..874629128
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DispenserTypesView.xaml
@@ -0,0 +1,24 @@
+<UserControl x:Class="Tango.MachineStudio.DB.Views.DBViews.DispenserTypesView"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:global="clr-namespace:Tango.MachineStudio.DB"
+ xmlns:controls="clr-namespace:Tango.MachineStudio.DB.Controls"
+ xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
+ xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
+ mc:Ignorable="d"
+ d:DesignHeight="720" d:DesignWidth="1280" Background="White" DataContext="{x:Static global:ViewModelLocator.DispenserTypesViewVM}">
+ <Grid>
+ <controls:DbTableView>
+ <DataGrid Background="Transparent" ItemsSource="{Binding Adapter.DispenserTypesViewSource}" SelectedItem="{Binding SelectedEntity}" AutoGenerateColumns="False" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" IsReadOnly="True">
+ <DataGrid.Columns>
+ <DataGridTextColumn Header="ID" Binding="{Binding ID}"></DataGridTextColumn>
+ <DataGridTextColumn Header="GUID" Binding="{Binding Guid}"></DataGridTextColumn>
+ <DataGridTextColumn Header="Code" Binding="{Binding Code}"></DataGridTextColumn>
+ <DataGridTextColumn Header="Name" Binding="{Binding Name}"></DataGridTextColumn>
+ </DataGrid.Columns>
+ </DataGrid>
+ </controls:DbTableView>
+ </Grid>
+</UserControl>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DispenserTypesView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DispenserTypesView.xaml.cs
new file mode 100644
index 000000000..89e0b05c1
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DispenserTypesView.xaml.cs
@@ -0,0 +1,32 @@
+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;
+using Tango.MachineStudio.DB.CustomAttributes;
+using Tango.MachineStudio.DB.Managers;
+using Tango.SharedUI.Controls;
+
+namespace Tango.MachineStudio.DB.Views.DBViews
+{
+ /// <summary>
+ /// Interaction logic for MachinesView.xaml
+ /// </summary>
+ [DBView]
+ public partial class DispenserTypesView : UserControl
+ {
+ public DispenserTypesView() : base()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DispenserView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DispenserView.xaml
new file mode 100644
index 000000000..7dc4ec1ff
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DispenserView.xaml
@@ -0,0 +1,29 @@
+<UserControl x:Class="Tango.MachineStudio.DB.Views.DBViews.DispenserView"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls"
+ xmlns:controls="clr-namespace:Tango.MachineStudio.DB.Controls"
+ xmlns:colorPicker="clr-namespace:Tango;assembly=Tango.ColorPicker"
+ xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
+ xmlns:vm="clr-namespace:Tango.MachineStudio.DB.ViewModels"
+ xmlns:local="clr-namespace:Tango.MachineStudio.DB.Views.DBViews"
+ mc:Ignorable="d"
+ d:DesignHeight="400" d:DesignWidth="300" d:DataContext="{d:DesignInstance Type=vm:DispensersViewVM, IsDesignTimeCreatable=False}">
+
+ <Grid>
+ <controls:TableGrid>
+ <TextBlock Text="ID:" FontWeight="Bold"></TextBlock>
+ <TextBox Text="{Binding EditEntity.ID}" IsReadOnly="True"></TextBox>
+ <TextBlock Text="GUID:" FontWeight="Bold"></TextBlock>
+ <TextBox Text="{Binding EditEntity.Guid}" IsReadOnly="True"></TextBox>
+ <TextBlock Text="Last Updated:" FontWeight="Bold"></TextBlock>
+ <TextBox Text="{Binding EditEntity.LastUpdated}" IsReadOnly="True"></TextBox>
+ <TextBlock Text="Serial Number:" FontWeight="Bold"></TextBlock>
+ <TextBox Text="{Binding EditEntity.SerialNumber}"></TextBox>
+ <TextBlock Text="Dispenser Type:" FontWeight="Bold"></TextBlock>
+ <ComboBox ItemsSource="{Binding Adapter.DispenserTypes}" SelectedItem="{Binding EditEntity.DispenserTypes,Mode=TwoWay}" DisplayMemberPath="Name"></ComboBox>
+ </controls:TableGrid>
+ </Grid>
+</UserControl>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DispenserView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DispenserView.xaml.cs
new file mode 100644
index 000000000..4ad5d74fe
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DispenserView.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.DB.Views.DBViews
+{
+ /// <summary>
+ /// Interaction logic for MachineView.xaml
+ /// </summary>
+ public partial class DispenserView : UserControl
+ {
+ public DispenserView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DispensersView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DispensersView.xaml
new file mode 100644
index 000000000..7fdb70bbe
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DispensersView.xaml
@@ -0,0 +1,24 @@
+<UserControl x:Class="Tango.MachineStudio.DB.Views.DBViews.DispensersView"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:global="clr-namespace:Tango.MachineStudio.DB"
+ xmlns:controls="clr-namespace:Tango.MachineStudio.DB.Controls"
+ xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
+ xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
+ mc:Ignorable="d"
+ d:DesignHeight="720" d:DesignWidth="1280" Background="White" DataContext="{x:Static global:ViewModelLocator.DispensersViewVM}">
+ <Grid>
+ <controls:DbTableView>
+ <DataGrid Background="Transparent" ItemsSource="{Binding Adapter.DispensersViewSource}" SelectedItem="{Binding SelectedEntity}" AutoGenerateColumns="False" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" IsReadOnly="True">
+ <DataGrid.Columns>
+ <DataGridTextColumn Header="ID" Binding="{Binding ID}"></DataGridTextColumn>
+ <DataGridTextColumn Header="GUID" Binding="{Binding Guid}"></DataGridTextColumn>
+ <DataGridTextColumn Header="Serial Number" Binding="{Binding SerialNumber}"></DataGridTextColumn>
+ <DataGridTextColumn Header="Dispenser Type" Binding="{Binding DispenserTypes.Name}"></DataGridTextColumn>
+ </DataGrid.Columns>
+ </DataGrid>
+ </controls:DbTableView>
+ </Grid>
+</UserControl>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DispensersView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DispensersView.xaml.cs
new file mode 100644
index 000000000..d86bd2e31
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DispensersView.xaml.cs
@@ -0,0 +1,32 @@
+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;
+using Tango.MachineStudio.DB.CustomAttributes;
+using Tango.MachineStudio.DB.Managers;
+using Tango.SharedUI.Controls;
+
+namespace Tango.MachineStudio.DB.Views.DBViews
+{
+ /// <summary>
+ /// Interaction logic for MachinesView.xaml
+ /// </summary>
+ [DBView]
+ public partial class DispensersView : UserControl
+ {
+ public DispensersView() : base()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EmbeddedFirmwareVersionView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EmbeddedFirmwareVersionView.xaml
new file mode 100644
index 000000000..56dccb7dc
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EmbeddedFirmwareVersionView.xaml
@@ -0,0 +1,25 @@
+<UserControl x:Class="Tango.MachineStudio.DB.Views.DBViews.EmbeddedFirmwareVersionView"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls"
+ xmlns:controls="clr-namespace:Tango.MachineStudio.DB.Controls"
+ xmlns:local="clr-namespace:Tango.MachineStudio.DB.Views.DBViews"
+ mc:Ignorable="d"
+ d:DesignHeight="300" d:DesignWidth="300">
+ <Grid>
+ <controls:TableGrid>
+ <TextBlock Text="ID:" FontWeight="Bold"></TextBlock>
+ <TextBox Text="{Binding EditEntity.ID}" IsReadOnly="True"></TextBox>
+ <TextBlock Text="GUID:" FontWeight="Bold"></TextBlock>
+ <TextBox Text="{Binding EditEntity.Guid}" IsReadOnly="True"></TextBox>
+ <TextBlock Text="Last Updated:" FontWeight="Bold"></TextBlock>
+ <TextBox Text="{Binding EditEntity.LastUpdated}" IsReadOnly="True"></TextBox>
+ <TextBlock Text="Version:" FontWeight="Bold"></TextBlock>
+ <mahapps:NumericUpDown Minimum="0" Maximum="1000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding EditEntity.Version,Mode=TwoWay}"></mahapps:NumericUpDown>
+ <TextBlock Text="Name:" FontWeight="Bold"></TextBlock>
+ <TextBox Text="{Binding EditEntity.Name,Mode=TwoWay}"></TextBox>
+ </controls:TableGrid>
+ </Grid>
+</UserControl>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EmbeddedFirmwareVersionView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EmbeddedFirmwareVersionView.xaml.cs
new file mode 100644
index 000000000..82aa4f7b4
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EmbeddedFirmwareVersionView.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.DB.Views.DBViews
+{
+ /// <summary>
+ /// Interaction logic for MachineView.xaml
+ /// </summary>
+ public partial class EmbeddedFirmwareVersionView : UserControl
+ {
+ public EmbeddedFirmwareVersionView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EmbeddedFirmwareVersionsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EmbeddedFirmwareVersionsView.xaml
new file mode 100644
index 000000000..219230d32
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EmbeddedFirmwareVersionsView.xaml
@@ -0,0 +1,23 @@
+<UserControl x:Class="Tango.MachineStudio.DB.Views.DBViews.EmbeddedFirmwareVersionsView"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:global="clr-namespace:Tango.MachineStudio.DB"
+ xmlns:controls="clr-namespace:Tango.MachineStudio.DB.Controls"
+ xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
+ mc:Ignorable="d"
+ d:DesignHeight="720" d:DesignWidth="1280" Background="White" DataContext="{x:Static global:ViewModelLocator.EmbeddedFirmwareVersionsViewVM}">
+ <Grid>
+ <controls:DbTableView>
+ <DataGrid Background="Transparent" ItemsSource="{Binding Adapter.EmbeddedFirmwareVersionsViewSource}" SelectedItem="{Binding SelectedEntity}" AutoGenerateColumns="False" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" IsReadOnly="True">
+ <DataGrid.Columns>
+ <DataGridTextColumn Header="ID" Binding="{Binding ID}"></DataGridTextColumn>
+ <DataGridTextColumn Header="GUID" Binding="{Binding Guid}"></DataGridTextColumn>
+ <DataGridTextColumn Header="Version" Binding="{Binding Version}"></DataGridTextColumn>
+ <DataGridTextColumn Header="Name" Binding="{Binding Name}"></DataGridTextColumn>
+ </DataGrid.Columns>
+ </DataGrid>
+ </controls:DbTableView>
+ </Grid>
+</UserControl>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EmbeddedFirmwareVersionsView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EmbeddedFirmwareVersionsView.xaml.cs
new file mode 100644
index 000000000..39c50aa39
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EmbeddedFirmwareVersionsView.xaml.cs
@@ -0,0 +1,32 @@
+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;
+using Tango.MachineStudio.DB.CustomAttributes;
+using Tango.MachineStudio.DB.Managers;
+using Tango.SharedUI.Controls;
+
+namespace Tango.MachineStudio.DB.Views.DBViews
+{
+ /// <summary>
+ /// Interaction logic for MachinesView.xaml
+ /// </summary>
+ [DBView]
+ public partial class EmbeddedFirmwareVersionsView : UserControl
+ {
+ public EmbeddedFirmwareVersionsView() : base()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EmbeddedSoftwareVersionView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EmbeddedSoftwareVersionView.xaml
new file mode 100644
index 000000000..279c15c84
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EmbeddedSoftwareVersionView.xaml
@@ -0,0 +1,25 @@
+<UserControl x:Class="Tango.MachineStudio.DB.Views.DBViews.EmbeddedSoftwareVersionView"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls"
+ xmlns:controls="clr-namespace:Tango.MachineStudio.DB.Controls"
+ xmlns:local="clr-namespace:Tango.MachineStudio.DB.Views.DBViews"
+ mc:Ignorable="d"
+ d:DesignHeight="300" d:DesignWidth="300">
+ <Grid>
+ <controls:TableGrid>
+ <TextBlock Text="ID:" FontWeight="Bold"></TextBlock>
+ <TextBox Text="{Binding EditEntity.ID}" IsReadOnly="True"></TextBox>
+ <TextBlock Text="GUID:" FontWeight="Bold"></TextBlock>
+ <TextBox Text="{Binding EditEntity.Guid}" IsReadOnly="True"></TextBox>
+ <TextBlock Text="Last Updated:" FontWeight="Bold"></TextBlock>
+ <TextBox Text="{Binding EditEntity.LastUpdated}" IsReadOnly="True"></TextBox>
+ <TextBlock Text="Version:" FontWeight="Bold"></TextBlock>
+ <mahapps:NumericUpDown Minimum="0" Maximum="1000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding EditEntity.Version,Mode=TwoWay}"></mahapps:NumericUpDown>
+ <TextBlock Text="Name:" FontWeight="Bold"></TextBlock>
+ <TextBox Text="{Binding EditEntity.Name,Mode=TwoWay}"></TextBox>
+ </controls:TableGrid>
+ </Grid>
+</UserControl>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EmbeddedSoftwareVersionView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EmbeddedSoftwareVersionView.xaml.cs
new file mode 100644
index 000000000..e2e626fb5
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EmbeddedSoftwareVersionView.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.DB.Views.DBViews
+{
+ /// <summary>
+ /// Interaction logic for MachineView.xaml
+ /// </summary>
+ public partial class EmbeddedSoftwareVersionView : UserControl
+ {
+ public EmbeddedSoftwareVersionView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EmbeddedSoftwareVersionsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EmbeddedSoftwareVersionsView.xaml
new file mode 100644
index 000000000..64814a416
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EmbeddedSoftwareVersionsView.xaml
@@ -0,0 +1,23 @@
+<UserControl x:Class="Tango.MachineStudio.DB.Views.DBViews.EmbeddedSoftwareVersionsView"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:global="clr-namespace:Tango.MachineStudio.DB"
+ xmlns:controls="clr-namespace:Tango.MachineStudio.DB.Controls"
+ xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
+ mc:Ignorable="d"
+ d:DesignHeight="720" d:DesignWidth="1280" Background="White" DataContext="{x:Static global:ViewModelLocator.EmbeddedSoftwareVersionsViewVM}">
+ <Grid>
+ <controls:DbTableView>
+ <DataGrid Background="Transparent" ItemsSource="{Binding Adapter.EmbeddedSoftwareVersionsViewSource}" SelectedItem="{Binding SelectedEntity}" AutoGenerateColumns="False" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" IsReadOnly="True">
+ <DataGrid.Columns>
+ <DataGridTextColumn Header="ID" Binding="{Binding ID}"></DataGridTextColumn>
+ <DataGridTextColumn Header="GUID" Binding="{Binding Guid}"></DataGridTextColumn>
+ <DataGridTextColumn Header="Version" Binding="{Binding Version}"></DataGridTextColumn>
+ <DataGridTextColumn Header="Name" Binding="{Binding Name}"></DataGridTextColumn>
+ </DataGrid.Columns>
+ </DataGrid>
+ </controls:DbTableView>
+ </Grid>
+</UserControl>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EmbeddedSoftwareVersionsView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EmbeddedSoftwareVersionsView.xaml.cs
new file mode 100644
index 000000000..55f7a03a6
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EmbeddedSoftwareVersionsView.xaml.cs
@@ -0,0 +1,32 @@
+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;
+using Tango.MachineStudio.DB.CustomAttributes;
+using Tango.MachineStudio.DB.Managers;
+using Tango.SharedUI.Controls;
+
+namespace Tango.MachineStudio.DB.Views.DBViews
+{
+ /// <summary>
+ /// Interaction logic for MachinesView.xaml
+ /// </summary>
+ [DBView]
+ public partial class EmbeddedSoftwareVersionsView : UserControl
+ {
+ public EmbeddedSoftwareVersionsView() : base()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/HardwareVersionView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/HardwareVersionView.xaml
new file mode 100644
index 000000000..45d36fb14
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/HardwareVersionView.xaml
@@ -0,0 +1,25 @@
+<UserControl x:Class="Tango.MachineStudio.DB.Views.DBViews.HardwareVersionView"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls"
+ xmlns:controls="clr-namespace:Tango.MachineStudio.DB.Controls"
+ xmlns:local="clr-namespace:Tango.MachineStudio.DB.Views.DBViews"
+ mc:Ignorable="d"
+ d:DesignHeight="300" d:DesignWidth="300">
+ <Grid>
+ <controls:TableGrid>
+ <TextBlock Text="ID:" FontWeight="Bold"></TextBlock>
+ <TextBox Text="{Binding EditEntity.ID}" IsReadOnly="True"></TextBox>
+ <TextBlock Text="GUID:" FontWeight="Bold"></TextBlock>
+ <TextBox Text="{Binding EditEntity.Guid}" IsReadOnly="True"></TextBox>
+ <TextBlock Text="Last Updated:" FontWeight="Bold"></TextBlock>
+ <TextBox Text="{Binding EditEntity.LastUpdated}" IsReadOnly="True"></TextBox>
+ <TextBlock Text="Version:" FontWeight="Bold"></TextBlock>
+ <mahapps:NumericUpDown Minimum="0" Maximum="1000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding EditEntity.Version,Mode=TwoWay}"></mahapps:NumericUpDown>
+ <TextBlock Text="Name:" FontWeight="Bold"></TextBlock>
+ <TextBox Text="{Binding EditEntity.Name,Mode=TwoWay}"></TextBox>
+ </controls:TableGrid>
+ </Grid>
+</UserControl>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/HardwareVersionView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/HardwareVersionView.xaml.cs
new file mode 100644
index 000000000..1419434bf
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/HardwareVersionView.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.DB.Views.DBViews
+{
+ /// <summary>
+ /// Interaction logic for MachineView.xaml
+ /// </summary>
+ public partial class HardwareVersionView : UserControl
+ {
+ public HardwareVersionView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/HardwareVersionsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/HardwareVersionsView.xaml
new file mode 100644
index 000000000..4a60ffcaa
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/HardwareVersionsView.xaml
@@ -0,0 +1,23 @@
+<UserControl x:Class="Tango.MachineStudio.DB.Views.DBViews.HardwareVersionsView"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:global="clr-namespace:Tango.MachineStudio.DB"
+ xmlns:controls="clr-namespace:Tango.MachineStudio.DB.Controls"
+ xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
+ mc:Ignorable="d"
+ d:DesignHeight="720" d:DesignWidth="1280" Background="White" DataContext="{x:Static global:ViewModelLocator.HardwareVersionsViewVM}">
+ <Grid>
+ <controls:DbTableView>
+ <DataGrid Background="Transparent" ItemsSource="{Binding Adapter.HardwareVersionsViewSource}" SelectedItem="{Binding SelectedEntity}" AutoGenerateColumns="False" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" IsReadOnly="True">
+ <DataGrid.Columns>
+ <DataGridTextColumn Header="ID" Binding="{Binding ID}"></DataGridTextColumn>
+ <DataGridTextColumn Header="GUID" Binding="{Binding Guid}"></DataGridTextColumn>
+ <DataGridTextColumn Header="Version" Binding="{Binding Version}"></DataGridTextColumn>
+ <DataGridTextColumn Header="Name" Binding="{Binding Name}"></DataGridTextColumn>
+ </DataGrid.Columns>
+ </DataGrid>
+ </controls:DbTableView>
+ </Grid>
+</UserControl>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/HardwareVersionsView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/HardwareVersionsView.xaml.cs
new file mode 100644
index 000000000..0e552cdb7
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/HardwareVersionsView.xaml.cs
@@ -0,0 +1,32 @@
+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;
+using Tango.MachineStudio.DB.CustomAttributes;
+using Tango.MachineStudio.DB.Managers;
+using Tango.SharedUI.Controls;
+
+namespace Tango.MachineStudio.DB.Views.DBViews
+{
+ /// <summary>
+ /// Interaction logic for MachinesView.xaml
+ /// </summary>
+ [DBView]
+ public partial class HardwareVersionsView : UserControl
+ {
+ public HardwareVersionsView() : base()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/IdsPackView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/IdsPackView.xaml
new file mode 100644
index 000000000..308a549fa
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/IdsPackView.xaml
@@ -0,0 +1,64 @@
+<UserControl x:Class="Tango.MachineStudio.DB.Views.DBViews.IdsPackView"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls"
+ xmlns:controls="clr-namespace:Tango.MachineStudio.DB.Controls"
+ xmlns:colorPicker="clr-namespace:Tango;assembly=Tango.ColorPicker"
+ xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
+ xmlns:vm="clr-namespace:Tango.MachineStudio.DB.ViewModels"
+ xmlns:local="clr-namespace:Tango.MachineStudio.DB.Views.DBViews"
+ mc:Ignorable="d"
+ d:DesignHeight="400" d:DesignWidth="300" d:DataContext="{d:DesignInstance Type=vm:IdsPacksViewVM, IsDesignTimeCreatable=False}">
+
+ <UserControl.Resources>
+ <converters:ColorToIntegerConverter x:Key="ColorToIntegerConverter"></converters:ColorToIntegerConverter>
+ </UserControl.Resources>
+
+ <Grid>
+ <controls:TableGrid>
+ <TextBlock Text="ID:" FontWeight="Bold"></TextBlock>
+ <TextBox Text="{Binding EditEntity.ID}" IsReadOnly="True"></TextBox>
+ <TextBlock Text="GUID:" FontWeight="Bold"></TextBlock>
+ <TextBox Text="{Binding EditEntity.Guid}" IsReadOnly="True"></TextBox>
+ <TextBlock Text="Last Updated:" FontWeight="Bold"></TextBlock>
+ <TextBox Text="{Binding EditEntity.LastUpdated}" IsReadOnly="True"></TextBox>
+ <TextBlock Text="Name:" FontWeight="Bold"></TextBlock>
+ <TextBox Text="{Binding EditEntity.Name}"></TextBox>
+ <TextBlock Text="Configuration:" FontWeight="Bold"></TextBlock>
+ <ComboBox ItemsSource="{Binding Adapter.Configurations}" SelectedItem="{Binding EditEntity.Configuration,Mode=TwoWay}" DisplayMemberPath="Name"></ComboBox>
+ <TextBlock Text="Dispenser:" FontWeight="Bold"></TextBlock>
+ <ComboBox ItemsSource="{Binding Adapter.Dispensers}" SelectedItem="{Binding EditEntity.Dispenser,Mode=TwoWay}">
+ <ComboBox.ItemTemplate>
+ <DataTemplate>
+ <TextBlock><Run Text="{Binding SerialNumber}"></Run><Run>,</Run> <Run Text="{Binding DispenserTypes.Name}"></Run></TextBlock>
+ </DataTemplate>
+ </ComboBox.ItemTemplate>
+ </ComboBox>
+ <TextBlock Text="Liquid:" FontWeight="Bold"></TextBlock>
+ <ComboBox ItemsSource="{Binding Adapter.Liquids}" SelectedItem="{Binding EditEntity.Liquid,Mode=TwoWay}">
+ <ComboBox.ItemTemplate>
+ <DataTemplate>
+ <StackPanel Orientation="Horizontal">
+ <Rectangle Width="16" Height="16" VerticalAlignment="Center">
+ <Rectangle.Fill>
+ <SolidColorBrush Color="{Binding Color,Converter={StaticResource ColorToIntegerConverter}}"></SolidColorBrush>
+ </Rectangle.Fill>
+ </Rectangle>
+ <TextBlock Margin="5 0 0 0" Text="{Binding Name}" VerticalAlignment="Center"></TextBlock>
+ </StackPanel>
+ </DataTemplate>
+ </ComboBox.ItemTemplate>
+ </ComboBox>
+ <TextBlock Text="Cartridge:" FontWeight="Bold"></TextBlock>
+ <ComboBox ItemsSource="{Binding Adapter.Cartridges}" SelectedItem="{Binding EditEntity.Cartridge,Mode=TwoWay}">
+ <ComboBox.ItemTemplate>
+ <DataTemplate>
+ <TextBlock><Run Text="{Binding SerialNumber}"></Run><Run>,</Run> <Run Text="{Binding CartridgeTypes.Name}"></Run></TextBlock>
+ </DataTemplate>
+ </ComboBox.ItemTemplate>
+ </ComboBox>
+ </controls:TableGrid>
+ </Grid>
+</UserControl>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/IdsPackView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/IdsPackView.xaml.cs
new file mode 100644
index 000000000..766b3087e
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/IdsPackView.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.DB.Views.DBViews
+{
+ /// <summary>
+ /// Interaction logic for MachineView.xaml
+ /// </summary>
+ public partial class IdsPackView : UserControl
+ {
+ public IdsPackView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/IdsPacksView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/IdsPacksView.xaml
new file mode 100644
index 000000000..df1557ec3
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/IdsPacksView.xaml
@@ -0,0 +1,57 @@
+<UserControl x:Class="Tango.MachineStudio.DB.Views.DBViews.IdsPacksView"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:global="clr-namespace:Tango.MachineStudio.DB"
+ xmlns:controls="clr-namespace:Tango.MachineStudio.DB.Controls"
+ xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
+ xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
+ mc:Ignorable="d"
+ d:DesignHeight="720" d:DesignWidth="1280" Background="White" DataContext="{x:Static global:ViewModelLocator.IdsPacksViewVM}">
+
+ <UserControl.Resources>
+ <converters:ColorToIntegerConverter x:Key="ColorToIntegerConverter"></converters:ColorToIntegerConverter>
+ </UserControl.Resources>
+
+ <Grid>
+ <controls:DbTableView>
+ <DataGrid Background="Transparent" ItemsSource="{Binding Adapter.IdsPacksViewSource}" SelectedItem="{Binding SelectedEntity}" AutoGenerateColumns="False" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" IsReadOnly="True">
+ <DataGrid.Columns>
+ <DataGridTextColumn Header="ID" Binding="{Binding ID}"></DataGridTextColumn>
+ <DataGridTextColumn Header="GUID" Binding="{Binding Guid}"></DataGridTextColumn>
+ <DataGridTextColumn Header="Name" Binding="{Binding Name}"></DataGridTextColumn>
+ <DataGridTextColumn Header="Configuration" Binding="{Binding Configuration.Name}"></DataGridTextColumn>
+ <DataGridTemplateColumn Header="Dispenser">
+ <DataGridTemplateColumn.CellTemplate>
+ <DataTemplate>
+ <TextBlock><Run Text="{Binding Dispenser.SerialNumber}"></Run><Run>,</Run> <Run Text="{Binding Dispenser.DispenserTypes.Name}"></Run></TextBlock>
+ </DataTemplate>
+ </DataGridTemplateColumn.CellTemplate>
+ </DataGridTemplateColumn>
+ <DataGridTemplateColumn Header="Liquid">
+ <DataGridTemplateColumn.CellTemplate>
+ <DataTemplate>
+ <StackPanel Orientation="Horizontal">
+ <Rectangle Width="16" Height="16" VerticalAlignment="Center">
+ <Rectangle.Fill>
+ <SolidColorBrush Color="{Binding Liquid.Color,Converter={StaticResource ColorToIntegerConverter}}"></SolidColorBrush>
+ </Rectangle.Fill>
+ </Rectangle>
+ <TextBlock Margin="5 0 0 0" Text="{Binding Liquid.Name}" VerticalAlignment="Center"></TextBlock>
+ </StackPanel>
+ </DataTemplate>
+ </DataGridTemplateColumn.CellTemplate>
+ </DataGridTemplateColumn>
+ <DataGridTemplateColumn Header="Cartridge">
+ <DataGridTemplateColumn.CellTemplate>
+ <DataTemplate>
+ <TextBlock><Run Text="{Binding Cartridge.SerialNumber}"></Run><Run>,</Run> <Run Text="{Binding Dispenser.CartridgeTypes.Name}"></Run></TextBlock>
+ </DataTemplate>
+ </DataGridTemplateColumn.CellTemplate>
+ </DataGridTemplateColumn>
+ </DataGrid.Columns>
+ </DataGrid>
+ </controls:DbTableView>
+ </Grid>
+</UserControl>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/IdsPacksView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/IdsPacksView.xaml.cs
new file mode 100644
index 000000000..3f1a0189b
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/IdsPacksView.xaml.cs
@@ -0,0 +1,32 @@
+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;
+using Tango.MachineStudio.DB.CustomAttributes;
+using Tango.MachineStudio.DB.Managers;
+using Tango.SharedUI.Controls;
+
+namespace Tango.MachineStudio.DB.Views.DBViews
+{
+ /// <summary>
+ /// Interaction logic for MachinesView.xaml
+ /// </summary>
+ [DBView]
+ public partial class IdsPacksView : UserControl
+ {
+ public IdsPacksView() : base()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/LiquidView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/LiquidView.xaml
new file mode 100644
index 000000000..19bcc2674
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/LiquidView.xaml
@@ -0,0 +1,42 @@
+<UserControl x:Class="Tango.MachineStudio.DB.Views.DBViews.LiquidView"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls"
+ xmlns:controls="clr-namespace:Tango.MachineStudio.DB.Controls"
+ xmlns:colorPicker="clr-namespace:Tango;assembly=Tango.ColorPicker"
+ xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
+ xmlns:vm="clr-namespace:Tango.MachineStudio.DB.ViewModels"
+ xmlns:local="clr-namespace:Tango.MachineStudio.DB.Views.DBViews"
+ mc:Ignorable="d"
+ d:DesignHeight="400" d:DesignWidth="300" d:DataContext="{d:DesignInstance Type=vm:LiquidsViewVM, IsDesignTimeCreatable=False}">
+
+ <UserControl.Resources>
+ <converters:ColorToIntegerConverter x:Key="ColorToIntegerConverter"></converters:ColorToIntegerConverter>
+
+ <Style TargetType="{x:Type TabItem}" BasedOn="{StaticResource {x:Type TabItem}}">
+ <Setter Property="mahapps:ControlsHelper.HeaderFontSize" Value="14" />
+ <Setter Property="Margin" Value="2" />
+ </Style>
+ </UserControl.Resources>
+
+ <Grid>
+ <controls:TableGrid>
+ <TextBlock Text="ID:" FontWeight="Bold"></TextBlock>
+ <TextBox Text="{Binding EditEntity.ID}" IsReadOnly="True"></TextBox>
+ <TextBlock Text="GUID:" FontWeight="Bold"></TextBlock>
+ <TextBox Text="{Binding EditEntity.Guid}" IsReadOnly="True"></TextBox>
+ <TextBlock Text="Last Updated:" FontWeight="Bold"></TextBlock>
+ <TextBox Text="{Binding EditEntity.LastUpdated}" IsReadOnly="True"></TextBox>
+ <TextBlock Text="Code:" FontWeight="Bold"></TextBlock>
+ <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="False" HorizontalContentAlignment="Left" Value="{Binding EditEntity.Code,Mode=TwoWay}"></mahapps:NumericUpDown>
+ <TextBlock Text="Name:" FontWeight="Bold"></TextBlock>
+ <TextBox Text="{Binding EditEntity.Name,Mode=TwoWay}"></TextBox>
+ <TextBlock Text="Version:" FontWeight="Bold"></TextBlock>
+ <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding EditEntity.Version,Mode=TwoWay}"></mahapps:NumericUpDown>
+ <TextBlock Text="Color:" FontWeight="Bold"></TextBlock>
+ <colorPicker:ColorPickerCombo SelectedColor="{Binding EditEntity.Color,Mode=TwoWay,Converter={StaticResource ColorToIntegerConverter},UpdateSourceTrigger=PropertyChanged}"></colorPicker:ColorPickerCombo>
+ </controls:TableGrid>
+ </Grid>
+</UserControl>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/LiquidView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/LiquidView.xaml.cs
new file mode 100644
index 000000000..653def003
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/LiquidView.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.DB.Views.DBViews
+{
+ /// <summary>
+ /// Interaction logic for MachineView.xaml
+ /// </summary>
+ public partial class LiquidView : UserControl
+ {
+ public LiquidView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/LiquidsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/LiquidsView.xaml
new file mode 100644
index 000000000..749b0ccd7
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/LiquidsView.xaml
@@ -0,0 +1,41 @@
+<UserControl x:Class="Tango.MachineStudio.DB.Views.DBViews.LiquidsView"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:global="clr-namespace:Tango.MachineStudio.DB"
+ xmlns:controls="clr-namespace:Tango.MachineStudio.DB.Controls"
+ xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
+ xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
+ mc:Ignorable="d"
+ d:DesignHeight="720" d:DesignWidth="1280" Background="White" DataContext="{x:Static global:ViewModelLocator.LiquidsViewVM}">
+
+ <UserControl.Resources>
+ <converters:ColorToIntegerConverter x:Key="ColorToIntegerConverter"></converters:ColorToIntegerConverter>
+ </UserControl.Resources>
+
+ <Grid>
+ <controls:DbTableView>
+ <DataGrid Background="Transparent" ItemsSource="{Binding Adapter.LiquidsViewSource}" SelectedItem="{Binding SelectedEntity}" AutoGenerateColumns="False" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" IsReadOnly="True">
+ <DataGrid.Columns>
+ <DataGridTextColumn Header="ID" Binding="{Binding ID}"></DataGridTextColumn>
+ <DataGridTextColumn Header="GUID" Binding="{Binding Guid}"></DataGridTextColumn>
+ <DataGridTextColumn Header="Code" Binding="{Binding Code}"></DataGridTextColumn>
+ <DataGridTextColumn Header="Name" Binding="{Binding Name}"></DataGridTextColumn>
+ <DataGridTextColumn Header="Version" Binding="{Binding Version}"></DataGridTextColumn>
+ <DataGridTemplateColumn Header="Color">
+ <DataGridTemplateColumn.CellTemplate>
+ <DataTemplate>
+ <Rectangle Width="50">
+ <Rectangle.Fill>
+ <SolidColorBrush Color="{Binding Color,Converter={StaticResource ColorToIntegerConverter},Mode=TwoWay}"></SolidColorBrush>
+ </Rectangle.Fill>
+ </Rectangle>
+ </DataTemplate>
+ </DataGridTemplateColumn.CellTemplate>
+ </DataGridTemplateColumn>
+ </DataGrid.Columns>
+ </DataGrid>
+ </controls:DbTableView>
+ </Grid>
+</UserControl>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/LiquidsView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/LiquidsView.xaml.cs
new file mode 100644
index 000000000..2d68d5ef5
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/LiquidsView.xaml.cs
@@ -0,0 +1,32 @@
+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;
+using Tango.MachineStudio.DB.CustomAttributes;
+using Tango.MachineStudio.DB.Managers;
+using Tango.SharedUI.Controls;
+
+namespace Tango.MachineStudio.DB.Views.DBViews
+{
+ /// <summary>
+ /// Interaction logic for MachinesView.xaml
+ /// </summary>
+ [DBView]
+ public partial class LiquidsView : UserControl
+ {
+ public LiquidsView() : base()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MachineVersionView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MachineVersionView.xaml
new file mode 100644
index 000000000..50a1c790b
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MachineVersionView.xaml
@@ -0,0 +1,27 @@
+<UserControl x:Class="Tango.MachineStudio.DB.Views.DBViews.MachineVersionView"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls"
+ xmlns:controls="clr-namespace:Tango.MachineStudio.DB.Controls"
+ xmlns:local="clr-namespace:Tango.MachineStudio.DB.Views.DBViews"
+ mc:Ignorable="d"
+ d:DesignHeight="300" d:DesignWidth="300">
+ <Grid>
+ <controls:TableGrid>
+ <TextBlock Text="ID:" FontWeight="Bold"></TextBlock>
+ <TextBox Text="{Binding EditEntity.ID}" IsReadOnly="True"></TextBox>
+ <TextBlock Text="GUID:" FontWeight="Bold"></TextBlock>
+ <TextBox Text="{Binding EditEntity.Guid}" IsReadOnly="True"></TextBox>
+ <TextBlock Text="Last Updated:" FontWeight="Bold"></TextBlock>
+ <TextBox Text="{Binding EditEntity.LastUpdated}" IsReadOnly="True"></TextBox>
+ <TextBlock Text="Version:" FontWeight="Bold"></TextBlock>
+ <mahapps:NumericUpDown Minimum="0" Maximum="1000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding EditEntity.Version,Mode=TwoWay}"></mahapps:NumericUpDown>
+ <TextBlock Text="Name:" FontWeight="Bold"></TextBlock>
+ <TextBox Text="{Binding EditEntity.Name,Mode=TwoWay}"></TextBox>
+ <TextBlock Text="Default Configuration:" FontWeight="Bold"></TextBlock>
+ <ComboBox ItemsSource="{Binding Adapter.Configurations}" SelectedItem="{Binding EditEntity.Configuration,Mode=TwoWay}" DisplayMemberPath="Name"></ComboBox>
+ </controls:TableGrid>
+ </Grid>
+</UserControl>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MachineVersionView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MachineVersionView.xaml.cs
new file mode 100644
index 000000000..5e284cd47
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MachineVersionView.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.DB.Views.DBViews
+{
+ /// <summary>
+ /// Interaction logic for MachineView.xaml
+ /// </summary>
+ public partial class MachineVersionView : UserControl
+ {
+ public MachineVersionView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MachineVersionsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MachineVersionsView.xaml
new file mode 100644
index 000000000..08cac568f
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MachineVersionsView.xaml
@@ -0,0 +1,24 @@
+<UserControl x:Class="Tango.MachineStudio.DB.Views.DBViews.MachineVersionsView"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:global="clr-namespace:Tango.MachineStudio.DB"
+ xmlns:controls="clr-namespace:Tango.MachineStudio.DB.Controls"
+ xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
+ mc:Ignorable="d"
+ d:DesignHeight="720" d:DesignWidth="1280" Background="White" DataContext="{x:Static global:ViewModelLocator.MachineVersionsViewVM}">
+ <Grid>
+ <controls:DbTableView>
+ <DataGrid Background="Transparent" ItemsSource="{Binding Adapter.MachineVersionsViewSource}" SelectedItem="{Binding SelectedEntity}" AutoGenerateColumns="False" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" IsReadOnly="True">
+ <DataGrid.Columns>
+ <DataGridTextColumn Header="ID" Binding="{Binding ID}"></DataGridTextColumn>
+ <DataGridTextColumn Header="GUID" Binding="{Binding Guid}"></DataGridTextColumn>
+ <DataGridTextColumn Header="Name" Binding="{Binding Name}"></DataGridTextColumn>
+ <DataGridTextColumn Header="Version" Binding="{Binding Version}"></DataGridTextColumn>
+ <DataGridTextColumn Header="Default Configuration" Binding="{Binding Configuration.Name}"></DataGridTextColumn>
+ </DataGrid.Columns>
+ </DataGrid>
+ </controls:DbTableView>
+ </Grid>
+</UserControl>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MachineVersionsView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MachineVersionsView.xaml.cs
new file mode 100644
index 000000000..275445917
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MachineVersionsView.xaml.cs
@@ -0,0 +1,32 @@
+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;
+using Tango.MachineStudio.DB.CustomAttributes;
+using Tango.MachineStudio.DB.Managers;
+using Tango.SharedUI.Controls;
+
+namespace Tango.MachineStudio.DB.Views.DBViews
+{
+ /// <summary>
+ /// Interaction logic for MachinesView.xaml
+ /// </summary>
+ [DBView]
+ public partial class MachineVersionsView : UserControl
+ {
+ public MachineVersionsView() : base()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MachineView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MachineView.xaml
new file mode 100644
index 000000000..0a7ee4c32
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MachineView.xaml
@@ -0,0 +1,30 @@
+<UserControl x:Class="Tango.MachineStudio.DB.Views.DBViews.MachineView"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:controls="clr-namespace:Tango.MachineStudio.DB.Controls"
+ xmlns:local="clr-namespace:Tango.MachineStudio.DB.Views.DBViews"
+ mc:Ignorable="d"
+ d:DesignHeight="300" d:DesignWidth="300">
+ <Grid>
+ <controls:TableGrid>
+ <TextBlock Text="ID:" FontWeight="Bold"></TextBlock>
+ <TextBox Text="{Binding EditEntity.ID}" IsReadOnly="True"></TextBox>
+ <TextBlock Text="GUID:" FontWeight="Bold"></TextBlock>
+ <TextBox Text="{Binding EditEntity.Guid}" IsReadOnly="True"></TextBox>
+ <TextBlock Text="Last Updated:" FontWeight="Bold"></TextBlock>
+ <TextBox Text="{Binding EditEntity.LastUpdated}" IsReadOnly="True"></TextBox>
+ <TextBlock Text="Serial Number:" FontWeight="Bold"></TextBlock>
+ <TextBox Text="{Binding EditEntity.SerialNumber,Mode=TwoWay}"></TextBox>
+ <TextBlock Text="Name:" FontWeight="Bold"></TextBlock>
+ <TextBox Text="{Binding EditEntity.Name,Mode=TwoWay}"></TextBox>
+ <TextBlock Text="Organization:" FontWeight="Bold"></TextBlock>
+ <ComboBox ItemsSource="{Binding Adapter.Organizations}" SelectedItem="{Binding EditEntity.Organization,Mode=TwoWay}" DisplayMemberPath="Name"></ComboBox>
+ <TextBlock Text="Version:" FontWeight="Bold"></TextBlock>
+ <ComboBox ItemsSource="{Binding Adapter.MachineVersions}" SelectedItem="{Binding EditEntity.MachineVersions,Mode=TwoWay}" DisplayMemberPath="Version"></ComboBox>
+ <TextBlock Text="Configuration:" FontWeight="Bold"></TextBlock>
+ <ComboBox ItemsSource="{Binding Adapter.Configurations}" SelectedItem="{Binding EditEntity.Configuration,Mode=TwoWay}" DisplayMemberPath="Name"></ComboBox>
+ </controls:TableGrid>
+ </Grid>
+</UserControl>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MachineView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MachineView.xaml.cs
new file mode 100644
index 000000000..b14dcc6c7
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MachineView.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.DB.Views.DBViews
+{
+ /// <summary>
+ /// Interaction logic for MachineView.xaml
+ /// </summary>
+ public partial class MachineView : UserControl
+ {
+ public MachineView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MachinesView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MachinesView.xaml
new file mode 100644
index 000000000..ea48667d9
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MachinesView.xaml
@@ -0,0 +1,26 @@
+<UserControl x:Class="Tango.MachineStudio.DB.Views.DBViews.MachinesView"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:global="clr-namespace:Tango.MachineStudio.DB"
+ xmlns:controls="clr-namespace:Tango.MachineStudio.DB.Controls"
+ xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
+ mc:Ignorable="d"
+ d:DesignHeight="720" d:DesignWidth="1280" Background="White" DataContext="{x:Static global:ViewModelLocator.MachinesViewVM}">
+ <Grid>
+ <controls:DbTableView>
+ <DataGrid Background="Transparent" ItemsSource="{Binding Adapter.MachinesViewSource}" SelectedItem="{Binding SelectedEntity}" AutoGenerateColumns="False" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" IsReadOnly="True">
+ <DataGrid.Columns>
+ <DataGridTextColumn Header="ID" Binding="{Binding ID}"></DataGridTextColumn>
+ <DataGridTextColumn Header="GUID" Binding="{Binding Guid}"></DataGridTextColumn>
+ <DataGridTextColumn Header="Serial Number" Binding="{Binding SerialNumber}"></DataGridTextColumn>
+ <DataGridTextColumn Header="Name" Binding="{Binding Name}"></DataGridTextColumn>
+ <DataGridTextColumn Header="Version" Binding="{Binding MachineVersions.Version}"></DataGridTextColumn>
+ <DataGridTextColumn Header="Organization" Binding="{Binding Organization.Name}"></DataGridTextColumn>
+ <DataGridTextColumn Header="Configuration" Binding="{Binding Configuration.Name}"></DataGridTextColumn>
+ </DataGrid.Columns>
+ </DataGrid>
+ </controls:DbTableView>
+ </Grid>
+</UserControl>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MachinesView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MachinesView.xaml.cs
new file mode 100644
index 000000000..a3865ce4e
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MachinesView.xaml.cs
@@ -0,0 +1,32 @@
+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;
+using Tango.MachineStudio.DB.CustomAttributes;
+using Tango.MachineStudio.DB.Managers;
+using Tango.SharedUI.Controls;
+
+namespace Tango.MachineStudio.DB.Views.DBViews
+{
+ /// <summary>
+ /// Interaction logic for MachinesView.xaml
+ /// </summary>
+ [DBView]
+ public partial class MachinesView : UserControl
+ {
+ public MachinesView() : base()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/OrganizationView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/OrganizationView.xaml
new file mode 100644
index 000000000..229ddacb2
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/OrganizationView.xaml
@@ -0,0 +1,26 @@
+<UserControl x:Class="Tango.MachineStudio.DB.Views.DBViews.OrganizationView"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:local="clr-namespace:Tango.MachineStudio.DB.Views.DBViews"
+ xmlns:controls="clr-namespace:Tango.MachineStudio.DB.Controls"
+ mc:Ignorable="d"
+ d:DesignHeight="300" d:DesignWidth="300">
+ <Grid>
+ <controls:TableGrid>
+ <TextBlock Text="ID:" FontWeight="Bold"></TextBlock>
+ <TextBox Text="{Binding EditEntity.ID}" IsReadOnly="True"></TextBox>
+ <TextBlock Text="GUID:" FontWeight="Bold"></TextBlock>
+ <TextBox Text="{Binding EditEntity.Guid}" IsReadOnly="True"></TextBox>
+ <TextBlock Text="Last Updated:" FontWeight="Bold"></TextBlock>
+ <TextBox Text="{Binding EditEntity.LastUpdated}" IsReadOnly="True"></TextBox>
+ <TextBlock Text="Name:" FontWeight="Bold"></TextBlock>
+ <TextBox Text="{Binding EditEntity.Name,Mode=TwoWay}"></TextBox>
+ <TextBlock Text="Address:" FontWeight="Bold"></TextBlock>
+ <ComboBox ItemsSource="{Binding Adapter.Addresses}" SelectedItem="{Binding EditEntity.Address}" DisplayMemberPath="AddressString"></ComboBox>
+ <TextBlock Text="Contact:" FontWeight="Bold"></TextBlock>
+ <ComboBox ItemsSource="{Binding Adapter.Contacts}" SelectedItem="{Binding EditEntity.Contact}" DisplayMemberPath="FullName"></ComboBox>
+ </controls:TableGrid>
+ </Grid>
+</UserControl>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/OrganizationView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/OrganizationView.xaml.cs
new file mode 100644
index 000000000..a9f4ec880
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/OrganizationView.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.DB.Views.DBViews
+{
+ /// <summary>
+ /// Interaction logic for OrganizationView.xaml
+ /// </summary>
+ public partial class OrganizationView : UserControl
+ {
+ public OrganizationView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/OrganizationsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/OrganizationsView.xaml
new file mode 100644
index 000000000..ff5e7df4a
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/OrganizationsView.xaml
@@ -0,0 +1,27 @@
+<UserControl x:Class="Tango.MachineStudio.DB.Views.DBViews.OrganizationsView"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:controls="clr-namespace:Tango.MachineStudio.DB.Controls"
+ xmlns:global="clr-namespace:Tango.MachineStudio.DB"
+ xmlns:system="clr-namespace:System;assembly=mscorlib"
+ xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
+ mc:Ignorable="d"
+ d:DesignHeight="720" d:DesignWidth="1280" Background="White" DataContext="{x:Static global:ViewModelLocator.OrganizationsViewVM}">
+ <Grid>
+ <controls:DbTableView>
+ <DataGrid Background="Transparent" ItemsSource="{Binding Adapter.OrganizationsViewSource}" SelectedItem="{Binding SelectedEntity}" AutoGenerateColumns="False" IsReadOnly="True">
+ <DataGrid.Columns>
+ <DataGridTextColumn Header="ID" Binding="{Binding ID}"></DataGridTextColumn>
+ <DataGridTextColumn Header="GUID" Binding="{Binding Guid}"></DataGridTextColumn>
+ <DataGridTextColumn Header="Name" Binding="{Binding Name}"></DataGridTextColumn>
+ <DataGridTextColumn Header="Address" Binding="{Binding Address.AddressString}"></DataGridTextColumn>
+ <DataGridTextColumn Header="Contact" Binding="{Binding Contact.FullName}"></DataGridTextColumn>
+ <DataGridTextColumn Header="Machines" Binding="{Binding Machines.Count}"></DataGridTextColumn>
+ <DataGridTextColumn Header="Users" Binding="{Binding Users.Count}"></DataGridTextColumn>
+ </DataGrid.Columns>
+ </DataGrid>
+ </controls:DbTableView>
+ </Grid>
+</UserControl>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/OrganizationsView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/OrganizationsView.xaml.cs
new file mode 100644
index 000000000..2b76305a5
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/OrganizationsView.xaml.cs
@@ -0,0 +1,30 @@
+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;
+using Tango.MachineStudio.DB.CustomAttributes;
+
+namespace Tango.MachineStudio.DB.Views.DBViews
+{
+ /// <summary>
+ /// Interaction logic for OrganizationsView.xaml
+ /// </summary>
+ [DBView]
+ public partial class OrganizationsView : UserControl
+ {
+ public OrganizationsView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/PermissionView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/PermissionView.xaml
new file mode 100644
index 000000000..98e1e086d
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/PermissionView.xaml
@@ -0,0 +1,27 @@
+<UserControl x:Class="Tango.MachineStudio.DB.Views.DBViews.PermissionView"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls"
+ xmlns:controls="clr-namespace:Tango.MachineStudio.DB.Controls"
+ xmlns:local="clr-namespace:Tango.MachineStudio.DB.Views.DBViews"
+ mc:Ignorable="d"
+ d:DesignHeight="300" d:DesignWidth="300">
+ <Grid>
+ <controls:TableGrid>
+ <TextBlock Text="ID:" FontWeight="Bold"></TextBlock>
+ <TextBox Text="{Binding EditEntity.ID}" IsReadOnly="True"></TextBox>
+ <TextBlock Text="GUID:" FontWeight="Bold"></TextBlock>
+ <TextBox Text="{Binding EditEntity.Guid}" IsReadOnly="True"></TextBox>
+ <TextBlock Text="Last Updated:" FontWeight="Bold"></TextBlock>
+ <TextBox Text="{Binding EditEntity.LastUpdated}" IsReadOnly="True"></TextBox>
+ <TextBlock Text="Code:" FontWeight="Bold"></TextBlock>
+ <mahapps:NumericUpDown Minimum="0" Maximum="1000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="False" HorizontalContentAlignment="Left" Value="{Binding EditEntity.Code,Mode=TwoWay}"></mahapps:NumericUpDown>
+ <TextBlock Text="Name:" FontWeight="Bold"></TextBlock>
+ <TextBox Text="{Binding EditEntity.Name,Mode=TwoWay}"></TextBox>
+ <TextBlock Text="Description:" FontWeight="Bold"></TextBlock>
+ <TextBox Text="{Binding EditEntity.Description,Mode=TwoWay}"></TextBox>
+ </controls:TableGrid>
+ </Grid>
+</UserControl>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/PermissionView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/PermissionView.xaml.cs
new file mode 100644
index 000000000..4d5eaf3a7
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/PermissionView.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.DB.Views.DBViews
+{
+ /// <summary>
+ /// Interaction logic for AddressView.xaml
+ /// </summary>
+ public partial class PermissionView : UserControl
+ {
+ public PermissionView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/PermissionsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/PermissionsView.xaml
new file mode 100644
index 000000000..9455fd519
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/PermissionsView.xaml
@@ -0,0 +1,24 @@
+<UserControl x:Class="Tango.MachineStudio.DB.Views.DBViews.PermissionsView"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:global="clr-namespace:Tango.MachineStudio.DB"
+ xmlns:controls="clr-namespace:Tango.MachineStudio.DB.Controls"
+ xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
+ mc:Ignorable="d"
+ d:DesignHeight="720" d:DesignWidth="1280" Background="White" DataContext="{x:Static global:ViewModelLocator.PermissionsViewVM}">
+ <Grid>
+ <controls:DbTableView>
+ <DataGrid Background="Transparent" ItemsSource="{Binding Adapter.PermissionsViewSource}" SelectedItem="{Binding SelectedEntity}" AutoGenerateColumns="False" IsReadOnly="True">
+ <DataGrid.Columns>
+ <DataGridTextColumn Header="ID" Binding="{Binding ID}"></DataGridTextColumn>
+ <DataGridTextColumn Header="GUID" Binding="{Binding Guid}"></DataGridTextColumn>
+ <DataGridTextColumn Header="Code" Binding="{Binding Code}"></DataGridTextColumn>
+ <DataGridTextColumn Header="Name" Binding="{Binding Name}"></DataGridTextColumn>
+ <DataGridTextColumn Header="Description" Binding="{Binding Description}"></DataGridTextColumn>
+ </DataGrid.Columns>
+ </DataGrid>
+ </controls:DbTableView>
+ </Grid>
+</UserControl>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/PermissionsView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/PermissionsView.xaml.cs
new file mode 100644
index 000000000..dc19c1d58
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/PermissionsView.xaml.cs
@@ -0,0 +1,31 @@
+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;
+using Tango.MachineStudio.DB.CustomAttributes;
+using Tango.SharedUI.Controls;
+
+namespace Tango.MachineStudio.DB.Views.DBViews
+{
+ /// <summary>
+ /// Interaction logic for MachinesView.xaml
+ /// </summary>
+ [DBView]
+ public partial class PermissionsView : UserControl
+ {
+ public PermissionsView() : base()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/RoleView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/RoleView.xaml
new file mode 100644
index 000000000..e88277e11
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/RoleView.xaml
@@ -0,0 +1,45 @@
+<UserControl x:Class="Tango.MachineStudio.DB.Views.DBViews.RoleView"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
+ xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls"
+ xmlns:controls="clr-namespace:Tango.MachineStudio.DB.Controls"
+ xmlns:converters="clr-namespace:Tango.MachineStudio.DB.Converters"
+ xmlns:local="clr-namespace:Tango.MachineStudio.DB.Views.DBViews"
+ mc:Ignorable="d"
+ d:DesignHeight="300" d:DesignWidth="300">
+
+ <UserControl.Resources>
+ <converters:RolesPermissionsToStringConverter x:Key="RolesPermissionsToStringConverter"></converters:RolesPermissionsToStringConverter>
+ </UserControl.Resources>
+
+ <Grid>
+ <controls:TableGrid>
+ <TextBlock Text="ID:" FontWeight="Bold"></TextBlock>
+ <TextBox Text="{Binding EditEntity.ID}" IsReadOnly="True"></TextBox>
+ <TextBlock Text="GUID:" FontWeight="Bold"></TextBlock>
+ <TextBox Text="{Binding EditEntity.Guid}" IsReadOnly="True"></TextBox>
+ <TextBlock Text="Last Updated:" FontWeight="Bold"></TextBlock>
+ <TextBox Text="{Binding EditEntity.LastUpdated}" IsReadOnly="True"></TextBox>
+ <TextBlock Text="Code:" FontWeight="Bold"></TextBlock>
+ <mahapps:NumericUpDown Minimum="0" Maximum="1000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="False" HorizontalContentAlignment="Left" Value="{Binding EditEntity.Code,Mode=TwoWay}"></mahapps:NumericUpDown>
+ <TextBlock Text="Name:" FontWeight="Bold"></TextBlock>
+ <TextBox Text="{Binding EditEntity.Name,Mode=TwoWay}"></TextBox>
+ <TextBlock Text="Description:" FontWeight="Bold"></TextBlock>
+ <TextBox Text="{Binding EditEntity.Description,Mode=TwoWay}"></TextBox>
+ <TextBlock Text="Permissions:" FontWeight="Bold"></TextBlock>
+ <ComboBox x:Name="comboRoles" SelectionChanged="comboRoles_SelectionChanged" ItemsSource="{Binding SelectedPermissions}" materialDesign:HintAssist.Hint="{Binding SelectedPermissions,Converter={StaticResource RolesPermissionsToStringConverter},UpdateSourceTrigger=PropertyChanged}">
+ <ComboBox.ItemTemplate>
+ <DataTemplate>
+ <StackPanel Orientation="Horizontal">
+ <CheckBox IsChecked="{Binding IsSelected}" Width="20"/>
+ <TextBlock Text="{Binding Entity.Name}" MinWidth="100" ToolTip="{Binding Entity.Description}" />
+ </StackPanel>
+ </DataTemplate>
+ </ComboBox.ItemTemplate>
+ </ComboBox>
+ </controls:TableGrid>
+ </Grid>
+</UserControl>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/RoleView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/RoleView.xaml.cs
new file mode 100644
index 000000000..d49ab14e9
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/RoleView.xaml.cs
@@ -0,0 +1,34 @@
+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.DB.Views.DBViews
+{
+ /// <summary>
+ /// Interaction logic for AddressView.xaml
+ /// </summary>
+ public partial class RoleView : UserControl
+ {
+ public RoleView()
+ {
+ InitializeComponent();
+ }
+
+ private void comboRoles_SelectionChanged(object sender, SelectionChangedEventArgs e)
+ {
+ comboRoles.SelectedItem = null;
+ comboRoles.Text = "Press to select";
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/RolesView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/RolesView.xaml
new file mode 100644
index 000000000..858cfd37b
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/RolesView.xaml
@@ -0,0 +1,30 @@
+<UserControl x:Class="Tango.MachineStudio.DB.Views.DBViews.RolesView"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:global="clr-namespace:Tango.MachineStudio.DB"
+ xmlns:converters="clr-namespace:Tango.MachineStudio.DB.Converters"
+ xmlns:controls="clr-namespace:Tango.MachineStudio.DB.Controls"
+ mc:Ignorable="d"
+ d:DesignHeight="720" d:DesignWidth="1280" Background="White" DataContext="{x:Static global:ViewModelLocator.RolesViewVM}">
+
+ <UserControl.Resources>
+ <converters:RolesPermissionsToStringConverter x:Key="RolesPermissionsToStringConverter"></converters:RolesPermissionsToStringConverter>
+ </UserControl.Resources>
+
+ <Grid>
+ <controls:DbTableView>
+ <DataGrid Background="Transparent" ItemsSource="{Binding Adapter.RolesViewSource}" SelectedItem="{Binding SelectedEntity}" AutoGenerateColumns="False" IsReadOnly="True">
+ <DataGrid.Columns>
+ <DataGridTextColumn Header="ID" Binding="{Binding ID}"></DataGridTextColumn>
+ <DataGridTextColumn Header="GUID" Binding="{Binding Guid}"></DataGridTextColumn>
+ <DataGridTextColumn Header="Code" Binding="{Binding Code}"></DataGridTextColumn>
+ <DataGridTextColumn Header="Name" Binding="{Binding Name}"></DataGridTextColumn>
+ <DataGridTextColumn Header="Description" Binding="{Binding Description}"></DataGridTextColumn>
+ <DataGridTextColumn Header="Permissions" Binding="{Binding RolesPermissions,Converter={StaticResource RolesPermissionsToStringConverter}}" MaxWidth="300"></DataGridTextColumn>
+ </DataGrid.Columns>
+ </DataGrid>
+ </controls:DbTableView>
+ </Grid>
+</UserControl>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/RolesView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/RolesView.xaml.cs
new file mode 100644
index 000000000..b1e39c417
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/RolesView.xaml.cs
@@ -0,0 +1,31 @@
+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;
+using Tango.MachineStudio.DB.CustomAttributes;
+using Tango.SharedUI.Controls;
+
+namespace Tango.MachineStudio.DB.Views.DBViews
+{
+ /// <summary>
+ /// Interaction logic for MachinesView.xaml
+ /// </summary>
+ [DBView]
+ public partial class RolesView : UserControl
+ {
+ public RolesView() : base()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/UserView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/UserView.xaml
new file mode 100644
index 000000000..6bfb2fbb8
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/UserView.xaml
@@ -0,0 +1,48 @@
+<UserControl x:Class="Tango.MachineStudio.DB.Views.DBViews.UserView"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
+ xmlns:controls="clr-namespace:Tango.MachineStudio.DB.Controls"
+ xmlns:converters="clr-namespace:Tango.MachineStudio.DB.Converters"
+ xmlns:local="clr-namespace:Tango.MachineStudio.DB.Views.DBViews"
+ mc:Ignorable="d"
+ d:DesignHeight="300" d:DesignWidth="300">
+
+ <UserControl.Resources>
+ <converters:UsersRolesToStringConverter x:Key="UsersRolesToStringConverter"></converters:UsersRolesToStringConverter>
+ </UserControl.Resources>
+
+ <Grid>
+ <controls:TableGrid>
+ <TextBlock Text="ID:" FontWeight="Bold"></TextBlock>
+ <TextBox Text="{Binding EditEntity.ID}" IsReadOnly="True" IsEnabled="False"></TextBox>
+ <TextBlock Text="GUID:" FontWeight="Bold"></TextBlock>
+ <TextBox Text="{Binding EditEntity.Guid}" IsReadOnly="True" IsEnabled="False"></TextBox>
+ <TextBlock Text="Last Updated:" FontWeight="Bold"></TextBlock>
+ <TextBox Text="{Binding EditEntity.LastUpdated}" IsReadOnly="True" IsEnabled="False"></TextBox>
+ <TextBlock Text="Email:" FontWeight="Bold"></TextBlock>
+ <TextBox Text="{Binding EditEntity.Email,Mode=TwoWay, ValidatesOnNotifyDataErrors=True}"></TextBox>
+ <TextBlock Text="Password:" FontWeight="Bold"></TextBlock>
+ <TextBox Text="{Binding EditEntity.Password,Mode=TwoWay}"></TextBox>
+ <TextBlock Text="Roles:" FontWeight="Bold"></TextBlock>
+ <ComboBox x:Name="comboRoles" SelectionChanged="comboRoles_SelectionChanged" ItemsSource="{Binding SelectedRoles}" materialDesign:HintAssist.Hint="{Binding SelectedRoles,Converter={StaticResource UsersRolesToStringConverter},UpdateSourceTrigger=PropertyChanged}">
+ <ComboBox.ItemTemplate>
+ <DataTemplate>
+ <StackPanel Orientation="Horizontal">
+ <CheckBox IsChecked="{Binding IsSelected}" Width="20"/>
+ <TextBlock Text="{Binding Entity.Name}" MinWidth="100" />
+ </StackPanel>
+ </DataTemplate>
+ </ComboBox.ItemTemplate>
+ </ComboBox>
+ <TextBlock Text="Organization:" FontWeight="Bold"></TextBlock>
+ <ComboBox ItemsSource="{Binding Adapter.Organizations}" SelectedItem="{Binding EditEntity.Organization,Mode=TwoWay}" DisplayMemberPath="Name"></ComboBox>
+ <TextBlock Text="Address:" FontWeight="Bold"></TextBlock>
+ <ComboBox ItemsSource="{Binding Adapter.Addresses}" SelectedItem="{Binding EditEntity.Address}" DisplayMemberPath="AddressString"></ComboBox>
+ <TextBlock Text="Contact:" FontWeight="Bold"></TextBlock>
+ <ComboBox ItemsSource="{Binding Adapter.Contacts}" SelectedItem="{Binding EditEntity.Contact}" DisplayMemberPath="FullName"></ComboBox>
+ </controls:TableGrid>
+ </Grid>
+</UserControl>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/UserView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/UserView.xaml.cs
new file mode 100644
index 000000000..1c84eed8e
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/UserView.xaml.cs
@@ -0,0 +1,34 @@
+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.DB.Views.DBViews
+{
+ /// <summary>
+ /// Interaction logic for UserView.xaml
+ /// </summary>
+ public partial class UserView : UserControl
+ {
+ public UserView()
+ {
+ InitializeComponent();
+ }
+
+ private void comboRoles_SelectionChanged(object sender, SelectionChangedEventArgs e)
+ {
+ comboRoles.SelectedItem = null;
+ comboRoles.Text = "Press to select";
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/UsersView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/UsersView.xaml
new file mode 100644
index 000000000..ad3814185
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/UsersView.xaml
@@ -0,0 +1,33 @@
+<UserControl x:Class="Tango.MachineStudio.DB.Views.DBViews.UsersView"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:controls="clr-namespace:Tango.MachineStudio.DB.Controls"
+ xmlns:global="clr-namespace:Tango.MachineStudio.DB"
+ xmlns:converters="clr-namespace:Tango.MachineStudio.DB.Converters"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:local="clr-namespace:Tango.MachineStudio.DB.Views.DBViews"
+ mc:Ignorable="d"
+ d:DesignHeight="720" d:DesignWidth="1280" Background="White" DataContext="{x:Static global:ViewModelLocator.UsersViewVM}">
+
+ <UserControl.Resources>
+ <converters:UsersRolesToStringConverter x:Key="UsersRolesToStringConverter"></converters:UsersRolesToStringConverter>
+ </UserControl.Resources>
+
+ <Grid>
+ <controls:DbTableView>
+ <DataGrid Background="Transparent" ItemsSource="{Binding Adapter.UsersViewSource}" SelectedItem="{Binding SelectedEntity}" AutoGenerateColumns="False" IsReadOnly="True">
+ <DataGrid.Columns>
+ <DataGridTextColumn Header="ID" Binding="{Binding ID}"></DataGridTextColumn>
+ <DataGridTextColumn Header="GUID" Binding="{Binding Guid}"></DataGridTextColumn>
+ <DataGridTextColumn Header="Name" Binding="{Binding Contact.FullName}"></DataGridTextColumn>
+ <DataGridTextColumn Header="Email" Binding="{Binding Email}"></DataGridTextColumn>
+ <DataGridTextColumn Header="Password" Binding="{Binding Password}"></DataGridTextColumn>
+ <DataGridTextColumn Header="Organization" Binding="{Binding Organization.Name}"></DataGridTextColumn>
+ <DataGridTextColumn Header="Roles" Binding="{Binding UsersRoles,Converter={StaticResource UsersRolesToStringConverter}}"></DataGridTextColumn>
+ <DataGridTextColumn Header="Address" Binding="{Binding Address.AddressString}"></DataGridTextColumn>
+ </DataGrid.Columns>
+ </DataGrid>
+ </controls:DbTableView>
+ </Grid>
+</UserControl>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/UsersView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/UsersView.xaml.cs
new file mode 100644
index 000000000..492e846fe
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/UsersView.xaml.cs
@@ -0,0 +1,30 @@
+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;
+using Tango.MachineStudio.DB.CustomAttributes;
+
+namespace Tango.MachineStudio.DB.Views.DBViews
+{
+ /// <summary>
+ /// Interaction logic for UsersView.xaml
+ /// </summary>
+ [DBView]
+ public partial class UsersView : UserControl
+ {
+ public UsersView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/MainDBView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/MainDBView.xaml
new file mode 100644
index 000000000..6c7cb2b95
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/MainDBView.xaml
@@ -0,0 +1,157 @@
+<UserControl x:Class="Tango.MachineStudio.DB.Views.MainDBView"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:dockablz="clr-namespace:Dragablz.Dockablz;assembly=Dragablz"
+ xmlns:dragablz="clr-namespace:Dragablz;assembly=Dragablz"
+ xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI"
+ xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
+ xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
+ xmlns:managers="clr-namespace:Tango.MachineStudio.DB.Managers"
+ xmlns:commonControls="clr-namespace:Tango.MachineStudio.Common.Controls;assembly=Tango.MachineStudio.Common"
+ xmlns:local="clr-namespace:Tango.MachineStudio.DB.Views"
+ mc:Ignorable="d"
+ d:DesignHeight="720" d:DesignWidth="1270" DataContext="{Binding MainViewVM, Source={StaticResource Locator}}">
+
+ <UserControl.Background>
+ <ImageBrush ImageSource="../Images/seamless-grid.jpg" Stretch="None" TileMode="Tile" ViewportUnits="Absolute" Viewport="0,0,32,32"></ImageBrush>
+ </UserControl.Background>
+ <Grid>
+ <Grid>
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="Auto"/>
+ <ColumnDefinition Width="*"/>
+ </Grid.ColumnDefinitions>
+
+ <Border Background="{StaticResource AccentColorBrush}" Margin="5" CornerRadius="5">
+ <ListBox ItemsSource="{x:Static managers:ViewsManager.DbViews}" Foreground="White" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch">
+ <ListBox.ItemTemplate>
+ <DataTemplate>
+ <DockPanel LastChildFill="False" Background="Transparent" >
+ <i:Interaction.Triggers>
+ <i:EventTrigger EventName="MouseDown">
+ <i:InvokeCommandAction Command="{Binding AddCommand}"></i:InvokeCommandAction>
+ </i:EventTrigger>
+ </i:Interaction.Triggers>
+ <StackPanel Orientation="Horizontal" DockPanel.Dock="Left">
+ <materialDesign:PackIcon Kind="Table" Width="24" Height="24"></materialDesign:PackIcon>
+ <TextBlock Margin="5 0 0 0" Style="{StaticResource MaterialDesignBody2TextBlock}" VerticalAlignment="Center" Text="{Binding Header}" Background="Transparent" HorizontalAlignment="Stretch"></TextBlock>
+ </StackPanel>
+ <materialDesign:PackIcon Margin="10 0 0 0" ToolTip="View Table" VerticalAlignment="Center" DockPanel.Dock="Right" Kind="ArrowRight"></materialDesign:PackIcon>
+ </DockPanel>
+ </DataTemplate>
+ </ListBox.ItemTemplate>
+ </ListBox>
+ </Border>
+
+ <Grid Grid.Column="1">
+ <commonControls:MdiContainerControl ItemsSource="{x:Static managers:ViewsManager.DisplayedViews}"></commonControls:MdiContainerControl>
+ </Grid>
+ </Grid>
+
+ <Grid IsHitTestVisible="False">
+ <Grid.Background>
+ <SolidColorBrush Color="Black" Opacity="0.8"></SolidColorBrush>
+ </Grid.Background>
+
+ <Grid.Style>
+ <Style TargetType="Grid">
+ <Setter Property="Opacity" Value="1"></Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=IsEditViewOpen}" Value="False">
+ <DataTrigger.EnterActions>
+ <BeginStoryboard>
+ <Storyboard>
+ <BooleanAnimationUsingKeyFrames Storyboard.TargetProperty="IsHitTestVisible">
+ <DiscreteBooleanKeyFrame Value="False" KeyTime="00:00:00"></DiscreteBooleanKeyFrame>
+ </BooleanAnimationUsingKeyFrames>
+ <DoubleAnimation Storyboard.TargetProperty="Opacity" To="0" Duration="00:00:0.3"></DoubleAnimation>
+ </Storyboard>
+ </BeginStoryboard>
+ </DataTrigger.EnterActions>
+ <DataTrigger.ExitActions>
+ <BeginStoryboard>
+ <Storyboard>
+ <BooleanAnimationUsingKeyFrames Storyboard.TargetProperty="IsHitTestVisible">
+ <DiscreteBooleanKeyFrame Value="True" KeyTime="00:00:00"></DiscreteBooleanKeyFrame>
+ </BooleanAnimationUsingKeyFrames>
+ <DoubleAnimation Storyboard.TargetProperty="Opacity" To="1" Duration="00:00:0.3"></DoubleAnimation>
+ </Storyboard>
+ </BeginStoryboard>
+ </DataTrigger.ExitActions>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </Grid.Style>
+ </Grid>
+
+ <Grid x:Name="grid" HorizontalAlignment="Right" MinWidth="300" RenderTransformOrigin="1,0" VerticalAlignment="Top" Margin="0 100 0 0">
+
+ <Grid.Style>
+ <Style TargetType="Grid">
+ <Setter Property="RenderTransform">
+ <Setter.Value>
+ <ScaleTransform ScaleY="1" ScaleX="0"></ScaleTransform>
+ </Setter.Value>
+ </Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=IsEditViewOpen}" Value="False">
+ <DataTrigger.EnterActions>
+ <BeginStoryboard>
+ <Storyboard>
+ <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleX" To="0" Duration="00:00:0.3"></DoubleAnimation>
+ </Storyboard>
+ </BeginStoryboard>
+ </DataTrigger.EnterActions>
+ <DataTrigger.ExitActions>
+ <BeginStoryboard>
+ <Storyboard>
+ <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleX" To="1" Duration="00:00:0.3"></DoubleAnimation>
+ </Storyboard>
+ </BeginStoryboard>
+ </DataTrigger.ExitActions>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </Grid.Style>
+
+ <Border Padding="10" CornerRadius="10 0 0 10" Background="White">
+ <Border.Effect>
+ <DropShadowEffect/>
+ </Border.Effect>
+ <DockPanel LastChildFill="True">
+ <StackPanel Orientation="Horizontal" DockPanel.Dock="Top" VerticalAlignment="Top">
+ <materialDesign:PackIcon x:Name="icon" VerticalAlignment="Center" Width="32" Height="32" Foreground="{StaticResource AccentColorBrush}" />
+ <TextBlock x:Name="txtTitle" Margin="10 0 0 0" Foreground="{StaticResource AccentColorBrush}" FontSize="16"></TextBlock>
+ </StackPanel>
+ <StackPanel DockPanel.Dock="Bottom">
+ <ItemsControl ItemsSource="{Binding ValidationErrors}">
+ <ItemsControl.ItemTemplate>
+ <DataTemplate>
+ <StackPanel Orientation="Horizontal">
+ <materialDesign:PackIcon VerticalAlignment="Center" Kind="Exclamation" Foreground="Red" Width="16" Height="16"></materialDesign:PackIcon>
+ <TextBlock VerticalAlignment="Center" Margin="5 0 0 0" Foreground="Red" Text="{Binding}"></TextBlock>
+ </StackPanel>
+ </DataTemplate>
+ </ItemsControl.ItemTemplate>
+ </ItemsControl>
+ <StackPanel Orientation="Horizontal" VerticalAlignment="Bottom" HorizontalAlignment="Right">
+ <Button Style="{StaticResource MaterialDesignFlatButton}" IsDefault="True" Margin="0 8 8 0" Command="{Binding DialogOKCommand}">
+ ACCEPT
+ </Button>
+ <Button Style="{StaticResource MaterialDesignFlatButton}" IsCancel="True" Margin="0 8 8 0" Command="{Binding DialogCancelCommand}">
+ CANCEL
+ </Button>
+ </StackPanel>
+ </StackPanel>
+ <ScrollViewer Margin="0 10 0 0" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled" Padding="5">
+ <ContentPresenter x:Name="presenter"></ContentPresenter>
+ </ScrollViewer>
+ </DockPanel>
+ </Border>
+
+ <Thumb HorizontalAlignment="Left" Opacity="0" Width="5" VerticalAlignment="Stretch" Cursor="SizeWE" DragDelta="Thumb_DragDelta"></Thumb>
+ </Grid>
+ </Grid>
+</UserControl>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/MainDBView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/MainDBView.xaml.cs
new file mode 100644
index 000000000..1ffdf7eb0
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/MainDBView.xaml.cs
@@ -0,0 +1,79 @@
+using GalaSoft.MvvmLight.Messaging;
+using MaterialDesignThemes.Wpf;
+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;
+using Tango.MachineStudio.DB.Messages;
+using Tango.MachineStudio.DB.ViewModels;
+using Tango.MachineStudio.DB.Views.DBViews;
+using Tango.SharedUI;
+using Tango.SharedUI.Controls;
+
+namespace Tango.MachineStudio.DB.Views
+{
+ /// <summary>
+ /// Interaction logic for MainView.xaml
+ /// </summary>
+ public partial class MainDBView : UserControl
+ {
+ public MainDBView() : base()
+ {
+ InitializeComponent();
+
+ Messenger.Default.Register<OpenEntityEditViewMessage>(this, HandleOpenEntityViewMessage);
+ Messenger.Default.Register<CloseEntityEditViewMessage>(this, HandleCloseEntityViewMessage);
+ }
+
+ public bool IsEditViewOpen
+ {
+ get { return (bool)GetValue(IsEditViewOpenProperty); }
+ set { SetValue(IsEditViewOpenProperty, value); }
+ }
+ public static readonly DependencyProperty IsEditViewOpenProperty =
+ DependencyProperty.Register("IsEditViewOpen", typeof(bool), typeof(MainDBView), new PropertyMetadata(false));
+
+ private void HandleCloseEntityViewMessage(CloseEntityEditViewMessage message)
+ {
+ IsEditViewOpen = false;
+ }
+
+ private void HandleOpenEntityViewMessage(OpenEntityEditViewMessage message)
+ {
+ Type viewType = typeof(MainDBView).Assembly.GetType(typeof(OrganizationView).Namespace + "." + message.EntityType.Name + "View");
+
+ presenter.DataContext = message.Context;
+ var view = Activator.CreateInstance(viewType) as FrameworkElement;
+ view.DataContext = message.Context;
+ grid.DataContext = message.Context;
+ presenter.Content = view;
+ icon.Kind = (message.DialogOpenMode == DialogOpenMode.Editing ? PackIconKind.TableEdit : PackIconKind.Plus);
+ txtTitle.Text = (message.DialogOpenMode == DialogOpenMode.Editing ? "Edit " : "Add New ") + message.EntityType.Name.ToTitle();
+
+ IsEditViewOpen = true;
+ }
+
+ private void Thumb_DragDelta(object sender, System.Windows.Controls.Primitives.DragDeltaEventArgs e)
+ {
+ if (double.IsNaN(grid.Width))
+ {
+ grid.Width = grid.ActualWidth;
+ }
+
+ if (grid.Width + -e.HorizontalChange > 100)
+ {
+ grid.Width += -e.HorizontalChange;
+ }
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Windows/DBDialogWindow.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Windows/DBDialogWindow.xaml
new file mode 100644
index 000000000..83cd48926
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Windows/DBDialogWindow.xaml
@@ -0,0 +1,32 @@
+<mahapps:MetroWindow x:Class="Tango.MachineStudio.DB.Windows.DBDialogWindow"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls"
+ xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
+ xmlns:local="clr-namespace:Tango.MachineStudio.DB.Windows"
+ mc:Ignorable="d"
+ Title="Machine Studio" Height="450" Width="650" EnableDWMDropShadow="True" ShowCloseButton="False" WindowTransitionsEnabled="False" ShowMaxRestoreButton="False" ShowMinButton="False" TitleCaps="False" BorderThickness="1" WindowStartupLocation="CenterOwner">
+ <Grid>
+ <Border Margin="16">
+ <DockPanel LastChildFill="True">
+ <StackPanel Orientation="Horizontal" DockPanel.Dock="Top" VerticalAlignment="Top">
+ <materialDesign:PackIcon Kind="{Binding RelativeSource={RelativeSource AncestorType=Window},Path=IconKind}" VerticalAlignment="Center" Width="32" Height="32" Foreground="{StaticResource AccentColorBrush}" />
+ <TextBlock Margin="10 0 0 0" Foreground="{StaticResource AccentColorBrush}" FontSize="16" Text="{Binding RelativeSource={RelativeSource AncestorType=Window},Path=InnerTitle}"></TextBlock>
+ </StackPanel>
+ <StackPanel Orientation="Horizontal" VerticalAlignment="Bottom" HorizontalAlignment="Right" DockPanel.Dock="Bottom">
+ <Button Style="{StaticResource MaterialDesignFlatButton}" IsDefault="True" Margin="0 8 8 0" Command="{Binding DialogOKCommand}" Click="OnOKClicked">
+ ACCEPT
+ </Button>
+ <Button Style="{StaticResource MaterialDesignFlatButton}" IsCancel="True" Margin="0 8 8 0" Command="{Binding DialogCancelCommand}" Click="OnCancelClicked">
+ CANCEL
+ </Button>
+ </StackPanel>
+ <ScrollViewer Margin="0 10 0 10" VerticalScrollBarVisibility="Auto" Padding="5">
+ <ContentPresenter x:Name="presenter"></ContentPresenter>
+ </ScrollViewer>
+ </DockPanel>
+ </Border>
+ </Grid>
+</mahapps:MetroWindow>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Windows/DBDialogWindow.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Windows/DBDialogWindow.xaml.cs
new file mode 100644
index 000000000..d9629c642
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Windows/DBDialogWindow.xaml.cs
@@ -0,0 +1,68 @@
+using MahApps.Metro.Controls;
+using MaterialDesignThemes.Wpf;
+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.Shapes;
+namespace Tango.MachineStudio.DB.Windows
+{
+ /// <summary>
+ /// Interaction logic for DBDialogWindow.xaml
+ /// </summary>
+ public partial class DBDialogWindow : MetroWindow
+ {
+ public DBDialogWindow()
+ {
+ InitializeComponent();
+ }
+
+ public String InnerTitle
+ {
+ get { return (String)GetValue(InnerTitleProperty); }
+ set { SetValue(InnerTitleProperty, value); }
+ }
+ public static readonly DependencyProperty InnerTitleProperty =
+ DependencyProperty.Register("InnerTitle", typeof(String), typeof(DBDialogWindow), new PropertyMetadata(null));
+
+
+
+ public PackIconKind IconKind
+ {
+ get { return (PackIconKind)GetValue(IconKindProperty); }
+ set { SetValue(IconKindProperty, value); }
+ }
+
+ // Using a DependencyProperty as the backing store for IconKind. This enables animation, styling, binding, etc...
+ public static readonly DependencyProperty IconKindProperty =
+ DependencyProperty.Register("IconKind", typeof(PackIconKind), typeof(DBDialogWindow), new PropertyMetadata(PackIconKind.TableEdit));
+
+
+
+
+ public DBDialogWindow(FrameworkElement content) : this()
+ {
+ presenter.Content = content;
+ }
+
+ private void OnOKClicked(object sender, RoutedEventArgs e)
+ {
+ DialogResult = true;
+ Close();
+ }
+
+ private void OnCancelClicked(object sender, RoutedEventArgs e)
+ {
+ DialogResult = false;
+ Close();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/packages.config b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/packages.config
new file mode 100644
index 000000000..138a48ec7
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/packages.config
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+ <package id="CommonServiceLocator" version="1.3" targetFramework="net46" />
+ <package id="Dragablz" version="0.0.3.197" targetFramework="net46" />
+ <package id="EntityFramework" version="6.0.0" targetFramework="net46" />
+ <package id="MahApps.Metro" version="1.5.0" targetFramework="net46" />
+ <package id="MaterialDesignColors" version="1.1.2" targetFramework="net46" />
+ <package id="MaterialDesignThemes" version="2.3.1.953" targetFramework="net46" />
+ <package id="MvvmLight" version="5.3.0.0" targetFramework="net46" />
+ <package id="MvvmLightLibs" version="5.3.0.0" targetFramework="net46" />
+ <package id="SimpleValidator" version="0.6.1.0" targetFramework="net46" />
+ <package id="WriteableBitmapEx" version="1.5.0.0" targetFramework="net46" />
+</packages> \ No newline at end of file