From 2c376ac3ae651dd6c6592cc4cbf72768dc97a93d Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Wed, 13 Dec 2017 13:45:13 +0200 Subject: Moved Machine Studio to its own folder. --- .../Windows/DialogWindow.xaml | 32 ++++++++++++ .../Windows/DialogWindow.xaml.cs | 58 ++++++++++++++++++++++ 2 files changed, 90 insertions(+) create mode 100644 Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Windows/DialogWindow.xaml create mode 100644 Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Windows/DialogWindow.xaml.cs (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Windows') diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Windows/DialogWindow.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Windows/DialogWindow.xaml new file mode 100644 index 000000000..f23776ec2 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Windows/DialogWindow.xaml @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Windows/DialogWindow.xaml.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Windows/DialogWindow.xaml.cs new file mode 100644 index 000000000..c946d2b88 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Windows/DialogWindow.xaml.cs @@ -0,0 +1,58 @@ +using MahApps.Metro.Controls; +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.Shapes; +using Tango.Core.Commands; + +namespace Tango.MachineStudio.UI.Windows +{ + /// + /// Interaction logic for DialogWindow.xaml + /// + public partial class DialogWindow : MetroWindow + { + public DialogWindow() + { + InitializeComponent(); + } + + + + public String InnerTitle + { + get { return (String)GetValue(InnerTitleProperty); } + set { SetValue(InnerTitleProperty, value); } + } + public static readonly DependencyProperty InnerTitleProperty = + DependencyProperty.Register("InnerTitle", typeof(String), typeof(DialogWindow), new PropertyMetadata(null)); + + + + public DialogWindow(FrameworkElement content) : this() + { + presenter.Content = content; + } + + private void OnOKClicked(object sender, RoutedEventArgs e) + { + DialogResult = true; + Close(); + } + + private void OnCancelClicked(object sender, RoutedEventArgs e) + { + DialogResult = false; + Close(); + } + } +} -- cgit v1.3.1