aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events
diff options
context:
space:
mode:
authorRoy Ben Shabat <Roy.mail.net@gmail.com>2021-03-10 03:59:31 +0200
committerRoy Ben Shabat <Roy.mail.net@gmail.com>2021-03-10 03:59:31 +0200
commitd1d28d68564d0a76021944ba1e2993ffb3eaba61 (patch)
treec0068878c600b48edccca9e824d6b9c41674cbee /Software/Visual_Studio/PPC/Modules/Tango.PPC.Events
parentdff40538d054551a74034b473f9f0e0c3590bcd0 (diff)
downloadTango-d1d28d68564d0a76021944ba1e2993ffb3eaba61.tar.gz
Tango-d1d28d68564d0a76021944ba1e2993ffb3eaba61.zip
Bit completed except updated BIT types.
Diffstat (limited to 'Software/Visual_Studio/PPC/Modules/Tango.PPC.Events')
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/Converters/MachineEventToViewConverter.cs3
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/EventsViews/BitFailedView.xaml26
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/EventsViews/BitFailedView.xaml.cs50
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/Tango.PPC.Events.csproj9
4 files changed, 87 insertions, 1 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..5198498a3 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
@@ -29,6 +29,9 @@ namespace Tango.PPC.Events.Converters
_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));
+
+ //BIT Failed
+ _eventViews.Add(EventTypes.POWER_UP_BIT_FAILURE, typeof(BitFailedView));
}
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/EventsViews/BitFailedView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/EventsViews/BitFailedView.xaml
new file mode 100644
index 000000000..9700eb5c4
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/EventsViews/BitFailedView.xaml
@@ -0,0 +1,26 @@
+<UserControl x:Class="Tango.PPC.Events.EventsViews.BitFailedView"
+ 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="btnViewBitResult" Margin="0 10 0 0" Height="55" Style="{StaticResource TangoHollowButton}" Width="280" HorizontalAlignment="Left">VIEW BIT RESULTS</touch:TouchButton>
+ </StackPanel>
+ </DockPanel>
+ </DockPanel>
+ </Grid>
+</UserControl>
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/EventsViews/BitFailedView.xaml.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/EventsViews/BitFailedView.xaml.cs
new file mode 100644
index 000000000..412755205
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/EventsViews/BitFailedView.xaml.cs
@@ -0,0 +1,50 @@
+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.Bit;
+using Tango.PPC.Common.ThreadLoading;
+
+namespace Tango.PPC.Events.EventsViews
+{
+ /// <summary>
+ /// Interaction logic for ThreadBreakView.xaml
+ /// </summary>
+ public partial class BitFailedView : UserControl
+ {
+ public BitFailedView()
+ {
+ InitializeComponent();
+
+ btnViewBitResult.Click += BtnViewBitResult_Click;
+ }
+
+ private void BtnViewBitResult_Click(object sender, RoutedEventArgs e)
+ {
+ try
+ {
+ var bitManager = TangoIOC.Default.GetInstance<IBitManager>();
+
+ if (bitManager != null)
+ {
+ bitManager.ShowBitResultsDialog();
+ }
+ }
+ 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/Tango.PPC.Events.csproj b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/Tango.PPC.Events.csproj
index 61485b00b..540c33e1c 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,6 +76,10 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
+ <Page Include="EventsViews\BitFailedView.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </Page>
<Page Include="EventsViews\ThreadBreakView.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
@@ -102,6 +106,9 @@
<Compile Include="EventsViews\JobEventView.xaml.cs">
<DependentUpon>JobEventView.xaml</DependentUpon>
</Compile>
+ <Compile Include="EventsViews\BitFailedView.xaml.cs">
+ <DependentUpon>BitFailedView.xaml</DependentUpon>
+ </Compile>
<Compile Include="EventsViews\ThreadBreakView.xaml.cs">
<DependentUpon>ThreadBreakView.xaml</DependentUpon>
</Compile>
@@ -187,7 +194,7 @@
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<ProjectExtensions>
<VisualStudio>
- <UserProperties BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UseGlobalSettings="False" BuildVersion_StartDate="2000/1/1" />
+ <UserProperties BuildVersion_StartDate="2000/1/1" BuildVersion_UseGlobalSettings="False" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" />
</VisualStudio>
</ProjectExtensions>
</Project> \ No newline at end of file