示例#1
0
        // static Create method follows the API convention and parent should be first argument
        public static LawsonRelaxGraphics Create(Lawson lawson)
        {
            var widget = new LawsonRelaxGraphics(lawson);

            widget.Initialize();
            return(widget);
        }
示例#2
0
        protected override void OnInitialize()
        {
            Reset();

            Rendering = Graphic.Create(null, null, LawsonRelaxGraphics.GetGraphic(lawson));

            //	SelectionTypes = new[] { typeof(DesignFace), typeof(CustomObject) }; bzc
        }
示例#3
0
        private void StartThread()
        {
            isThreadRunning = true;
            thread          = new System.Threading.Thread((System.Threading.ThreadStart) delegate {
                while (isThreadRunning)
                {
                    buttonCapsule.UpdateProperties();
                    for (int i = 0; i < 20; i++)
                    {
                        lawson.Iterate();
                    }

                    Rendering  = Graphic.Create(null, null, LawsonRelaxGraphics.GetGraphic(lawson));
                    StatusText = string.Format("Iteration {0}  Error {1}  Max {2}", lawson.Iteration, lawson.CumulativeError, lawson.MaxError);
                }
            });
            thread.Start();
        }