// static Create method follows the API convention and parent should be first argument public static GyroidRelaxGraphics Create(Gyroid gyroid) { var widget = new GyroidRelaxGraphics(gyroid); widget.Initialize(); return(widget); }
protected override void OnInitialize() { Reset(); Rendering = Graphic.Create(null, null, GyroidRelaxGraphics.GetGraphic(gyroid)); // SelectionTypes = new[] { typeof(DesignFace), typeof(CustomObject) }; bzc }
private void StartThread() { isThreadRunning = true; thread = new System.Threading.Thread((System.Threading.ThreadStart) delegate { while (isThreadRunning) { buttonCapsule.UpdateProperties(); for (int i = 0; i < 10; i++) { gyroid.Iterate(); } Rendering = Graphic.Create(null, null, GyroidRelaxGraphics.GetGraphic(gyroid)); StatusText = string.Format("Iteration {0} Error {1} Max {2}", gyroid.Iteration, gyroid.CumulativeError, gyroid.MaxError); } }); thread.Start(); }