public FormCylinderElement() { InitializeComponent(); //if (CameraDictionary.Instance.ContainsKey(this.GetType().Name)) //{ // this.camera = CameraDictionary.Instance[this.GetType().Name]; //} //else { this.camera = new Camera(CameraType.Ortho, this.glCanvas1.Width, this.glCanvas1.Height); //CameraDictionary.Instance.Add(this.GetType().Name, this.camera); } satelliteRoration = new SatelliteRotator(camera); var faceCount = 18; var radius = 1f; var height = 3f; element = new CylinderElement(radius, height, faceCount); element.Initialize(); element.BeforeRendering += element_BeforeRendering; element.AfterRendering += element_AfterRendering; this.glCanvas1.MouseWheel += glCanvas1_MouseWheel; this.glCanvas1.KeyPress += glCanvas1_KeyPress; this.glCanvas1.MouseDown += glCanvas1_MouseDown; this.glCanvas1.MouseMove += glCanvas1_MouseMove; this.glCanvas1.MouseUp += glCanvas1_MouseUp; this.glCanvas1.OpenGLDraw += glCanvas1_OpenGLDraw; this.glCanvas1.Resize += glCanvas1_Resize; }
public override IDeepCopyable CopyTo(IDeepCopyable other) { var dest = other as DispenseComponent; if (dest != null) { base.CopyTo(dest); if (Product != null) { dest.Product = (Hl7.Fhir.Model.Coding)Product.DeepCopy(); } if (EyeElement != null) { dest.EyeElement = (Code <Hl7.Fhir.Model.VisionPrescription.VisionEyes>)EyeElement.DeepCopy(); } if (SphereElement != null) { dest.SphereElement = (Hl7.Fhir.Model.FhirDecimal)SphereElement.DeepCopy(); } if (CylinderElement != null) { dest.CylinderElement = (Hl7.Fhir.Model.FhirDecimal)CylinderElement.DeepCopy(); } if (AxisElement != null) { dest.AxisElement = (Hl7.Fhir.Model.Integer)AxisElement.DeepCopy(); } if (PrismElement != null) { dest.PrismElement = (Hl7.Fhir.Model.FhirDecimal)PrismElement.DeepCopy(); } if (BaseElement != null) { dest.BaseElement = (Code <Hl7.Fhir.Model.VisionPrescription.VisionBase>)BaseElement.DeepCopy(); } if (AddElement != null) { dest.AddElement = (Hl7.Fhir.Model.FhirDecimal)AddElement.DeepCopy(); } if (PowerElement != null) { dest.PowerElement = (Hl7.Fhir.Model.FhirDecimal)PowerElement.DeepCopy(); } if (BackCurveElement != null) { dest.BackCurveElement = (Hl7.Fhir.Model.FhirDecimal)BackCurveElement.DeepCopy(); } if (DiameterElement != null) { dest.DiameterElement = (Hl7.Fhir.Model.FhirDecimal)DiameterElement.DeepCopy(); } if (Duration != null) { dest.Duration = (Hl7.Fhir.Model.SimpleQuantity)Duration.DeepCopy(); } if (ColorElement != null) { dest.ColorElement = (Hl7.Fhir.Model.FhirString)ColorElement.DeepCopy(); } if (BrandElement != null) { dest.BrandElement = (Hl7.Fhir.Model.FhirString)BrandElement.DeepCopy(); } if (NotesElement != null) { dest.NotesElement = (Hl7.Fhir.Model.FhirString)NotesElement.DeepCopy(); } return(dest); } else { throw new ArgumentException("Can only copy to an object of the same type", "other"); } }