aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2019-10-27 12:09:07 +0200
committerRoy Ben-Shabat <Roy@Twine-s.com>2019-10-27 12:09:07 +0200
commit312e8ccad554d6d0e7d21444e069731e770db978 (patch)
treed20a3657dab87de400675f5f8aca77c0f124b2bd /Software/Visual_Studio
parent4954a924b8a5b8fd7a213a444027e74b936359be (diff)
downloadTango-312e8ccad554d6d0e7d21444e069731e770db978.tar.gz
Tango-312e8ccad554d6d0e7d21444e069731e770db978.zip
Added DEVICE_ID, DEVICE_NAME & IS_DEVICE_REGISTERED fields to db.
Prevent multiple machine setup from different devices. Moved notification to inner layout on PPC. Improved PPC notification bar. Added more machine status support from embedded. FIxed issue with external bridge and emergency pressed.
Diffstat (limited to 'Software/Visual_Studio')
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachineSettingsView.xaml3
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Common/MachineSetup/MachineSetupManager.cs3
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Common/OS/DefaultOperationSystemManager.cs64
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Common/OS/IOperationSystemManager.cs12
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Common/Web/MachineSetupRequest.cs2
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutView.xaml136
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MainView.xaml15
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest2
-rw-r--r--Software/Visual_Studio/Tango.BL/DTO/MachineDTOBase.cs32
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/MachineBase.cs152
-rw-r--r--Software/Visual_Studio/Tango.DAL.Remote/DB/MACHINE.cs4
-rw-r--r--Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx12
-rw-r--r--Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx.diagram142
-rw-r--r--Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs6
-rw-r--r--Software/Visual_Studio/Tango.Emulations/ExternalBridge/EmulatorExternalBridge.cs14
-rw-r--r--Software/Visual_Studio/Tango.Integration/ExternalBridge/ExternalBridgeService.cs2
-rw-r--r--Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs29
-rw-r--r--Software/Visual_Studio/Tango.Integration/Operation/MachineStatuses.cs2
-rw-r--r--Software/Visual_Studio/Tango.Touch/Controls/TouchNotificationBar.cs12
-rw-r--r--Software/Visual_Studio/Tango.Touch/Controls/TouchPanel.cs40
-rw-r--r--Software/Visual_Studio/Tango.Touch/Controls/TouchPanel.xaml4
-rw-r--r--Software/Visual_Studio/Tango.Touch/Controls/TouchScrollViewer.cs41
-rw-r--r--Software/Visual_Studio/Tango.Touch/Controls/TouchScrollViewer.xaml17
-rw-r--r--Software/Visual_Studio/Tango.Touch/Controls/TouchSimpleDataGrid.xaml34
-rw-r--r--Software/Visual_Studio/Utilities/Tango.MachineEM.UI/MainWindow.xaml2
-rw-r--r--Software/Visual_Studio/Utilities/Tango.MachineEM.UI/Views/MainView.xaml52
-rw-r--r--Software/Visual_Studio/Web/Tango.MachineService/Controllers/PPCController.cs29
-rw-r--r--Software/Visual_Studio/Web/Tango.MachineService/Properties/PublishProfiles/Development.pubxml18
28 files changed, 578 insertions, 303 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachineSettingsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachineSettingsView.xaml
index 62c38a1e6..40ce9ea08 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachineSettingsView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachineSettingsView.xaml
@@ -97,6 +97,9 @@
<TextBlock FontWeight="SemiBold">Suspend Version Update</TextBlock>
<ToggleButton HorizontalAlignment="Left" IsChecked="{Binding ActiveMachine.SuspendVersionUpdate}"></ToggleButton>
+ <TextBlock FontWeight="SemiBold">Force Version Update</TextBlock>
+ <ToggleButton HorizontalAlignment="Left" IsChecked="{Binding ActiveMachine.ForceVersionUpdate}"></ToggleButton>
+
<TextBlock FontWeight="SemiBold">Update Schema on Update</TextBlock>
<ToggleButton HorizontalAlignment="Left" IsChecked="{Binding ActiveMachine.PerformSchemaUpdateOnDataUpdate}"></ToggleButton>
</controls:TableGrid>
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/MachineSetup/MachineSetupManager.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/MachineSetup/MachineSetupManager.cs
index 94091b284..004c37096 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.Common/MachineSetup/MachineSetupManager.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/MachineSetup/MachineSetupManager.cs
@@ -132,6 +132,9 @@ namespace Tango.PPC.Common.MachineSetup
MachineSetupRequest request = new MachineSetupRequest();
request.SerialNumber = serialNumber;
+ request.DeviceID = await _windows_manager.GetDeviceId();
+ request.DeviceName = await _windows_manager.GetDeviceName();
+
MachineSetupResponse setup_response = null;
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/OS/DefaultOperationSystemManager.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/OS/DefaultOperationSystemManager.cs
index d0c8567a1..2164a71c3 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.Common/OS/DefaultOperationSystemManager.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/OS/DefaultOperationSystemManager.cs
@@ -168,5 +168,69 @@ namespace Tango.PPC.Common.OS
{
Process.Start("shutdown.exe", "-s -t 0");
}
+
+ /// <summary>
+ /// Gets the machine unique identifier.
+ /// </summary>
+ /// <returns></returns>
+ public Task<string> GetDeviceId()
+ {
+ return Task.Factory.StartNew<String>(() =>
+ {
+ try
+ {
+ ManagementObjectCollection mbsList = null;
+ ManagementObjectSearcher mbs = new ManagementObjectSearcher("Select * From Win32_processor");
+ mbsList = mbs.Get();
+ string id = "";
+ foreach (ManagementObject mo in mbsList)
+ {
+ id = mo["ProcessorID"].ToString();
+ }
+
+ string max_address = "";
+
+ using (ManagementClass mc = new ManagementClass("Win32_NetworkAdapterConfiguration"))
+ {
+ using (ManagementObjectCollection moc = mc.GetInstances())
+ {
+ if (moc != null)
+ {
+ foreach (ManagementObject mo in moc)
+ {
+ if (string.IsNullOrEmpty(max_address)) // only return MAC Address from first card
+ {
+ if (mo["MacAddress"] != null)
+ {
+ max_address = mo["MacAddress"].ToString();
+ }
+ }
+ mo.Dispose();
+ }
+ }
+ }
+ }
+
+ return id + "_" + max_address;
+ }
+ catch (Exception ex)
+ {
+ LogManager.Log(ex, "Could not extract device id. Falling back to device name...");
+ return GetDeviceName().Result;
+ }
+ });
+ }
+
+ /// <summary>
+ /// Gets the machine host name.
+ /// </summary>
+ /// <returns></returns>
+ public Task<string> GetDeviceName()
+ {
+ return Task.Factory.StartNew<String>(() =>
+ {
+ return Environment.MachineName;
+ });
+ }
}
}
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/OS/IOperationSystemManager.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/OS/IOperationSystemManager.cs
index f3ec398fc..3e24ffe72 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.Common/OS/IOperationSystemManager.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/OS/IOperationSystemManager.cs
@@ -45,6 +45,18 @@ namespace Tango.PPC.Common.OS
Task ChangeTimeZone(TimeZoneInfo timeZone);
/// <summary>
+ /// Gets the machine unique identifier.
+ /// </summary>
+ /// <returns></returns>
+ Task<String> GetDeviceId();
+
+ /// <summary>
+ /// Gets the machine host name.
+ /// </summary>
+ /// <returns></returns>
+ Task<String> GetDeviceName();
+
+ /// <summary>
/// Restarts the system.
/// </summary>
/// <returns></returns>
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Web/MachineSetupRequest.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/Web/MachineSetupRequest.cs
index 83bec6b07..821828a48 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.Common/Web/MachineSetupRequest.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Web/MachineSetupRequest.cs
@@ -10,5 +10,7 @@ namespace Tango.PPC.Common.Web
public class MachineSetupRequest : WebRequestMessage
{
public String SerialNumber { get; set; }
+ public String DeviceID { get; set; }
+ public String DeviceName { get; set; }
}
}
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutView.xaml
index dce92c2dd..7284830a0 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutView.xaml
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutView.xaml
@@ -13,6 +13,7 @@
xmlns:touch="clr-namespace:Tango.Touch.Controls;assembly=Tango.Touch"
xmlns:commonControls="clr-namespace:Tango.PPC.Common.Controls;assembly=Tango.PPC.Common"
xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI"
+ xmlns:components="clr-namespace:Tango.Touch.Components;assembly=Tango.Touch"
xmlns:keyboard="clr-namespace:Tango.Touch.Keyboard;assembly=Tango.Touch"
mc:Ignorable="d"
d:DesignHeight="1280" d:DesignWidth="800" d:DataContext="{d:DesignInstance Type=vm:LayoutViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.LayoutViewVM}">
@@ -20,6 +21,7 @@
<UserControl.Resources>
<localConverters:ItemBaseConverter x:Key="NotificationItemConverter" />
<localConverters:AppBarItemConverter x:Key="AppBarItemConverter" />
+ <localConverters:ItemBaseConverter x:Key="ItemBaseConverter" />
</UserControl.Resources>
<Grid>
@@ -228,55 +230,79 @@
</Border>
</touch:TouchSideMenu.MenuContent>
- <DockPanel>
- <Border BorderThickness="0 0 0 1" BorderBrush="{StaticResource TangoDividerBrush}" DockPanel.Dock="Top">
- <DockPanel>
- <Border BorderThickness="0 0 1 0" BorderBrush="{StaticResource TangoDividerBrush}">
- <touch:TouchHamburgerButton Width="100" Height="100" Padding="15" Command="{Binding MenuOrBackCommand}" EnableDropShadow="False" Foreground="{StaticResource TangoPrimaryAccentBrush}" IsBack="{Binding NavigationManager.CanNavigateBack}">
-
- </touch:TouchHamburgerButton>
- </Border>
- <Grid DockPanel.Dock="Right" Margin="0 0 20 0">
- <StackPanel Orientation="Horizontal">
- <StackPanel x:Name="techPressElement" VerticalAlignment="Center" Background="Transparent">
- <touch:TouchGifAnimation Width="36" HorizontalAlignment="Center" EnableAnimation="True">
- <touch:TouchGifAnimation.Style>
- <Style TargetType="touch:TouchGifAnimation">
- <Setter Property="Source" Value="/Images/GlobalStatus/standby.png"></Setter>
- <Style.Triggers>
- <DataTrigger Binding="{Binding MachineProvider.MachineOperator.Status}" Value="{x:Static operations:MachineStatuses.Disconnected}">
- <Setter Property="Source" Value="/Images/GlobalStatus/machine_off_Anim.gif"></Setter>
- </DataTrigger>
- <DataTrigger Binding="{Binding MachineProvider.MachineOperator.Status}" Value="{x:Static operations:MachineStatuses.Standby}">
- <Setter Property="Source" Value="/Images/GlobalStatus/standby_Anim.gif"></Setter>
- </DataTrigger>
- <DataTrigger Binding="{Binding MachineProvider.MachineOperator.Status}" Value="{x:Static operations:MachineStatuses.ReadyToDye}">
- <Setter Property="Source" Value="/Images/GlobalStatus/Ready_Anim.gif"></Setter>
- </DataTrigger>
- <DataTrigger Binding="{Binding MachineProvider.MachineOperator.Status}" Value="{x:Static operations:MachineStatuses.GettingReady}">
- <Setter Property="Source" Value="/Images/GlobalStatus/getting_ready_Anim.gif"></Setter>
- </DataTrigger>
- <DataTrigger Binding="{Binding MachineProvider.MachineOperator.Status}" Value="{x:Static operations:MachineStatuses.Printing}">
- <Setter Property="Source" Value="/Images/GlobalStatus/dyeing_Anim.gif"></Setter>
- </DataTrigger>
- </Style.Triggers>
- </Style>
- </touch:TouchGifAnimation.Style>
- </touch:TouchGifAnimation>
- <TextBlock Margin="0 10 0 0" Text="{Binding MachineProvider.MachineOperator.Status,Converter={StaticResource EnumToDescriptionConverter}}"></TextBlock>
- </StackPanel>
+ <touch:TouchNotificationBar
+ NotificationBarVisibility="{Binding NotificationProvider.NotificationsVisible,Converter={StaticResource BooleanToVisibilityConverter}}"
+ HasNotifications="{Binding NotificationProvider.HasNotificationItems}"
+ Notifications="{Binding NotificationProvider.NotificationItems}"
+ ItemExpandedPropertyPath="IsExpanded">
+ <touch:TouchNotificationBar.NotificationTemplate>
+ <DataTemplate>
+ <touch:TouchButton Style="{StaticResource TangoFlatButton}" Padding="0" Command="{Binding PressedCommand}" components:TransformationHelper.TransformWhenPressed="False">
+ <Grid>
+ <ContentControl Content="{Binding Converter={StaticResource ItemBaseConverter}}"/>
+ <touch:TouchIconButton Visibility="{Binding CanClose,Converter={StaticResource BooleanToVisibilityConverter}}" DockPanel.Dock="Right" Background="Transparent" Padding="35" Style="{StaticResource TangoRoundTouchIconButton}" Command="{Binding CloseCommand}" CommandParameter="{Binding}" HorizontalAlignment="Right" MaxHeight="90" Width="{Binding RelativeSource={RelativeSource Self},Path=ActualHeight}" Icon="Close" Foreground="{StaticResource TangoDarkForegroundBrush}" />
+ </Grid>
+ </touch:TouchButton>
+ </DataTemplate>
+ </touch:TouchNotificationBar.NotificationTemplate>
+ <DockPanel>
+ <Border BorderThickness="0 0 0 1" BorderBrush="{StaticResource TangoDividerBrush}" DockPanel.Dock="Top">
+ <DockPanel>
+ <Border BorderThickness="0 0 1 0" BorderBrush="{StaticResource TangoDividerBrush}">
+ <touch:TouchHamburgerButton Width="100" Height="100" Padding="15" Command="{Binding MenuOrBackCommand}" EnableDropShadow="False" Foreground="{StaticResource TangoPrimaryAccentBrush}" IsBack="{Binding NavigationManager.CanNavigateBack}">
- <touch:TouchButton Margin="40 0 0 0" Height="65" Padding="50 0" MinWidth="200" CornerRadius="35" BlurRadius="20" Command="{Binding NotificationProvider.CurrentAppButton.Command}" IsEnabled="{Binding NotificationProvider.CurrentAppButton.IsEnabled}" Content="{Binding NotificationProvider.CurrentAppButton.Text}" Visibility="{Binding NotificationProvider.CurrentAppButton,Converter={StaticResource IsNullToVisibilityConverter}}"></touch:TouchButton>
- </StackPanel>
- </Grid>
- <Grid>
+ </touch:TouchHamburgerButton>
+ </Border>
+ <Grid DockPanel.Dock="Right" Margin="0 0 20 0">
+ <StackPanel Orientation="Horizontal">
+ <StackPanel x:Name="techPressElement" VerticalAlignment="Center" Background="Transparent">
+ <touch:TouchGifAnimation Width="36" HorizontalAlignment="Center" EnableAnimation="True">
+ <touch:TouchGifAnimation.Style>
+ <Style TargetType="touch:TouchGifAnimation">
+ <Setter Property="Source" Value="/Images/GlobalStatus/standby.png"></Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding MachineProvider.MachineOperator.Status}" Value="{x:Static operations:MachineStatuses.Disconnected}">
+ <Setter Property="Source" Value="/Images/GlobalStatus/machine_off_Anim.gif"></Setter>
+ </DataTrigger>
+ <DataTrigger Binding="{Binding MachineProvider.MachineOperator.Status}" Value="{x:Static operations:MachineStatuses.Standby}">
+ <Setter Property="Source" Value="/Images/GlobalStatus/standby_Anim.gif"></Setter>
+ </DataTrigger>
+ <DataTrigger Binding="{Binding MachineProvider.MachineOperator.Status}" Value="{x:Static operations:MachineStatuses.ReadyToDye}">
+ <Setter Property="Source" Value="/Images/GlobalStatus/Ready_Anim.gif"></Setter>
+ </DataTrigger>
+ <DataTrigger Binding="{Binding MachineProvider.MachineOperator.Status}" Value="{x:Static operations:MachineStatuses.GettingReady}">
+ <Setter Property="Source" Value="/Images/GlobalStatus/getting_ready_Anim.gif"></Setter>
+ </DataTrigger>
+ <DataTrigger Binding="{Binding MachineProvider.MachineOperator.Status}" Value="{x:Static operations:MachineStatuses.Printing}">
+ <Setter Property="Source" Value="/Images/GlobalStatus/dyeing_Anim.gif"></Setter>
+ </DataTrigger>
+ <DataTrigger Binding="{Binding MachineProvider.MachineOperator.Status}" Value="{x:Static operations:MachineStatuses.ShuttingDown}">
+ <Setter Property="Source" Value="/Images/GlobalStatus/shutdown_icon_Anim.gif"></Setter>
+ </DataTrigger>
+ <DataTrigger Binding="{Binding MachineProvider.MachineOperator.Status}" Value="{x:Static operations:MachineStatuses.Error}">
+ <Setter Property="Source" Value="/Images/GlobalStatus/error_Anim.gif"></Setter>
+ </DataTrigger>
+ <DataTrigger Binding="{Binding MachineProvider.MachineOperator.Status}" Value="{x:Static operations:MachineStatuses.Service}">
+ <Setter Property="Source" Value="/Images/GlobalStatus/service_Anim.gif"></Setter>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </touch:TouchGifAnimation.Style>
+ </touch:TouchGifAnimation>
+ <TextBlock Margin="0 10 0 0" Text="{Binding MachineProvider.MachineOperator.Status,Converter={StaticResource EnumToDescriptionConverter}}"></TextBlock>
+ </StackPanel>
- <Grid Margin="20 0 60 0" Height="80" Visibility="{Binding NotificationProvider.HasAppBarItem,Converter={StaticResource BooleanToVisibilityConverter}}">
- <ContentControl Content="{Binding NotificationProvider.CurrentAppBarItem,Converter={StaticResource AppBarItemConverter}}"></ContentControl>
+ <touch:TouchButton Margin="40 0 0 0" Height="65" Padding="50 0" MinWidth="200" CornerRadius="35" BlurRadius="20" Command="{Binding NotificationProvider.CurrentAppButton.Command}" IsEnabled="{Binding NotificationProvider.CurrentAppButton.IsEnabled}" Content="{Binding NotificationProvider.CurrentAppButton.Text}" Visibility="{Binding NotificationProvider.CurrentAppButton,Converter={StaticResource IsNullToVisibilityConverter}}"></touch:TouchButton>
+ </StackPanel>
</Grid>
+ <Grid>
- <!--External Header Content Here-->
- <!--<commonControls:AsyncAdornerControl>
+ <Grid Margin="20 0 60 0" Height="80" Visibility="{Binding NotificationProvider.HasAppBarItem,Converter={StaticResource BooleanToVisibilityConverter}}">
+ <ContentControl Content="{Binding NotificationProvider.CurrentAppBarItem,Converter={StaticResource AppBarItemConverter}}"></ContentControl>
+ </Grid>
+
+ <!--External Header Content Here-->
+ <!--<commonControls:AsyncAdornerControl>
<commonControls:AsyncAdornerControl.Style>
<Style TargetType="commonControls:AsyncAdornerControl">
<Setter Property="Visibility" Value="Hidden"></Setter>
@@ -295,17 +321,17 @@
<touch:TouchGifAnimation Source="/Images/preloader_rectangles.gif" EnableAnimation="{Binding NotificationProvider.IsInGlobalBusyState}" />
</StackPanel>
</commonControls:AsyncAdornerControl>-->
- </Grid>
- </DockPanel>
- </Border>
-
- <Grid Background="{StaticResource TangoKeyboardBackground}">
- <controls:NavigationControl x:Name="NavigationControl" x:FieldModifier="public" TransitionAlwaysFades="False" TransitionType="Zoom" KeepElementsAttached="False" UseDefferedRendering="True">
- <!--MODULES GOES HERE-->
- </controls:NavigationControl>
- </Grid>
+ </Grid>
+ </DockPanel>
+ </Border>
- </DockPanel>
+ <Grid Background="{StaticResource TangoKeyboardBackground}">
+ <controls:NavigationControl x:Name="NavigationControl" x:FieldModifier="public" TransitionAlwaysFades="False" TransitionType="Zoom" KeepElementsAttached="False" UseDefferedRendering="True">
+ <!--MODULES GOES HERE-->
+ </controls:NavigationControl>
+ </Grid>
+ </DockPanel>
+ </touch:TouchNotificationBar>
</touch:TouchSideMenu>
<Grid PreviewMouseUp="Grid_PreviewMouseUp" IsHitTestVisible="True" Background="Transparent" Visibility="{Binding ApplicationManager.IsScreenLocked,Converter={StaticResource BooleanToVisibilityConverter}}">
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MainView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MainView.xaml
index 0ee8058c0..6d6d57526 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MainView.xaml
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MainView.xaml
@@ -23,25 +23,10 @@
<touch:TouchPanel
HasMessageBox="{Binding NotificationProvider.HasMessageBox}"
CurrentMessageBox="{Binding NotificationProvider.CurrentMessageBox}"
- HasNotifications="{Binding NotificationProvider.HasNotificationItems}"
- Notifications="{Binding NotificationProvider.NotificationItems}"
- ItemExpandedPropertyPath="IsExpanded"
HasDialog="{Binding NotificationProvider.HasDialog}"
CurrentDialog="{Binding NotificationProvider.CurrentDialog}"
- NotificationBarVisibility="{Binding NotificationProvider.NotificationsVisible,Converter={StaticResource BooleanToVisibilityConverter}}"
IsBusy="{Binding NotificationProvider.IsInGlobalBusyState}"
BusyMessage="{Binding NotificationProvider.GlobalBusyMessage}">
- <touch:TouchPanel.NotificationTemplate>
- <DataTemplate>
- <touch:TouchButton Style="{StaticResource TangoFlatButton}" Padding="0" Command="{Binding PressedCommand}" components:TransformationHelper.TransformWhenPressed="False">
- <Grid>
- <ContentControl Content="{Binding Converter={StaticResource ItemBaseConverter}}"/>
- <touch:TouchIconButton Visibility="{Binding CanClose,Converter={StaticResource BooleanToVisibilityConverter}}" DockPanel.Dock="Right" Background="Transparent" Padding="35" Style="{StaticResource TangoRoundTouchIconButton}" Command="{Binding CloseCommand}" CommandParameter="{Binding}" HorizontalAlignment="Right" MaxHeight="90" Width="{Binding RelativeSource={RelativeSource Self},Path=ActualHeight}" Icon="Close" Foreground="{StaticResource TangoDarkForegroundBrush}" />
- </Grid>
- </touch:TouchButton>
- </DataTemplate>
- </touch:TouchPanel.NotificationTemplate>
-
<touch:TouchPanel.TaskBarElement>
<Border DockPanel.Dock="Top" Background="Black" Padding="5">
<DockPanel>
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest b/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest
index d72e75011..efc5f8179 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest
@@ -16,7 +16,7 @@
Remove this element if your application requires this virtualization for backwards
compatibility.
-->
- <requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
+ <!--<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />-->
</requestedPrivileges>
</security>
</trustInfo>
diff --git a/Software/Visual_Studio/Tango.BL/DTO/MachineDTOBase.cs b/Software/Visual_Studio/Tango.BL/DTO/MachineDTOBase.cs
index 95a95098c..e3adf4e0f 100644
--- a/Software/Visual_Studio/Tango.BL/DTO/MachineDTOBase.cs
+++ b/Software/Visual_Studio/Tango.BL/DTO/MachineDTOBase.cs
@@ -206,6 +206,14 @@ namespace Tango.BL.DTO
}
/// <summary>
+ /// force version update
+ /// </summary>
+ public Boolean ForceVersionUpdate
+ {
+ get; set;
+ }
+
+ /// <summary>
/// perform schema update on data update
/// </summary>
public Boolean PerformSchemaUpdateOnDataUpdate
@@ -221,5 +229,29 @@ namespace Tango.BL.DTO
get; set;
}
+ /// <summary>
+ /// is device registered
+ /// </summary>
+ public Boolean IsDeviceRegistered
+ {
+ get; set;
+ }
+
+ /// <summary>
+ /// device id
+ /// </summary>
+ public String DeviceId
+ {
+ get; set;
+ }
+
+ /// <summary>
+ /// device name
+ /// </summary>
+ public String DeviceName
+ {
+ get; set;
+ }
+
}
}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/MachineBase.cs b/Software/Visual_Studio/Tango.BL/Entities/MachineBase.cs
index 6c59e43ba..4f989aeb2 100644
--- a/Software/Visual_Studio/Tango.BL/Entities/MachineBase.cs
+++ b/Software/Visual_Studio/Tango.BL/Entities/MachineBase.cs
@@ -58,10 +58,18 @@ namespace Tango.BL.Entities
public event EventHandler<Boolean> SuspendVersionUpdateChanged;
+ public event EventHandler<Boolean> ForceVersionUpdateChanged;
+
public event EventHandler<Boolean> PerformSchemaUpdateOnDataUpdateChanged;
public event EventHandler<String> DeviceComPortChanged;
+ public event EventHandler<Boolean> IsDeviceRegisteredChanged;
+
+ public event EventHandler<String> DeviceIdChanged;
+
+ public event EventHandler<String> DeviceNameChanged;
+
public event EventHandler<SynchronizedObservableCollection<Cat>> CatsChanged;
public event EventHandler<ColorSpace> DefaultColorSpaceChanged;
@@ -695,6 +703,33 @@ namespace Tango.BL.Entities
}
}
+ protected Boolean _forceversionupdate;
+
+ /// <summary>
+ /// Gets or sets the machinebase force version update.
+ /// </summary>
+
+ [Column("FORCE_VERSION_UPDATE")]
+
+ public Boolean ForceVersionUpdate
+ {
+ get
+ {
+ return _forceversionupdate;
+ }
+
+ set
+ {
+ if (_forceversionupdate != value)
+ {
+ _forceversionupdate = value;
+
+ OnForceVersionUpdateChanged(value);
+
+ }
+ }
+ }
+
protected Boolean _performschemaupdateondataupdate;
/// <summary>
@@ -749,6 +784,87 @@ namespace Tango.BL.Entities
}
}
+ protected Boolean _isdeviceregistered;
+
+ /// <summary>
+ /// Gets or sets the machinebase is device registered.
+ /// </summary>
+
+ [Column("IS_DEVICE_REGISTERED")]
+
+ public Boolean IsDeviceRegistered
+ {
+ get
+ {
+ return _isdeviceregistered;
+ }
+
+ set
+ {
+ if (_isdeviceregistered != value)
+ {
+ _isdeviceregistered = value;
+
+ OnIsDeviceRegisteredChanged(value);
+
+ }
+ }
+ }
+
+ protected String _deviceid;
+
+ /// <summary>
+ /// Gets or sets the machinebase device id.
+ /// </summary>
+
+ [Column("DEVICE_ID")]
+
+ public String DeviceId
+ {
+ get
+ {
+ return _deviceid;
+ }
+
+ set
+ {
+ if (_deviceid != value)
+ {
+ _deviceid = value;
+
+ OnDeviceIdChanged(value);
+
+ }
+ }
+ }
+
+ protected String _devicename;
+
+ /// <summary>
+ /// Gets or sets the machinebase device name.
+ /// </summary>
+
+ [Column("DEVICE_NAME")]
+
+ public String DeviceName
+ {
+ get
+ {
+ return _devicename;
+ }
+
+ set
+ {
+ if (_devicename != value)
+ {
+ _devicename = value;
+
+ OnDeviceNameChanged(value);
+
+ }
+ }
+ }
+
protected SynchronizedObservableCollection<Cat> _cats;
/// <summary>
@@ -1186,6 +1302,15 @@ namespace Tango.BL.Entities
}
/// <summary>
+ /// Called when the ForceVersionUpdate has changed.
+ /// </summary>
+ protected virtual void OnForceVersionUpdateChanged(Boolean forceversionupdate)
+ {
+ ForceVersionUpdateChanged?.Invoke(this, forceversionupdate);
+ RaisePropertyChanged(nameof(ForceVersionUpdate));
+ }
+
+ /// <summary>
/// Called when the PerformSchemaUpdateOnDataUpdate has changed.
/// </summary>
protected virtual void OnPerformSchemaUpdateOnDataUpdateChanged(Boolean performschemaupdateondataupdate)
@@ -1204,6 +1329,33 @@ namespace Tango.BL.Entities
}
/// <summary>
+ /// Called when the IsDeviceRegistered has changed.
+ /// </summary>
+ protected virtual void OnIsDeviceRegisteredChanged(Boolean isdeviceregistered)
+ {
+ IsDeviceRegisteredChanged?.Invoke(this, isdeviceregistered);
+ RaisePropertyChanged(nameof(IsDeviceRegistered));
+ }
+
+ /// <summary>
+ /// Called when the DeviceId has changed.
+ /// </summary>
+ protected virtual void OnDeviceIdChanged(String deviceid)
+ {
+ DeviceIdChanged?.Invoke(this, deviceid);
+ RaisePropertyChanged(nameof(DeviceId));
+ }
+
+ /// <summary>
+ /// Called when the DeviceName has changed.
+ /// </summary>
+ protected virtual void OnDeviceNameChanged(String devicename)
+ {
+ DeviceNameChanged?.Invoke(this, devicename);
+ RaisePropertyChanged(nameof(DeviceName));
+ }
+
+ /// <summary>
/// Called when the Cats has changed.
/// </summary>
protected virtual void OnCatsChanged(SynchronizedObservableCollection<Cat> cats)
diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/MACHINE.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/MACHINE.cs
index ac820fd27..9e83e7e4d 100644
--- a/Software/Visual_Studio/Tango.DAL.Remote/DB/MACHINE.cs
+++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/MACHINE.cs
@@ -49,8 +49,12 @@ namespace Tango.DAL.Remote.DB
public bool SETUP_FPGA { get; set; }
public bool IS_DEMO { get; set; }
public bool SUSPEND_VERSION_UPDATE { get; set; }
+ public bool FORCE_VERSION_UPDATE { get; set; }
public bool PERFORM_SCHEMA_UPDATE_ON_DATA_UPDATE { get; set; }
public string DEVICE_COM_PORT { get; set; }
+ public bool IS_DEVICE_REGISTERED { get; set; }
+ public string DEVICE_ID { get; set; }
+ public string DEVICE_NAME { get; set; }
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
public virtual ICollection<CAT> CATS { get; set; }
diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx
index f641e3185..59eaba8d0 100644
--- a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx
+++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx
@@ -724,8 +724,12 @@
<Property Name="SETUP_FPGA" Type="bit" Nullable="false" />
<Property Name="IS_DEMO" Type="bit" Nullable="false" />
<Property Name="SUSPEND_VERSION_UPDATE" Type="bit" Nullable="false" />
+ <Property Name="FORCE_VERSION_UPDATE" Type="bit" Nullable="false" />
<Property Name="PERFORM_SCHEMA_UPDATE_ON_DATA_UPDATE" Type="bit" Nullable="false" />
<Property Name="DEVICE_COM_PORT" Type="nchar" MaxLength="5" />
+ <Property Name="IS_DEVICE_REGISTERED" Type="bit" Nullable="false" />
+ <Property Name="DEVICE_ID" Type="nvarchar(max)" />
+ <Property Name="DEVICE_NAME" Type="nvarchar" MaxLength="200" />
</EntityType>
<EntityType Name="MACHINES_EVENTS">
<Key>
@@ -3793,8 +3797,12 @@
<Property Name="SETUP_FPGA" Type="Boolean" Nullable="false" />
<Property Name="IS_DEMO" Type="Boolean" Nullable="false" />
<Property Name="SUSPEND_VERSION_UPDATE" Type="Boolean" Nullable="false" />
+ <Property Name="FORCE_VERSION_UPDATE" Type="Boolean" Nullable="false" />
<Property Name="PERFORM_SCHEMA_UPDATE_ON_DATA_UPDATE" Type="Boolean" Nullable="false" />
<Property Name="DEVICE_COM_PORT" Type="String" MaxLength="5" FixedLength="true" Unicode="true" />
+ <Property Name="IS_DEVICE_REGISTERED" Type="Boolean" Nullable="false" />
+ <Property Name="DEVICE_ID" Type="String" MaxLength="Max" FixedLength="false" Unicode="true" />
+ <Property Name="DEVICE_NAME" Type="String" MaxLength="200" FixedLength="false" Unicode="true" />
<NavigationProperty Name="CATS" Relationship="RemoteModel.FK_CATS_MACHINES" FromRole="MACHINE" ToRole="CAT" />
<NavigationProperty Name="COLOR_SPACES" Relationship="RemoteModel.FK_MACHINES_COLOR_SPACES" FromRole="MACHINE" ToRole="COLOR_SPACES" />
<NavigationProperty Name="CONFIGURATION" Relationship="RemoteModel.FK_MACHINES_CONFIGURATIONS" FromRole="MACHINE" ToRole="CONFIGURATION" />
@@ -6030,8 +6038,12 @@
<EntitySetMapping Name="MACHINES">
<EntityTypeMapping TypeName="RemoteModel.MACHINE">
<MappingFragment StoreEntitySet="MACHINES">
+ <ScalarProperty Name="DEVICE_NAME" ColumnName="DEVICE_NAME" />
+ <ScalarProperty Name="DEVICE_ID" ColumnName="DEVICE_ID" />
+ <ScalarProperty Name="IS_DEVICE_REGISTERED" ColumnName="IS_DEVICE_REGISTERED" />
<ScalarProperty Name="DEVICE_COM_PORT" ColumnName="DEVICE_COM_PORT" />
<ScalarProperty Name="PERFORM_SCHEMA_UPDATE_ON_DATA_UPDATE" ColumnName="PERFORM_SCHEMA_UPDATE_ON_DATA_UPDATE" />
+ <ScalarProperty Name="FORCE_VERSION_UPDATE" ColumnName="FORCE_VERSION_UPDATE" />
<ScalarProperty Name="SUSPEND_VERSION_UPDATE" ColumnName="SUSPEND_VERSION_UPDATE" />
<ScalarProperty Name="IS_DEMO" ColumnName="IS_DEMO" />
<ScalarProperty Name="SETUP_FPGA" ColumnName="SETUP_FPGA" />
diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx.diagram b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx.diagram
index 422102d3d..842c5b9a6 100644
--- a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx.diagram
+++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx.diagram
@@ -5,79 +5,79 @@
<!-- Diagram content (shape and connector positions) -->
<edmx:Diagrams>
<Diagram DiagramId="f9ae01d708754bbd997add25a4bacc79" Name="Diagram1">
- <EntityTypeShape EntityType="RemoteModel.ADDRESS" Width="1.5" PointX="6.75" PointY="38.5" />
- <EntityTypeShape EntityType="RemoteModel.APPLICATION_DISPLAY_PANEL_VERSIONS" Width="1.5" PointX="6.75" PointY="49.75" />
- <EntityTypeShape EntityType="RemoteModel.APPLICATION_FIRMWARE_VERSIONS" Width="1.5" PointX="6.75" PointY="42.625" />
- <EntityTypeShape EntityType="RemoteModel.APPLICATION_OS_VERSIONS" Width="1.5" PointX="6.75" PointY="52.75" />
- <EntityTypeShape EntityType="RemoteModel.BRUSH_STOPS" Width="1.5" PointX="19" PointY="14.5" />
- <EntityTypeShape EntityType="RemoteModel.CARTRIDGE_TYPES" Width="1.5" PointX="16.25" PointY="35.75" />
- <EntityTypeShape EntityType="RemoteModel.CAT" Width="1.5" PointX="16.5" PointY="21.125" />
- <EntityTypeShape EntityType="RemoteModel.CCT" Width="1.5" PointX="0.75" PointY="21.375" />
- <EntityTypeShape EntityType="RemoteModel.COLOR_CATALOGS" Width="1.5" PointX="1.5" PointY="4" />
- <EntityTypeShape EntityType="RemoteModel.COLOR_CATALOGS_GROUPS" Width="1.5" PointX="0.75" PointY="9.375" />
- <EntityTypeShape EntityType="RemoteModel.COLOR_CATALOGS_ITEMS" Width="1.5" PointX="3" PointY="8.125" />
- <EntityTypeShape EntityType="RemoteModel.COLOR_CATALOGS_ITEMS_RECIPES" Width="1.5" PointX="5.25" PointY="21" />
- <EntityTypeShape EntityType="RemoteModel.COLOR_SPACES" Width="1.5" PointX="9" PointY="9.625" />
- <EntityTypeShape EntityType="RemoteModel.CONFIGURATION" Width="1.5" PointX="9" PointY="48.125" />
- <EntityTypeShape EntityType="RemoteModel.CONTACT" Width="1.5" PointX="6.75" PointY="34.625" />
- <EntityTypeShape EntityType="RemoteModel.CUSTOMER" Width="1.5" PointX="11.25" PointY="33.625" />
- <EntityTypeShape EntityType="RemoteModel.DISPENSER_TYPES" Width="1.5" PointX="14" PointY="56.375" />
- <EntityTypeShape EntityType="RemoteModel.DISPENSER" Width="1.5" PointX="16.25" PointY="55.75" />
- <EntityTypeShape EntityType="RemoteModel.EMBEDDED_FIRMWARE_VERSIONS" Width="1.5" PointX="6.75" PointY="55.625" />
- <EntityTypeShape EntityType="RemoteModel.EVENT_TYPES" Width="1.5" PointX="16.25" PointY="30.625" />
- <EntityTypeShape EntityType="RemoteModel.FIBER_SHAPES" Width="1.5" PointX="0.75" PointY="17.25" />
- <EntityTypeShape EntityType="RemoteModel.FIBER_SYNTHS" Width="1.5" PointX="0.75" PointY="28" />
- <EntityTypeShape EntityType="RemoteModel.HARDWARE_BLOWER_TYPES" Width="1.5" PointX="9.75" PointY="63.125" />
- <EntityTypeShape EntityType="RemoteModel.HARDWARE_BLOWERS" Width="1.5" PointX="12" PointY="45.75" />
- <EntityTypeShape EntityType="RemoteModel.HARDWARE_BREAK_SENSOR_TYPES" Width="1.5" PointX="6.75" PointY="59.125" />
- <EntityTypeShape EntityType="RemoteModel.HARDWARE_BREAK_SENSORS" Width="1.5" PointX="9" PointY="43.75" />
- <EntityTypeShape EntityType="RemoteModel.HARDWARE_DANCER_TYPES" Width="1.5" PointX="6.75" PointY="63.125" />
- <EntityTypeShape EntityType="RemoteModel.HARDWARE_DANCERS" Width="1.5" PointX="9" PointY="53" />
- <EntityTypeShape EntityType="RemoteModel.HARDWARE_MOTOR_TYPES" Width="1.5" PointX="12.75" PointY="38" />
- <EntityTypeShape EntityType="RemoteModel.HARDWARE_MOTORS" Width="1.5" PointX="15" PointY="42.75" />
- <EntityTypeShape EntityType="RemoteModel.HARDWARE_PID_CONTROL_TYPES" Width="1.5" PointX="15.75" PointY="39.125" />
- <EntityTypeShape EntityType="RemoteModel.HARDWARE_PID_CONTROLS" Width="1.5" PointX="18" PointY="44.125" />
- <EntityTypeShape EntityType="RemoteModel.HARDWARE_SPEED_SENSOR_TYPES" Width="1.5" PointX="9.75" PointY="67.125" />
- <EntityTypeShape EntityType="RemoteModel.HARDWARE_SPEED_SENSORS" Width="1.5" PointX="12" PointY="49.75" />
- <EntityTypeShape EntityType="RemoteModel.HARDWARE_VERSIONS" Width="1.5" PointX="6.75" PointY="45.5" />
- <EntityTypeShape EntityType="RemoteModel.HARDWARE_WINDER_TYPES" Width="1.5" PointX="9.75" PointY="59.125" />
- <EntityTypeShape EntityType="RemoteModel.HARDWARE_WINDERS" Width="1.5" PointX="12" PointY="41.875" />
- <EntityTypeShape EntityType="RemoteModel.IDS_PACK_FORMULAS" Width="1.5" PointX="16.25" PointY="13.375" />
- <EntityTypeShape EntityType="RemoteModel.IDS_PACKS" Width="1.5" PointX="18.5" PointY="29.75" />
- <EntityTypeShape EntityType="RemoteModel.JOB_RUNS" Width="1.5" PointX="15.75" PointY="26" />
- <EntityTypeShape EntityType="RemoteModel.JOB" Width="1.5" PointX="13.5" PointY="17.75" />
- <EntityTypeShape EntityType="RemoteModel.LINEAR_MASS_DENSITY_UNITS" Width="1.5" PointX="0.75" PointY="33.875" />
- <EntityTypeShape EntityType="RemoteModel.LIQUID_TYPES" Width="1.5" PointX="14.25" PointY="3.5" />
- <EntityTypeShape EntityType="RemoteModel.LIQUID_TYPES_RMLS" Width="1.5" PointX="8.25" PointY="21.25" />
- <EntityTypeShape EntityType="RemoteModel.MACHINE_STUDIO_VERSIONS" Width="1.5" PointX="13.5" PointY="29.25" />
- <EntityTypeShape EntityType="RemoteModel.MACHINE_VERSIONS" Width="1.5" PointX="9" PointY="13.25" />
+ <EntityTypeShape EntityType="RemoteModel.ADDRESS" Width="1.5" PointX="6.75" PointY="6" />
+ <EntityTypeShape EntityType="RemoteModel.APPLICATION_DISPLAY_PANEL_VERSIONS" Width="1.5" PointX="6.75" PointY="39.375" />
+ <EntityTypeShape EntityType="RemoteModel.APPLICATION_FIRMWARE_VERSIONS" Width="1.5" PointX="6.75" PointY="36.375" />
+ <EntityTypeShape EntityType="RemoteModel.APPLICATION_OS_VERSIONS" Width="1.5" PointX="6.75" PointY="33.5" />
+ <EntityTypeShape EntityType="RemoteModel.BRUSH_STOPS" Width="1.5" PointX="19" PointY="22.625" />
+ <EntityTypeShape EntityType="RemoteModel.CARTRIDGE_TYPES" Width="1.5" PointX="19.25" PointY="13.5" />
+ <EntityTypeShape EntityType="RemoteModel.CAT" Width="1.5" PointX="16.5" PointY="21.5" />
+ <EntityTypeShape EntityType="RemoteModel.CCT" Width="1.5" PointX="0.75" PointY="34.125" />
+ <EntityTypeShape EntityType="RemoteModel.COLOR_CATALOGS" Width="1.5" PointX="1.5" PointY="4.375" />
+ <EntityTypeShape EntityType="RemoteModel.COLOR_CATALOGS_GROUPS" Width="1.5" PointX="0.75" PointY="9.75" />
+ <EntityTypeShape EntityType="RemoteModel.COLOR_CATALOGS_ITEMS" Width="1.5" PointX="3" PointY="8.5" />
+ <EntityTypeShape EntityType="RemoteModel.COLOR_CATALOGS_ITEMS_RECIPES" Width="1.5" PointX="5.25" PointY="21.375" />
+ <EntityTypeShape EntityType="RemoteModel.COLOR_SPACES" Width="1.5" PointX="9" PointY="37.25" />
+ <EntityTypeShape EntityType="RemoteModel.CONFIGURATION" Width="1.5" PointX="9" PointY="31.875" />
+ <EntityTypeShape EntityType="RemoteModel.CONTACT" Width="1.5" PointX="6.75" PointY="10" />
+ <EntityTypeShape EntityType="RemoteModel.CUSTOMER" Width="1.5" PointX="11.25" PointY="34.125" />
+ <EntityTypeShape EntityType="RemoteModel.DISPENSER_TYPES" Width="1.5" PointX="17" PointY="7" />
+ <EntityTypeShape EntityType="RemoteModel.DISPENSER" Width="1.5" PointX="19.25" PointY="6.375" />
+ <EntityTypeShape EntityType="RemoteModel.EMBEDDED_FIRMWARE_VERSIONS" Width="1.5" PointX="6.75" PointY="26.25" />
+ <EntityTypeShape EntityType="RemoteModel.EVENT_TYPES" Width="1.5" PointX="16.25" PointY="11" />
+ <EntityTypeShape EntityType="RemoteModel.FIBER_SHAPES" Width="1.5" PointX="0.75" PointY="14.5" />
+ <EntityTypeShape EntityType="RemoteModel.FIBER_SYNTHS" Width="1.5" PointX="0.75" PointY="22" />
+ <EntityTypeShape EntityType="RemoteModel.HARDWARE_BLOWER_TYPES" Width="1.5" PointX="6.75" PointY="17.75" />
+ <EntityTypeShape EntityType="RemoteModel.HARDWARE_BLOWERS" Width="1.5" PointX="9" PointY="27.375" />
+ <EntityTypeShape EntityType="RemoteModel.HARDWARE_BREAK_SENSOR_TYPES" Width="1.5" PointX="11.75" PointY="43.75" />
+ <EntityTypeShape EntityType="RemoteModel.HARDWARE_BREAK_SENSORS" Width="1.5" PointX="14" PointY="29.5" />
+ <EntityTypeShape EntityType="RemoteModel.HARDWARE_DANCER_TYPES" Width="1.5" PointX="9.75" PointY="51.75" />
+ <EntityTypeShape EntityType="RemoteModel.HARDWARE_DANCERS" Width="1.5" PointX="12" PointY="37.75" />
+ <EntityTypeShape EntityType="RemoteModel.HARDWARE_MOTOR_TYPES" Width="1.5" PointX="14.75" PointY="37.75" />
+ <EntityTypeShape EntityType="RemoteModel.HARDWARE_MOTORS" Width="1.5" PointX="17" PointY="32.5" />
+ <EntityTypeShape EntityType="RemoteModel.HARDWARE_PID_CONTROL_TYPES" Width="1.5" PointX="17.75" PointY="51.75" />
+ <EntityTypeShape EntityType="RemoteModel.HARDWARE_PID_CONTROLS" Width="1.5" PointX="20" PointY="36.875" />
+ <EntityTypeShape EntityType="RemoteModel.HARDWARE_SPEED_SENSOR_TYPES" Width="1.5" PointX="17.75" PointY="47.75" />
+ <EntityTypeShape EntityType="RemoteModel.HARDWARE_SPEED_SENSORS" Width="1.5" PointX="20" PointY="32.5" />
+ <EntityTypeShape EntityType="RemoteModel.HARDWARE_VERSIONS" Width="1.5" PointX="6.75" PointY="29.25" />
+ <EntityTypeShape EntityType="RemoteModel.HARDWARE_WINDER_TYPES" Width="1.5" PointX="11.75" PointY="47.75" />
+ <EntityTypeShape EntityType="RemoteModel.HARDWARE_WINDERS" Width="1.5" PointX="14" PointY="33.625" />
+ <EntityTypeShape EntityType="RemoteModel.IDS_PACK_FORMULAS" Width="1.5" PointX="19.25" PointY="2.75" />
+ <EntityTypeShape EntityType="RemoteModel.IDS_PACKS" Width="1.5" PointX="21.5" PointY="17.75" />
+ <EntityTypeShape EntityType="RemoteModel.JOB_RUNS" Width="1.5" PointX="15.75" PointY="16.875" />
+ <EntityTypeShape EntityType="RemoteModel.JOB" Width="1.5" PointX="13.5" PointY="18.125" />
+ <EntityTypeShape EntityType="RemoteModel.LINEAR_MASS_DENSITY_UNITS" Width="1.5" PointX="0.75" PointY="25.375" />
+ <EntityTypeShape EntityType="RemoteModel.LIQUID_TYPES" Width="1.5" PointX="14.25" PointY="3.875" />
+ <EntityTypeShape EntityType="RemoteModel.LIQUID_TYPES_RMLS" Width="1.5" PointX="8.25" PointY="21.75" />
+ <EntityTypeShape EntityType="RemoteModel.MACHINE_STUDIO_VERSIONS" Width="1.5" PointX="13.5" PointY="51.75" />
+ <EntityTypeShape EntityType="RemoteModel.MACHINE_VERSIONS" Width="1.5" PointX="9" PointY="13.875" />
<EntityTypeShape EntityType="RemoteModel.MACHINE" Width="1.5" PointX="11.25" PointY="18.5" />
- <EntityTypeShape EntityType="RemoteModel.MACHINES_EVENTS" Width="1.5" PointX="18.5" PointY="25" />
- <EntityTypeShape EntityType="RemoteModel.MEDIA_CONDITIONS" Width="1.5" PointX="0.75" PointY="25.125" />
- <EntityTypeShape EntityType="RemoteModel.MEDIA_MATERIALS" Width="1.5" PointX="0.75" PointY="14.25" />
- <EntityTypeShape EntityType="RemoteModel.MEDIA_PURPOSES" Width="1.5" PointX="0.75" PointY="31" />
- <EntityTypeShape EntityType="RemoteModel.MID_TANK_TYPES" Width="1.5" PointX="16.25" PointY="52.625" />
- <EntityTypeShape EntityType="RemoteModel.ORGANIZATION" Width="1.5" PointX="9" PointY="36.625" />
- <EntityTypeShape EntityType="RemoteModel.PERMISSION" Width="1.5" PointX="11.25" PointY="70.5" />
- <EntityTypeShape EntityType="RemoteModel.PROCESS_PARAMETERS_TABLES" Width="1.5" PointX="7.5" PointY="27.25" />
- <EntityTypeShape EntityType="RemoteModel.PROCESS_PARAMETERS_TABLES_GROUPS" Width="1.5" PointX="5.25" PointY="28.875" />
- <EntityTypeShape EntityType="RemoteModel.RML" Width="1.5" PointX="3" PointY="18.125" />
- <EntityTypeShape EntityType="RemoteModel.ROLE" Width="1.5" PointX="11.25" PointY="54.375" />
- <EntityTypeShape EntityType="RemoteModel.ROLES_PERMISSIONS" Width="1.5" PointX="13.5" PointY="59.5" />
- <EntityTypeShape EntityType="RemoteModel.SEGMENT" Width="1.5" PointX="15.75" PointY="17.5" />
- <EntityTypeShape EntityType="RemoteModel.SPOOL_TYPES" Width="1.5" PointX="9" PointY="5.5" />
- <EntityTypeShape EntityType="RemoteModel.SPOOL" Width="1.5" PointX="13.5" PointY="13.125" />
+ <EntityTypeShape EntityType="RemoteModel.MACHINES_EVENTS" Width="1.5" PointX="18.5" PointY="17.375" />
+ <EntityTypeShape EntityType="RemoteModel.MEDIA_CONDITIONS" Width="1.5" PointX="0.75" PointY="28.25" />
+ <EntityTypeShape EntityType="RemoteModel.MEDIA_MATERIALS" Width="1.5" PointX="0.75" PointY="31.25" />
+ <EntityTypeShape EntityType="RemoteModel.MEDIA_PURPOSES" Width="1.5" PointX="0.75" PointY="17.375" />
+ <EntityTypeShape EntityType="RemoteModel.MID_TANK_TYPES" Width="1.5" PointX="19.25" PointY="44" />
+ <EntityTypeShape EntityType="RemoteModel.ORGANIZATION" Width="1.5" PointX="9" PointY="8" />
+ <EntityTypeShape EntityType="RemoteModel.PERMISSION" Width="1.5" PointX="19.25" PointY="59.875" />
+ <EntityTypeShape EntityType="RemoteModel.PROCESS_PARAMETERS_TABLES" Width="1.5" PointX="7.5" PointY="52" />
+ <EntityTypeShape EntityType="RemoteModel.PROCESS_PARAMETERS_TABLES_GROUPS" Width="1.5" PointX="5.25" PointY="53.625" />
+ <EntityTypeShape EntityType="RemoteModel.RML" Width="1.5" PointX="3" PointY="18.5" />
+ <EntityTypeShape EntityType="RemoteModel.ROLE" Width="1.5" PointX="19.25" PointY="55.75" />
+ <EntityTypeShape EntityType="RemoteModel.ROLES_PERMISSIONS" Width="1.5" PointX="21.5" PointY="55.875" />
+ <EntityTypeShape EntityType="RemoteModel.SEGMENT" Width="1.5" PointX="15.75" PointY="25.5" />
+ <EntityTypeShape EntityType="RemoteModel.SPOOL_TYPES" Width="1.5" PointX="9" PointY="17.25" />
+ <EntityTypeShape EntityType="RemoteModel.SPOOL" Width="1.5" PointX="13.5" PointY="13.5" />
<EntityTypeShape EntityType="RemoteModel.sysdiagram" Width="1.5" PointX="0.75" PointY="0.75" />
- <EntityTypeShape EntityType="RemoteModel.TANGO_VERSIONS" Width="1.5" PointX="21.5" PointY="21.5" />
- <EntityTypeShape EntityType="RemoteModel.TECH_CONTROLLERS" Width="1.5" PointX="3.75" PointY="0.75" />
- <EntityTypeShape EntityType="RemoteModel.TECH_DISPENSERS" Width="1.5" PointX="3.75" PointY="4.75" />
- <EntityTypeShape EntityType="RemoteModel.TECH_HEATERS" Width="1.5" PointX="5.75" PointY="0.75" />
- <EntityTypeShape EntityType="RemoteModel.TECH_IOS" Width="1.5" PointX="5.75" PointY="3.75" />
- <EntityTypeShape EntityType="RemoteModel.TECH_MONITORS" Width="1.5" PointX="7.75" PointY="0.75" />
- <EntityTypeShape EntityType="RemoteModel.TECH_VALVES" Width="1.5" PointX="5.75" PointY="8.75" />
- <EntityTypeShape EntityType="RemoteModel.USER" Width="1.5" PointX="11.25" PointY="28.375" />
- <EntityTypeShape EntityType="RemoteModel.USERS_ROLES" Width="1.5" PointX="13.5" PointY="33.5" />
- <EntityTypeShape EntityType="RemoteModel.WINDING_METHODS" Width="1.5" PointX="11.25" PointY="15.25" />
+ <EntityTypeShape EntityType="RemoteModel.TANGO_VERSIONS" Width="1.5" PointX="21.5" PointY="23" />
+ <EntityTypeShape EntityType="RemoteModel.TECH_CONTROLLERS" Width="1.5" PointX="2.75" PointY="0.75" />
+ <EntityTypeShape EntityType="RemoteModel.TECH_DISPENSERS" Width="1.5" PointX="4.75" PointY="0.75" />
+ <EntityTypeShape EntityType="RemoteModel.TECH_HEATERS" Width="1.5" PointX="3.75" PointY="4.75" />
+ <EntityTypeShape EntityType="RemoteModel.TECH_IOS" Width="1.5" PointX="6.75" PointY="0.75" />
+ <EntityTypeShape EntityType="RemoteModel.TECH_MONITORS" Width="1.5" PointX="8.75" PointY="0.75" />
+ <EntityTypeShape EntityType="RemoteModel.TECH_VALVES" Width="1.5" PointX="10.75" PointY="0.75" />
+ <EntityTypeShape EntityType="RemoteModel.USER" Width="1.5" PointX="11.25" PointY="28.875" />
+ <EntityTypeShape EntityType="RemoteModel.USERS_ROLES" Width="1.5" PointX="21.5" PointY="28.875" />
+ <EntityTypeShape EntityType="RemoteModel.WINDING_METHODS" Width="1.5" PointX="11.25" PointY="14.75" />
<AssociationConnector Association="RemoteModel.FK_ORGANIZATIONS_ADDRESSES" />
<AssociationConnector Association="RemoteModel.FK_USERS_ADDRESSES" />
<AssociationConnector Association="RemoteModel.FK_CONFIGURATIONS_APPLICATION_DISPLAY_PANEL_VERSIONS" />
diff --git a/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs b/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs
index 64071a554..ad3b242f4 100644
--- a/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs
+++ b/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs
@@ -625,6 +625,8 @@ namespace Tango.Emulations.Emulators
private void HandleJobRequest(TangoMessage<JobRequest> request)
{
+ MachineStatus.State = MachineState.PreparingJob;
+
JobTicket job = request.Message.JobTicket;
_current_job_ticket = job;
_current_job_resume_token = null;
@@ -662,6 +664,8 @@ namespace Tango.Emulations.Emulators
Task.Factory.StartNew(() =>
{
+ MachineStatus.State = MachineState.RunningJob;
+
while (progress < length + job.ProcessParameters.DryerBufferLength * ProcessParametersTable.DRYER_METERS_PER_CYCLE && !_cancelJob)
{
var status = new PMR.Printing.JobStatus();
@@ -742,6 +746,8 @@ namespace Tango.Emulations.Emulators
}, _current_job_resume_token, !_cancelJob);
}
}
+
+ MachineStatus.State = MachineState.Ready;
});
}
diff --git a/Software/Visual_Studio/Tango.Emulations/ExternalBridge/EmulatorExternalBridge.cs b/Software/Visual_Studio/Tango.Emulations/ExternalBridge/EmulatorExternalBridge.cs
index 764e0d719..da428b6f7 100644
--- a/Software/Visual_Studio/Tango.Emulations/ExternalBridge/EmulatorExternalBridge.cs
+++ b/Software/Visual_Studio/Tango.Emulations/ExternalBridge/EmulatorExternalBridge.cs
@@ -53,22 +53,20 @@ namespace Tango.Emulations.ExternalBridge
/// Connects the transport component.
/// </summary>
/// <returns></returns>
- public override Task Connect()
+ public override async Task Connect()
{
- return Task.WhenAll(
- Emulator.Start(),
- base.Connect());
+ await Emulator.Start();
+ await base.Connect();
}
/// <summary>
/// Disconnects the machine operator and the underlying transporter.
/// </summary>
/// <returns></returns>
- public override Task Disconnect()
+ public override async Task Disconnect()
{
- return Task.WhenAll(
- base.Disconnect(),
- Emulator.Stop());
+ await base.Disconnect();
+ await Emulator.Stop();
}
/// <summary>
diff --git a/Software/Visual_Studio/Tango.Integration/ExternalBridge/ExternalBridgeService.cs b/Software/Visual_Studio/Tango.Integration/ExternalBridge/ExternalBridgeService.cs
index 524ce6f2d..2cd7af7aa 100644
--- a/Software/Visual_Studio/Tango.Integration/ExternalBridge/ExternalBridgeService.cs
+++ b/Software/Visual_Studio/Tango.Integration/ExternalBridge/ExternalBridgeService.cs
@@ -245,7 +245,7 @@ namespace Tango.Integration.ExternalBridge
private void MachineOperator_StatusChanged(object sender, MachineStatuses e)
{
- if (e == MachineStatuses.ReadyToDye)
+ if (e == MachineStatuses.ReadyToDye && _machineOperator.State == TransportComponentState.Connected)
{
if (IsInSession && _resend_diagnostics_and_debug)
{
diff --git a/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs b/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs
index fe4e230ec..e439c4ee9 100644
--- a/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs
+++ b/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs
@@ -774,8 +774,37 @@ namespace Tango.Integration.Operation
/// <param name="response">The response.</param>
protected virtual void OnMachineStatusChanged(StartMachineStatusUpdateResponse response)
{
+ bool changed = (MachineStatus == null || response.Status.State != MachineStatus.State);
+
MachineStatus = response.Status;
MachineStatusChanged?.Invoke(this, MachineStatus);
+
+ if (changed)
+ {
+ LogManager.Log($"Machine State Changed: {MachineStatus.State}.");
+
+ switch (MachineStatus.State)
+ {
+ case MachineState.Initializing:
+ Status = MachineStatuses.Service;
+ break;
+ //case MachineState.PreparingJob:
+ // Status = MachineStatuses.GettingReady;
+ // break;
+ case MachineState.Ready:
+ Status = MachineStatuses.ReadyToDye;
+ break;
+ //case MachineState.Sleep:
+ // Status = MachineStatuses.Standby;
+ // break;
+ case MachineState.PowerOff:
+ Status = MachineStatuses.ShuttingDown;
+ break;
+ case MachineState.Error:
+ Status = MachineStatuses.Error;
+ break;
+ }
+ }
}
/// <summary>
diff --git a/Software/Visual_Studio/Tango.Integration/Operation/MachineStatuses.cs b/Software/Visual_Studio/Tango.Integration/Operation/MachineStatuses.cs
index 059c1f859..14774f73a 100644
--- a/Software/Visual_Studio/Tango.Integration/Operation/MachineStatuses.cs
+++ b/Software/Visual_Studio/Tango.Integration/Operation/MachineStatuses.cs
@@ -23,6 +23,8 @@ namespace Tango.Integration.Operation
Service,
[Description("Upgrading")]
Upgrading,
+ [Description("Shutting Down")]
+ ShuttingDown,
[Description("Error")]
Error,
}
diff --git a/Software/Visual_Studio/Tango.Touch/Controls/TouchNotificationBar.cs b/Software/Visual_Studio/Tango.Touch/Controls/TouchNotificationBar.cs
index 9f18ec8d4..54154d71a 100644
--- a/Software/Visual_Studio/Tango.Touch/Controls/TouchNotificationBar.cs
+++ b/Software/Visual_Studio/Tango.Touch/Controls/TouchNotificationBar.cs
@@ -299,7 +299,6 @@ namespace Tango.Touch.Controls
{
_border_drag.EnsureHeight();
_border_notifications.EnsureHeight();
- _scrollViewer.ScrollToTop();
_border_notifications.StartDoubleAnimation(Border.HeightProperty, TimeSpan.FromSeconds(0.2), CurrentMinHeight, null, 1, null, () =>
{
@@ -333,6 +332,14 @@ namespace Tango.Touch.Controls
UpdateExpanded(false);
IsExpanded = false;
+
+ Task.Delay(400).ContinueWith((x) =>
+ {
+ Dispatcher.BeginInvoke(new Action(() =>
+ {
+ _scrollViewer.ScrollToTop();
+ }));
+ });
}
private void GridNotificationMouseUp(object sender, MouseOrTouchEventArgs e)
@@ -365,6 +372,8 @@ namespace Tango.Touch.Controls
CloseNotifications();
}
}
+
+ _scrollViewer.DisableScrolling = false;
}
}
@@ -433,6 +442,7 @@ namespace Tango.Touch.Controls
_last_mouse_y = _downLocation.Y;
_last_delta_measure_time = DateTime.Now;
_last_manipulation_delta = 0;
+ _scrollViewer.DisableScrolling = true;
_isMouseDown = true;
}
}
diff --git a/Software/Visual_Studio/Tango.Touch/Controls/TouchPanel.cs b/Software/Visual_Studio/Tango.Touch/Controls/TouchPanel.cs
index bb715abba..6aa92d15e 100644
--- a/Software/Visual_Studio/Tango.Touch/Controls/TouchPanel.cs
+++ b/Software/Visual_Studio/Tango.Touch/Controls/TouchPanel.cs
@@ -208,38 +208,6 @@ namespace Tango.Touch.Controls
public static readonly DependencyProperty CurrentDialogProperty =
DependencyProperty.Register("CurrentDialog", typeof(FrameworkElement), typeof(TouchPanel), new PropertyMetadata(null));
- public bool HasNotifications
- {
- get { return (bool)GetValue(HasNotificationsProperty); }
- set { SetValue(HasNotificationsProperty, value); }
- }
- public static readonly DependencyProperty HasNotificationsProperty =
- DependencyProperty.Register("HasNotifications", typeof(bool), typeof(TouchPanel), new PropertyMetadata(false));
-
- public IList Notifications
- {
- get { return (IList)GetValue(NotificationsProperty); }
- set { SetValue(NotificationsProperty, value); }
- }
- public static readonly DependencyProperty NotificationsProperty =
- DependencyProperty.Register("Notifications", typeof(IList), typeof(TouchPanel), new PropertyMetadata(null));
-
- public DataTemplate NotificationTemplate
- {
- get { return (DataTemplate)GetValue(NotificationTemplateProperty); }
- set { SetValue(NotificationTemplateProperty, value); }
- }
- public static readonly DependencyProperty NotificationTemplateProperty =
- DependencyProperty.Register("NotificationTemplate", typeof(DataTemplate), typeof(TouchPanel), new PropertyMetadata(null));
-
- public String ItemExpandedPropertyPath
- {
- get { return (String)GetValue(ItemExpandedPropertyPathProperty); }
- set { SetValue(ItemExpandedPropertyPathProperty, value); }
- }
- public static readonly DependencyProperty ItemExpandedPropertyPathProperty =
- DependencyProperty.Register("ItemExpandedPropertyPath", typeof(String), typeof(TouchPanel), new PropertyMetadata(null));
-
public FrameworkElement TaskBarElement
{
get { return (FrameworkElement)GetValue(TaskBarElementProperty); }
@@ -248,14 +216,6 @@ namespace Tango.Touch.Controls
public static readonly DependencyProperty TaskBarElementProperty =
DependencyProperty.Register("TaskBarElement", typeof(FrameworkElement), typeof(TouchPanel), new PropertyMetadata(null));
- public Visibility NotificationBarVisibility
- {
- get { return (Visibility)GetValue(NotificationBarVisibilityProperty); }
- set { SetValue(NotificationBarVisibilityProperty, value); }
- }
- public static readonly DependencyProperty NotificationBarVisibilityProperty =
- DependencyProperty.Register("NotificationBarVisibility", typeof(Visibility), typeof(TouchPanel), new PropertyMetadata(Visibility.Visible));
-
public bool IsBusy
{
get { return (bool)GetValue(IsBusyProperty); }
diff --git a/Software/Visual_Studio/Tango.Touch/Controls/TouchPanel.xaml b/Software/Visual_Studio/Tango.Touch/Controls/TouchPanel.xaml
index 1082bcf3b..2b35a5ede 100644
--- a/Software/Visual_Studio/Tango.Touch/Controls/TouchPanel.xaml
+++ b/Software/Visual_Studio/Tango.Touch/Controls/TouchPanel.xaml
@@ -35,12 +35,12 @@
<ContentControl DockPanel.Dock="Top" Content="{TemplateBinding TaskBarElement}"></ContentControl>
<!--Notification Bar-->
- <local:TouchNotificationBar NotificationBarVisibility="{TemplateBinding NotificationBarVisibility}" NotificationTemplate="{TemplateBinding NotificationTemplate}" HasNotifications="{TemplateBinding HasNotifications}" Notifications="{TemplateBinding Notifications}" ItemExpandedPropertyPath="{TemplateBinding ItemExpandedPropertyPath}">
+ <!--<local:TouchNotificationBar NotificationBarVisibility="{TemplateBinding NotificationBarVisibility}" NotificationTemplate="{TemplateBinding NotificationTemplate}" HasNotifications="{TemplateBinding HasNotifications}" Notifications="{TemplateBinding Notifications}" ItemExpandedPropertyPath="{TemplateBinding ItemExpandedPropertyPath}">-->
<Grid>
<!--Content-->
<ContentPresenter Content="{TemplateBinding Content}" />
</Grid>
- </local:TouchNotificationBar>
+ <!--</local:TouchNotificationBar>-->
</DockPanel>
<!--Combo Box PopUp-->
diff --git a/Software/Visual_Studio/Tango.Touch/Controls/TouchScrollViewer.cs b/Software/Visual_Studio/Tango.Touch/Controls/TouchScrollViewer.cs
index c88c11fb0..1a9201f0d 100644
--- a/Software/Visual_Studio/Tango.Touch/Controls/TouchScrollViewer.cs
+++ b/Software/Visual_Studio/Tango.Touch/Controls/TouchScrollViewer.cs
@@ -18,52 +18,11 @@ namespace Tango.Touch.Controls
{
public class TouchScrollViewer : ScrollViewer
{
- //private double _position;
- //private bool _fixed;
-
static TouchScrollViewer()
{
DefaultStyleKeyProperty.OverrideMetadata(typeof(TouchScrollViewer), new FrameworkPropertyMetadata(typeof(TouchScrollViewer)));
}
- //public TouchScrollViewer()
- //{
- // this.RegisterForPreviewMouseOrTouchDown((_, e) =>
- // {
- // if (e.OriginalSource.GetType() == typeof(DragThumb))
- // {
- // e.Handled = true;
- // return;
- // }
- // });
- //}
-
- //public void FixPosition()
- //{
- // _position = VerticalOffset;
- // _fixed = true;
- //}
-
- //public void ReleasePosition()
- //{
- // _fixed = false;
- //}
-
- //public TouchScrollViewer()
- //{
- // AddHandler(PreviewTouchUpEvent, new EventHandler<TouchEventArgs>(async (_, __) =>
- // {
- // await Task.Delay(250);
- // ReleasePosition();
- // }), true);
- //}
- //protected override void OnScrollChanged(ScrollChangedEventArgs e)
- //{
- // if (_fixed)
- // {
- // ScrollToVerticalOffset(_position);
- // }
- //}
}
}
diff --git a/Software/Visual_Studio/Tango.Touch/Controls/TouchScrollViewer.xaml b/Software/Visual_Studio/Tango.Touch/Controls/TouchScrollViewer.xaml
index 0036683e7..eda50f8d6 100644
--- a/Software/Visual_Studio/Tango.Touch/Controls/TouchScrollViewer.xaml
+++ b/Software/Visual_Studio/Tango.Touch/Controls/TouchScrollViewer.xaml
@@ -47,21 +47,20 @@
<Setter Property="HorizontalScrollBarVisibility" Value="Disabled"></Setter>
<Setter Property="PanningMode" Value="VerticalOnly"></Setter>
<Setter Property="VerticalScrollBarVisibility" Value="Visible"></Setter>
+ <Setter Property="Focusable" Value="False"></Setter>
+ <Setter Property="CanContentScroll" Value="true"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ScrollViewer}">
- <Grid x:Name="Grid" Background="{TemplateBinding Background}">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="*"/>
- </Grid.ColumnDefinitions>
+ <Grid>
<Grid.RowDefinitions>
- <RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
+ <RowDefinition Height="*"/>
</Grid.RowDefinitions>
- <Rectangle x:Name="Corner" Grid.Column="1" Fill="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" Grid.Row="1"/>
- <ScrollContentPresenter x:Name="PART_ScrollContentPresenter" CanContentScroll="{TemplateBinding CanContentScroll}" CanHorizontallyScroll="False" CanVerticallyScroll="False" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" Grid.Column="0" Margin="{TemplateBinding Padding}" Grid.Row="0"/>
- <ScrollBar Opacity="0" x:Name="PART_VerticalScrollBar" Style="{StaticResource TouchScrollBar}" HorizontalAlignment="Right" AutomationProperties.AutomationId="VerticalScrollBar" Cursor="Arrow" Grid.Column="1" Maximum="{TemplateBinding ScrollableHeight}" Minimum="0" Grid.Row="0" Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}" Value="{Binding VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" ViewportSize="{TemplateBinding ViewportHeight}"/>
- <ScrollBar x:Name="PART_HorizontalScrollBar" AutomationProperties.AutomationId="HorizontalScrollBar" Cursor="Arrow" Grid.Column="0" Maximum="{TemplateBinding ScrollableWidth}" Minimum="0" Orientation="Horizontal" Grid.Row="1" Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}" Value="{Binding HorizontalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" ViewportSize="{TemplateBinding ViewportWidth}"/>
+
+ <DataGridColumnHeadersPresenter x:Name="PART_ColumnHeadersPresenter" Visibility="{Binding HeadersVisibility, ConverterParameter={x:Static DataGridHeadersVisibility.Column}, Converter={x:Static DataGrid.HeadersVisibilityConverter}, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
+ <ScrollContentPresenter x:Name="PART_ScrollContentPresenter" CanContentScroll="{TemplateBinding CanContentScroll}" Grid.Row="1"/>
+ <ScrollBar Opacity="0" Grid.Row="1" x:Name="PART_VerticalScrollBar" Style="{StaticResource TouchScrollBar}" HorizontalAlignment="Right" AutomationProperties.AutomationId="VerticalScrollBar" Cursor="Arrow" Grid.Column="1" Maximum="{TemplateBinding ScrollableHeight}" Minimum="0" Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}" Value="{Binding VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" ViewportSize="{TemplateBinding ViewportHeight}"/>
</Grid>
<ControlTemplate.Triggers>
diff --git a/Software/Visual_Studio/Tango.Touch/Controls/TouchSimpleDataGrid.xaml b/Software/Visual_Studio/Tango.Touch/Controls/TouchSimpleDataGrid.xaml
index 05681fa9c..4d900cb52 100644
--- a/Software/Visual_Studio/Tango.Touch/Controls/TouchSimpleDataGrid.xaml
+++ b/Software/Visual_Studio/Tango.Touch/Controls/TouchSimpleDataGrid.xaml
@@ -20,44 +20,12 @@
<Setter Property="BorderBrush" Value="#FF688CAF"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="RowDetailsVisibilityMode" Value="VisibleWhenSelected"/>
- <Setter Property="ScrollViewer.CanContentScroll" Value="true"/>
- <Setter Property="ScrollViewer.PanningMode" Value="VerticalOnly"/>
<Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type local:TouchSimpleDataGrid}">
<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="True">
- <local:TouchScrollViewer x:Name="DG_ScrollViewer" Focusable="false">
- <local:TouchScrollViewer.Template>
- <ControlTemplate TargetType="{x:Type ScrollViewer}">
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="Auto"/>
- <RowDefinition Height="*"/>
- </Grid.RowDefinitions>
-
- <DataGridColumnHeadersPresenter x:Name="PART_ColumnHeadersPresenter" Visibility="{Binding HeadersVisibility, ConverterParameter={x:Static DataGridHeadersVisibility.Column}, Converter={x:Static DataGrid.HeadersVisibilityConverter}, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
- <ScrollContentPresenter x:Name="PART_ScrollContentPresenter" CanContentScroll="{TemplateBinding CanContentScroll}" Grid.Row="1"/>
- <ScrollBar Opacity="0" Grid.Row="1" x:Name="PART_VerticalScrollBar" Style="{StaticResource TouchScrollBar}" HorizontalAlignment="Right" AutomationProperties.AutomationId="VerticalScrollBar" Cursor="Arrow" Grid.Column="1" Maximum="{TemplateBinding ScrollableHeight}" Minimum="0" Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}" Value="{Binding VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" ViewportSize="{TemplateBinding ViewportHeight}"/>
- </Grid>
-
- <ControlTemplate.Triggers>
- <EventTrigger RoutedEvent="ScrollViewer.ScrollChanged">
- <EventTrigger.Actions>
- <BeginStoryboard>
- <Storyboard>
- <DoubleAnimationUsingKeyFrames Storyboard.TargetName="PART_VerticalScrollBar" Storyboard.TargetProperty="Opacity" Duration="00:00:01" FillBehavior="Stop">
- <EasingDoubleKeyFrame KeyTime="00:00:0.2" Value="1"></EasingDoubleKeyFrame>
- <DiscreteDoubleKeyFrame KeyTime="00:00:0.2" Value="1"></DiscreteDoubleKeyFrame>
- <EasingDoubleKeyFrame KeyTime="00:00:01" Value="0"></EasingDoubleKeyFrame>
- </DoubleAnimationUsingKeyFrames>
- </Storyboard>
- </BeginStoryboard>
- </EventTrigger.Actions>
- </EventTrigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </local:TouchScrollViewer.Template>
+ <local:TouchScrollViewer x:Name="DG_ScrollViewer">
<ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
</local:TouchScrollViewer>
</Border>
diff --git a/Software/Visual_Studio/Utilities/Tango.MachineEM.UI/MainWindow.xaml b/Software/Visual_Studio/Utilities/Tango.MachineEM.UI/MainWindow.xaml
index 0bedbb1fb..7bfc7f0fd 100644
--- a/Software/Visual_Studio/Utilities/Tango.MachineEM.UI/MainWindow.xaml
+++ b/Software/Visual_Studio/Utilities/Tango.MachineEM.UI/MainWindow.xaml
@@ -9,7 +9,7 @@
xmlns:local="clr-namespace:Tango.MachineEM.UI"
xmlns:views="clr-namespace:Tango.MachineEM.UI.Views"
mc:Ignorable="d"
- Title="Tango Embedded Emulator" Height="720" Width="1200" TitleCaps="False" BorderBrush="Gray" BorderThickness="1" WindowStartupLocation="CenterScreen" Background="#202020" Foreground="Gainsboro" DataContext="{Binding RelativeSource={RelativeSource Self}}">
+ Title="Tango Embedded Emulator" Height="720" Width="1300" TitleCaps="False" BorderBrush="Gray" BorderThickness="1" WindowStartupLocation="CenterScreen" Background="#202020" Foreground="Gainsboro" DataContext="{Binding RelativeSource={RelativeSource Self}}">
<Grid>
<views:MainView DataContext="{StaticResource MainViewVM}"></views:MainView>
</Grid>
diff --git a/Software/Visual_Studio/Utilities/Tango.MachineEM.UI/Views/MainView.xaml b/Software/Visual_Studio/Utilities/Tango.MachineEM.UI/Views/MainView.xaml
index 02c1b4eba..036fec7dc 100644
--- a/Software/Visual_Studio/Utilities/Tango.MachineEM.UI/Views/MainView.xaml
+++ b/Software/Visual_Studio/Utilities/Tango.MachineEM.UI/Views/MainView.xaml
@@ -8,12 +8,14 @@
xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
xmlns:fa="http://schemas.fontawesome.io/icons/"
xmlns:vm="clr-namespace:Tango.MachineEM.UI.ViewModels"
+ xmlns:pmr="clr-namespace:Tango.PMR.MachineStatus;assembly=Tango.PMR"
xmlns:local="clr-namespace:Tango.MachineEM.UI.Views"
mc:Ignorable="d"
d:DesignHeight="720" d:DesignWidth="1300" Foreground="Gainsboro" d:DataContext="{d:DesignInstance Type=vm:MainViewVM, IsDesignTimeCreatable=False}" >
<UserControl.Resources>
<converters:BooleanInverseConverter x:Key="BooleanInverseConverter"></converters:BooleanInverseConverter>
+ <converters:EnumToItemsSourceConverter x:Key="EnumToItemsSourceConverter" />
</UserControl.Resources>
<Grid>
<Grid.Background>
@@ -193,36 +195,42 @@
</ToggleButton>
<Popup IsOpen="{Binding ElementName=toggleLevels,Path=IsChecked}" StaysOpen="True">
<Border Padding="10">
- <StackPanel>
- <TextBlock Foreground="Red">IDS Packs Levels</TextBlock>
- <ScrollViewer Height="400" HorizontalScrollBarVisibility="Disabled">
- <ItemsControl Margin="0 5 0 0" ItemsSource="{Binding Emulator.MachineStatus.IDSPacksLevels}">
- <ItemsControl.ItemTemplate>
- <DataTemplate>
- <StackPanel Margin="0 5">
- <TextBlock>
+ <StackPanel Orientation="Horizontal">
+ <StackPanel HorizontalAlignment="Left">
+ <TextBlock Foreground="Red">IDS Packs Levels</TextBlock>
+ <ScrollViewer Height="400" HorizontalScrollBarVisibility="Disabled">
+ <ItemsControl Margin="0 5 0 0" ItemsSource="{Binding Emulator.MachineStatus.IDSPacksLevels}">
+ <ItemsControl.ItemTemplate>
+ <DataTemplate>
+ <StackPanel Margin="0 5">
+ <TextBlock>
<Run Text="Index: "></Run>
<Run Text="{Binding Index}"></Run>
- </TextBlock>
+ </TextBlock>
- <StackPanel Orientation="Horizontal">
- <TextBlock Text="Dispenser Level (nl): " />
- <TextBox Text="{Binding ElementName=sliderDispenser,Path=Value,UpdateSourceTrigger=PropertyChanged,Mode=TwoWay}"></TextBox>
- </StackPanel>
+ <StackPanel Orientation="Horizontal">
+ <TextBlock Text="Dispenser Level (nl): " />
+ <TextBox Text="{Binding ElementName=sliderDispenser,Path=Value,UpdateSourceTrigger=PropertyChanged,Mode=TwoWay}"></TextBox>
+ </StackPanel>
- <Slider x:Name="sliderDispenser" Orientation="Horizontal" Minimum="0" Maximum="130000000" Value="{Binding DispenserLevel}"></Slider>
+ <Slider x:Name="sliderDispenser" Orientation="Horizontal" Minimum="0" Maximum="130000000" Value="{Binding DispenserLevel}"></Slider>
- <TextBlock>
+ <TextBlock>
<Run Text="MidTank Level (ml): "></Run>
<Run Text="{Binding ElementName=sliderMidTank,Path=Value}"></Run>
- </TextBlock>
+ </TextBlock>
- <Slider x:Name="sliderMidTank" Orientation="Horizontal" Minimum="0" Maximum="2500" Value="{Binding MidTankLevel}"></Slider>
- </StackPanel>
- </DataTemplate>
- </ItemsControl.ItemTemplate>
- </ItemsControl>
- </ScrollViewer>
+ <Slider x:Name="sliderMidTank" Orientation="Horizontal" Minimum="0" Maximum="2500" Value="{Binding MidTankLevel}"></Slider>
+ </StackPanel>
+ </DataTemplate>
+ </ItemsControl.ItemTemplate>
+ </ItemsControl>
+ </ScrollViewer>
+ </StackPanel>
+ <StackPanel Margin="10 0 0 0">
+ <TextBlock Foreground="Red">MACHINE STATE</TextBlock>
+ <ComboBox Margin="0 5 0 0" Width="150" ItemsSource="{Binding Source={x:Type pmr:MachineState},Converter={StaticResource EnumToItemsSourceConverter}}" SelectedValue="{Binding Emulator.MachineStatus.State,Mode=TwoWay}" SelectedValuePath="Value" DisplayMemberPath="DisplayName"></ComboBox>
+ </StackPanel>
</StackPanel>
</Border>
</Popup>
diff --git a/Software/Visual_Studio/Web/Tango.MachineService/Controllers/PPCController.cs b/Software/Visual_Studio/Web/Tango.MachineService/Controllers/PPCController.cs
index 6f5eed749..d8dc4a7b8 100644
--- a/Software/Visual_Studio/Web/Tango.MachineService/Controllers/PPCController.cs
+++ b/Software/Visual_Studio/Web/Tango.MachineService/Controllers/PPCController.cs
@@ -74,11 +74,32 @@ namespace Tango.MachineService.Controllers
throw new AuthenticationException("The specified serial number could not be found.");
}
- if (machine.SetupActivation && machine.OsKey == null)
+ if (machine.SetupActivation && String.IsNullOrWhiteSpace(machine.OsKey))
{
throw new InvalidDataException("The specified machine is configured to perform an OS activation but is not associated with an OS activation key.");
}
+ if (String.IsNullOrWhiteSpace(request.DeviceID))
+ {
+ throw new InvalidDataException("Device id not set.");
+ }
+
+ if (String.IsNullOrWhiteSpace(request.DeviceName))
+ {
+ throw new InvalidDataException("Device name not set.");
+ }
+
+ if (machine.IsDeviceRegistered && machine.DeviceId != request.DeviceID)
+ {
+ throw new InvalidDataException("The specified machine is already registered and device id is invalid.");
+ }
+
+ machine.DeviceName = request.DeviceName;
+ machine.DeviceId = request.DeviceID;
+ machine.IsDeviceRegistered = true;
+
+ db.SaveChanges();
+
var machine_version = db.MachineVersions.SingleOrDefault(x => x.Guid == machine.MachineVersionGuid);
var latest_machine_version = db.TangoVersions.Where(x => x.MachineVersionGuid == machine_version.Guid).ToList().OrderByDescending(x => Version.Parse(x.Version)).FirstOrDefault();
@@ -122,7 +143,6 @@ namespace Tango.MachineService.Controllers
response.SetupUWF = machine.SetupUwf;
response.SetupFirmware = machine.SetupFirmware;
response.IsDemo = machine.IsDemo;
-
}
return response;
@@ -216,6 +236,11 @@ namespace Tango.MachineService.Controllers
}
response.Version = latest_machine_version.Version;
+
+ if (machine.ForceVersionUpdate)
+ {
+ response.IsUpdateAvailable = true;
+ }
}
}
diff --git a/Software/Visual_Studio/Web/Tango.MachineService/Properties/PublishProfiles/Development.pubxml b/Software/Visual_Studio/Web/Tango.MachineService/Properties/PublishProfiles/Development.pubxml
index 5fb79879e..60d445532 100644
--- a/Software/Visual_Studio/Web/Tango.MachineService/Properties/PublishProfiles/Development.pubxml
+++ b/Software/Visual_Studio/Web/Tango.MachineService/Properties/PublishProfiles/Development.pubxml
@@ -9,7 +9,7 @@ by editing this MSBuild file. In order to learn more about this please visit htt
<ResourceId>/subscriptions/10c8aa60-3b15-4e0d-b412-6aeef90e5e91/resourceGroups/Tango/providers/Microsoft.Web/sites/machineservice/slots/MachineService-DEV</ResourceId>
<ResourceGroup>Tango</ResourceGroup>
<PublishProvider>AzureWebSite</PublishProvider>
- <LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
+ <LastUsedBuildConfiguration>Debug</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<SiteUrlToLaunchAfterPublish>http://machineservice-machineservice-dev.azurewebsites.net</SiteUrlToLaunchAfterPublish>
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
@@ -24,5 +24,21 @@ by editing this MSBuild file. In order to learn more about this please visit htt
<UserName>$machineservice__MachineService-DEV</UserName>
<_SavePWD>True</_SavePWD>
<_DestinationType>AzureWebSite</_DestinationType>
+ <PublishDatabaseSettings>
+ <Objects xmlns="">
+ <ObjectGroup Name="Tango.BL.ObservablesContext" Order="1" Enabled="False">
+ <Destination Path="" />
+ <Object Type="DbCodeFirst">
+ <Source Path="DBContext" DbContext="Tango.BL.ObservablesContext, Tango.BL" Origin="Convention" />
+ </Object>
+ </ObjectGroup>
+ </Objects>
+ </PublishDatabaseSettings>
</PropertyGroup>
+ <ItemGroup>
+ <MSDeployParameterValue Include="$(DeployParameterPrefix)Tango.BL.ObservablesContext-Web.config Connection String" />
+ </ItemGroup>
+ <ItemGroup>
+ <_ConnectionStringsToInsert Include="Tango.BL.ObservablesContext" />
+ </ItemGroup>
</Project> \ No newline at end of file