public void Splitter() { var SplitterViewInstance = new SplitterView(); SplitterViewInstance.DataContext = new SplitterViewModel(); SplitterViewInstance.ShowDialog(); }
public void MainForm_Load_InitializationCode(MainForm mf) { mf.MyViewDataFactory.RootViewData = new ViewData(mf.MyDataFile) { ViewType = ViewDataType.Splitter }; mf.RootViewData.SetViewPointer(mf.RootSplitterViewPointer); SplitterView.BuildFromViewData(mf, mf.RootViewData); (mf.RootViewData.View as Control).Name = "RootSplitterView"; ClockListView clv = mf.MyClocksViewProvider.GetExistingOrNewClockListView(); mf.RootViewData.SetFirstChild(new ViewData(mf.MyDataFile) { ViewType = ViewDataType.List, View = clv }); clv.MyViewData = mf.RootViewData.GetFirstChild(); mf.InitializeLastFocusedTimersView(); //RootSplitterViewPointer.Value = SplitterView.BuildFromViewData(this, RootViewData) as SplitterView; //SplitterView.SubscribeViewData(RootViewData, RootViewData.View); //mf.UpdateRootSplitterViewControl(); }
public void ViewDataTest_SetViewPointer() { // Arrange cs_timed_silver.Properties.Settings.Default.AutoOpenLastFile = "No"; var mf = new MainForm(); mf.OnLoadCreateBasicViewDataWithView = false; mf.OnLoadUpdateViewType = false; mf.Show(); Application.DoEvents(); var p = new Pointer(); p.Value = new ClockListView(mf); var vd = new ViewData(mf.MyDataFile); vd.SetViewPointer(p); SplitterView.BuildFromViewData(mf, vd); // Act Application.DoEvents(); // Assert Assert.AreEqual(vd.View, p.Value, "Pointer passed to ViewData c-tor should set its View to the pointer's current value."); }
public void ViewDataTest_SetViewPointer_and_View() { // Arrange cs_timed_silver.Properties.Settings.Default.AutoOpenLastFile = "No"; var mf = new MainForm(); mf.OnLoadCreateBasicViewDataWithView = false; mf.OnLoadUpdateViewType = false; mf.Show(); Application.DoEvents(); var p = new Pointer(); var vd = new ViewData(mf.MyDataFile); vd.SetViewPointer(p); SplitterView.BuildFromViewData(mf, vd); vd.View = new ClockListView(mf); // Act Application.DoEvents(); // Assert Assert.AreEqual(p.Value, vd.View, "Pointer value should be a reference to the ViewData's view."); }
/// <summary> /// LoadContent will be called once per game and is the place to load /// all of your content. /// </summary> protected override void LoadContent() { // Create a new SpriteBatch, which can be used to draw textures. spriteBatch = new SpriteBatch(GraphicsDevice); IsMouseVisible = true; m_levelsTextPosition = new Vector2(GraphicsDevice.Viewport.Width / 1.35f, GraphicsDevice.Viewport.Height / 100); m_View = new View(GraphicsDevice, Content); m_soundEffect = Content.Load <SoundEffect>("plong1"); m_destroyedEffect = Content.Load <SoundEffect>("test"); m_waterEffect = Content.Load <SoundEffect>("watereffect"); m_BombEffect = Content.Load <SoundEffect>("BombEffect"); m_hahaEfect = Content.Load <SoundEffect>("haha"); m_SongLevel1 = Content.Load <Song>("BackgroundSong"); m_songLevel2 = Content.Load <Song>("BackgroundSong2"); m_songLevel3 = Content.Load <Song>("backgroundSong3"); m_warningSong = Content.Load <SoundEffect>("LeaveNow"); m_NrOfLifes = Content.Load <SpriteFont>("SpriteFont1"); m_LevelsFont = Content.Load <SpriteFont>("LevelsFont"); m_Camera = new Camera(GraphicsDevice.Viewport); m_MenuController = new MenuControlls(GraphicsDevice); m_MenuView = new MenuView(GraphicsDevice, Content, spriteBatch, m_MenuController); m_splitterView = new SplitterView(GraphicsDevice, Content); model = new gameModel(); model.LoadLevel(Level.Maps(CurrentLevel)); m_rainParticle = new RainParticle(Content, GraphicsDevice, 15); }
public DynamicSplitViewController (UIViewController first, UIViewController second) { this.First = first; this.Second = second; containerView = new ContainerView (this); Splitter = new SplitterView (); containerView.BackgroundColor = first.View.BackgroundColor; }
public DynamicSplitViewController(UIViewController first, UIViewController second) { this.First = first; this.Second = second; containerView = new ContainerView(this); Splitter = new SplitterView(); containerView.BackgroundColor = first.View.BackgroundColor; }
/// <summary> /// LoadContent will be called once per game and is the place to load /// all of your content. /// </summary> protected override void LoadContent() { camera = new Camera(GraphicsDevice.Viewport); gameView = new GameView(spriteBatch, camera, Content.Load<Texture2D>("explosion")); splitterView = new SplitterView(spriteBatch, camera, Content.Load<Texture2D>("spark")); // Create a new SpriteBatch, which can be used to draw textures. spriteBatch = new SpriteBatch(GraphicsDevice); // TODO: use this.Content to load your game content here }