From 2b8e41b5279c2d3ab370595f6593b64ea734ef87 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Sun, 4 Mar 2018 15:28:15 +0200 Subject: Implemented job embroidery image capture, display export, Implemented running job text to speech. --- .../ExtensionMethods/CommonDialogExtensions.cs | 15 +++++++++++++++ .../Tango.MachineStudio.Common/IStudioModule.cs | 1 + .../Notifications/INotificationProvider.cs | 11 +++++++++++ .../Tango.MachineStudio.Common/StudioModuleBase.cs | 1 + .../Tango.MachineStudio.Common.csproj | 1 + 5 files changed, 29 insertions(+) create mode 100644 Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/ExtensionMethods/CommonDialogExtensions.cs (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common') diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/ExtensionMethods/CommonDialogExtensions.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/ExtensionMethods/CommonDialogExtensions.cs new file mode 100644 index 000000000..886ccdd1e --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/ExtensionMethods/CommonDialogExtensions.cs @@ -0,0 +1,15 @@ +using Microsoft.Win32; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; + +public static class CommonDialogExtensions +{ + public static bool ShowDialogCenter(this CommonDialog dialog) + { + return dialog.ShowDialog(Application.Current.MainWindow).Value; + } +} diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/IStudioModule.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/IStudioModule.cs index 1107222ef..ee01def9e 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/IStudioModule.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/IStudioModule.cs @@ -6,6 +6,7 @@ using System.Threading.Tasks; using System.Windows; using System.Windows.Media.Imaging; using Tango.BL.Entities; +using Tango.BL.Enumerations; namespace Tango.MachineStudio.Common { diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Notifications/INotificationProvider.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Notifications/INotificationProvider.cs index 79bcc9bf9..ce60715a8 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Notifications/INotificationProvider.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Notifications/INotificationProvider.cs @@ -101,6 +101,17 @@ namespace Tango.MachineStudio.Common.Notifications /// The cancel action. void ShowModalDialog(VM vm, Action onAccept, Action onCancel) where View : FrameworkElement where VM : DialogViewVM; + /// + /// Shows the specified view with the specified view model as it's data context. + /// + /// The type of the mm. + /// The type of the view. + /// The view model. + /// The view. + /// The accept action. + /// The cancel action. + void ShowModalDialog(VM vm, View view, Action onAccept, Action onCancel) where View : FrameworkElement where VM : DialogViewVM; + /// /// Creates a new view by a naming convention of the specified view model type. /// diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/StudioModuleBase.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/StudioModuleBase.cs index 3d17b245f..11da53c6c 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/StudioModuleBase.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/StudioModuleBase.cs @@ -7,6 +7,7 @@ using System.Windows; using System.Windows.Media.Imaging; using Tango.Core; using Tango.BL.Entities; +using Tango.BL.Enumerations; namespace Tango.MachineStudio.Common { diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Tango.MachineStudio.Common.csproj b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Tango.MachineStudio.Common.csproj index bc102a017..457646223 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Tango.MachineStudio.Common.csproj +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Tango.MachineStudio.Common.csproj @@ -87,6 +87,7 @@ + -- cgit v1.3.1