private void InitEvent() { MVWindow_IsInSync_And_IsSyncOwner_Callback = new MVWindow_IsInSync_And_IsSyncOwner_Function(IsInSync_And_IsSyncOwner); MVWindow_MVAction_Callback = new MVWindow_MVAction_Function(MVAction); Singleton_Socket.mvWindow_OpenIEventManager.MVWindow_IsInSync_And_IsSyncOwner_Event += MVWindow_IsInSync_And_IsSyncOwner_Callback; Singleton_Socket.mvWindow_OpenIEventManager.MVWindow_MVAction_Event += MVWindow_MVAction_Callback; // 滑鼠偵測 MouseTimer = new DispatcherTimer(); MouseTimer.Interval = TimeSpan.FromMilliseconds(1100); MouseTimer.Tick += new EventHandler(MouseTimer_Tick); MouseTimer.Start(); // 播放進度偵測 MediaPlayerTimer = new DispatcherTimer(); MediaPlayerTimer.Interval = TimeSpan.FromMilliseconds(200); MediaPlayerTimer.Tick += new EventHandler(MediaPlayerTimer_Tick); //MediaPlayerTimer.Start(); btnClose.MouseEnter += (sender, e) => { MouseTool.ShowHand(); }; btnClose.MouseLeave += (sender, e) => { MouseTool.ShowArrow(); }; btnClose.MouseLeftButtonDown += btnClose_MouseLeftButtonDown; btnSync.MouseEnter += (sender, e) => { MouseTool.ShowHand(); }; btnSync.MouseLeave += (sender, e) => { MouseTool.ShowArrow(); }; btnSync.MouseLeftButtonDown += btnSync_MouseLeftButtonDown; btnLight.MouseEnter += (sender, e) => { MouseTool.ShowHand(); }; btnLight.MouseLeave += (sender, e) => { MouseTool.ShowArrow(); }; btnLight.MouseLeftButtonDown += btnSync_MouseLeftButtonDown; btnFunction.MouseEnter += (sender, e) => { MouseTool.ShowHand(); }; btnFunction.MouseLeave += (sender, e) => { MouseTool.ShowArrow(); }; HeaderDP.MouseEnter += (sender, e) => { IsAlwaysShowHeaderFooter = true; }; HeaderDP.MouseLeave += (sender, e) => { IsAlwaysShowHeaderFooter = false; }; FooterDP.MouseEnter += (sender, e) => { IsAlwaysShowHeaderFooter = true; }; FooterDP.MouseLeave += (sender, e) => { IsAlwaysShowHeaderFooter = false; }; //SeekBar.MouseEnter += (sender, e) => { MouseTool.ShowHand(); }; //SeekBar.MouseLeave += (sender, e) => { MouseTool.ShowArrow(); }; SeekBar.ValueChanged += SeekBar_ValueChanged; mediaPlayer.MediaOpened += MediaPlayer_MediaOpened; mediaPlayer.Play(); btnFunction.Source = new BitmapImage(new Uri("images/mv_pause.png", UriKind.Relative)); img_animation.MouseLeftButtonDown += AnimationController_MouseLeftButtonDown; btnFunction.MouseLeftButtonDown += AnimationController_MouseLeftButtonDown; mediaPlayer.MouseLeftButtonDown += AnimationController_MouseLeftButtonDown; cbBooks.SelectionChanged += cbBooks_SelectionChanged; // PageJson ParsePageJson(); }
private void InitEvent() { MVWindow_IsInSync_And_IsSyncOwner_Callback = new MVWindow_IsInSync_And_IsSyncOwner_Function(IsInSync_And_IsSyncOwner); MVWindow_MVAction_Callback = new MVWindow_MVAction_Function(MVAction); Singleton_Socket.mvWindow_OpenIEventManager.MVWindow_IsInSync_And_IsSyncOwner_Event += MVWindow_IsInSync_And_IsSyncOwner_Callback; Singleton_Socket.mvWindow_OpenIEventManager.MVWindow_MVAction_Event += MVWindow_MVAction_Callback; MouseTimer = new DispatcherTimer(); MouseTimer.Interval = TimeSpan.FromMilliseconds(1100.0); MouseTimer.Tick += new EventHandler(MouseTimer_Tick); MouseTimer.Start(); MediaPlayerTimer = new DispatcherTimer(); MediaPlayerTimer.Interval = TimeSpan.FromMilliseconds(200.0); MediaPlayerTimer.Tick += new EventHandler(MediaPlayerTimer_Tick); Image image = btnClose; if (CS_0024_003C_003E9__CachedAnonymousMethodDelegatee == null) { CS_0024_003C_003E9__CachedAnonymousMethodDelegatee = new System.Windows.Input.MouseEventHandler(_003CInitEvent_003Eb__2); } image.MouseEnter += CS_0024_003C_003E9__CachedAnonymousMethodDelegatee; Image image2 = btnClose; if (CS_0024_003C_003E9__CachedAnonymousMethodDelegatef == null) { CS_0024_003C_003E9__CachedAnonymousMethodDelegatef = new System.Windows.Input.MouseEventHandler(_003CInitEvent_003Eb__3); } image2.MouseLeave += CS_0024_003C_003E9__CachedAnonymousMethodDelegatef; btnClose.MouseLeftButtonDown += new MouseButtonEventHandler(btnClose_MouseLeftButtonDown); Image image3 = btnSync; if (CS_0024_003C_003E9__CachedAnonymousMethodDelegate10 == null) { CS_0024_003C_003E9__CachedAnonymousMethodDelegate10 = new System.Windows.Input.MouseEventHandler(_003CInitEvent_003Eb__4); } image3.MouseEnter += CS_0024_003C_003E9__CachedAnonymousMethodDelegate10; Image image4 = btnSync; if (CS_0024_003C_003E9__CachedAnonymousMethodDelegate11 == null) { CS_0024_003C_003E9__CachedAnonymousMethodDelegate11 = new System.Windows.Input.MouseEventHandler(_003CInitEvent_003Eb__5); } image4.MouseLeave += CS_0024_003C_003E9__CachedAnonymousMethodDelegate11; btnSync.MouseLeftButtonDown += new MouseButtonEventHandler(btnSync_MouseLeftButtonDown); Image image5 = btnLight; if (CS_0024_003C_003E9__CachedAnonymousMethodDelegate12 == null) { CS_0024_003C_003E9__CachedAnonymousMethodDelegate12 = new System.Windows.Input.MouseEventHandler(_003CInitEvent_003Eb__6); } image5.MouseEnter += CS_0024_003C_003E9__CachedAnonymousMethodDelegate12; Image image6 = btnLight; if (CS_0024_003C_003E9__CachedAnonymousMethodDelegate13 == null) { CS_0024_003C_003E9__CachedAnonymousMethodDelegate13 = new System.Windows.Input.MouseEventHandler(_003CInitEvent_003Eb__7); } image6.MouseLeave += CS_0024_003C_003E9__CachedAnonymousMethodDelegate13; btnLight.MouseLeftButtonDown += new MouseButtonEventHandler(btnSync_MouseLeftButtonDown); Image image7 = btnFunction; if (CS_0024_003C_003E9__CachedAnonymousMethodDelegate14 == null) { CS_0024_003C_003E9__CachedAnonymousMethodDelegate14 = new System.Windows.Input.MouseEventHandler(_003CInitEvent_003Eb__8); } image7.MouseEnter += CS_0024_003C_003E9__CachedAnonymousMethodDelegate14; Image image8 = btnFunction; if (CS_0024_003C_003E9__CachedAnonymousMethodDelegate15 == null) { CS_0024_003C_003E9__CachedAnonymousMethodDelegate15 = new System.Windows.Input.MouseEventHandler(_003CInitEvent_003Eb__9); } image8.MouseLeave += CS_0024_003C_003E9__CachedAnonymousMethodDelegate15; HeaderDP.MouseEnter += new System.Windows.Input.MouseEventHandler(_003CInitEvent_003Eb__a); HeaderDP.MouseLeave += new System.Windows.Input.MouseEventHandler(_003CInitEvent_003Eb__b); FooterDP.MouseEnter += new System.Windows.Input.MouseEventHandler(_003CInitEvent_003Eb__c); FooterDP.MouseLeave += new System.Windows.Input.MouseEventHandler(_003CInitEvent_003Eb__d); SeekBar.ValueChanged += new RoutedPropertyChangedEventHandler <double>(SeekBar_ValueChanged); mediaPlayer.MediaOpened += new RoutedEventHandler(MediaPlayer_MediaOpened); mediaPlayer.Play(); btnFunction.Source = new BitmapImage(new Uri("images/mv_pause.png", UriKind.Relative)); img_animation.MouseLeftButtonDown += new MouseButtonEventHandler(AnimationController_MouseLeftButtonDown); btnFunction.MouseLeftButtonDown += new MouseButtonEventHandler(AnimationController_MouseLeftButtonDown); mediaPlayer.MouseLeftButtonDown += new MouseButtonEventHandler(AnimationController_MouseLeftButtonDown); cbBooks.SelectionChanged += new SelectionChangedEventHandler(cbBooks_SelectionChanged); ParsePageJson(); }