private Control CreateListBox(ITypeDescriptorContext context, object value) { ListBox listBox = new ListBox(); listBox.Dock = DockStyle.Fill; listBox.SelectedValueChanged += new EventHandler(listBox_SelectedValueChanged); listBox.BorderStyle = BorderStyle.None; listBox.ItemHeight = 13; listBox.Items.Add("(none)"); CarouselBezierPath carouselBezierPath = new CarouselBezierPath(); carouselBezierPath.CtrlPoint1 = new Telerik.WinControls.UI.Point3D(14.0, 76.0, 70); carouselBezierPath.CtrlPoint2 = new Telerik.WinControls.UI.Point3D(86.0, 76.0, 70); carouselBezierPath.FirstPoint = new Telerik.WinControls.UI.Point3D(10, 20, 0); carouselBezierPath.LastPoint = new Telerik.WinControls.UI.Point3D(90, 20, 0); CarouselEllipsePath carouselEllipsePath = new CarouselEllipsePath(); carouselEllipsePath.Center = new Telerik.WinControls.UI.Point3D(50, 50, 0); carouselEllipsePath.FinalAngle = -100; carouselEllipsePath.InitialAngle = -90; carouselEllipsePath.U = new Telerik.WinControls.UI.Point3D(-20.0, -17.0, -50.0); carouselEllipsePath.V = new Telerik.WinControls.UI.Point3D(30.0, -25.0, -60.0); carouselEllipsePath.ZScale = 500; listBox.Items.Add(new CarouselPathListItem(carouselBezierPath)); listBox.Items.Add(new CarouselPathListItem(carouselEllipsePath)); return(listBox); }
private void OnRadRadioPath_ToggleStateChanged(object sender, StateChangedEventArgs args) { switch (this.radRadioBezier.ToggleState) { case ToggleState.On: CarouselBezierPath carouselPath = new CarouselBezierPath(); carouselPath.CtrlPoint1 = new Telerik.WinControls.UI.Point3D(125, 150, 400); carouselPath.CtrlPoint2 = new Telerik.WinControls.UI.Point3D(64, -80, -200); carouselPath.FirstPoint = new Telerik.WinControls.UI.Point3D(10, 10, -0); carouselPath.LastPoint = new Telerik.WinControls.UI.Point3D(19, 80, -100); carouselPath.ZScale = 200; this.radCarouselDemo.CarouselPath = carouselPath; break; case ToggleState.Off: CarouselEllipsePath ellipsePath = new CarouselEllipsePath(); ellipsePath.Center = new Telerik.WinControls.UI.Point3D(50, 47, 0); ellipsePath.FinalAngle = 270; ellipsePath.InitialAngle = 270; ellipsePath.U = new Telerik.WinControls.UI.Point3D(31, -21, 0); ellipsePath.V = new Telerik.WinControls.UI.Point3D(0, 22, 200); ellipsePath.ZScale = 400; this.radCarouselDemo.CarouselPath = ellipsePath; break; } }
private Control CreateListBox(ITypeDescriptorContext context, object value) { System.Windows.Forms.ListBox listBox = new System.Windows.Forms.ListBox(); listBox.Dock = DockStyle.Fill; listBox.SelectedValueChanged += new EventHandler(this.listBox_SelectedValueChanged); listBox.BorderStyle = BorderStyle.None; listBox.ItemHeight = 13; listBox.Items.Add((object)"(none)"); CarouselBezierPath carouselBezierPath = new CarouselBezierPath(); carouselBezierPath.CtrlPoint1 = new Point3D(14.0, 76.0, 70.0); carouselBezierPath.CtrlPoint2 = new Point3D(86.0, 76.0, 70.0); carouselBezierPath.FirstPoint = new Point3D(10.0, 20.0, 0.0); carouselBezierPath.LastPoint = new Point3D(90.0, 20.0, 0.0); CarouselEllipsePath carouselEllipsePath = new CarouselEllipsePath(); carouselEllipsePath.Center = new Point3D(50.0, 50.0, 0.0); carouselEllipsePath.FinalAngle = -100.0; carouselEllipsePath.InitialAngle = -90.0; carouselEllipsePath.U = new Point3D(-20.0, -17.0, -50.0); carouselEllipsePath.V = new Point3D(30.0, -25.0, -60.0); carouselEllipsePath.ZScale = 500.0; listBox.Items.Add((object)new CarouselPathEditor.CarouselPathListItem((ICarouselPath)carouselBezierPath)); listBox.Items.Add((object)new CarouselPathEditor.CarouselPathListItem((ICarouselPath)carouselEllipsePath)); return((Control)listBox); }