Пример #1
0
        private void RegisterEventHandlers()
        {
            this.containerColor.Click += (object sender, EventArgs args) =>
            {
                this.BuildAndShowColorMenu();
            };

            this.containerHeight.Click += (object sender, EventArgs args) =>
            {
                this.MoveToFragment(ViewfinderRectangleHeightMeasureFragment.Create(), true, null);
            };

            this.containerWidth.Click += (object sender, EventArgs args) =>
            {
                this.MoveToFragment(ViewfinderRectangleWidthMeasureFragment.Create(), true, null);
            };

            this.containerSizeSpec.Click += (object sender, EventArgs args) =>
            {
                this.BuildAndShowSizeSpecificationMenu();
            };

            this.editHeightAspect.EditorAction += (object sender, TextView.EditorActionEventArgs args) =>
            {
                if (args.ActionId == ImeAction.Done)
                {
                    this.ApplyHeightChange(this.editHeightAspect.Text);
                    this.DismissKeyboard(this.editHeightAspect);
                    this.editHeightAspect.ClearFocus();
                }
            };

            this.editWidthAspect.EditorAction += (object sender, TextView.EditorActionEventArgs args) =>
            {
                if (args.ActionId == ImeAction.Done)
                {
                    this.ApplyWidthChange(this.editWidthAspect.Text);
                    this.DismissKeyboard(this.editWidthAspect);
                    this.editWidthAspect.ClearFocus();
                }
            };

            this.containerLaserlineWidth.Click += (object sender, EventArgs args) =>
            {
                this.MoveToFragment(ViewfinderLaserlineWidthMeasureFragment.Create(), true, null);
            };

            this.containerEnabledColor.Click += (object sender, EventArgs args) =>
            {
                this.BuildAndShowEnabledColorMenu();
            };

            this.containerDisabledColor.Click += (object sender, EventArgs args) =>
            {
                this.BuildAndShowDisabledColorMenu();
            };
        }
Пример #2
0
        private void RegisterEventHandlers()
        {
            this.containerColor.Click += (object sender, EventArgs args) =>
            {
                this.BuildAndShowColorMenu();
            };

            this.containerRectangularDisabledColor.Click += (object sender, EventArgs args) =>
            {
                this.BuildAndShowRectangularDisabledColorMenu();
            };

            this.containerRectangularStyle.Click += (object sender, EventArgs args) =>
            {
                this.BuildAndShowRectangularStyleMenu();
            };

            this.containerRectangularLineStyle.Click += (object sender, EventArgs args) =>
            {
                this.BuildAndShowRectangularLineStyleMenu();
            };

            this.containerHeight.Click += (object sender, EventArgs args) =>
            {
                this.MoveToFragment(ViewfinderRectangleHeightMeasureFragment.Create(), true, null);
            };

            this.containerWidth.Click += (object sender, EventArgs args) =>
            {
                this.MoveToFragment(ViewfinderRectangleWidthMeasureFragment.Create(), true, null);
            };

            this.containerSizeSpec.Click += (object sender, EventArgs args) =>
            {
                this.BuildAndShowSizeSpecificationMenu();
            };

            this.editHeightAspect.EditorAction += (object sender, TextView.EditorActionEventArgs args) =>
            {
                if (args.ActionId == ImeAction.Done)
                {
                    this.ApplyHeightChange(this.editHeightAspect.Text);
                    this.DismissKeyboard(this.editHeightAspect);
                    this.editHeightAspect.ClearFocus();
                }
            };

            this.editWidthAspect.EditorAction += (object sender, TextView.EditorActionEventArgs args) =>
            {
                if (args.ActionId == ImeAction.Done)
                {
                    this.ApplyWidthChange(this.editWidthAspect.Text);
                    this.DismissKeyboard(this.editWidthAspect);
                    this.editWidthAspect.ClearFocus();
                }
            };

            this.editShorterDimension.EditorAction += (object sender, TextView.EditorActionEventArgs args) =>
            {
                if (args.ActionId == ImeAction.Done)
                {
                    this.ApplyShorterDimensionChange(this.editShorterDimension.Text);
                    this.DismissKeyboard(this.editShorterDimension);
                    this.editShorterDimension.ClearFocus();
                }
            };

            this.editLongerDimensionAspect.EditorAction += (object sender, TextView.EditorActionEventArgs args) =>
            {
                if (args.ActionId == ImeAction.Done)
                {
                    this.ApplyLongerDimensionAspectChange(this.editLongerDimensionAspect.Text);
                    this.DismissKeyboard(this.editLongerDimensionAspect);
                    this.editLongerDimensionAspect.ClearFocus();
                }
            };

            this.editRectangularDimming.EditorAction += (object sender, TextView.EditorActionEventArgs args) =>
            {
                if (args.ActionId == ImeAction.Done)
                {
                    this.ApplyRectangularDimmingChange(this.editRectangularDimming.Text);
                    this.DismissKeyboard(this.editRectangularDimming);
                    this.editRectangularDimming.ClearFocus();
                }
            };

            this.switchRectangularAnimation.CheckedChange += (object sender, CompoundButton.CheckedChangeEventArgs args) =>
            {
                this.viewModel.SetRectangularAnimationEnabled(args.IsChecked);
                this.RefreshRectangularAnimation(args.IsChecked);
            };

            this.switchRectangularLooping.CheckedChange += (object sender, CompoundButton.CheckedChangeEventArgs args) =>
            {
                this.viewModel.SetRectangularLoopingEnabled(args.IsChecked);
            };

            this.containerLaserlineStyle.Click += (object sender, EventArgs args) =>
            {
                this.BuildAndShowLaserlineStyleMenu();
            };

            this.containerLaserlineWidth.Click += (object sender, EventArgs args) =>
            {
                this.MoveToFragment(ViewfinderLaserlineWidthMeasureFragment.Create(), true, null);
            };

            this.containerEnabledColor.Click += (object sender, EventArgs args) =>
            {
                this.BuildAndShowEnabledColorMenu();
            };

            this.containerDisabledColor.Click += (object sender, EventArgs args) =>
            {
                this.BuildAndShowDisabledColorMenu();
            };

            this.containerAimerFrameColor.Click += (object sender, EventArgs args) =>
            {
                this.BuildAndShowAimerFrameColorMenu();
            };

            this.containerAimerDotColor.Click += (object sender, EventArgs args) =>
            {
                this.BuildAndShowAimerDotColorMenu();
            };
        }