private void OnSelectedLinePointChanged(object sender, IndexEventArgs e)
			{
				_isDirty = true;
			}
Пример #2
0
 protected virtual void FireAfterAddToIndex(IndexEventArgs e)
 {
     if (AfterAddToIndex != null)
         AfterAddToIndex(this, e);
 }
Пример #3
0
 private void OnDocumentLayersRemovingAt(object sender, IndexEventArgs e)
 {
 }
Пример #4
0
			private void OnAnchorPointChanged(object sender, IndexEventArgs e)
			{
				IDrawable reslicedResult = this.Reslice();

				if (reslicedResult != null)
					reslicedResult.Draw();
			}
Пример #5
0
		private void OnSubjectPointChanged(object sender, IndexEventArgs e)
		{
			if (_suspendSubjectPointChangeEvents)
				return;

			this.OnSubjectPointChanged(e.Index);
		}
Пример #6
0
		private void OnPointsItemRemoved(object sender, IndexEventArgs e)
		{
			if (_lines.Graphics.Count > 0)
			{
				if (e.Index == _points.Count)
				{
					_lines.Graphics.RemoveAt(e.Index - 1);
				}
				else if (e.Index > 0)
				{
					_lines.Graphics.RemoveAt(e.Index);
					((LinePrimitive) _lines.Graphics[e.Index - 1]).Point2 = _points[e.Index];
				}
				else
				{
					_lines.Graphics.RemoveAt(e.Index);
				}
			}
			base.NotifyVisualStateChanged("Points");
		}
Пример #7
0
 protected virtual void FireBeforeRemoveFromIndex(IndexEventArgs e)
 {
     _e.FireCancelableEvent(BeforeRemoveFromIndex, this, e);
 }
        private void gradientInput_ValueChanged(object sender, IndexEventArgs e)
        {
            if (ignore == 0)
            {
                int lo = gradientInput.GetValue(0), hi = gradientInput.GetValue(1);
                ignore++;

                switch (e.Index)
                {
                    case 0:
                        inputLoUpDown.Text = lo.ToString();
                        break;

                    case 1:
                        inputHiUpDown.Text = hi.ToString();
                        break;
                }

                UpdateLevels();
                ignore--;
            }
        }
 private void OnSelectedLinePointChanged(object sender, IndexEventArgs e)
 {
     _isDirty = true;
 }
Пример #10
0
 void mainSlider_ItemHover(object sender, IndexEventArgs e)
 {
     print("Item hover: " + e.Item);
 }
Пример #11
0
 protected override void Awake()
 {
     base.Awake();
     indexArgs = new IndexEventArgs(index);
     args      = indexArgs;
 }
Пример #12
0
 protected override void Awake()
 {
     base.Awake();
     moveSelectedArgs = new IndexEventArgs();
 }
Пример #13
0
 void button_Clicked(object sender, IndexEventArgs e)
 {
     players.EachPlayer(p => p.GoToPlaylistIndex(e.Index));
     players.EachPlayer(p => p.Play());
 }
Пример #14
0
 protected virtual void FireAfterRemoveFromIndex(IndexEventArgs e)
 {
     if (AfterRemoveFromIndex != null)
         AfterRemoveFromIndex(this, e);
 }
Пример #15
0
 private void swatchControl_ColorClicked(object sender, IndexEventArgs e)
 {
     Color = paletteColors[e.Index];
 }
Пример #16
0
 protected virtual void FireBeforeRemoveFromIndex(IndexEventArgs e)
 {
     _e.FireCancelableEvent(BeforeRemoveFromIndex, this, e);
 }
Пример #17
0
        private void RgbGradientControl_ValueChanged(object sender, IndexEventArgs ce)
        {
            if (IgnoreChangedEvents)
            {
                return;
            }

            int red;

            if (sender == redGradientControl)
            {
                red = redGradientControl.Value;
            }
            else
            {
                red = (int)redUpDown.Value;
            }

            int green;

            if (sender == greenGradientControl)
            {
                green = greenGradientControl.Value;
            }
            else
            {
                green = (int)greenUpDown.Value;
            }

            int blue;

            if (sender == blueGradientControl)
            {
                blue = blueGradientControl.Value;
            }
            else
            {
                blue = (int)blueUpDown.Value;
            }

            Color    rgbColor = Color.FromArgb(255, red, green, blue);
            HsvColor hsvColor = HsvColor.FromColor(rgbColor);

            PushIgnoreChangedEvents();
            Utility.SetNumericUpDownValue(hueUpDown, hsvColor.Hue);
            Utility.SetNumericUpDownValue(saturationUpDown, hsvColor.Saturation);
            Utility.SetNumericUpDownValue(valueUpDown, hsvColor.Value);

            Utility.SetNumericUpDownValue(redUpDown, rgbColor.R);
            Utility.SetNumericUpDownValue(greenUpDown, rgbColor.G);
            Utility.SetNumericUpDownValue(blueUpDown, rgbColor.B);
            PopIgnoreChangedEvents();

            string hexText = GetHexNumericUpDownValue(rgbColor.R, rgbColor.G, rgbColor.B);

            hexBox.Text = hexText;

            Color = rgbColor;

            Update();
        }
        private void gradientOutput_ValueChanged(object sender, IndexEventArgs e)
        {
            if (ignore == 0)
            {
                int lo = gradientOutput.GetValue(0), md, hi = gradientOutput.GetValue(2);
                md = (int)(lo + (hi - lo) * Math.Pow(0.5, (double)outputGammaUpDown.Value));
                ignore++;

                switch (e.Index)
                {
                    case 0:
                        outputLowUpDown.Text = lo.ToString();
                        break;

                    case 1:
                        md = gradientOutput.GetValue(1);
                        outputGammaUpDown.Value = (decimal)Utility.Clamp(1 / Math.Log(0.5, (float)(md - lo) / (float)(hi - lo)), 0.1, 10.0);
                        break;

                    case 2:
                        outputHiUpDown.Text = hi.ToString();
                        break;
                }

                gradientOutput.SetValue(1, md);
                UpdateLevels();
                ignore--;
            }
        }
Пример #19
0
        private void HsvGradientControl_ValueChanged(object sender, IndexEventArgs e)
        {
            if (IgnoreChangedEvents)
            {
                return;
            }

            int hue;

            if (sender == hueGradientControl)
            {
                hue = (hueGradientControl.Value * 360) / 255;
            }
            else
            {
                hue = (int)hueUpDown.Value;
            }

            int saturation;

            if (sender == saturationGradientControl)
            {
                saturation = (saturationGradientControl.Value * 100) / 255;
            }
            else
            {
                saturation = (int)saturationUpDown.Value;
            }

            int value;

            if (sender == valueGradientControl)
            {
                value = (valueGradientControl.Value * 100) / 255;
            }
            else
            {
                value = (int)valueUpDown.Value;
            }

            HsvColor hsvColor = new HsvColor(hue, saturation, value);

            colorWheel.HsvColor = hsvColor;
            RgbColor rgbColor = hsvColor.ToRgb();
            Color    color    = Color.FromArgb((byte)rgbColor.Red, (byte)rgbColor.Green, (byte)rgbColor.Blue);

            Utility.SetNumericUpDownValue(hueUpDown, hsvColor.Hue);
            Utility.SetNumericUpDownValue(saturationUpDown, hsvColor.Saturation);
            Utility.SetNumericUpDownValue(valueUpDown, hsvColor.Value);

            Utility.SetNumericUpDownValue(redUpDown, rgbColor.Red);
            Utility.SetNumericUpDownValue(greenUpDown, rgbColor.Green);
            Utility.SetNumericUpDownValue(blueUpDown, rgbColor.Blue);

            string hexText = GetHexNumericUpDownValue(rgbColor.Red, rgbColor.Green, rgbColor.Blue);

            hexBox.Text = hexText;

            Color = color;

            Update();
        }
Пример #20
0
		private void OnPointsItemAdded(object sender, IndexEventArgs e)
		{
			if (_points.Count >= 2)
			{
				LinePrimitive line = new LinePrimitive();
				line.Color = _color;
				line.LineStyle = _lineStyle;
				line.CoordinateSystem = this.CoordinateSystem;
				try
				{
					if (e.Index == _points.Count - 1)
					{
						_lines.Graphics.Add(line);
						line.Point1 = _points[e.Index - 1];
						line.Point2 = _points[e.Index];
					}
					else
					{
						_lines.Graphics.Insert(e.Index, line);
						line.Point1 = _points[e.Index];
						line.Point2 = _points[e.Index + 1];

						if (e.Index > 0)
							((LinePrimitive) _lines.Graphics[e.Index - 1]).Point2 = _points[e.Index];
					}
				}
				finally
				{
					line.ResetCoordinateSystem();
				}
			}
			base.NotifyVisualStateChanged("Points");
		}
Пример #21
0
 void mainSlider_ItemHover(object sender, IndexEventArgs e)
 {
     print("Item hover: " + e.Item);
 }
Пример #22
0
		private void OnPointsItemChanged(object sender, IndexEventArgs e)
		{
			if (_lines.Graphics.Count > 0)
			{
				if (e.Index < _points.Count - 1)
				{
					((LinePrimitive) _lines.Graphics[e.Index]).Point1 = _points[e.Index];
				}

				if (e.Index > 0)
				{
					((LinePrimitive) _lines.Graphics[e.Index - 1]).Point2 = _points[e.Index];
				}
			}
			base.NotifyVisualStateChanged("Points");
		}
Пример #23
0
 private void OnDocumentLayersInserted(object sender, IndexEventArgs e)
 {
 }