aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Console/ConsoleWindow.xaml.cs
diff options
context:
space:
mode:
authorShlomo Hecht <shlomo@twine-s.com>2018-05-02 17:36:54 +0300
committerShlomo Hecht <shlomo@twine-s.com>2018-05-02 17:36:54 +0300
commitee697f7a3350d0a97bddee4de3a2ae4f9d285052 (patch)
tree2dc2e3bb811b0d89a3c4c51801c1572966fcee7c /Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Console/ConsoleWindow.xaml.cs
parent73c4b814f1f28170ae72723568189096413c3564 (diff)
downloadTango-ee697f7a3350d0a97bddee4de3a2ae4f9d285052.tar.gz
Tango-ee697f7a3350d0a97bddee4de3a2ae4f9d285052.zip
merge
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Console/ConsoleWindow.xaml.cs')
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Console/ConsoleWindow.xaml.cs43
1 files changed, 43 insertions, 0 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Console/ConsoleWindow.xaml.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Console/ConsoleWindow.xaml.cs
new file mode 100644
index 000000000..de2c728b0
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Console/ConsoleWindow.xaml.cs
@@ -0,0 +1,43 @@
+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;
+
+namespace Tango.MachineStudio.UI.Console
+{
+ /// <summary>
+ /// Interaction logic for ConsoleWindow.xaml
+ /// </summary>
+ public partial class ConsoleWindow : MetroWindow
+ {
+ private ConsoleWindowVM _vm;
+
+ public ConsoleWindow()
+ {
+ InitializeComponent();
+
+ this.Loaded += (_, __) =>
+ {
+ _vm = this.DataContext as ConsoleWindowVM;
+ _vm.SetLogTextBox(txtLog);
+ };
+ }
+
+ //Auto scroll to bottom of response log each time it is changed.
+ private void TextBox_TextChanged(object sender, TextChangedEventArgs e)
+ {
+ txtLog.SelectionStart = txtLog.Text.Length;
+ txtLog.ScrollToEnd();
+ }
+ }
+}