/TEditXna/View/ChestSignEditorView.xaml.cs
C# | 44 lines | 37 code | 3 blank | 4 comment | 5 complexity | 86bbfd79d2f9db6e573bd9690cab9129 MD5 | raw file
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- 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 TEditXna.View
- {
- /// <summary>
- /// Interaction logic for ChestSignEditorView.xaml
- /// </summary>
- public partial class ChestSignEditorView : UserControl
- {
- public ChestSignEditorView()
- {
- InitializeComponent();
- }
-
- private void ValidateLines(object sender, KeyEventArgs e)
- {
- // Limit to 10 lines
- var tb = sender as TextBox;
-
- if (tb != null)
- {
- if (e.Key == Key.Enter)
- {
- if (tb.LineCount > 9)
- {
- e.Handled = true;
- }
- }
- }
- }
- }
- }