diff options
| author | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2020-11-05 19:33:06 +0200 |
|---|---|---|
| committer | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2020-11-05 19:33:06 +0200 |
| commit | b9009a814b9c91010e44534b42fa15fe164757a3 (patch) | |
| tree | 007aa60379f5a519ce3c3328887c8aec4951931f /Software/Visual_Studio/PPC/Modules/Tango.PPC.Events | |
| parent | ee3f1aa159ebb326e7c7053501130afa06bf47d4 (diff) | |
| download | Tango-b9009a814b9c91010e44534b42fa15fe164757a3.tar.gz Tango-b9009a814b9c91010e44534b42fa15fe164757a3.zip | |
Completed ThreadBreak/Loading Wizards !!!
Diffstat (limited to 'Software/Visual_Studio/PPC/Modules/Tango.PPC.Events')
4 files changed, 84 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 47c9e0ddf..6981bd5d6 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 @@ -22,6 +22,7 @@ namespace Tango.PPC.Events.Converters _eventViews.Add(EventTypes.JOB_ABORTED, typeof(JobEventView)); _eventViews.Add(EventTypes.JOB_COMPLETED, typeof(JobEventView)); _eventViews.Add(EventTypes.JOB_FAILED, typeof(JobEventView)); + _eventViews.Add(EventTypes.THREAD_BREAK, 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 new file mode 100644 index 000000000..71c4ced07 --- /dev/null +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/EventsViews/ThreadBreakView.xaml @@ -0,0 +1,26 @@ +<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 new file mode 100644 index 000000000..7e8337514 --- /dev/null +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/EventsViews/ThreadBreakView.xaml.cs @@ -0,0 +1,49 @@ +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/Tango.PPC.Events.csproj b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/Tango.PPC.Events.csproj index e2133e585..e8d4683ee 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\ThreadBreakView.xaml"> + <SubType>Designer</SubType> + <Generator>MSBuild:Compile</Generator> + </Page> <Page Include="Resources\Styles.xaml"> <Generator>MSBuild:Compile</Generator> <SubType>Designer</SubType> @@ -98,6 +102,9 @@ <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> @@ -180,7 +187,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 |
