Example #1
0
        void ReleaseDesignerOutlets()
        {
            if (RadiusSlider != null)
            {
                RadiusSlider.Dispose();
                RadiusSlider = null;
            }

            if (RadiusValue != null)
            {
                RadiusValue.Dispose();
                RadiusValue = null;
            }
        }
Example #2
0
        private void BindingCadObject(LProjectionSetting projectionSetting)
        {
            CRSUpDn.DataContext = projectionSetting.PointStep;
            CRSUpDn.SetBinding(NumericUpDown.ValueProperty, "MX");
            projectionSetting.PointStep.PropertyChanged += M_ChangePoint;

            RadiusSlider.Value       = projectionSetting.RadiusEdge;
            RadiusSlider.DataContext = projectionSetting;
            RadiusSlider.SetBinding(Slider.ValueProperty, "RadiusEdge");
            MonchaHub.Size.PropertyChanged += Size_ChangePoint;

            MultiplierSlider.Value       = projectionSetting.StartLineWait;
            MultiplierSlider.DataContext = projectionSetting;
            MultiplierSlider.SetBinding(Slider.ValueProperty, "StartLineWait");

            DistanceUpDn.DataContext = projectionSetting;
            DistanceUpDn.SetBinding(NumericUpDown.ValueProperty, "Distance");

            RedUpDn.DataContext = projectionSetting;
            RedUpDn.SetBinding(NumericUpDown.ValueProperty, "Red");

            RedToggle.DataContext = projectionSetting;
            RedToggle.SetBinding(ToggleSwitch.IsOnProperty, "RedOn");

            GreenUpDn.DataContext = projectionSetting;
            GreenUpDn.SetBinding(NumericUpDown.ValueProperty, "Green");

            GreenToggle.DataContext = projectionSetting;
            GreenToggle.SetBinding(ToggleSwitch.IsOnProperty, "GreenOn");

            BlueUpDn.DataContext = projectionSetting;
            BlueUpDn.SetBinding(NumericUpDown.ValueProperty, "Blue");

            BlueToggle.DataContext = projectionSetting;
            BlueToggle.SetBinding(ToggleSwitch.IsOnProperty, "BlueOn");

            DeviceLayerCombo.Items.Clear();
            DeviceLayerCombo.DisplayMemberPath = "HWIdentifier";
            DeviceLayerCombo.Items.Add(null);
            foreach (MonchaDevice device in MonchaHub.Devices)
            {
                DeviceLayerCombo.Items.Add(device);
            }

            projectionSetting.PropertyChanged           += ProjectionSetting_PropertyChanged;
            projectionSetting.PointStep.PropertyChanged += ProjectionSetting_PropertyChanged;
        }
Example #3
0
        void ReleaseDesignerOutlets()
        {
            if (DesignPreview != null)
            {
                DesignPreview.Dispose();
                DesignPreview = null;
            }

            if (AddColorButton != null)
            {
                AddColorButton.Dispose();
                AddColorButton = null;
            }

            if (AddPointButton != null)
            {
                AddPointButton.Dispose();
                AddPointButton = null;
            }

            if (BackButton != null)
            {
                BackButton.Dispose();
                BackButton = null;
            }

            if (DeleteButton != null)
            {
                DeleteButton.Dispose();
                DeleteButton = null;
            }

            if (DeletePointButton != null)
            {
                DeletePointButton.Dispose();
                DeletePointButton = null;
            }

            if (DesignBar != null)
            {
                DesignBar.Dispose();
                DesignBar = null;
            }

            if (DuplicateButton != null)
            {
                DuplicateButton.Dispose();
                DuplicateButton = null;
            }

            if (DuplicatePointButton != null)
            {
                DuplicatePointButton.Dispose();
                DuplicatePointButton = null;
            }

            if (GradientName != null)
            {
                GradientName.Dispose();
                GradientName = null;
            }

            if (LinkedColorDropdown != null)
            {
                LinkedColorDropdown.Dispose();
                LinkedColorDropdown = null;
            }

            if (OpacitySlider != null)
            {
                OpacitySlider.Dispose();
                OpacitySlider = null;
            }

            if (OpacityValue != null)
            {
                OpacityValue.Dispose();
                OpacityValue = null;
            }

            if (PointColor != null)
            {
                PointColor.Dispose();
                PointColor = null;
            }

            if (SelectedColorTitle != null)
            {
                SelectedColorTitle.Dispose();
                SelectedColorTitle = null;
            }

            if (TileDropdown != null)
            {
                TileDropdown.Dispose();
                TileDropdown = null;
            }

            if (TypeDropdown != null)
            {
                TypeDropdown.Dispose();
                TypeDropdown = null;
            }

            if (RadiusSlider != null)
            {
                RadiusSlider.Dispose();
                RadiusSlider = null;
            }

            if (RadiusValue != null)
            {
                RadiusValue.Dispose();
                RadiusValue = null;
            }
        }