private void Window_ContentRendered(object sender, EventArgs e) { KeyDown += (_, e) => Shortcuts.GenericWindowShortcuts.KeysDown(null, e, this); // CloseButton CloseButton.TheButton.Click += delegate { Hide(); ConfigureWindows.GetMainWindow.Focus(); }; // MinButton MinButton.TheButton.Click += delegate { SystemCommands.MinimizeWindow(this); }; TitleBar.MouseLeftButtonDown += delegate { DragMove(); }; NegativeButton.Click += Negative; NegativeButton.PreviewMouseLeftButtonDown += delegate { PreviewMouseButtonDownAnim(NegativeColorsText); }; NegativeButton.MouseEnter += delegate { ButtonMouseOverAnim(NegativeColorsText); }; NegativeButton.MouseLeave += delegate { ButtonMouseLeaveAnim(NegativeColorsText); }; GrayscaleButton.Click += GraySceale; GrayscaleButton.PreviewMouseLeftButtonDown += delegate { PreviewMouseButtonDownAnim(BlackAndWhiteText); }; GrayscaleButton.MouseEnter += delegate { ButtonMouseOverAnim(BlackAndWhiteText); }; GrayscaleButton.MouseLeave += delegate { ButtonMouseLeaveAnim(BlackAndWhiteText); }; ColorToneButton.Click += ColorToneEffect; ColorToneButton.PreviewMouseLeftButtonDown += delegate { PreviewMouseButtonDownAnim(ColorToneText); }; ColorToneButton.MouseEnter += delegate { ButtonMouseOverAnim(ColorToneText); }; ColorToneButton.MouseLeave += delegate { ButtonMouseLeaveAnim(ColorToneText); }; OldMovieButton.Click += OldMovieEffect; OldMovieButton.PreviewMouseLeftButtonDown += delegate { PreviewMouseButtonDownAnim(OldMovieText); }; OldMovieButton.MouseEnter += delegate { ButtonMouseOverAnim(OldMovieText); }; OldMovieButton.MouseLeave += delegate { ButtonMouseLeaveAnim(OldMovieText); }; BloomButton.Click += Bloom; BloomButton.PreviewMouseLeftButtonDown += delegate { PreviewMouseButtonDownAnim(BloomText); }; BloomButton.MouseEnter += delegate { ButtonMouseOverAnim(BloomText); }; BloomButton.MouseLeave += delegate { ButtonMouseLeaveAnim(BloomText); }; GloomButton.Click += Gloom; GloomButton.PreviewMouseLeftButtonDown += delegate { PreviewMouseButtonDownAnim(GloomText); }; GloomButton.MouseEnter += delegate { ButtonMouseOverAnim(GloomText); }; GloomButton.MouseLeave += delegate { ButtonMouseLeaveAnim(GloomText); }; MonochromeButton.Click += Monochrome; MonochromeButton.PreviewMouseLeftButtonDown += delegate { PreviewMouseButtonDownAnim(MonochromeText); }; MonochromeButton.MouseEnter += delegate { ButtonMouseOverAnim(MonochromeText); }; MonochromeButton.MouseLeave += delegate { ButtonMouseLeaveAnim(MonochromeText); }; WavewarperButton.Click += WaveWarperEffect; WavewarperButton.PreviewMouseLeftButtonDown += delegate { PreviewMouseButtonDownAnim(WaveWarperText); }; WavewarperButton.MouseEnter += delegate { ButtonMouseOverAnim(WaveWarperText); }; WavewarperButton.MouseLeave += delegate { ButtonMouseLeaveAnim(WaveWarperText); }; UnderwaterButton.Click += UnderWaterEffect; UnderwaterButton.PreviewMouseLeftButtonDown += delegate { PreviewMouseButtonDownAnim(UnderwaterText); }; UnderwaterButton.MouseEnter += delegate { ButtonMouseOverAnim(UnderwaterText); }; UnderwaterButton.MouseLeave += delegate { ButtonMouseLeaveAnim(UnderwaterText); }; BandedSwirlButton.Click += BandedSwirlEffect; BandedSwirlButton.PreviewMouseLeftButtonDown += delegate { PreviewMouseButtonDownAnim(BandedSwirlText); }; BandedSwirlButton.MouseEnter += delegate { ButtonMouseOverAnim(BandedSwirlText); }; BandedSwirlButton.MouseLeave += delegate { ButtonMouseLeaveAnim(BandedSwirlText); }; SwirlButton.Click += SwirlEffect; SwirlButton.PreviewMouseLeftButtonDown += delegate { PreviewMouseButtonDownAnim(SwirlText); }; SwirlButton.MouseEnter += delegate { ButtonMouseOverAnim(SwirlText); }; SwirlButton.MouseLeave += delegate { ButtonMouseLeaveAnim(SwirlText); }; RippleButton.Click += RippleEffect1; RippleButton.PreviewMouseLeftButtonDown += delegate { PreviewMouseButtonDownAnim(RippleText); }; RippleButton.MouseEnter += delegate { ButtonMouseOverAnim(RippleText); }; RippleButton.MouseLeave += delegate { ButtonMouseLeaveAnim(RippleText); }; RippleAltButton.Click += RippleEffect2; RippleAltButton.PreviewMouseLeftButtonDown += delegate { PreviewMouseButtonDownAnim(RippleAltText); }; RippleAltButton.MouseEnter += delegate { ButtonMouseOverAnim(RippleAltText); }; RippleAltButton.MouseLeave += delegate { ButtonMouseLeaveAnim(RippleAltText); }; BlurButton.Click += BlurEffect; BlurButton.PreviewMouseLeftButtonDown += delegate { PreviewMouseButtonDownAnim(BlurText); }; BlurButton.MouseEnter += delegate { ButtonMouseOverAnim(BlurText); }; BlurButton.MouseLeave += delegate { ButtonMouseLeaveAnim(BlurText); }; DirectionalBlurButton.Click += Dir_blur; DirectionalBlurButton.PreviewMouseLeftButtonDown += delegate { PreviewMouseButtonDownAnim(DirectionalBlurText); }; DirectionalBlurButton.MouseEnter += delegate { ButtonMouseOverAnim(DirectionalBlurText); }; DirectionalBlurButton.MouseLeave += delegate { ButtonMouseLeaveAnim(DirectionalBlurText); }; TelescopicBlurButton.Click += Teleskopisk_blur; TelescopicBlurButton.PreviewMouseLeftButtonDown += delegate { PreviewMouseButtonDownAnim(TelescopicBlurText); }; TelescopicBlurButton.MouseEnter += delegate { ButtonMouseOverAnim(TelescopicBlurText); }; TelescopicBlurButton.MouseLeave += delegate { ButtonMouseLeaveAnim(TelescopicBlurText); }; PixelateButton.Click += PixelateEffect; PixelateButton.PreviewMouseLeftButtonDown += delegate { PreviewMouseButtonDownAnim(PixelateText); }; PixelateButton.MouseEnter += delegate { ButtonMouseOverAnim(PixelateText); }; PixelateButton.MouseLeave += delegate { ButtonMouseLeaveAnim(PixelateText); }; EmbossedButton.Click += Embossed; EmbossedButton.PreviewMouseLeftButtonDown += delegate { PreviewMouseButtonDownAnim(EmbossedText); }; EmbossedButton.MouseEnter += delegate { ButtonMouseOverAnim(EmbossedText); }; EmbossedButton.MouseLeave += delegate { ButtonMouseLeaveAnim(EmbossedText); }; SmoothMagnifyButton.Click += MagnifySmoothEffect; SmoothMagnifyButton.PreviewMouseLeftButtonDown += delegate { PreviewMouseButtonDownAnim(SmoothMagnifyText); }; SmoothMagnifyButton.MouseEnter += delegate { ButtonMouseOverAnim(SmoothMagnifyText); }; SmoothMagnifyButton.MouseLeave += delegate { ButtonMouseLeaveAnim(SmoothMagnifyText); }; PivotButton.Click += PivotEffect; PivotButton.PreviewMouseLeftButtonDown += delegate { PreviewMouseButtonDownAnim(PivotText); }; PivotButton.MouseEnter += delegate { ButtonMouseOverAnim(PivotText); }; PivotButton.MouseLeave += delegate { ButtonMouseLeaveAnim(PivotText); }; PaperfoldButton.Click += PaperFoldEffect; PaperfoldButton.PreviewMouseLeftButtonDown += delegate { PreviewMouseButtonDownAnim(PaperFoldText); }; PaperfoldButton.MouseEnter += delegate { ButtonMouseOverAnim(PaperFoldText); }; PaperfoldButton.MouseLeave += delegate { ButtonMouseLeaveAnim(PaperFoldText); }; PencilSketchButton.Click += SketchPencilStrokeEffect; PencilSketchButton.PreviewMouseLeftButtonDown += delegate { PreviewMouseButtonDownAnim(PencilSketchText); }; PencilSketchButton.MouseEnter += delegate { ButtonMouseOverAnim(PencilSketchText); }; PencilSketchButton.MouseLeave += delegate { ButtonMouseLeaveAnim(PencilSketchText); }; SketchButton.Click += Sketch; SketchButton.PreviewMouseLeftButtonDown += delegate { PreviewMouseButtonDownAnim(SketchText); }; SketchButton.MouseEnter += delegate { ButtonMouseOverAnim(SketchText); }; SketchButton.MouseLeave += delegate { ButtonMouseLeaveAnim(SketchText); }; TonemappingButton.Click += ToneMapping; TonemappingButton.PreviewMouseLeftButtonDown += delegate { PreviewMouseButtonDownAnim(ToneMappingText); }; TonemappingButton.MouseEnter += delegate { ButtonMouseOverAnim(ToneMappingText); }; TonemappingButton.MouseLeave += delegate { ButtonMouseLeaveAnim(ToneMappingText); }; BandsButton.Click += Bands; BandsButton.PreviewMouseLeftButtonDown += delegate { PreviewMouseButtonDownAnim(BandsText); }; BandsButton.MouseEnter += delegate { ButtonMouseOverAnim(BandsText); }; BandsButton.MouseLeave += delegate { ButtonMouseLeaveAnim(BandsText); }; GlasTileButton.Click += GlasTileEffect; GlasTileButton.PreviewMouseLeftButtonDown += delegate { PreviewMouseButtonDownAnim(GlassTileText); }; GlasTileButton.MouseEnter += delegate { ButtonMouseOverAnim(GlassTileText); }; GlasTileButton.MouseLeave += delegate { ButtonMouseLeaveAnim(GlassTileText); }; FrostyOutlineButton.Click += FrostyOutlineEffect; FrostyOutlineButton.PreviewMouseLeftButtonDown += delegate { PreviewMouseButtonDownAnim(FrostyOutlineText); }; FrostyOutlineButton.MouseEnter += delegate { ButtonMouseOverAnim(FrostyOutlineText); }; FrostyOutlineButton.MouseLeave += delegate { ButtonMouseLeaveAnim(FrostyOutlineText); }; // SaveButton SaveButton.PreviewMouseLeftButtonDown += delegate { PreviewMouseButtonDownAnim(SaveText); }; SaveButton.MouseEnter += delegate { ButtonMouseOverAnim(SaveText); }; SaveButton.MouseLeave += delegate { ButtonMouseLeaveAnim(SaveText); }; SaveButton.Click += (_, _) => Open_Save.SaveFiles(); }
private void Window_ContentRendered(object sender, EventArgs e) { // Center vertically Top = ((WindowLogic.MonitorInfo.WorkArea.Height * WindowLogic.MonitorInfo.DpiScaling) - ActualHeight) / 2 + WindowLogic.MonitorInfo.WorkArea.Top; KeyDown += KeysDown; KeyUp += KeysUp; Scroller.MouseWheel += Info_MouseWheel; // CloseButton CloseButton.TheButton.Click += delegate { Hide(); LoadWindows.GetMainWindow.Focus(); }; // MinButton MinButton.TheButton.Click += delegate { SystemCommands.MinimizeWindow(this); }; TitleBar.MouseLeftButtonDown += delegate { DragMove(); }; NegativeButton.Click += Negative; NegativeButton.Unchecked += Remove_Effects; NegativeButton.PreviewMouseLeftButtonDown += (s, x) => PreviewMouseButtonDownAnim(NegativeBrush); NegativeButton.MouseEnter += (s, x) => ButtonMouseOverAnim(NegativeBrush, true); NegativeButton.MouseLeave += (s, x) => ButtonMouseLeaveAnimBgColor(NegativeBrush, false); GrayscaleButton.Click += GraySceale; GrayscaleButton.Unchecked += Remove_Effects; GrayscaleButton.PreviewMouseLeftButtonDown += (s, x) => PreviewMouseButtonDownAnim(GrayscaleBrush); GrayscaleButton.MouseEnter += (s, x) => ButtonMouseOverAnim(GrayscaleBrush, true); GrayscaleButton.MouseLeave += (s, x) => ButtonMouseLeaveAnimBgColor(GrayscaleBrush, false); ColorToneButton.Click += ColorToneEffect; ColorToneButton.Unchecked += Remove_Effects; ColorToneButton.PreviewMouseLeftButtonDown += (s, x) => PreviewMouseButtonDownAnim(ColortoneBrush); ColorToneButton.MouseEnter += (s, x) => ButtonMouseOverAnim(ColortoneBrush, true); ColorToneButton.MouseLeave += (s, x) => ButtonMouseLeaveAnimBgColor(ColortoneBrush, false); OldMovieButton.Click += OldMovieEffect; OldMovieButton.Unchecked += Remove_Effects; OldMovieButton.PreviewMouseLeftButtonDown += (s, x) => PreviewMouseButtonDownAnim(OldMovieBrush); OldMovieButton.MouseEnter += (s, x) => ButtonMouseOverAnim(OldMovieBrush, true); OldMovieButton.MouseLeave += (s, x) => ButtonMouseLeaveAnimBgColor(OldMovieBrush, false); BloomButton.Click += Bloom; BloomButton.Unchecked += Remove_Effects; BloomButton.PreviewMouseLeftButtonDown += (s, x) => PreviewMouseButtonDownAnim(BloomBrush); BloomButton.MouseEnter += (s, x) => ButtonMouseOverAnim(BloomBrush, true); BloomButton.MouseLeave += (s, x) => ButtonMouseLeaveAnimBgColor(BloomBrush, false); GloomButton.Click += Gloom; GloomButton.Unchecked += Remove_Effects; GloomButton.PreviewMouseLeftButtonDown += (s, x) => PreviewMouseButtonDownAnim(GloomBrush); GloomButton.MouseEnter += (s, x) => ButtonMouseOverAnim(GloomBrush, true); GloomButton.MouseLeave += (s, x) => ButtonMouseLeaveAnimBgColor(GloomBrush, false); MonochromeButton.Click += Monochrome; MonochromeButton.Unchecked += Remove_Effects; MonochromeButton.PreviewMouseLeftButtonDown += (s, x) => PreviewMouseButtonDownAnim(MonocromeBrush); MonochromeButton.MouseEnter += (s, x) => ButtonMouseOverAnim(MonocromeBrush, true); MonochromeButton.MouseLeave += (s, x) => ButtonMouseLeaveAnimBgColor(MonocromeBrush, false); WavewarperButton.Click += WaveWarperEffect; WavewarperButton.Unchecked += Remove_Effects; WavewarperButton.PreviewMouseLeftButtonDown += (s, x) => PreviewMouseButtonDownAnim(WavewarperBrush); WavewarperButton.MouseEnter += (s, x) => ButtonMouseOverAnim(WavewarperBrush, true); WavewarperButton.MouseLeave += (s, x) => ButtonMouseLeaveAnimBgColor(WavewarperBrush, false); UnderwaterButton.Click += UnderWaterEffect; UnderwaterButton.Unchecked += Remove_Effects; UnderwaterButton.PreviewMouseLeftButtonDown += (s, x) => PreviewMouseButtonDownAnim(UnderwaterBrush); UnderwaterButton.MouseEnter += (s, x) => ButtonMouseOverAnim(UnderwaterBrush, true); UnderwaterButton.MouseLeave += (s, x) => ButtonMouseLeaveAnimBgColor(UnderwaterBrush, false); BandedSwirlButton.Click += BandedSwirlEffect; BandedSwirlButton.Unchecked += Remove_Effects; BandedSwirlButton.PreviewMouseLeftButtonDown += (s, x) => PreviewMouseButtonDownAnim(BandedSwirlBrush); BandedSwirlButton.MouseEnter += (s, x) => ButtonMouseOverAnim(BandedSwirlBrush, true); BandedSwirlButton.MouseLeave += (s, x) => ButtonMouseLeaveAnimBgColor(BandedSwirlBrush, false); RippleButton.Click += RippleEffect1; RippleButton.Unchecked += Remove_Effects; RippleButton.PreviewMouseLeftButtonDown += (s, x) => PreviewMouseButtonDownAnim(RippleBrush); RippleButton.MouseEnter += (s, x) => ButtonMouseOverAnim(RippleBrush, true); RippleButton.MouseLeave += (s, x) => ButtonMouseLeaveAnimBgColor(RippleBrush, false); RippleAltButton.Click += RippleEffect2; RippleAltButton.Unchecked += Remove_Effects; RippleAltButton.PreviewMouseLeftButtonDown += (s, x) => PreviewMouseButtonDownAnim(RippleAltBrush); RippleAltButton.MouseEnter += (s, x) => ButtonMouseOverAnim(RippleAltBrush, true); RippleAltButton.MouseLeave += (s, x) => ButtonMouseLeaveAnimBgColor(RippleAltBrush, false); BlurButton.Click += Poison_blur; BlurButton.Unchecked += Remove_Effects; BlurButton.PreviewMouseLeftButtonDown += (s, x) => PreviewMouseButtonDownAnim(BlurBrush); BlurButton.MouseEnter += (s, x) => ButtonMouseOverAnim(BlurBrush, true); BlurButton.MouseLeave += (s, x) => ButtonMouseLeaveAnimBgColor(BlurBrush, false); DirectionalBlurButton.Click += Dir_blur; DirectionalBlurButton.Unchecked += Remove_Effects; DirectionalBlurButton.PreviewMouseLeftButtonDown += (s, x) => PreviewMouseButtonDownAnim(DirectionalBlurBrush); DirectionalBlurButton.MouseEnter += (s, x) => ButtonMouseOverAnim(DirectionalBlurBrush, true); DirectionalBlurButton.MouseLeave += (s, x) => ButtonMouseLeaveAnimBgColor(DirectionalBlurBrush, false); TelescopicBlurButton.Click += Teleskopisk_blur; TelescopicBlurButton.Unchecked += Remove_Effects; TelescopicBlurButton.PreviewMouseLeftButtonDown += (s, x) => PreviewMouseButtonDownAnim(TelescopicBlurBrush); TelescopicBlurButton.MouseEnter += (s, x) => ButtonMouseOverAnim(TelescopicBlurBrush, true); TelescopicBlurButton.MouseLeave += (s, x) => ButtonMouseLeaveAnimBgColor(TelescopicBlurBrush, false); PixelateButton.Click += PixelateEffect; PixelateButton.Unchecked += Remove_Effects; PixelateButton.PreviewMouseLeftButtonDown += (s, x) => PreviewMouseButtonDownAnim(PixelateBrush); PixelateButton.MouseEnter += (s, x) => ButtonMouseOverAnim(PixelateBrush, true); PixelateButton.MouseLeave += (s, x) => ButtonMouseLeaveAnimBgColor(PixelateBrush, false); EmbossedButton.Click += Embossed; EmbossedButton.Unchecked += Remove_Effects; EmbossedButton.PreviewMouseLeftButtonDown += (s, x) => PreviewMouseButtonDownAnim(EmbossedBrush); EmbossedButton.MouseEnter += (s, x) => ButtonMouseOverAnim(EmbossedBrush, true); EmbossedButton.MouseLeave += (s, x) => ButtonMouseLeaveAnimBgColor(EmbossedBrush, false); SmoothMagnifyButton.Click += MagnifySmoothEffect; SmoothMagnifyButton.Unchecked += Remove_Effects; SmoothMagnifyButton.PreviewMouseLeftButtonDown += (s, x) => PreviewMouseButtonDownAnim(SmoothMagnifyBrush); SmoothMagnifyButton.MouseEnter += (s, x) => ButtonMouseOverAnim(SmoothMagnifyBrush, true); SmoothMagnifyButton.MouseLeave += (s, x) => ButtonMouseLeaveAnimBgColor(SmoothMagnifyBrush, false); PivotButton.Click += PivotEffect; PivotButton.Unchecked += Remove_Effects; PivotButton.PreviewMouseLeftButtonDown += (s, x) => PreviewMouseButtonDownAnim(PivotBrush); PivotButton.MouseEnter += (s, x) => ButtonMouseOverAnim(PivotBrush, true); PivotButton.MouseLeave += (s, x) => ButtonMouseLeaveAnimBgColor(PivotBrush, false); PaperfoldButton.Click += PaperFoldEffect; PaperfoldButton.Unchecked += Remove_Effects; PaperfoldButton.PreviewMouseLeftButtonDown += (s, x) => PreviewMouseButtonDownAnim(PaperfoldBrush); PaperfoldButton.MouseEnter += (s, x) => ButtonMouseOverAnim(PaperfoldBrush, true); PaperfoldButton.MouseLeave += (s, x) => ButtonMouseLeaveAnimBgColor(PaperfoldBrush, false); PencilSketchButton.Click += SketchPencilStrokeEffect; PencilSketchButton.Unchecked += Remove_Effects; PencilSketchButton.PreviewMouseLeftButtonDown += (s, x) => PreviewMouseButtonDownAnim(PencilSketchBrush); PencilSketchButton.MouseEnter += (s, x) => ButtonMouseOverAnim(PencilSketchBrush, true); PencilSketchButton.MouseLeave += (s, x) => ButtonMouseLeaveAnimBgColor(PencilSketchBrush, false); SketchButton.Click += Sketch; SketchButton.Unchecked += Remove_Effects; SketchButton.PreviewMouseLeftButtonDown += (s, x) => PreviewMouseButtonDownAnim(SketchBrush); SketchButton.MouseEnter += (s, x) => ButtonMouseOverAnim(SketchBrush, true); SketchButton.MouseLeave += (s, x) => ButtonMouseLeaveAnimBgColor(SketchBrush, false); TonemappingButton.Click += ToneMapping; TonemappingButton.Unchecked += Remove_Effects; TonemappingButton.PreviewMouseLeftButtonDown += (s, x) => PreviewMouseButtonDownAnim(TonemappingBrush); TonemappingButton.MouseEnter += (s, x) => ButtonMouseOverAnim(TonemappingBrush, true); TonemappingButton.MouseLeave += (s, x) => ButtonMouseLeaveAnimBgColor(TonemappingBrush, false); BandsButton.Click += bands; BandsButton.Unchecked += Remove_Effects; BandsButton.PreviewMouseLeftButtonDown += (s, x) => PreviewMouseButtonDownAnim(BandsBrush); BandsButton.MouseEnter += (s, x) => ButtonMouseOverAnim(BandsBrush, true); BandsButton.MouseLeave += (s, x) => ButtonMouseLeaveAnimBgColor(BandsBrush, false); GlasTileButton.Click += GlasTileEffect; GlasTileButton.Unchecked += Remove_Effects; GlasTileButton.PreviewMouseLeftButtonDown += (s, x) => PreviewMouseButtonDownAnim(GlasTileBrush); GlasTileButton.MouseEnter += (s, x) => ButtonMouseOverAnim(GlasTileBrush, true); GlasTileButton.MouseLeave += (s, x) => ButtonMouseLeaveAnimBgColor(GlasTileBrush, false); FrostyOutlineButton.Click += FrostyOutlineEffect; FrostyOutlineButton.Unchecked += Remove_Effects; FrostyOutlineButton.PreviewMouseLeftButtonDown += (s, x) => PreviewMouseButtonDownAnim(FrostyOutlineBrush); FrostyOutlineButton.MouseEnter += (s, x) => ButtonMouseOverAnim(FrostyOutlineBrush, true); FrostyOutlineButton.MouseLeave += (s, x) => ButtonMouseLeaveAnimBgColor(FrostyOutlineBrush, false); // SaveButton SaveButton.PreviewMouseLeftButtonDown += delegate { PreviewMouseButtonDownAnim(SaveText); }; SaveButton.MouseEnter += delegate { ButtonMouseOverAnim(SaveText); }; SaveButton.MouseEnter += delegate { AnimationHelper.MouseEnterBgTexColor(SaveBrush); }; SaveButton.MouseLeave += delegate { ButtonMouseLeaveAnim(SaveText); }; SaveButton.MouseLeave += delegate { AnimationHelper.MouseLeaveBgTexColor(SaveBrush); }; SaveButton.Click += (_, _) => Open_Save.SaveFiles(); }