aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.Touch/Controls/TouchPanel.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Visual_Studio/Tango.Touch/Controls/TouchPanel.cs')
-rw-r--r--Software/Visual_Studio/Tango.Touch/Controls/TouchPanel.cs41
1 files changed, 4 insertions, 37 deletions
diff --git a/Software/Visual_Studio/Tango.Touch/Controls/TouchPanel.cs b/Software/Visual_Studio/Tango.Touch/Controls/TouchPanel.cs
index 1993e8cae..6aa92d15e 100644
--- a/Software/Visual_Studio/Tango.Touch/Controls/TouchPanel.cs
+++ b/Software/Visual_Studio/Tango.Touch/Controls/TouchPanel.cs
@@ -1,7 +1,6 @@
using System;
using System.Collections;
using System.Collections.Generic;
-using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
@@ -23,7 +22,6 @@ namespace Tango.Touch.Controls
private TouchIconButton _comboBoxCloseButton;
private TouchCalendar _calendar;
private Grid _calendar_grid;
- private bool _isDialogGridMaskMouseDown;
static TouchPanel()
{
@@ -32,19 +30,19 @@ namespace Tango.Touch.Controls
public TouchPanel()
{
- ComboBoxPickedCommand = new RelayCommand((x) =>
+ ComboBoxPickedCommand = new RelayCommand((x) =>
{
CurrentComboBox.SetResultFromTouchPanel(x);
CurrentComboBox = null;
});
- DateSelectedCommand = new RelayCommand(() =>
+ DateSelectedCommand = new RelayCommand(() =>
{
CurrentDatePicker.SetResultFromTouchPanel(_calendar.SelectedDate.Value);
CurrentDatePicker = null;
});
- CancelDateCommand = new RelayCommand(() =>
+ CancelDateCommand = new RelayCommand(() =>
{
CurrentDatePicker = null;
});
@@ -72,9 +70,6 @@ namespace Tango.Touch.Controls
_comboBoxCloseButton = GetTemplateChild("PART_comboboxCloseButton") as TouchIconButton;
_calendar_grid = GetTemplateChild("PART_datepicker_grid") as Grid;
_calendar = GetTemplateChild("PART_calendar") as TouchCalendar;
- var gridDialogsMask = GetTemplateChild("PART_gridDialogsMask") as Grid;
- gridDialogsMask.MouseUp += GridDialogsMask_MouseUp;
- gridDialogsMask.MouseDown += GridDialogsMask_MouseDown;
_comboBoxCloseButton.RegisterForPreviewMouseOrTouchUp(OnComboBoxClose);
_combobox_grid.RegisterForMouseOrTouchDown(OnComboBoxGridDown);
@@ -84,34 +79,6 @@ namespace Tango.Touch.Controls
_calendar.SelectedDatesChanged += _calendar_SelectedDatesChanged;
}
- private void GridDialogsMask_MouseDown(object sender, MouseButtonEventArgs e)
- {
- _isDialogGridMaskMouseDown = true;
- }
-
- private void GridDialogsMask_MouseUp(object sender, MouseButtonEventArgs e)
- {
- if (_isDialogGridMaskMouseDown)
- {
- if (e.Source == sender)
- {
- try
- {
- if ((CurrentDialog.DataContext as DialogViewVM).CanClose)
- {
- (CurrentDialog.DataContext as DialogViewVM).CloseCommand?.Execute(null);
- }
- }
- catch (Exception ex)
- {
- Debug.WriteLine($"Error in touch panel {ex.ToString()}");
- }
- }
- }
-
- _isDialogGridMaskMouseDown = false;
- }
-
private void _calendar_SelectedDatesChanged(object sender, SelectionChangedEventArgs e)
{
Mouse.Capture(null);
@@ -181,7 +148,7 @@ namespace Tango.Touch.Controls
set { SetValue(CurrentComboBoxProperty, value); }
}
internal static readonly DependencyProperty CurrentComboBoxProperty =
- DependencyProperty.Register("CurrentComboBox", typeof(TouchComboBox), typeof(TouchPanel), new PropertyMetadata(null, (d, e) => (d as TouchPanel).OnCurrentComboBoxChanged()));
+ DependencyProperty.Register("CurrentComboBox", typeof(TouchComboBox), typeof(TouchPanel), new PropertyMetadata(null,(d,e) => (d as TouchPanel).OnCurrentComboBoxChanged()));
internal TouchDatePicker CurrentDatePicker
{