private void SafeViewRemove(ViewTypes type) { if (_views.Contains(type)) { _views.Remove(type); } }
public bool LoadView(ViewTypes Type) { Viewing.View view; view = (Viewing.View)_views[Type]; return(LoadView(view)); }
public void SetViewType(ViewTypes viewType) { RecentesModel.ViewType = viewType; DestaquesModel.ViewType = viewType; MapasModel.ViewType = viewType; FavoritosModel.ViewType = viewType; }
public void SetViewType(ViewTypes viewType) { FacebookModel.ViewType = viewType; TwitterModel.ViewType = viewType; InstagramModel.ViewType = viewType; SobreModel.ViewType = viewType; }
/// <summary> /// Apply specifed viewType to camera according to bounding box's size and position. /// <para> +-------+ </para> /// <para> /| /| </para> /// <para> +-------+ | </para> /// <para> | | | | </para> /// <para> | O-----|-+---X</para> /// <para> |/ |/ </para> /// <para> +-------+ </para> /// <para> / | </para> /// <para>Y Z </para> /// <para>其边长为(2 * Math.Sqrt(3)), 所在的坐标系如下</para> /// <para> O---X</para> /// <para> /| </para> /// <para> Y | </para> /// <para> Z </para> /// </summary> /// <param name="camera"></param> /// <param name="boundingBox"></param> /// <param name="viewType"></param> public static void ApplyViewType(this IPerspectiveViewCamera camera, IBoundingBox boundingBox, ViewTypes viewType) { vec3 length = boundingBox.MaxPosition - boundingBox.MinPosition; float size = Math.Max(Math.Max(length.x, length.y), length.z); { vec3 target = boundingBox.MaxPosition / 2 + boundingBox.MinPosition / 2; vec3 target2Position; vec3 upVector; GetBackAndUp(out target2Position, out upVector, viewType); vec3 position = target + target2Position * (size * 2 + 1); camera.Position = position; camera.Target = target; camera.UpVector = upVector; } { int[] viewport = new int[4]; OpenGL.GetInteger(GetTarget.Viewport, viewport); int width = viewport[2]; int height = viewport[3]; IPerspectiveCamera perspectiveCamera = camera; perspectiveCamera.FieldOfView = 60; perspectiveCamera.AspectRatio = (double)width / (double)height; perspectiveCamera.Near = 0.01; perspectiveCamera.Far = size * 3 + 1;// double.MaxValue; } }
public T GetView <T>(ViewTypes type) where T : Control { T result = default(T); switch (type) { case ViewTypes.Clone: result = new CloneView(_messenger, _shell, _storage, _web) as T; break; case ViewTypes.Create: result = new CreateView(_git, _messenger, _shell, _storage, _web) as T; break; case ViewTypes.Login: result = new LoginView(_messenger, _shell, _storage, _web) as T; break; case ViewTypes.CreateSnippet: result = new CreateSnippet(_messenger, _shell, _storage, _web) as T; break; default: break; } return(result); }
public virtual IView Create(ViewTypes type) { IView view = null; switch (type) { case ViewTypes.GAME: view = new GameView(services.Updateables, services.GameService); break; case ViewTypes.INIT: view = new InitView(); break; case ViewTypes.LOAD: view = new LoadView(); break; case ViewTypes.MAIN: view = new MainView(services); break; case ViewTypes.RESULTS: view = new ResultsView(services); break; case ViewTypes.LEVEL_UP: view = new LevelUpView(services); break; } initView(view); return view; }
private void AddSection(NotifyCollectionChangedEventArgs e) { // regard as coming only one item. if (e.NewItems[0] is not Section section) { return; } int startIndex = RowIndexFromParentCollection(e.NewStartingIndex); Insert(startIndex, new RowInfo(section, ViewType.CustomHeader)); // Insert(startIndex, new RowInfo(section, section.HeaderView == null ? ViewType.TextHeader : ViewType.CustomHeader)); for (var i = 0; i < section.Count; i++) { Cell cell = section[i]; if (!ViewTypes.ContainsKey(cell.GetType())) { ViewTypes.Add(cell.GetType(), GetNextTypeIndex()); } var rowInfo = new RowInfo(section, cell, (ViewType)ViewTypes[cell.GetType()]); Insert(i + 1 + startIndex, rowInfo); } Insert(startIndex + section.Count() + 1, new RowInfo(section, ViewType.CustomFooter)); // Insert(startIndex + section.Count() + 1, new RowInfo(section, section.FooterView == null ? ViewType.TextFooter : ViewType.CustomFooter)); _Adapter.NotifyItemRangeInserted(startIndex, section.Count + 2); // add a header and footer }
private void cmbViewType_SelectedIndexChanged(object sender, EventArgs e) { string selected = this.cmbViewType.SelectedItem.ToString(); ViewTypes viewType = (ViewTypes)Enum.Parse(typeof(ViewTypes), selected); this.scientificVisual3DControl.ViewType = viewType; }
public void Dispose() { _Root.SectionCollectionChanged -= OnRootSectionCollectionChanged; _Root.CollectionChanged -= OnRootCollectionChanged; Clear(); ViewTypes?.Clear(); }
public void Navigate(ViewTypes destination, object parameter = null, bool replace = false) { if (CurrentViewModel != null && replace == false) { History.Push(CurrentViewModel); } switch (destination) { case ViewTypes.Data: CurrentViewModel = _vmStore.Get <DataViewModel>(parameter); break; case ViewTypes.Search: CurrentViewModel = _vmStore.Get <SearchViewModel>(parameter); break; case ViewTypes.Match: CurrentViewModel = _vmStore.Get <MatchDetailsViewModel>(parameter); break; case ViewTypes.Lobby: CurrentViewModel = _vmStore.Get <LobbyViewModel>(parameter); break; case ViewTypes.TeamAnalyze: CurrentViewModel = _vmStore.Get <TeamAnalyzeViewModel>(parameter); break; } }
public void TurnViewOn(ViewTypes type, bool closeCurrentView = false, Action callback = null) { if (type == ViewTypes.None) { return; } if (ViewExists(type) == false) { return; } if (closeCurrentView) { TurnViewOff(CurrentViewType, type); } else { ViewBase page = GetView(type); page.gameObject.SetActive(true); page.SetState(true); CurrentViewType = type; } callback?.Invoke(); }
/// <summary> /// Apply specifed viewType to camera according to bounding box's size and position. /// <para> +-------+ </para> /// <para> /| /| </para> /// <para> +-------+ | </para> /// <para> | | | | </para> /// <para> | O-----|-+---X</para> /// <para> |/ |/ </para> /// <para> +-------+ </para> /// <para> / | </para> /// <para>Y Z </para> /// <para>其边长为(2 * Math.Sqrt(3)), 所在的坐标系如下</para> /// <para> O---X</para> /// <para> /| </para> /// <para> Y | </para> /// <para> Z </para> /// </summary> /// <param name="camera"></param> /// <param name="boundingBox"></param> /// <param name="viewType"></param> public static void ApplyViewType(this IPerspectiveViewCamera camera, IBoundingBox boundingBox, ViewTypes viewType) { float sizeX, sizeY, sizeZ; boundingBox.GetBoundDimensions(out sizeX, out sizeY, out sizeZ); float size = Math.Max(Math.Max(sizeX, sizeY), sizeZ); { float centerX, centerY, centerZ; boundingBox.GetCenter(out centerX, out centerY, out centerZ); vec3 target = new vec3(centerX, centerY, centerZ); vec3 target2Position; vec3 upVector; GetBackAndUp(out target2Position, out upVector, viewType); vec3 position = target + target2Position * (size * 2 + 1); camera.Position = position; camera.Target = target; camera.UpVector = upVector; } { int[] viewport = new int[4]; GL.GetInteger(GetTarget.Viewport, viewport); int width = viewport[2]; int height = viewport[3]; IPerspectiveCamera perspectiveCamera = camera; perspectiveCamera.FieldOfView = 60; perspectiveCamera.AspectRatio = (double)width / (double)height; perspectiveCamera.Near = 0.01; perspectiveCamera.Far = size * 3 + 1;// double.MaxValue; } }
public void TurnViewOff(ViewTypes offType, ViewTypes onType = ViewTypes.None, bool waitForExit = false) { if (offType == ViewTypes.None) { return; } if (ViewExists(offType) == false) { return; } ViewBase offPage = GetView(offType); if (offPage.gameObject.activeSelf) { offPage.SetState(false); } if (waitForExit && offPage.UseAnimation) { ViewBase onPage = GetView(onType); StopCoroutine(nameof(WaitForViewExit)); StartCoroutine(WaitForViewExit(onPage, offPage)); } else { TurnViewOn(onType); } }
public void SetViewType(ViewTypes viewType) { VideosModel.ViewType = viewType; VlogsModel.ViewType = viewType; FacebookModel.ViewType = viewType; AboutThiroshigaModel.ViewType = viewType; }
public void SetViewType(ViewTypes viewType) { QuestionablecontentModel.ViewType = viewType; PennyArcadeModel.ViewType = viewType; PvponlineModel.ViewType = viewType; CatandgirlModel.ViewType = viewType; }
/// <summary> /// Sets the view type. /// </summary> /// <param name="viewType">The view type to be displayed</param> /// <history> /// [Curtis_Beard] 11/11/2014 Initial /// [Curtis_Beard] 08/16/2016 CHG: 107, allow time selection /// </history> public void SetViewType(ViewTypes viewType) { currentViewType = viewType; switch (currentViewType) { case ViewTypes.DateTime: pnlDateTime.Visible = true; txtValue.Visible = false; numValue.Visible = false; pnlSize.Visible = false; break; case ViewTypes.String: pnlDateTime.Visible = false; txtValue.Visible = true; numValue.Visible = false; pnlSize.Visible = false; break; case ViewTypes.Numeric: pnlDateTime.Visible = false; txtValue.Visible = false; numValue.Visible = true; pnlSize.Visible = false; break; case ViewTypes.Size: pnlDateTime.Visible = false; txtValue.Visible = false; numValue.Visible = false; pnlSize.Visible = true; break; } }
public void SetViewType(ViewTypes viewType) { PhineasAndFerbModel.ViewType = viewType; KimPossibleModel.ViewType = viewType; LizzieMcguireModel.ViewType = viewType; HannahMontanaModel.ViewType = viewType; }
public override IView Create(ViewTypes type) { IView view = null; switch (type) { case ViewTypes.EDITOR_LANDING: view = new EditorView(services.ViewService); break; case ViewTypes.EDITOR_PATH: view = new PathView((services as EditorServices).PathService, services.ViewService); break; case ViewTypes.EDITOR_EDIT_PATH: view = new EditPathView((services as EditorServices).PathService, services.ViewService); break; case ViewTypes.EDITOR_LEVELS: view = new LevelsView((services as EditorServices).LevelService, services.ViewService, (services as EditorServices).PathService, (services as EditorServices).EnemyService, (services as EditorServices).BonusService, (services as EditorServices).DifficultyService); break; case ViewTypes.EDITOR_EDIT_LEVEL: view = new EditLevelView(services.Pool, (services as EditorServices).LevelService, services.ViewService, (services as EditorServices).PathService, (services as EditorServices).EnemyService); break; case ViewTypes.EDITOR_EDIT_ENEMY: view = new EditEnemyView(services.Pool, services.ViewService, (services as EditorServices).EnemyService); break; case ViewTypes.EDITOR_ENEMIES: view = new EnemiesView(services.Pool, services.ViewService, (services as EditorServices).EnemyService); break; case ViewTypes.EDITOR_EDIT_DIFFICULTY: view = new EditDifficultyView(services.Pool, services.ViewService, (services as EditorServices).DifficultyService); break; case ViewTypes.EDITOR_DIFFICULTIES: view = new DifficultiesView(services.Pool, services.ViewService, (services as EditorServices).DifficultyService); break; case ViewTypes.EDITOR_EDIT_BONUS: view = new EditBonusView(services.Pool, services.ViewService, (services as EditorServices).BonusService); break; case ViewTypes.EDITOR_BONUSES: view = new BonusesView(services.Pool, services.ViewService, (services as EditorServices).BonusService); break; case ViewTypes.EDITOR_EDIT_LANGUAGE: view = new EditLanguageView(services.Pool, services.ViewService, (services as EditorServices).LanguageService); break; case ViewTypes.EDITOR_LANUGAGES: view = new LanguagesView(services.Pool, services.ViewService, (services as EditorServices).LanguageService); break; } if (view == null) { view = base.Create(type); } else { initView(view); } return view; }
public void SetViewType(ViewTypes viewType) { TopNewsModel.ViewType = viewType; NewsModel.ViewType = viewType; TechSolutionModel.ViewType = viewType; NumberGameModel.ViewType = viewType; FacebookModel.ViewType = viewType; }
public void SetViewType(ViewTypes viewType) { AboutModel.ViewType = viewType; PrabathsBlogModel.ViewType = viewType; JaliyasBlogModel.ViewType = viewType; ChamindasBlogModel.ViewType = viewType; MalinsBlogModel.ViewType = viewType; }
public void SetViewType(ViewTypes viewType) { WaterlustModel.ViewType = viewType; VideosModel.ViewType = viewType; FacebookModel.ViewType = viewType; DonateModel.ViewType = viewType; ContactModel.ViewType = viewType; }
public void SetViewType(ViewTypes viewType) { NewYorkTimesModel.ViewType = viewType; TheGuardianModel.ViewType = viewType; NYRBModel.ViewType = viewType; RTBookReviewsModel.ViewType = viewType; TheIndependentModel.ViewType = viewType; }
void SetViewType(ViewTypes viewType) { if (_viewType != viewType) { _viewType = viewType; RaisePropertyChanged(); } }
public void SetViewType(ViewTypes viewType) { TheOatmealModel.ViewType = viewType; GarfieldGarfieldModel.ViewType = viewType; XKCDModel.ViewType = viewType; SatMorningBreakfastCerealModel.ViewType = viewType; NuklearPowerModel.ViewType = viewType; }
public void SetViewType(ViewTypes viewType) { ElheddafModel.ViewType = viewType; EchoroukModel.ViewType = viewType; ElwatanModel.ViewType = viewType; LexpressionModel.ViewType = viewType; LiberteModel.ViewType = viewType; }
void OnItemSelected(object sender, SelectedItemChangedEventArgs e) { MasterPageItem masterPageItem = e.SelectedItem as MasterPageItem; ModalPage selected; if (masterPageItem != null) { ViewTypes viewSelected = masterPageItem.View; try { if (String.IsNullOrEmpty(SessionSingleton.ContactlessDeviceId) && String.IsNullOrEmpty(SessionSingleton.ContactDeviceId) && viewSelected != ViewTypes.Settings) { App.Current.MainPage.DisplayAlert("Validation", "No card reader selected in settings", "OK"); viewSelected = ViewTypes.Settings; } switch (viewSelected) { case ViewTypes.Transact: selected = new EMVTx(contactCardInterfaceManger, contactlessCardInterfaceManger, configProvider, onlineApprover, tcpClientStream); break; case ViewTypes.QRCode: selected = new EMVQRCodeView(contactCardInterfaceManger, contactlessCardInterfaceManger, configProvider, onlineApprover, tcpClientStream); break; case ViewTypes.Settings: selected = new SettingsView(contactCardInterfaceManger, contactlessCardInterfaceManger); break; default: throw new Exception("Unknown Form Type:" + viewSelected); } selected.PageClosing += (sender2, e2) => { naviDetailPage.PopAsync(); }; masterPage.ClearSelectedItems(); IsPresented = false; if (naviDetailPage.Navigation.NavigationStack.Count > 1) { naviDetailPage.Navigation.PopAsync(); } naviDetailPage.PushAsync(selected); } catch (Exception ex) { App.Current.MainPage.DisplayAlert("Error", ex.Message, "OK"); naviDetailPage.PushAsync(new IntroView()); masterPage.ClearSelectedItems(); IsPresented = false; return; } } }
public void SetViewType(ViewTypes viewType) { AboutBandModel.ViewType = viewType; YouTubeChannelModel.ViewType = viewType; FacebookUpdatesModel.ViewType = viewType; InstaPhotosModel.ViewType = viewType; TwittItModel.ViewType = viewType; MenuModel.ViewType = viewType; }
public void SetViewType(ViewTypes viewType) { ScienceNewsModel.ViewType = viewType; EScienceNewsModel.ViewType = viewType; BbcScienceNewsModel.ViewType = viewType; SciencemagModel.ViewType = viewType; ScienceDailyModel.ViewType = viewType; TOIScienceModel.ViewType = viewType; }
public void SetViewType(ViewTypes viewType) { ELECTRONICSModel.ViewType = viewType; CircuitsAndNetworksModel.ViewType = viewType; CIRCUITSModel.ViewType = viewType; NETWORKSModel.ViewType = viewType; EXTRAINFOModel.ViewType = viewType; AUDIOVISUALSModel.ViewType = viewType; }
private ViewBase GetView(ViewTypes type) { if (ViewExists(type) == false) { return(null); } return((ViewBase)_views[type]); }
public void SetViewType(ViewTypes viewType) { AboutMeModel.ViewType = viewType; TwitterModel.ViewType = viewType; InstagramModel.ViewType = viewType; MyBlogModel.ViewType = viewType; MyVideosModel.ViewType = viewType; MyFavoriteMusicModel.ViewType = viewType; }
public void SetViewType(ViewTypes viewType) { AboutModel.ViewType = viewType; OnlineLecturesModel.ViewType = viewType; FreeBooksModel.ViewType = viewType; EngineeringToolsModel.ViewType = viewType; EngineeringMythsModel.ViewType = viewType; EngineersMemeModel.ViewType = viewType; }
public void SetViewType(ViewTypes viewType) { AppModel.ViewType = viewType; GoProVODModel.ViewType = viewType; GPTipsTricksModel.ViewType = viewType; GoProPhotosModel.ViewType = viewType; GoProMountsModel.ViewType = viewType; AboutModel.ViewType = viewType; }
public void SetViewType(ViewTypes viewType) { VideosModel.ViewType = viewType; GoProPhotosModel.ViewType = viewType; GoProFlickrModel.ViewType = viewType; GoProNewsModel.ViewType = viewType; GoProFacebookModel.ViewType = viewType; AboutModel.ViewType = viewType; }
public void SetViewType(ViewTypes viewType) { NdtvModel.ViewType = viewType; TimesOfIndiaModel.ViewType = viewType; IndiaTodayModel.ViewType = viewType; SifySportsModel.ViewType = viewType; TheHinduModel.ViewType = viewType; IbnLiveModel.ViewType = viewType; }
public bool IsViewOn(ViewTypes type) { if (ViewExists(type) == false) { return(false); } return(GetView(type).IsOn); }
public void SetViewType(ViewTypes viewType) { EnvironemtalNewsModel.ViewType = viewType; GoingGreenModel.ViewType = viewType; LivingGreenModel.ViewType = viewType; BackyardMattersModel.ViewType = viewType; EnvironmentMattersModel.ViewType = viewType; VideoTipsModel.ViewType = viewType; }
public void SetViewType(ViewTypes viewType) { HeyIsItOnVODModel.ViewType = viewType; HeyIsItOnBlogModel.ViewType = viewType; FBHeyIsItOnModel.ViewType = viewType; MountsAccesoriesModel.ViewType = viewType; BatteriesAndSDsModel.ViewType = viewType; DIYGoProModel.ViewType = viewType; }
public void SetViewType(ViewTypes viewType) { MuSiCModel.ViewType = viewType; MUSICALINSTRUMENTSModel.ViewType = viewType; TYPESOFINSTRUMENTSModel.ViewType = viewType; HOWTOPLAYModel.ViewType = viewType; MUsIcNEWSModel.ViewType = viewType; ViSuAlSModel.ViewType = viewType; }
public IView SetView(ViewTypes type) { if (currentView != null) { touchBlocker.SetActive(true); nextView = factory.Create(type); currentView.Hide(); return nextView; } else { currentView = factory.Create(type); showCurrentView(); return currentView; } }
public void SetView(ViewTypes viewType) { switch (viewType) { case ViewTypes.Idopont: view = new Idopont_View(this); break; case ViewTypes.Adatok: view = new AdatMod_View(this); break; default: break; } OnPropertyChanged("view"); }
/// <summary> /// Gets all the data required to completely represent this camera's state, so that it can /// later be restored by calling SetState(). Note that the aspect ratio is not saved and /// restored, because it should be set depending on the aspect ratio of the viewport; it would /// be wrong to restore the camera's aspect ratio after the user has resized the window, for example.</summary> /// <param name="perspective">Camera view type</param> /// <param name="eye">Eye point in "world view" space</param> /// <param name="lookAtPoint">Camera look-at point in "world view" space</param> /// <param name="upVector">Camera up direction in "world view" space</param> /// <param name="yFov">Y-field-of-view in radians</param> /// <param name="nearZ">Current near plane distance value for the current projection type</param> /// <param name="farZ">Current far plane distance value for the current projection type</param> /// <param name="focusRadius">Focus radius around the "look at" point</param> public void GetState( out ViewTypes perspective, out Vec3F eye, out Vec3F lookAtPoint, out Vec3F upVector, out float yFov, out float nearZ, out float farZ, out float focusRadius) { perspective = m_viewType; eye = Eye; lookAtPoint = LookAtPoint; upVector = Up; yFov = YFov; nearZ = NearZ; farZ = FarZ; focusRadius = FocusRadius; }
/// <summary> /// Apply specifed viewType to camera according to bounding box's size and position. /// <para> +-------+ </para> /// <para> /| /| </para> /// <para> +-------+ | </para> /// <para> | | | | </para> /// <para> | O-----|-+---X</para> /// <para> |/ |/ </para> /// <para> +-------+ </para> /// <para> / | </para> /// <para>Y Z </para> /// <para>其边长为(2 * Math.Sqrt(3)), 所在的坐标系如下</para> /// <para> O---X</para> /// <para> /| </para> /// <para> Y | </para> /// <para> Z </para> /// </summary> /// <param name="camera"></param> /// <param name="boundingBox"></param> /// <param name="viewType"></param> public static void ApplyViewType(this IOrthoViewCamera camera, IBoundingBox boundingBox, ViewTypes viewType) { float sizeX, sizeY, sizeZ; boundingBox.GetBoundDimensions(out sizeX, out sizeY, out sizeZ); float size = Math.Max(Math.Max(sizeX, sizeY), sizeZ); { float centerX, centerY, centerZ; boundingBox.GetCenter(out centerX, out centerY, out centerZ); vec3 target = new vec3(centerX, centerY, centerZ); vec3 target2Position; vec3 upVector; GetBackAndUp(out target2Position, out upVector, viewType); vec3 position = target + target2Position * (size * 2 + 1); camera.Position = position; camera.Target = target; camera.UpVector = upVector; } { int[] viewport = new int[4]; GL.GetInteger(GetTarget.Viewport, viewport); int width = viewport[2]; int height = viewport[3]; IOrthoCamera orthoCamera = camera; if (width > height) { orthoCamera.Left = -size * width / height; orthoCamera.Right = size * width / height; orthoCamera.Bottom = -size; orthoCamera.Top = size; } else { orthoCamera.Left = -size; orthoCamera.Right = size; orthoCamera.Bottom = -size * height / width; orthoCamera.Top = size * height / width; } orthoCamera.Near = 0.001; orthoCamera.Far = size * 3 + 1;// double.MaxValue; } }
private static void GetBackAndUp(out vec3 target2Position, out vec3 upVector, ViewTypes viewType) { switch (viewType) { case ViewTypes.UserView: //UserView 定义为从顶视图开始,绕X 轴旋转30 度,在绕Z 轴45 度,并且能看到整个模型的虚拟模型空间。 target2Position = new vec3((float)Math.Sqrt(3), (float)Math.Sqrt(3), -1); target2Position.Normalize(); upVector = new vec3(0, 0, -1); break; case ViewTypes.Top: target2Position = new vec3(0, 0, -1); upVector = new vec3(0, -1, 0); break; case ViewTypes.Bottom: target2Position = new vec3(0, 0, 1); upVector = new vec3(0, -1, 0); break; case ViewTypes.Left: target2Position = new vec3(-1, 0, 0); upVector = new vec3(0, 0, -1); break; case ViewTypes.Right: target2Position = new vec3(1, 0, 0); upVector = new vec3(0, 0, -1); break; case ViewTypes.Front: target2Position = new vec3(0, 1, 0); upVector = new vec3(0, 0, -1); break; case ViewTypes.Back: target2Position = new vec3(0, -1, 0); upVector = new vec3(0, 0, -1); break; default: throw new NotImplementedException(string.Format("new value({0}) of EViewType is not implemented!", viewType)); //break; } }
public void SetViewType(ViewTypes viewType) { NavigateModel.ViewType = viewType; SpecialOffersModel.ViewType = viewType; }
public void SetViewType(ViewTypes viewType) { DashboardModel.ViewType = viewType; }
/// <summary> /// Sets this cammera's state completely. Complements GetState().</summary> /// <param name="viewType">Camera view type</param> /// <param name="eye">Eye point in "world view" space</param> /// <param name="lookAtPoint">Camera look-at point in "world view" space</param> /// <param name="upVector">Camera up direction in "world view" space</param> /// <param name="yFov">Y-field-of-view in radians</param> /// <param name="nearZ">Current near plane distance value for the current projection type</param> /// <param name="farZ">Current far plane distance value for the current projection type</param> /// <param name="focusRadius">Focus radius around the "look at" point</param> public void SetState( ViewTypes viewType, Vec3F eye, Vec3F lookAtPoint, Vec3F upVector, float yFov, float nearZ, float farZ, float focusRadius) { // to avoid duplicate camera events, let's batch up all the changes. m_changingCamera = true; try { m_viewType = viewType; Set(eye, lookAtPoint, upVector); if (viewType == ViewTypes.Perspective) { SetPerspective(yFov, m_aspectRatio, nearZ, farZ); } else { float d = DistanceFromLookAt; SetOrthographic(d * m_aspectRatio / 2, -d * m_aspectRatio / 2, d / 2, -d / 2, nearZ, farZ); } } finally { m_changingCamera = false; } OnCameraChanged(EventArgs.Empty); }
private void Earth3d_Load(object sender, System.EventArgs e) { CheckOSVersion(); string path = Properties.Settings.Default.ImageSetUrl; if (Properties.Settings.Default.ImageSetUrl.ToLower().Contains("imagesetsnew")) { Properties.Settings.Default.ImageSetUrl = "http://www.worldwidetelescope.org/wwtweb/catalog.aspx?X=ImageSets5"; } Earth3d.MainWindow = this; this.dsm = new DataSetManager(); Constellations.Containment = this.constellationCheck; ContextSearch.InitializeDatabase(true); LoadExploreRoot(); if (explorerRoot != null) { ContextSearch.AddFolderToSearch(explorerRoot, true); } ContextSearch.AddCatalogs(true); BackInitDelegate initBackground = SearchInit; initBackground.BeginInvoke(null, null); this.WindowState = FormWindowState.Maximized; this.FormBorderStyle = TouchKiosk ? FormBorderStyle.None : FormBorderStyle.Sizable; TileCache.StartQueue(); this.SetStyle(ControlStyles.AllPaintingInWmPaint, true); this.SetStyle(ControlStyles.UserPaint, true); Earth3d.MainWindow.Config.DomeTilt = (float)Properties.Settings.Default.DomeTilt; if (ProjectorServer) { ShowFullScreen(true); this.timer.Interval = 1000; this.InputTimer.Enabled = false; Cursor.Hide(); Properties.Settings.Default.ShowCrosshairs = false; Properties.Settings.Default.SolarSystemMultiRes = true; NetControl.Start(); } else { if (Properties.Settings.Default.ListenMode || Settings.DomeView) { NetControl.Start(); } } if (Settings.MasterController) { NetControl.StartStatusListner(); } if (Settings.MasterController) { NetControl.LoadNodeList(); } if (Earth3d.TouchKiosk) { this.menuTabs.IsVisible = false; this.kioskTitleBar.Visible = true; Properties.Settings.Default.ShowTouchControls = true; ShowFullScreen(true); } if (NoUi) { this.menuTabs.IsVisible = false; Properties.Settings.Default.ShowTouchControls = true; ShowFullScreen(true); } Tile.GrayscaleStyle = Properties.Settings.Default.MonochromeImageStyle; // This forces a init at startup does not do anything but force the static contstuctor to fire now LayerManager.LoadTree(); listenUpBoysToolStripMenuItem.Checked = Properties.Settings.Default.ListenMode; int id = Properties.Settings.Default.StartUpLookAt; if (Properties.Settings.Default.StartUpLookAt == 5) { id = Properties.Settings.Default.LastLookAtMode; } if (Properties.Settings.Default.StartUpLookAt == 6) { Random rnd = new Random(); id = rnd.Next(-1, 5); Properties.Settings.Default.LastLookAtMode = id; } CurrentImageSet = GetDefaultImageset((ImageSetType)id, BandPass.Visible); Properties.Settings.Default.SettingChanging += new System.Configuration.SettingChangingEventHandler(Default_SettingChanging); Properties.Settings.Default.PropertyChanged += new System.ComponentModel.PropertyChangedEventHandler(Default_PropertyChanged); if (Properties.Settings.Default.LocalHorizonMode) { viewType = ViewTypes.AltAz; } else { viewType = ViewTypes.Equatorial; } InitSpaceNavigator(); ReadyToRender = true; Refresh(); try { fov = new FieldOfView(Properties.Settings.Default.FovTelescope, Properties.Settings.Default.FovCamera, Properties.Settings.Default.FovEyepiece); } catch { } SpaceTimeController.Altitude = Properties.Settings.Default.LocationAltitude; SpaceTimeController.Location = Coordinates.FromLatLng(Properties.Settings.Default.LocationLat, Properties.Settings.Default.LocationLng); TourPlayer.TourEnded += new EventHandler(TourPlayer_TourEnded); if (KmlMarkers == null) { KmlMarkers = new KmlLabels(); } ReadyToRender = true; Initialized = true; this.Activate(); fadeImageSet.State = false; fadeImageSet.State = true; fadeImageSet.TargetState = false; // Force settings Properties.Settings.Default.ActualPlanetScale = true; Properties.Settings.Default.HighPercitionPlanets = true; Properties.Settings.Default.ShowMoonsAsPointSource = false; Properties.Settings.Default.ShowSolarSystem.TargetState = true; toolStripMenuItem2.Checked = Settings.MasterController; viewCamera.Target = SolarSystemObjects.Sun; if (!ProjectorServer) { webServer.Startup(); sampConnection = new Samp(); // Register goto SampMessageHandler.RegiseterMessage(new SampCoordPointAtSky(new CoordPointAtSkyDelegate(SampGoto))); SampMessageHandler.RegiseterMessage(new SampTableLoadVoTable(new TableLoadVoTableDelegate(SampLoadTable))); SampMessageHandler.RegiseterMessage(new SampImageLoadFits(new ImageLoadFitsDelegate(SampLoadFitsImage))); SampMessageHandler.RegiseterMessage(new SampTableHighlightRow(new TableHighlightRowDelegate(SampHighlightRow))); NetworkChange.NetworkAddressChanged += new NetworkAddressChangedEventHandler(NetworkChange_NetworkAddressChanged); MidiMapManager.Startup(); } Fader.TargetState = false; hold = new Text3dBatch(80); hold.Add(new Text3d(new Vector3d(0, 0, 1), new Vector3d(0, 1, 0), " 0hr123456789-+", 80, .0001f)); hold.Add(new Text3d(new Vector3d(0, 0, 1), new Vector3d(0, 1, 0), "JanuyFebMcApilg", 80, .0001f)); hold.Add(new Text3d(new Vector3d(0, 0, 1), new Vector3d(0, 1, 0), "stSmOoNvDBCEdqV", 80, .0001f)); hold.Add(new Text3d(new Vector3d(0, 0, 1), new Vector3d(0, 1, 0), "jxGHILPRTU", 80, .0001f)); hold.PrepareBatch(); Constellations.InitializeConstellationNames(); if (Properties.Settings.Default.ShowClientNodeList && !ProjectorServer) { ClientNodeList.ShowNodeList(); } if (DetachScreenId > -1) { FreeFloatRenderWindow(DetachScreenId); } if (!string.IsNullOrWhiteSpace(Properties.Settings.Default.RefreshToken)) { WindowsLiveSignIn(); } }
public void ProcessChanged() { ignoreChanges = false; Planets.ShowActualSize = Settings.Active.ActualPlanetScale; if (Properties.Settings.Default.LocalHorizonMode) { viewType = ViewTypes.AltAz; } else { viewType = ViewTypes.Equatorial; } }
/// <summary> /// Sets the view type. /// </summary> /// <param name="viewType">The view type to be displayed</param> /// <history> /// [Curtis_Beard] 11/11/2014 Initial /// </history> public void SetViewType(ViewTypes viewType) { currentViewType = viewType; switch (currentViewType) { case ViewTypes.DateTime: dtpValue.Visible = true; txtValue.Visible = false; numValue.Visible = false; pnlSize.Visible = false; break; case ViewTypes.String: dtpValue.Visible = false; txtValue.Visible = true; numValue.Visible = false; pnlSize.Visible = false; break; case ViewTypes.Numeric: dtpValue.Visible = false; txtValue.Visible = false; numValue.Visible = true; pnlSize.Visible = false; break; case ViewTypes.Size: dtpValue.Visible = false; txtValue.Visible = false; numValue.Visible = false; pnlSize.Visible = true; break; } }
public void SetViewType(ViewTypes viewType) { VideosViewModel.ViewType = viewType; AboutIndiasGotTalentViewModel.ViewType = viewType; }
public void SetViewType(ViewTypes viewType) { WhatsNewModel.ViewType = viewType; TechUpdatesModel.ViewType = viewType; SelectSourceModel.ViewType = viewType; }