diff options
| author | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2020-02-27 18:25:51 +0200 |
|---|---|---|
| committer | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2020-02-27 18:25:51 +0200 |
| commit | 03970962af1bfbfc5c13109c3f0a465cf9a1dc29 (patch) | |
| tree | 94d97e7aff1e6c0e95495636540c7fa99f5ef16d /Software/Visual_Studio/Tango.Console/ConsoleControl.xaml.cs | |
| parent | cd974051e442dd0420eb14513a57855e69beef86 (diff) | |
| download | Tango-03970962af1bfbfc5c13109c3f0a465cf9a1dc29.tar.gz Tango-03970962af1bfbfc5c13109c3f0a465cf9a1dc29.zip | |
Create FSE module project template.
Implemented core PPC console components.
Added FSE PPC Console module.
Diffstat (limited to 'Software/Visual_Studio/Tango.Console/ConsoleControl.xaml.cs')
| -rw-r--r-- | Software/Visual_Studio/Tango.Console/ConsoleControl.xaml.cs | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/Software/Visual_Studio/Tango.Console/ConsoleControl.xaml.cs b/Software/Visual_Studio/Tango.Console/ConsoleControl.xaml.cs new file mode 100644 index 000000000..97059227c --- /dev/null +++ b/Software/Visual_Studio/Tango.Console/ConsoleControl.xaml.cs @@ -0,0 +1,63 @@ +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; + +namespace Tango.Console +{ + /// <summary> + /// Interaction logic for ConsoleControl.xaml + /// </summary> + public partial class ConsoleControl : UserControl + { + public ConsoleControl() + { + InitializeComponent(); + MouseDown += ConsoleControl_MouseDown; + } + + public Brush SelectionBrush + { + get { return (Brush)GetValue(SelectionBrushProperty); } + set { SetValue(SelectionBrushProperty, value); } + } + public static readonly DependencyProperty SelectionBrushProperty = + DependencyProperty.Register("SelectionBrush", typeof(Brush), typeof(ConsoleControl), new PropertyMetadata(Brushes.DimGray)); + + public Brush CaretBrush + { + get { return (Brush)GetValue(CaretBrushProperty); } + set { SetValue(CaretBrushProperty, value); } + } + public static readonly DependencyProperty CaretBrushProperty = + DependencyProperty.Register("CaretBrush", typeof(Brush), typeof(ConsoleControl), new PropertyMetadata(Brushes.White)); + + public DataTemplate BusyTemplate + { + get { return (DataTemplate)GetValue(BusyTemplateProperty); } + set { SetValue(BusyTemplateProperty, value); } + } + public static readonly DependencyProperty BusyTemplateProperty = + DependencyProperty.Register("BusyTemplate", typeof(DataTemplate), typeof(ConsoleControl), new PropertyMetadata(null)); + + private void ConsoleControl_MouseDown(object sender, MouseButtonEventArgs e) + { + Keyboard.Focus(txtCurrentCommand); + } + + private void ScrollViewer_PreviewMouseDown(object sender, MouseButtonEventArgs e) + { + Keyboard.Focus(txtCurrentCommand); + } + } +} |
