/// <summary>
        /// 当鼠标移出[记录列表]时
        /// </summary>
        private void RightCanvas_OnMouseLeave(object sender, MouseEventArgs e)
        {
            //隐藏[是否显示Bug回复]控件(把Opacity属性设置为0)
            AnimationTool.PlayGridOpacityAnimation(this.IsShowBugReplyGrid, null, 0, 0.25f);

            //隐藏“选择图片”按钮
            RecordInputBoxControl.HideChooseImageButton();
        }
        /// <summary>
        /// 当鼠标进入[记录列表]时
        /// </summary>
        private void RightCanvas_OnMouseEnter(object sender, MouseEventArgs e)
        {
            //显示[是否显示Bug回复]控件(把Opacity属性设置为1)
            AnimationTool.PlayGridOpacityAnimation(this.IsShowBugReplyGrid, null, 1, 0.25f);

            //显示“选择图片”按钮
            RecordInputBoxControl.ShowChooseImageButton();
        }
        //当[文本输入框]里的文字改变时
        private void InputTextBox_TextChanged(object sender, TextChangedEventArgs e)
        {
            //取到TextBox控件
            TextBox _textBox = sender as TextBox;

            //如果TextBox的内容为空,就把TextBox的背景设置为透明
            //如果TextBox的内容不为空,把TextBox的背景设置为白色
            AnimationTool.PlayTextChangedAnimation(_textBox);
        }
 /// <summary>
 /// 隐藏“选择图片”的按钮
 /// </summary>
 public void HideChooseImageButton()
 {
     //如果没有图片在显示,那么就可以关闭掉选择图片的按钮
     if (this.ImagePaths == null || this.ImagePaths.Count == 0)
     {
         //隐藏按钮
         AnimationTool.PlayGridOpacityAnimation(this.ChooseImageGrid, null, 0, 0.25f);
     }
 }
Exemple #5
0
        //如果鼠标双击
        private void BaseCheckControl_OnMouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            //获取Check的空姐
            ColorCheckControl _colorCheckControl = sender as ColorCheckControl;

            //让这个Check的按钮动画,恢复到正常的大小
            AnimationTool.PlayButtonAnimation(false, _colorCheckControl.PressAnimationSize, _colorCheckControl.BaseButtonScaleTransform);//获取"抬起动画",并播放动画

            //触发事件
            this.OnMouseDoubleClickCheck();
        }
        //当Name文本框里的文字改变时
        private void BugNameTextBox_TextChanged(object sender, TextChangedEventArgs e)
        {
            //取到TextBox控件
            TextBox _textBox = sender as TextBox;

            //如果TextBox的内容为空,就把TextBox的背景设置为透明
            //如果TextBox的内容不为空,把TextBox的背景设置为白色
            AnimationTool.PlayTextChangedAnimation(_textBox);

            //触发事件
            this.OnBugNameChange(_textBox.Text, _textBox.Text);

            //显示[相关Bug]的面板
            OpenOrCloseRelatedBugsGrid(true);
        }
        /// <summary>
        /// 依赖项属性发生改变时,触发的事件:
        /// 当IsOpenProperty依赖项属性,的属性值发生改变的时候,调用这个方法
        /// </summary>
        /// <param name="sender">依赖项对象</param>
        /// <param name="e">依赖项属性改变事件 的参数(里面有这个属性的新的值,和旧的值)</param>
        private static void OnIsOpenChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e)
        {
            //获取控件
            ListTipControl _listTipControl = sender as ListTipControl;

            //进行判断
            switch ((bool)e.NewValue)
            {
            //如果是打开Tip
            case true:
                //打开控件
                _listTipControl.Visibility = Visibility.Visible;

                /* 显示这个控件(把Opacity属性设置为1)*/
                //播放[第1个]动画:把Opacity属性设置为1
                AnimationTool.PlayGridOpacityAnimation(_listTipControl.BaseGrid, null, 1, 0.25f,
                                                       (object _sender1, EventArgs _e1) =>
                {
                    //当[第1个]动画播放完成后,播放[第2个动画]:啥也不干,等待3秒,然后关闭控件
                    AnimationTool.PlayGridOpacityAnimation(_listTipControl.BaseGrid, 1, 1, 3f,
                                                           (object _sender2, EventArgs _e2) =>
                    {
                        //当[第2个]动画播放完成后,关闭控件
                        _listTipControl.IsOpen = false;
                    });
                });
                break;

            //如果是关闭Tip
            case false:
                //隐藏这个控件(把Opacity属性设置为0)
                AnimationTool.PlayGridOpacityAnimation(_listTipControl.BaseGrid, null, 0, 0.25f,
                                                       (object _sender1, EventArgs _e1) =>
                {
                    //当动画播放完成后,关闭控件
                    _listTipControl.Visibility = Visibility.Collapsed;
                });
                break;
            }
        }
        /// <summary>
        /// 依赖项属性发生改变时,触发的事件:
        /// 当IsShowSubmitButtonAnimationProperty依赖项属性,的属性值发生改变的时候,调用这个方法
        /// </summary>
        /// <param name="sender">依赖项对象</param>
        /// <param name="e">依赖项属性改变事件 的参数(里面有这个属性的新的值,和旧的值)</param>
        private static void OnIsShowSubmitButtonAnimationChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e)
        {
            //获取控件
            BugUiControl _bugUiControl = sender as BugUiControl;

            //判断:动画
            switch ((bool)e.NewValue)
            {
            //当[省略号]显示时,等2秒后,关闭[省略号]
            case true:
                AnimationTool.PlayGridOpacityAnimation(_bugUiControl.AnimationGrid, 0, 0, 2f,
                                                       (object _sender1, EventArgs _e1) =>
                {
                    //当完成动画后,关闭[省略号]
                    _bugUiControl.IsShowSubmitButtonAnimation = false;
                });
                break;
            }

            //判断:返回按钮
            switch ((bool)e.NewValue)
            {
            //当[省略号]显示时,关闭[返回按钮]
            case true:
                _bugUiControl.BackGrid.Visibility = Visibility.Collapsed;
                break;

            //当[省略号]隐藏时,显示[返回按钮]
            case false:
                _bugUiControl.BackGrid.Visibility = Visibility.Visible;
                break;
            }

            //触发事件
            _bugUiControl.OnIsShowSubmitButtonAnimationChange((bool)e.OldValue, (bool)e.NewValue);
        }
 //当鼠标在[按钮]上抬起的时候,触发此方法
 private void Button_OnPreviewMouseUp(object sender, MouseButtonEventArgs e)
 {
     /* 获取"抬起动画",并播放动画 */
     AnimationTool.PlayButtonAnimation(false, this.PressAnimationSize, this.BaseButtonScaleTransform);
 }
 /// <summary>
 /// 显示“选择图片”的按钮
 /// </summary>
 public void ShowChooseImageButton()
 {
     //显示按钮
     AnimationTool.PlayGridOpacityAnimation(this.ChooseImageGrid, null, 1, 0.25f);
 }
 //当鼠标离开[Staff]按钮或者按钮时
 private void StaffPanelControl_MouseLeave(object sender, MouseEventArgs e)
 {
     //关闭Staff面板
     this.StaffGrid.Visibility = Visibility.Collapsed;
     AnimationTool.PlayGridOpacityAnimation(this.StaffGrid, null, 0, 0.25f);
 }
 //当鼠标进入[Staff]按钮或者按钮时
 private void StaffPanelControl_MouseEnter(object sender, MouseEventArgs e)
 {
     //打开Staff面板
     this.StaffGrid.Visibility = Visibility.Visible;
     AnimationTool.PlayGridOpacityAnimation(this.StaffGrid, null, 1, 0.25f);
 }
Exemple #13
0
 /// <summary>
 /// 当鼠标移出[Item]时
 /// </summary>
 private void LatelyProjectListItemControl_OnMouseLeave(object sender, MouseEventArgs e)
 {
     //隐藏[是否显示Bug回复]控件(把Opacity属性设置为0)
     AnimationTool.PlayGridOpacityAnimation(this.MoreGrid, null, 0, 0.25f);
 }
 //当鼠标移出控件时
 private void LatelyProjectUiControl_OnMouseLeave(object sender, MouseEventArgs e)
 {
     //隐藏[折叠]按钮(把Opacity属性设置为1)
     AnimationTool.PlayGridOpacityAnimation(this.FoldGrid, null, 0, 0.25f);
 }