Ejemplo n.º 1
0
        private void InitEvent()
        {
            Home Home_Window = Application.Current.Windows.OfType <Home>().FirstOrDefault();

            if (Home_Window != null)
            {
                Home_Window.KeyDown += Home_Window_KeyDown;
            }

            btnYes.MouseEnter += (sender, e) => { MouseTool.ShowHand(); };
            btnYes.MouseLeave += (sender, e) => { MouseTool.ShowArrow(); };
            btnYes.MouseDown  += btnYes_MouseDown;

            btnNO.MouseEnter += (sender, e) => { MouseTool.ShowHand(); };
            btnNO.MouseLeave += (sender, e) => { MouseTool.ShowArrow(); };
            btnNO.MouseDown  += (sender, e) =>
            {
                if (PicUrl.Equals("") == false || StackLines.Count > 0)
                {
                    MessageBoxResult result = MessageBox.Show("是否要清除簽名檔", "系統訊息", MessageBoxButton.OKCancel);

                    if (result == MessageBoxResult.Cancel)
                    {
                        return;
                    }
                    PicUrl = "";
                }
                imgSignedPicPanel.Visibility = Visibility.Collapsed;
                txtPLS.Visibility            = Visibility.Visible;
                SignPadPanel.Visibility      = Visibility.Visible;
                SignPad.Children.Clear();
                SignPad.Strokes.Clear();
                StackLines.Clear();
            };

            btnBack.MouseEnter          += (sender, e) => { MouseTool.ShowHand(); };
            btnBack.MouseLeave          += (sender, e) => { MouseTool.ShowArrow(); };
            btnBack.MouseLeftButtonDown += (sender, e) => { Home_GoBackTogSignPictureCT_Event("", ""); };

            SignPad.MouseEnter += (sender, e) => { MouseTool.ShowPen(); };
            SignPad.MouseLeave += (sender, e) => { MouseTool.ShowArrow(); };
            //SignPad.MouseDown += SignPad_MouseDown;
            //SignPad.MouseMove += SignPad_MouseMove;
            //SignPad.MouseUp += SignPad_MouseUp;
            SignPad.PreviewMouseLeftButtonDown += (sender, e) =>
            {
                txtPLS.Visibility = Visibility.Collapsed;
            };



            imgSignedPicPanel.MouseEnter += (sender, e) => { MouseTool.ShowPen(); };
            imgSignedPicPanel.MouseLeave += (sender, e) => { MouseTool.ShowArrow(); };
            imgSignedPicPanel.PreviewMouseLeftButtonDown += (sender, e) =>
                                                            //imgSignedPicPanel.MouseLeftButtonDown += (sender, e) =>
            {
                imgSignedPicPanel.Visibility = Visibility.Collapsed;
                txtPLS.Visibility            = Visibility.Visible;
                SignPadPanel.Visibility      = Visibility.Visible;
            };

            btnSignOut.MouseEnter          += (sender, e) => { MouseTool.ShowHand(); };
            btnSignOut.MouseLeave          += (sender, e) => { MouseTool.ShowArrow(); };
            btnSignOut.MouseLeftButtonDown += (sender, e) =>
            {
                MessageBoxResult result = MessageBox.Show("您確定要簽退?", "系統訊息", MessageBoxButton.YesNo);
                if (result != MessageBoxResult.Yes)
                {
                    return;
                }

                MouseTool.ShowLoading();

                GetSignOutUpload.AsyncPOST(MeetingID, DeptID, UserID, (so) => { GetSignOutUpload_DoAction(so); });
            };
        }
Ejemplo n.º 2
0
 private static void _003CInitEvent_003Eb__c(object sender, MouseEventArgs e)
 {
     MouseTool.ShowPen();
 }