コード例 #1
0
        private void Canvas_SizeChanged(object sender, SizeChangedEventArgs e)
        {
            Center.X = e.NewSize.Width / 2;
            Center.Y = e.NewSize.Height / 2;

            Radius        = Math.Min(e.NewSize.Width, e.NewSize.Height) / 2 - ThumbSize / 2;
            Ellipse.Width = Ellipse.Height = Radius * 2;

            Canvas.SetLeft(Ellipse, Center.X - Radius);
            Canvas.SetTop(Ellipse, Center.Y - Radius);

            Rotation = rotation;
            AngleChange?.Invoke(this, Rotation / 180 * Math.PI, Rotation); //用户控件:Value改变
        }
コード例 #2
0
ファイル: PieChartControl.cs プロジェクト: henrikja/EVEMon
 /// <summary>
 /// Event for when the graph angle changes
 /// </summary>
 /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
 private void OnAngleChange(EventArgs e)
 {
     AngleChange?.ThreadSafeInvoke(this, e);
 }
コード例 #3
0
 //滚轮
 private void Wheel_Changed(Point p, double d)
 {
     Rotation += d / 100;
     AngleChange?.Invoke(this, Rotation / 180 * Math.PI, Rotation); //用户控件:Value改变
 }
コード例 #4
0
 private void Complete(Point p)
 {
     Rotation = Method.点角度(Center, p);
     AngleChange?.Invoke(this, Rotation / 180 * Math.PI, Rotation); //用户控件:Value改变
 }