diff --git a/eDosStation/EntryBadge.xaml b/eDosStation/EntryBadge.xaml index a3e6af6..6d31c3c 100644 --- a/eDosStation/EntryBadge.xaml +++ b/eDosStation/EntryBadge.xaml @@ -88,7 +88,7 @@ - + @@ -100,6 +100,7 @@ --> + @@ -172,11 +173,28 @@ - - - - + + + + diff --git a/eDosStation/EntryBadge.xaml.cs b/eDosStation/EntryBadge.xaml.cs index 2a1743c..3d38131 100644 --- a/eDosStation/EntryBadge.xaml.cs +++ b/eDosStation/EntryBadge.xaml.cs @@ -157,7 +157,7 @@ namespace eDosStation } ep.SetIssued(); - IssueOK.Visibility = Visibility.Visible; + bEpdDone.Visibility = Visibility.Visible; } } @@ -189,12 +189,23 @@ namespace eDosStation void AskTask() { - eDosStation.DataSet1 dataSet1 = ((eDosStation.DataSet1)(this.FindResource("dataSet1"))); - using (var dataSet1GetTaskInfoTableAdapter = new eDosStation.DataSet1TableAdapters.GetTaskInfoTableAdapter()) + if (_User == null || _User.VisitIDLocked==true || _User.AccessAllow==false) { - dataSet1GetTaskInfoTableAdapter.Fill(dataSet1.GetTaskInfo, null, _User.Margin); + tbNotAllowed.IsSelected = true; + if (_User.VisitIDLocked == true) tReasonNoAccess.Text = "Alarm status not cleared"; + else if (_User.AccessAllow==false) tReasonNoAccess.Text = "Access not allowed"; + else tReasonNoAccess.Text = "No identification"; + } + else + { + + eDosStation.DataSet1 dataSet1 = ((eDosStation.DataSet1)(this.FindResource("dataSet1"))); + using (var dataSet1GetTaskInfoTableAdapter = new eDosStation.DataSet1TableAdapters.GetTaskInfoTableAdapter()) + { + dataSet1GetTaskInfoTableAdapter.Fill(dataSet1.GetTaskInfo, null, _User.Margin); + } + tbTask.IsSelected = true; } - tbTask.IsSelected = true; } void CheckBadge() @@ -257,6 +268,13 @@ namespace eDosStation return false; } + private void bClose_Click(object sender, RoutedEventArgs e) + { + this.Close(); + } + + + private void BClear_Click(object sender, RoutedEventArgs e) { CSN.Text = string.Empty; @@ -343,7 +361,7 @@ namespace eDosStation private void Window_Loaded(object sender, RoutedEventArgs e) { tbEntry.IsSelected = true; - IssueOK.Visibility = Visibility.Hidden; + bEpdDone.Visibility = Visibility.Hidden; eDosStation.DataSet1 dataSet1 = ((eDosStation.DataSet1)(this.FindResource("dataSet1"))); //using (eDosStation.DataSet1TableAdapters.GetTaskListTableAdapter dataSet1GetTaskListTableAdapter = new eDosStation.DataSet1TableAdapters.GetTaskListTableAdapter()) diff --git a/eDosStation/TouchEnabledTextBox.cs b/eDosStation/TouchEnabledTextBox.cs new file mode 100644 index 0000000..c9f1aca --- /dev/null +++ b/eDosStation/TouchEnabledTextBox.cs @@ -0,0 +1,58 @@ +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; + +namespace eDosStation +{ + + + public class TouchEnabledTextBox : TextBox + { + + + + //inside the class definition +private Process _touchKeyboardProcess = null; + + + public TouchEnabledTextBox() + { + this.GotFocus += TouchEnabledTextBox_GotFocus; + + //this.GotTouchCapture += TouchEnabledTextBox_GotTouchCapture; + this.LostFocus += TouchEnabledTextBox_LostFocus; + } + + private void TouchEnabledTextBox_GotFocus(object sender, RoutedEventArgs e) + { + string touchKeyboardPath = @"C:\Program Files\Common Files\Microsoft Shared\Ink\TabTip.exe"; + _touchKeyboardProcess = Process.Start(touchKeyboardPath); + } + + private void TouchEnabledTextBox_GotTouchCapture(object sender, System.Windows.Input.TouchEventArgs e) + { + string touchKeyboardPath = @"C:\Program Files\Common Files\Microsoft Shared\Ink\TabTip.exe"; + _touchKeyboardProcess= Process.Start(touchKeyboardPath); + } + + + +//add this method as a member method of the class + private void TouchEnabledTextBox_LostFocus(object sender, RoutedEventArgs eventArgs) + { + if (_touchKeyboardProcess != null) + { + _touchKeyboardProcess.Kill(); + //nullify the instance pointing to the now-invalid process + _touchKeyboardProcess = null; + } + } + } + + +} diff --git a/eDosStation/eDosStation.csproj b/eDosStation/eDosStation.csproj index 19dd42f..0424c02 100644 --- a/eDosStation/eDosStation.csproj +++ b/eDosStation/eDosStation.csproj @@ -102,6 +102,7 @@ ShowEPDDose.xaml + Designer