示例#1
0
 private void cBoxValueStyle_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (cBoxValueStyle.SelectedIndex == 0)
     {
         TextBox_Value.BringToFront();
     }
     else if (cBoxValueStyle.SelectedIndex == 1)
     {
         ComboBoxParameters.BringToFront();
     }
 }
示例#2
0
 private void TextBox_Value_KeyDown(object sender, System.Windows.Input.KeyEventArgs e)
 {
     switch (e.Key)
     {
     case System.Windows.Input.Key.Enter:
     case System.Windows.Input.Key.Escape:
     {
         var be = TextBox_Value.GetBindingExpression(TextBox.TextProperty);
         be.UpdateSource();
     }
     break;
     }
 }
示例#3
0
 private void WindowBase_Loaded(object sender, RoutedEventArgs e)
 {
     if (TextBox_Value != null)
     {
         var bindExp = TextBox_Value.GetBindingExpression(TextBox.TextProperty);
         if (bindExp != null)
         {
             if (bindExp.ParentBinding.ValidationRules.Count > 0)
             {
                 var rule = bindExp.ParentBinding.ValidationRules[0] as InputWindow.RequiredRule;
                 if (rule != null)
                 {
                     rule.OnValidateCheck = mOnValidateCheck;
                 }
             }
         }
     }
 }
示例#4
0
        private void userControl_Loaded(object sender, RoutedEventArgs e)
        {
            var icc = BindInstance as InputWindow.IInputErrorCheckClass;

            if (TextBox_Value != null && icc != null)
            {
                var bindExp = TextBox_Value.GetBindingExpression(TextBox.TextProperty);
                if (bindExp != null)
                {
                    if (bindExp.ParentBinding.ValidationRules.Count > 0)
                    {
                        var rule = bindExp.ParentBinding.ValidationRules[0] as InputWindow.RequiredRule;
                        if (rule != null)
                        {
                            rule.OnValidateCheck = icc.IsInputValidate;
                        }
                    }
                }
            }
        }
示例#5
0
        void InputWindow_Loaded(object sender, RoutedEventArgs e)
        {
            if (TextBox_Value != null)
            {
                var bindExp = TextBox_Value.GetBindingExpression(TextBox.TextProperty);
                if (bindExp != null)
                {
                    if (bindExp.ParentBinding.ValidationRules.Count > 0)
                    {
                        var rule = bindExp.ParentBinding.ValidationRules[0] as RequiredRule;
                        if (rule != null)
                        {
                            rule.OnValidateCheck = mOnValidateCheck;
                        }
                    }
                }
            }

            mWinEffects.Clear();
            foreach (var win in DockControl.DockManager.Instance.DockableWindows)
            {
                mWinEffects[win] = Effect;
                win.Effect       = new BlurEffect()
                {
                    Radius     = 2,
                    KernelType = KernelType.Gaussian
                };
            }


            if (OwnerControl != null)
            {
                var oriPt = OwnerControl.PointToScreen(new Point(0, 0));
                this.Left = oriPt.X + OwnerControl.ActualWidth * 0.5 - this.ActualWidth * 0.5;
                this.Top  = oriPt.Y + OwnerControl.ActualHeight * 0.5 - this.ActualHeight * 0.5;
            }
        }
示例#6
0
        private void TextBox_Value_LostFocus(object sender, RoutedEventArgs e)
        {
            var be = TextBox_Value.GetBindingExpression(TextBox.TextProperty);

            be.UpdateSource();
        }