aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Visual_Studio/PPC/Modules/Tango.PPC.Events')
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/Converters/MachineEventToViewConverter.cs7
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/EventsViews/ThreadBreakView.xaml26
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/EventsViews/ThreadBreakView.xaml.cs49
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/Resources/Styles.xaml4
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/Tango.PPC.Events.csproj9
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/ViewModels/MainViewVM.cs32
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/Views/MainView.xaml8
7 files changed, 9 insertions, 126 deletions
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/Converters/MachineEventToViewConverter.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/Converters/MachineEventToViewConverter.cs
index 56d7149d3..47c9e0ddf 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/Converters/MachineEventToViewConverter.cs
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/Converters/MachineEventToViewConverter.cs
@@ -18,17 +18,10 @@ namespace Tango.PPC.Events.Converters
static MachineEventToViewConverter()
{
- //Jobs
_eventViews.Add(EventTypes.JOB_STARTED, typeof(JobEventView));
_eventViews.Add(EventTypes.JOB_ABORTED, typeof(JobEventView));
_eventViews.Add(EventTypes.JOB_COMPLETED, typeof(JobEventView));
_eventViews.Add(EventTypes.JOB_FAILED, typeof(JobEventView));
-
- //Thread Break
- _eventViews.Add(EventTypes.THREAD_BREAK, typeof(ThreadBreakView));
- _eventViews.Add(EventTypes.THREAD_TENSION_CONTROL_FAILURE_FEEDER_DANCER, typeof(ThreadBreakView));
- _eventViews.Add(EventTypes.THREAD_TENSION_CONTROL_FAILURE_PULLER_DANCER, typeof(ThreadBreakView));
- _eventViews.Add(EventTypes.THREAD_TENSION_CONTROL_FAILURE_WINDER_DANCER, typeof(ThreadBreakView));
}
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/EventsViews/ThreadBreakView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/EventsViews/ThreadBreakView.xaml
deleted file mode 100644
index 71c4ced07..000000000
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/EventsViews/ThreadBreakView.xaml
+++ /dev/null
@@ -1,26 +0,0 @@
-<UserControl x:Class="Tango.PPC.Events.EventsViews.ThreadBreakView"
- 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:touch="clr-namespace:Tango.Touch.Controls;assembly=Tango.Touch"
- xmlns:entities="clr-namespace:Tango.BL.Entities;assembly=Tango.BL"
- xmlns:local="clr-namespace:Tango.PPC.Events.EventsViews"
- mc:Ignorable="d"
- d:DesignHeight="220" d:DesignWidth="750" d:DataContext="{d:DesignInstance Type=entities:MachinesEvent, IsDesignTimeCreatable=False}">
- <Grid Background="{StaticResource TangoPrimaryBackgroundBrush}">
- <DockPanel>
- <Image Stretch="None" Margin="20" DockPanel.Dock="Right" Source="../Images/machine_small.png" RenderOptions.BitmapScalingMode="Fant" />
- <DockPanel Margin="35 20 20 20">
- <TextBlock FontSize="{StaticResource TangoTitleFontSize}" FontWeight="SemiBold" DockPanel.Dock="Top" Text="{Binding EventType.Title,FallbackValue='Unknown Event'}"></TextBlock>
-
- <StackPanel Margin="0 30 0 0">
- <TextBlock TextWrapping="Wrap" FontWeight="SemiBold" Text="{Binding EventType.Description,FallbackValue='No Description'}"></TextBlock>
- <Rectangle Margin="0 5 0 10" StrokeThickness="2" Stroke="{StaticResource TangoDividerBrush}" />
-
- <touch:TouchButton x:Name="btnLoadThreadBreakWizard" Margin="0 10 0 0" Height="55" Style="{StaticResource TangoHollowButton}" Width="280" HorizontalAlignment="Left">LOAD THREAD BREAK WIZARD</touch:TouchButton>
- </StackPanel>
- </DockPanel>
- </DockPanel>
- </Grid>
-</UserControl>
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/EventsViews/ThreadBreakView.xaml.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/EventsViews/ThreadBreakView.xaml.cs
deleted file mode 100644
index 7e8337514..000000000
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/EventsViews/ThreadBreakView.xaml.cs
+++ /dev/null
@@ -1,49 +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.Core.DI;
-using Tango.PPC.Common.ThreadLoading;
-
-namespace Tango.PPC.Events.EventsViews
-{
- /// <summary>
- /// Interaction logic for ThreadBreakView.xaml
- /// </summary>
- public partial class ThreadBreakView : UserControl
- {
- public ThreadBreakView()
- {
- InitializeComponent();
-
- btnLoadThreadBreakWizard.Click += BtnLoadThreadBreakWizard_Click;
- }
-
- private void BtnLoadThreadBreakWizard_Click(object sender, RoutedEventArgs e)
- {
- try
- {
- var threadLoadingService = TangoIOC.Default.GetInstance<IThreadLoadingService>();
-
- if (threadLoadingService != null)
- {
- threadLoadingService.StartThreadBreakWizard();
- }
- }
- catch (Exception ex)
- {
- Logging.LogManager.Default.Log(ex, "Error loading the thread break wizard.");
- }
- }
- }
-}
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/Resources/Styles.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/Resources/Styles.xaml
index eaf621571..53102d8ec 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/Resources/Styles.xaml
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/Resources/Styles.xaml
@@ -18,11 +18,11 @@
<Setter Property="Height" Value="68"></Setter>
<Setter Property="Margin" Value="5 0 5 5"></Setter>
<Setter Property="CornerRadius" Value="5"></Setter>
- <!--<Setter Property="Effect">
+ <Setter Property="Effect">
<Setter.Value>
<DropShadowEffect BlurRadius="5" ShadowDepth="1" Color="Silver" />
</Setter.Value>
- </Setter>-->
+ </Setter>
</Style>
<Style TargetType="{x:Type touch:LightTouchDataGridRow}">
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/Tango.PPC.Events.csproj b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/Tango.PPC.Events.csproj
index e8d4683ee..e2133e585 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/Tango.PPC.Events.csproj
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/Tango.PPC.Events.csproj
@@ -76,10 +76,6 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
- <Page Include="EventsViews\ThreadBreakView.xaml">
- <SubType>Designer</SubType>
- <Generator>MSBuild:Compile</Generator>
- </Page>
<Page Include="Resources\Styles.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
@@ -102,9 +98,6 @@
<Compile Include="EventsViews\JobEventView.xaml.cs">
<DependentUpon>JobEventView.xaml</DependentUpon>
</Compile>
- <Compile Include="EventsViews\ThreadBreakView.xaml.cs">
- <DependentUpon>ThreadBreakView.xaml</DependentUpon>
- </Compile>
<Compile Include="Properties\AssemblyInfo.cs">
<SubType>Code</SubType>
</Compile>
@@ -187,7 +180,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/PPC/Modules/Tango.PPC.Events/ViewModels/MainViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/ViewModels/MainViewVM.cs
index a6e6b7a4e..d2a730cd7 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/ViewModels/MainViewVM.cs
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/ViewModels/MainViewVM.cs
@@ -127,31 +127,15 @@ namespace Tango.PPC.Events.ViewModels
{
if (ev.NotificationTime != EventTypeNotificationTimes.None)
{
- if (!ev.EventType.Persistent)
- {
- CurrentEvents.Insert(0, ev);
- }
- else
- {
- HistoryEvents.Insert(0, ev);
- }
+ CurrentEvents.Insert(0, ev);
var notificationItem = new MessageNotificationItem();
- notificationItem.CanClose = ev.EventType.Persistent;
+ notificationItem.CanClose = false;
notificationItem.Message = ev.EventType.Title;
notificationItem.ExpandedMessage = ev.EventType.Description;
notificationItem.Pressed += async (_, __) =>
{
- if (!ev.EventType.Persistent)
- {
- SelectedEventsSource = EventsSource.CURRENT;
- }
- else
- {
- SelectedEventsSource = EventsSource.HISTORY;
- notificationItem.Dispose();
- }
-
+ SelectedEventsSource = EventsSource.CURRENT;
SelectedEvent = ev;
await NavigationManager.NavigateTo<EventsModule>();
};
@@ -160,23 +144,15 @@ namespace Tango.PPC.Events.ViewModels
{
case EventTypeCategories.Info:
notificationItem.MessageType = MessageNotificationItem.MessageNotificationItemTypes.Info;
- notificationItem.Priority = NotificationItem.NotificationPriority.Normal;
break;
case EventTypeCategories.Warning:
notificationItem.MessageType = MessageNotificationItem.MessageNotificationItemTypes.Warning;
- notificationItem.Priority = NotificationItem.NotificationPriority.High;
break;
case EventTypeCategories.Error:
notificationItem.MessageType = MessageNotificationItem.MessageNotificationItemTypes.Error;
- notificationItem.Priority = NotificationItem.NotificationPriority.VeryHigh;
break;
case EventTypeCategories.Critical:
notificationItem.MessageType = MessageNotificationItem.MessageNotificationItemTypes.Critical;
- notificationItem.Priority = NotificationItem.NotificationPriority.Critical;
- break;
- case EventTypeCategories.Success:
- notificationItem.MessageType = MessageNotificationItem.MessageNotificationItemTypes.Success;
- notificationItem.Priority = NotificationItem.NotificationPriority.VeryHigh;
break;
}
@@ -195,7 +171,7 @@ namespace Tango.PPC.Events.ViewModels
{
InvokeUI(() =>
{
- if (ev.NotificationTime != EventTypeNotificationTimes.None && !ev.EventType.Persistent)
+ if (ev.NotificationTime != EventTypeNotificationTimes.None)
{
CurrentEvents.Remove(ev);
HistoryEvents.Insert(0, ev);
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/Views/MainView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/Views/MainView.xaml
index f0ae4b128..af42a5576 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/Views/MainView.xaml
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/Views/MainView.xaml
@@ -143,8 +143,8 @@
<touch:TouchIcon Width="32" Height="32" IsHitTestVisible="False">
<touch:TouchIcon.Style>
<Style TargetType="touch:TouchIcon">
- <Setter Property="Icon" Value="Information"/>
- <Setter Property="Foreground" Value="{StaticResource TangoDarkForegroundBrush}"/>
+ <Setter Property="Icon" Value="CheckCircleOutline"/>
+ <Setter Property="Foreground" Value="{StaticResource TangoSuccessBrush}"/>
<Style.Triggers>
<DataTrigger Binding="{Binding Category,Mode=OneWay}" Value="Warning">
<Setter Property="Icon" Value="AlertCircleOutline"/>
@@ -158,10 +158,6 @@
<Setter Property="Icon" Value="Alert"/>
<Setter Property="Foreground" Value="{StaticResource TangoErrorBrush}"/>
</DataTrigger>
- <DataTrigger Binding="{Binding Category,Mode=OneWay}" Value="Success">
- <Setter Property="Icon" Value="CheckCircleOutline"/>
- <Setter Property="Foreground" Value="{StaticResource TangoSuccessBrush}"/>
- </DataTrigger>
</Style.Triggers>
</Style>
</touch:TouchIcon.Style>