public void Refresh(ControlPointsMode controlPointsMode, bool wireframeVisible) { Dispatcher.Invoke(() => { WarpControl1.UpdateWarpControl(controlPointsMode); WarpControl1.SetVisibility(controlPointsMode, wireframeVisible); }); }
//private void OnApplicationReady(EventArgs obj) //{ // //_screen.RefreshPattern(false); // //WarpControl1.UpdateWarpControl(ControlPointsMode.None); //} public void UpdateWarpControl() { if (_screen.SetPattern(Configuration.Configuration.Instance.Settings.PatternSize, GetPatternCount(), Configuration.Configuration.Instance.Settings.ControlPointsInsideOverlap, false)) { WarpControl1.UpdateWarpControl(Configuration.Configuration.Instance.Settings.ControlPointsMode); } WarpControl1.SetVisibility(Configuration.Configuration.Instance.Settings.ControlPointsMode, Configuration.Configuration.Instance.Settings.ShowWireframe); }
public void Initialize(PanoScreen screen) { _screen = screen; var width = Resolution.Width; var height = Resolution.Height; Width = width; Height = height; Image1.Width = width; Image1.Height = height; WarpControl1.Initialize(screen); _screen.SetPattern( Configuration.Configuration.Instance.Settings.PatternSize, new Size(Configuration.Configuration.Instance.Settings.PatternCountX, Configuration.Configuration.Instance.Settings.PatternCountY), Configuration.Configuration.Instance.Settings.ControlPointsInsideOverlap, false); _screen.UpdateProjectorsFromConfig(ProjectorMapper.MapProjectorsData(Configuration.Configuration.Instance.Projectors)); //EventHelper.SubscribeEvent<CalibrationDataChanged, CalibrationData>(OnCalibrationDataChanged); EventHelper.SubscribeEvent <ControlPointsMoved, ControlPointData>(OnControlPointsMoved); //EventHelper.SubscribeEvent<ApplicationReady, EventArgs>(OnApplicationReady); }
private void Window_KeyUp(object sender, KeyEventArgs e) { if (e.Key == Key.LeftShift || e.Key == Key.RightShift) { _isShiftPressed = false; } else if (e.Key == Key.D0) { WarpControl1.SetActiveProjector(0); } else if (e.Key == Key.D1) { WarpControl1.SetActiveProjector(1); } else if (e.Key == Key.Escape) { WarpControl1.DeactivateProjectors(); } else if (e.Key == Key.W) { Mouse.OverrideCursor = Cursors.Wait; _screen.Warp(); Mouse.OverrideCursor = null; } else if (e.Key == Key.B) { Mouse.OverrideCursor = Cursors.Wait; _screen.Blend(); Mouse.OverrideCursor = null; } else //if (WarpControl1.HasActiveControlPoint) { WarpControl1.KeyPressed(e, _isShiftPressed); } //Koordinaten anzeigen }