Пример #1
0
        /// <summary>
        /// 鼠标退出按钮范围时触发
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        internal void Btn_MouseLeave(object sender, MouseEventArgs e)
        {
            ZNC.Component.DynamicImageButton.DynamicButton ImgBtn = (ZNC.Component.DynamicImageButton.DynamicButton)sender;

            if (ImgBtn.Name == "btn_exit")
            {
                ImgBtn.IconImage = new BitmapImage(new Uri("pack://siteoforigin:,,,/image/button_exit.png"));
            }
            else if (ImgBtn.Name == "btn_user")
            {
                ImgBtn.IconImage = new BitmapImage(new Uri("pack://siteoforigin:,,,/image/button_userCH.png"));
            }
        }
Пример #2
0
        /// <summary>
        /// 普通系统按钮的单击事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        internal void Btn_Click(object sender, RoutedEventArgs e)
        {
            //App.Current.ShutdownMode = ShutdownMode.OnExplicitShutdown;

            // 用户切换功能
            ZNC.Component.DynamicImageButton.DynamicButton ImgBtn = (ZNC.Component.DynamicImageButton.DynamicButton)sender;
            if (ImgBtn.Name == "btn_user")
            {
                foreach (Window win in App.Current.Windows)
                {
                    if (win.Name == "")
                    {
                        _bYhch_Mode = true;
                    }

                    win.Close();
                }

                //LoginView LoginWindow = new LoginView();
                //LoginWindow.Show();
            }
        }