public void Initialization(ServoMovedEventHandler servoMovedEventHandler = null) { this.ServoMoved = servoMovedEventHandler; actionTable = new ActionTable(); ReadSPIFFS(); Alpha.Initialization(); object value = Util.ReadRegistry(Util.KEY.SERVO_VERSION); if ((value == null) || (value.GetType().Name != "Byte[]")) { Util.WriteRegistry(Util.KEY.SERVO_VERSION, servo_version); } else { byte[] version = (byte[])value; if (version.Length == 4) { for (int idx = 0; idx < 4; idx++) { servo_version[idx] = version[idx]; } } else { Util.WriteRegistry(Util.KEY.SERVO_VERSION, servo_version); } } }
public UcAlphaViewModel(Viewport3DX viewport, ServoMovedEventHandler servoMovedEventHandler = null) { this.viewport = viewport; this.servoMovedEventHandler = servoMovedEventHandler; Background = new LinearGradientBrush(Colors.Black, Colors.DarkBlue, 90); BackgroundColor = new SharpDX.Color4(0, 0, 0, 0); this.Camera = new PerspectiveCamera { LookDirection = new Media3D.Vector3D(-5.059, 1.949, -23.856), UpDirection = new Media3D.Vector3D(0.067, 0.946, 0.319), Position = new Media3D.Point3D(3.648, 5.954, 23.353) }; RenderTechniquesManager = new DefaultRenderTechniquesManager(); EffectsManager = new DefaultEffectsManager(RenderTechniquesManager); this.ModelTransform = new Media3D.TranslateTransform3D(0, 0, 0); this.ModelGeometry = new Element3DCollection(); }