コード例 #1
0
 private void SetSliderValue()
 {
     invokeColorChange             = false;
     this.sliderTargetSize.Value   = (int)graphicsProperties.TextSize;
     this.sliderThickness.Value    = graphicsProperties.PenWidth;
     this.sliderTransparency.Value = (int)((graphicsProperties.Alpha * 100) / 255f);
     //this.sliderTickLength.Value = graphicsProperties.TargetSize;
     this.sliderColour.Value = graphicsProperties.ColorIndex() * 10;
     invokeColorChange       = true;
 }
コード例 #2
0
        private void btnDefault_Click(object sender, EventArgs e)
        {
            graphicsProperties.Alpha         = 0xFF;
            graphicsProperties.PenWidth      = 1;
            graphicsProperties.ExclusionSize = 20;
            graphicsProperties.TargetSize    = 1;
            graphicsProperties.Color         = Color.Yellow;

            this.sliderTargetSize.Value   = graphicsProperties.TargetSize;
            this.sliderThickness.Value    = graphicsProperties.PenWidth;
            this.sliderTransparency.Value = (int)(graphicsProperties.Alpha * 100 / 255f);
            this.sliderZoneSize.Value     = graphicsProperties.ExclusionSize;
            this.sliderZoneColour.Value   = graphicsProperties.ColorIndex() * 10;
            this.pictureBox.Invalidate();
        }
コード例 #3
0
 public LaserAppearanceCtrl(RichPictureBox pictureBox) : base()
 {
     resources          = new ComponentResourceManager(typeof(LaserAppearanceCtrl));
     this.ShowIndex     = 3;
     this.CtrlType      = CtrlType.LaserAppreance;
     graphicsProperties = graphicsPropertiesManager.GetPropertiesByName("Circle");
     InitializeComponent();
     this.pictureBox               = pictureBox;
     this.sliderTargetSize.Value   = graphicsProperties.TargetSize;
     this.sliderThickness.Value    = graphicsProperties.PenWidth;
     this.sliderTransparency.Value = (int)(graphicsProperties.Alpha * 100 / 255f);
     this.sliderZoneSize.Value     = graphicsProperties.ExclusionSize;
     this.sliderZoneColour.Value   = graphicsProperties.ColorIndex() * 10;
     this.InitializeThumbCustomShape();
 }