aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB')
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Converters/EventTypeActionsToStringConverter.cs40
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Tango.MachineStudio.DB.csproj48
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModelLocator.cs28
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/ActionTypesViewVM.cs18
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/EventTypesGroupsViewVM.cs17
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/EventTypesViewVM.cs71
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ActionTypeView.xaml31
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ActionTypeView.xaml.cs28
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ActionTypesView.xaml25
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ActionTypesView.xaml.cs32
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EventTypeView.xaml55
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EventTypeView.xaml.cs34
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EventTypesGroupView.xaml31
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EventTypesGroupView.xaml.cs28
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EventTypesGroupsView.xaml26
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EventTypesGroupsView.xaml.cs30
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EventTypesView.xaml38
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EventTypesView.xaml.cs30
18 files changed, 1 insertions, 609 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Converters/EventTypeActionsToStringConverter.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Converters/EventTypeActionsToStringConverter.cs
deleted file mode 100644
index b33259e3e..000000000
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Converters/EventTypeActionsToStringConverter.cs
+++ /dev/null
@@ -1,40 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Globalization;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows.Data;
-using Tango.BL.Entities;
-using Tango.MachineStudio.DB.ViewModels;
-
-namespace Tango.MachineStudio.DB.Converters
-{
- /// <summary>
- /// Converts an event type action to string representation.
- /// </summary>
- /// <seealso cref="System.Windows.Data.IValueConverter" />
- public class EventTypeActionsToStringConverter : IValueConverter
- {
- public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
- {
- if (value == null) return "";
-
- if (value is IEnumerable<EventTypesAction>)
- {
- IEnumerable<EventTypesAction> eventActions = value as IEnumerable<EventTypesAction>;
- return String.Join(", ", eventActions.Select(x => x.ActionType.Name));
- }
- else
- {
- IEnumerable<MultiComboVM<ActionType>> eventActions = value as IEnumerable<MultiComboVM<ActionType>>;
- return String.Join(", ", eventActions.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/Tango.MachineStudio.DB.csproj b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Tango.MachineStudio.DB.csproj
index e719464f8..da427f4d8 100644
--- 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
@@ -80,13 +80,11 @@
</Compile>
<Compile Include="Converters\ByteArrayToFileSizeConverter.cs" />
<Compile Include="Converters\EntityFieldNameToFriendlyStringConverter.cs" />
- <Compile Include="Converters\EventTypeActionsToStringConverter.cs" />
<Compile Include="Converters\LiquidTypeRmlsToStringConverter.cs" />
<Compile Include="Converters\RolesPermissionsToStringConverter.cs" />
<Compile Include="DBModule.cs" />
<Compile Include="Messages\CloseEntityEditViewMessage.cs" />
<Compile Include="Messages\OpenEntityEditViewMessage.cs" />
- <Compile Include="ViewModels\ActionTypesViewVM.cs" />
<Compile Include="ViewModels\AddressesViewVM.cs" />
<Compile Include="ViewModels\ApplicationDisplayPanelVersionsViewVM.cs" />
<Compile Include="ViewModels\ApplicationFirmwareVersionsViewVM.cs" />
@@ -96,13 +94,11 @@
<Compile Include="ViewModels\CctsViewVM.cs" />
<Compile Include="ViewModels\ConfigurationsViewVM.cs" />
<Compile Include="ViewModels\ContactsViewVM.cs" />
- <Compile Include="ViewModels\EventTypesGroupsViewVM.cs" />
<Compile Include="ViewModels\HardwareDancerTypesViewVM.cs" />
<Compile Include="ViewModels\DbTableViewModel.cs" />
<Compile Include="ViewModels\DialogOpenMode.cs" />
<Compile Include="ViewModels\DispenserTypesViewVM.cs" />
<Compile Include="ViewModels\EmbeddedFirmwareVersionsViewVM.cs" />
- <Compile Include="ViewModels\EventTypesViewVM.cs" />
<Compile Include="ViewModels\FiberShapesViewVM.cs" />
<Compile Include="ViewModels\FiberSynthsViewVM.cs" />
<Compile Include="ViewModels\HardwareVersionsViewVM.cs" />
@@ -132,24 +128,12 @@
<Compile Include="ViewModels\EntityViewModel.cs" />
<Compile Include="ViewModels\MainViewVM.cs" />
<Compile Include="ViewModelLocator.cs" />
- <Compile Include="Views\DBViews\ActionTypesView.xaml.cs">
- <DependentUpon>ActionTypesView.xaml</DependentUpon>
- </Compile>
- <Compile Include="Views\DBViews\ActionTypeView.xaml.cs">
- <DependentUpon>ActionTypeView.xaml</DependentUpon>
- </Compile>
<Compile Include="Views\DBViews\SpoolTypesView.xaml.cs">
<DependentUpon>SpoolTypesView.xaml</DependentUpon>
</Compile>
<Compile Include="Views\DBViews\SpoolTypeView.xaml.cs">
<DependentUpon>SpoolTypeView.xaml</DependentUpon>
</Compile>
- <Compile Include="Views\DBViews\EventTypesGroupsView.xaml.cs">
- <DependentUpon>EventTypesGroupsView.xaml</DependentUpon>
- </Compile>
- <Compile Include="Views\DBViews\EventTypesGroupView.xaml.cs">
- <DependentUpon>EventTypesGroupView.xaml</DependentUpon>
- </Compile>
<Compile Include="Views\DBViews\HardwarePidControlTypesView.xaml.cs">
<DependentUpon>HardwarePidControlTypesView.xaml</DependentUpon>
</Compile>
@@ -354,18 +338,12 @@
<Compile Include="Views\DBViews\OrganizationView.xaml.cs">
<DependentUpon>OrganizationView.xaml</DependentUpon>
</Compile>
- <Compile Include="Views\DBViews\EventTypesView.xaml.cs">
- <DependentUpon>EventTypesView.xaml</DependentUpon>
- </Compile>
<Compile Include="Views\DBViews\LiquidTypesRmlsView.xaml.cs">
<DependentUpon>LiquidTypesRmlsView.xaml</DependentUpon>
</Compile>
<Compile Include="Views\DBViews\UsersView.xaml.cs">
<DependentUpon>UsersView.xaml</DependentUpon>
</Compile>
- <Compile Include="Views\DBViews\EventTypeView.xaml.cs">
- <DependentUpon>EventTypeView.xaml</DependentUpon>
- </Compile>
<Compile Include="Views\DBViews\LiquidTypesRmlView.xaml.cs">
<DependentUpon>LiquidTypesRmlView.xaml</DependentUpon>
</Compile>
@@ -387,14 +365,6 @@
<Compile Include="CustomAttributes\DBViewAttribute.cs" />
<Compile Include="Managers\RegisteredView.cs" />
<Compile Include="Managers\ViewsManager.cs" />
- <Page Include="Views\DBViews\ActionTypesView.xaml">
- <Generator>MSBuild:Compile</Generator>
- <SubType>Designer</SubType>
- </Page>
- <Page Include="Views\DBViews\ActionTypeView.xaml">
- <Generator>MSBuild:Compile</Generator>
- <SubType>Designer</SubType>
- </Page>
<Page Include="Views\DBViews\SpoolTypesView.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
@@ -403,14 +373,6 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
- <Page Include="Views\DBViews\EventTypesGroupsView.xaml">
- <Generator>MSBuild:Compile</Generator>
- <SubType>Designer</SubType>
- </Page>
- <Page Include="Views\DBViews\EventTypesGroupView.xaml">
- <Generator>MSBuild:Compile</Generator>
- <SubType>Designer</SubType>
- </Page>
<Page Include="Views\DBViews\HardwarePidControlTypesView.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
@@ -683,10 +645,6 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
- <Page Include="Views\DBViews\EventTypesView.xaml">
- <Generator>MSBuild:Compile</Generator>
- <SubType>Designer</SubType>
- </Page>
<Page Include="Views\DBViews\LiquidTypesRmlsView.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
@@ -695,10 +653,6 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
- <Page Include="Views\DBViews\EventTypeView.xaml">
- <Generator>MSBuild:Compile</Generator>
- <SubType>Designer</SubType>
- </Page>
<Page Include="Views\DBViews\LiquidTypesRmlView.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
@@ -780,7 +734,7 @@
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<ProjectExtensions>
<VisualStudio>
- <UserProperties BuildVersion_StartDate="2000/1/1" BuildVersion_UseGlobalSettings="False" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" />
+ <UserProperties BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UseGlobalSettings="False" BuildVersion_StartDate="2000/1/1" />
</VisualStudio>
</ProjectExtensions>
</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
index 409b66e12..736682e07 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModelLocator.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModelLocator.cs
@@ -37,8 +37,6 @@ namespace Tango.MachineStudio.DB
TangoIOC.Default.Register<CartridgeTypesViewVM>();
TangoIOC.Default.Register<MidTankTypesViewVM>();
- TangoIOC.Default.Register<EventTypesViewVM>();
- TangoIOC.Default.Register<ActionTypesViewVM>();
TangoIOC.Default.Register<ContactsViewVM>();
@@ -62,8 +60,6 @@ namespace Tango.MachineStudio.DB
TangoIOC.Default.Register<HardwareDancerTypesViewVM>();
TangoIOC.Default.Register<HardwarePidControlTypesViewVM>();
- TangoIOC.Default.Register<EventTypesGroupsViewVM>();
-
TangoIOC.Default.Register<SpoolTypesViewVM>();
}
@@ -211,22 +207,6 @@ namespace Tango.MachineStudio.DB
}
}
- public static EventTypesViewVM EventTypesViewVM
- {
- get
- {
- return TangoIOC.Default.GetInstance<EventTypesViewVM>();
- }
- }
-
- public static ActionTypesViewVM ActionTypesViewVM
- {
- get
- {
- return TangoIOC.Default.GetInstance<ActionTypesViewVM>();
- }
- }
-
public static ContactsViewVM ContactsViewVM
{
get
@@ -379,14 +359,6 @@ namespace Tango.MachineStudio.DB
}
}
- public static EventTypesGroupsViewVM EventTypesGroupsViewVM
- {
- get
- {
- return TangoIOC.Default.GetInstance<EventTypesGroupsViewVM>();
- }
- }
-
public static SpoolTypesViewVM SpoolTypesViewVM
{
get
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/ActionTypesViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/ActionTypesViewVM.cs
deleted file mode 100644
index 69092a70d..000000000
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/ActionTypesViewVM.cs
+++ /dev/null
@@ -1,18 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using Tango.BL.Entities;
-using Tango.MachineStudio.Common.Notifications;
-
-namespace Tango.MachineStudio.DB.ViewModels
-{
- public class ActionTypesViewVM : DbTableViewModel<ActionType>
- {
- public ActionTypesViewVM(INotificationProvider notification) : base(notification)
- {
-
- }
- }
-}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/EventTypesGroupsViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/EventTypesGroupsViewVM.cs
deleted file mode 100644
index abdb00e32..000000000
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/EventTypesGroupsViewVM.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using Tango.BL.Entities;
-using Tango.MachineStudio.Common.Notifications;
-
-namespace Tango.MachineStudio.DB.ViewModels
-{
- public class EventTypesGroupsViewVM : DbTableViewModel<EventTypesGroup>
- {
- public EventTypesGroupsViewVM(INotificationProvider notification) : base(notification)
- {
- }
- }
-}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/EventTypesViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/EventTypesViewVM.cs
deleted file mode 100644
index 6702b720f..000000000
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/EventTypesViewVM.cs
+++ /dev/null
@@ -1,71 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using Tango.BL.Entities;
-using Tango.MachineStudio.Common.Notifications;
-
-namespace Tango.MachineStudio.DB.ViewModels
-{
- public class EventTypesViewVM : DbTableViewModel<EventType>
- {
- public EventTypesViewVM(INotificationProvider notification) : base(notification)
- {
- SelectedActions = new ObservableCollection<MultiComboVM<ActionType>>();
- }
-
- private ObservableCollection<MultiComboVM<ActionType>> _selectedActions;
- public ObservableCollection<MultiComboVM<ActionType>> SelectedActions
- {
- get { return _selectedActions; }
- set { _selectedActions = value; RaisePropertyChangedAuto(); }
- }
-
- protected override void OnEdit()
- {
- SelectedActions = Adapter.ActionTypes.Select(x => new MultiComboVM<ActionType>(x, () => RaisePropertyChanged(nameof(SelectedActions)))).ToObservableCollection();
-
- foreach (var actionType in SelectedActions)
- {
- if (SelectedEntity.EventTypesActions.ToList().Exists(x => x.ActionType == actionType.Entity))
- {
- actionType.IsSelected = true;
- }
- }
-
- base.OnEdit();
- }
-
- protected override void OnAdd()
- {
- SelectedActions = Adapter.ActionTypes.Select(x => new MultiComboVM<ActionType>(x, () => RaisePropertyChanged(nameof(SelectedActions)))).ToObservableCollection();
-
- base.OnAdd();
- }
-
- protected override void OnBeforeEntitySave(DialogOpenMode mode, EventType eventType)
- {
- base.OnBeforeEntitySave(mode, eventType);
-
-
-
- Adapter.Context.EventTypesActions.RemoveRange(eventType.EventTypesActions);
-
- foreach (var actionType in SelectedActions)
- {
- if (actionType.IsSelected)
- {
- eventType.EventTypesActions.Add(new EventTypesAction()
- {
- ActionType = actionType.Entity,
- EventType = eventType,
- ActionTypeGuid = actionType.Entity.Guid,
- EventTypeGuid = eventType.Guid
- });
- }
- }
- }
- }
-}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ActionTypeView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ActionTypeView.xaml
deleted file mode 100644
index 11a472edb..000000000
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ActionTypeView.xaml
+++ /dev/null
@@ -1,31 +0,0 @@
-<UserControl x:Class="Tango.MachineStudio.DB.Views.DBViews.ActionTypeView"
- 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:ActionTypesViewVM, 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>
- <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/ActionTypeView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ActionTypeView.xaml.cs
deleted file mode 100644
index 05a56fb89..000000000
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ActionTypeView.xaml.cs
+++ /dev/null
@@ -1,28 +0,0 @@
-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 ActionTypeView : UserControl
- {
- public ActionTypeView()
- {
- InitializeComponent();
- }
- }
-}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ActionTypesView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ActionTypesView.xaml
deleted file mode 100644
index a9a14fb0c..000000000
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ActionTypesView.xaml
+++ /dev/null
@@ -1,25 +0,0 @@
-<UserControl x:Class="Tango.MachineStudio.DB.Views.DBViews.ActionTypesView"
- 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.ActionTypesViewVM}">
- <Grid>
- <controls:DbTableView>
- <DataGrid Background="Transparent" ItemsSource="{Binding Adapter.ActionTypesViewSource}" 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="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/ActionTypesView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ActionTypesView.xaml.cs
deleted file mode 100644
index aad79c87a..000000000
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ActionTypesView.xaml.cs
+++ /dev/null
@@ -1,32 +0,0 @@
-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 ActionTypesView : UserControl
- {
- public ActionTypesView() : base()
- {
- InitializeComponent();
- }
- }
-}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EventTypeView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EventTypeView.xaml
deleted file mode 100644
index 4c1111ed7..000000000
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EventTypeView.xaml
+++ /dev/null
@@ -1,55 +0,0 @@
-<UserControl x:Class="Tango.MachineStudio.DB.Views.DBViews.EventTypeView"
- 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:EventTypeActionsToStringConverter x:Key="EventTypeActionsToStringConverter"></converters:EventTypeActionsToStringConverter>
- </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="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="Description:" FontWeight="Bold"></TextBlock>
- <TextBox Text="{Binding EditEntity.Description,Mode=TwoWay}"></TextBox>
- <TextBlock Text="Category:" FontWeight="Bold"></TextBlock>
- <ComboBox ItemsSource="{Binding Adapter.EventTypesCategories}" SelectedItem="{Binding EditEntity.EventTypesCategory,Mode=TwoWay}" DisplayMemberPath="Name"></ComboBox>
- <TextBlock Text="Group:" FontWeight="Bold"></TextBlock>
- <ComboBox ItemsSource="{Binding Adapter.EventTypesGroups}" SelectedItem="{Binding EditEntity.EventTypesGroup,Mode=TwoWay}" DisplayMemberPath="Name"></ComboBox>
- <TextBlock Text="Requires User Intervention:" FontWeight="Bold"></TextBlock>
- <ToggleButton HorizontalAlignment="Right" IsChecked="{Binding EditEntity.RequiresUserIntervention}" />
- <TextBlock Text="Resolvable:" FontWeight="Bold"></TextBlock>
- <ToggleButton HorizontalAlignment="Right" IsChecked="{Binding EditEntity.Resolvable}" />
- <TextBlock Text="HTML Page:" FontWeight="Bold"></TextBlock>
- <ComboBox ItemsSource="{Binding Adapter.HtmlPages}" SelectedItem="{Binding EditEntity.HtmlPage,Mode=TwoWay}" DisplayMemberPath="Name"></ComboBox>
- <TextBlock Text="Actions:" FontWeight="Bold"></TextBlock>
- <ComboBox x:Name="comboActions" SelectionChanged="comboRoles_SelectionChanged" ItemsSource="{Binding SelectedActions}" materialDesign:HintAssist.Hint="{Binding SelectedActions,Converter={StaticResource EventTypeActionsToStringConverter},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>
- </controls:TableGrid>
- </Grid>
-</UserControl>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EventTypeView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EventTypeView.xaml.cs
deleted file mode 100644
index 6294b14e7..000000000
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EventTypeView.xaml.cs
+++ /dev/null
@@ -1,34 +0,0 @@
-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 EventTypeView : UserControl
- {
- public EventTypeView()
- {
- InitializeComponent();
- }
-
- private void comboRoles_SelectionChanged(object sender, SelectionChangedEventArgs e)
- {
- comboActions.SelectedItem = null;
- comboActions.Text = "Press to select";
- }
- }
-}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EventTypesGroupView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EventTypesGroupView.xaml
deleted file mode 100644
index 8f8ec1eae..000000000
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EventTypesGroupView.xaml
+++ /dev/null
@@ -1,31 +0,0 @@
-<UserControl x:Class="Tango.MachineStudio.DB.Views.DBViews.EventTypesGroupView"
- 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">
-
-
- <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="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="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/EventTypesGroupView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EventTypesGroupView.xaml.cs
deleted file mode 100644
index e164fa171..000000000
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EventTypesGroupView.xaml.cs
+++ /dev/null
@@ -1,28 +0,0 @@
-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 EventTypesGroupView : UserControl
- {
- public EventTypesGroupView()
- {
- InitializeComponent();
- }
- }
-}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EventTypesGroupsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EventTypesGroupsView.xaml
deleted file mode 100644
index e6dff7f8a..000000000
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EventTypesGroupsView.xaml
+++ /dev/null
@@ -1,26 +0,0 @@
-<UserControl x:Class="Tango.MachineStudio.DB.Views.DBViews.EventTypesGroupsView"
- 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.EventTypesGroupsViewVM}">
-
- <Grid>
- <controls:DbTableView>
- <DataGrid Background="Transparent" ItemsSource="{Binding Adapter.EventTypesGroupsViewSource}" 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/EventTypesGroupsView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EventTypesGroupsView.xaml.cs
deleted file mode 100644
index c11aeccc4..000000000
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EventTypesGroupsView.xaml.cs
+++ /dev/null
@@ -1,30 +0,0 @@
-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 EventTypesGroupsView : UserControl
- {
- public EventTypesGroupsView()
- {
- InitializeComponent();
- }
- }
-}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EventTypesView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EventTypesView.xaml
deleted file mode 100644
index 19700c976..000000000
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EventTypesView.xaml
+++ /dev/null
@@ -1,38 +0,0 @@
-<UserControl x:Class="Tango.MachineStudio.DB.Views.DBViews.EventTypesView"
- 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:sharedConverters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
- 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.EventTypesViewVM}">
-
- <UserControl.Resources>
- <converters:EventTypeActionsToStringConverter x:Key="EventTypeActionsToStringConverter"></converters:EventTypeActionsToStringConverter>
- <sharedConverters:BooleanToYesNoConverter x:Key="BooleanToYesNoConverter" />
- </UserControl.Resources>
-
- <Grid>
- <controls:DbTableView>
- <DataGrid Background="Transparent" ItemsSource="{Binding Adapter.EventTypesViewSource}" 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="Category" Binding="{Binding EventTypesCategory.Name}"></DataGridTextColumn>
- <DataGridTextColumn Header="Group" Binding="{Binding EventTypesGroup.Name}"></DataGridTextColumn>
- <DataGridTextColumn Header="Requires User Intervention" Binding="{Binding RequiresUserIntervention,Converter={StaticResource BooleanToYesNoConverter}}"></DataGridTextColumn>
- <DataGridTextColumn Header="Resolvable" Binding="{Binding Resolvable,Converter={StaticResource BooleanToYesNoConverter}}"></DataGridTextColumn>
- <DataGridTextColumn Header="HTML Page" Binding="{Binding HtmlPageGuid}"></DataGridTextColumn>
- <DataGridTextColumn Header="Actions" Binding="{Binding EventTypesActions,Converter={StaticResource EventTypeActionsToStringConverter}}"></DataGridTextColumn>
- </DataGrid.Columns>
- </DataGrid>
- </controls:DbTableView>
- </Grid>
-</UserControl>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EventTypesView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EventTypesView.xaml.cs
deleted file mode 100644
index 3c197b7f2..000000000
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EventTypesView.xaml.cs
+++ /dev/null
@@ -1,30 +0,0 @@
-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 EventTypesView : UserControl
- {
- public EventTypesView()
- {
- InitializeComponent();
- }
- }
-}