private string DisplayKeyboard(string KeyText, string type)
 {
     try
     {
         LogManager.WriteLog("Inside DisplayKeyboard", LogManager.enumLogLevel.Info);
         strKeyText = "";
         KeyboardInterface objKeyboard = new KeyboardInterface();
         if (type == "Pwd")
         {
             objKeyboard.IsPwd = true;
         }
         objKeyboard.Closing  += new System.ComponentModel.CancelEventHandler(objKeyboard_Closing);
         objKeyboard.KeyString = KeyText;
         Point locationFromScreen          = this.PointToScreen(new Point(0, 0));
         PresentationSource   source       = PresentationSource.FromVisual(this);
         System.Windows.Point targetPoints = source.CompositionTarget.TransformFromDevice.Transform(locationFromScreen);
         objKeyboard.Top  = targetPoints.Y + this.Height / 2;
         objKeyboard.Left = targetPoints.X;
         objKeyboard.ShowDialogEx(this);
         return(strKeyText);
     }
     catch (Exception ex)
     {
         ExceptionManager.Publish(ex);
         return(string.Empty);
     }
 }
        public string DisplayKeyboard(string keyText, string type)
        {
            _sKeyText = "";

            var objKeyboard = new KeyboardInterface();

            if (type == "Pwd")
            {
                objKeyboard.IsPwd = true;
            }
            objKeyboard.Closing  += ObjKeyboardClosing;
            objKeyboard.KeyString = keyText;
            objKeyboard.Top       = Top + Height - objKeyboard.Height;
            objKeyboard.Left      = Left + Width / 2 - objKeyboard.Width / 2;
            objKeyboard.ShowDialogEx(this);
            return(_sKeyText);
        }
        public string DisplayKeyboard(string keyText, string type)
        {
            _sKeyText = "";

            var objKeyboard = new KeyboardInterface();
            if (type == "Pwd")
            {
                objKeyboard.IsPwd = true;
            }
            objKeyboard.Closing += ObjKeyboardClosing;
            objKeyboard.KeyString = keyText;
            objKeyboard.Top = Top + Height - objKeyboard.Height;
            objKeyboard.Left = Left + Width / 2 - objKeyboard.Width / 2;
            objKeyboard.ShowDialogEx(this);
            return _sKeyText;
        }
 private string DisplayKeyboard(string KeyText, string type)
 {
     try
     {
         LogManager.WriteLog("Inside DisplayKeyboard", LogManager.enumLogLevel.Info);
         strKeyText = "";
         KeyboardInterface objKeyboard = new KeyboardInterface();
         if (type == "Pwd")
         {
             objKeyboard.IsPwd = true;
         }
         objKeyboard.Closing += new System.ComponentModel.CancelEventHandler(objKeyboard_Closing);
         objKeyboard.KeyString = KeyText;
         Point locationFromScreen = this.PointToScreen(new Point(0, 0));
         PresentationSource source = PresentationSource.FromVisual(this);
         System.Windows.Point targetPoints = source.CompositionTarget.TransformFromDevice.Transform(locationFromScreen);
         objKeyboard.Top = targetPoints.Y + this.Height / 2;
         objKeyboard.Left = targetPoints.X;
         objKeyboard.ShowDialogEx(this);
         return strKeyText;
     }
     catch (Exception ex)
     {
         ExceptionManager.Publish(ex);
         return string.Empty;
     }
 }