public SettingsWindow(MainWindow parent) { InitializeComponent(); this.parent_ = parent; this.Top = parent_.Top + (parent_.Height / 2) - (this.Height / 2); this.Left = parent_.Left + (parent_.Width / 2) - (this.Width / 2); this.sliderNeckHeight.Value = parent_.Config.NeckHeight; this.sliderHorizontalOffset.Value = parent_.Config.ViewportsHorizontalOffset; this.sliderVerticalOffset.Value = parent_.Config.ViewportsVerticalOffset; this.sliderFOV.Value = parent_.Config.CameraFieldOfView; if (parent_.State.ModeProj == ProjectionMode.PLANE) { this.sliderRatioProjections.Value = ((PlaneProjection)parent_.State.ProjectionPlugin.Content).Ratio; this.ComboboxProjection.SelectedIndex = 0; } else if (parent_.State.ModeProj == ProjectionMode.DOME) { this.sliderHorizontalCoverage.Value = ((DomeProjection)parent_.State.ProjectionPlugin.Content).HorizontalCoverage; this.sliderVerticalCoverage.Value = ((DomeProjection)parent_.State.ProjectionPlugin.Content).VerticalCoverage; this.sliderSlices.Value = ((DomeProjection)parent_.State.ProjectionPlugin.Content).Slices; this.sliderStacks.Value = ((DomeProjection)parent_.State.ProjectionPlugin.Content).Stacks; this.ComboboxProjection.SelectedIndex = 1; } this.sliderBlue.Value = ((BarrelEffect)parent_.State.DistortionPlugin.Content).BlueOffset; this.sliderRed.Value = ((BarrelEffect)parent_.State.DistortionPlugin.Content).RedOffset; this.sliderXcenter.Value = ((BarrelEffect)parent_.State.DistortionPlugin.Content).XCenter; this.sliderYCenter.Value = ((BarrelEffect)parent_.State.DistortionPlugin.Content).YCenter; this.sliderFactor.Value = ((BarrelEffect)parent_.State.DistortionPlugin.Content).Factor; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.window = ((OculusRacingCar.MainWindow)(target)); #line 5 "..\..\MainWindow.xaml" this.window.KeyDown += new System.Windows.Input.KeyEventHandler(this.window_KeyDown); #line default #line hidden #line 5 "..\..\MainWindow.xaml" this.window.Closed += new System.EventHandler(this.window_Closed); #line default #line hidden return; case 2: this.LayoutRoot = ((System.Windows.Controls.Grid)(target)); return; case 3: this.ViewPortLeft = ((System.Windows.Controls.Grid)(target)); return; case 4: this.ViewPortRight = ((System.Windows.Controls.Grid)(target)); return; } this._contentLoaded = true; }