/// <summary> /// Event that gets called to update GUI and projectstate on NewProject. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void NewProject_CreateProject(object sender, StateEventArgs e) { Close_Click(null, null); this.framesContainer.Clear(); this.SequencePanel.Child = timeLinePanel; //Update projectstate this.projectstate.Active = e.ACTIVE; this.projectstate.Saved = e.SAVED; this.projectstate.FileName = e.FILENAME; this.projectstate.Destination = e.DESTINATION; this.projectstate.Width = e.WIDTH; this.projectstate.Height = e.HEIGHT; this.projectstate.EditorState = ProjectState.ProjectEditorState.Create; //Set Viewport this.GLControl.Children.Add(glHost); System.Drawing.Size frameSize = new System.Drawing.Size(projectstate.Width, projectstate.Height); glHost.SetProjectFrameSize(frameSize); exporter.SetFrameSize(frameSize); framesContainer.AddFrame(new Model.Frame(null)); this.projectstate.ActiveLayerIndex = 0; EnableMenuItems(); EnableButtons(); EnableLayers(); }
public void TestAddFrame() { Frame testframe = MockRepository.GenerateMock <Frame>(""); Frame testframe2 = MockRepository.GenerateMock <Frame>(""); Frame testframe3 = MockRepository.GenerateMock <Frame>(""); int countFrames = testFramesContainer.Count; testFramesContainer.AddFrame(testframe); Assert.AreEqual(countFrames + 1, testFramesContainer.Count); testFramesContainer.AddFrame(testframe2); Assert.AreEqual(countFrames + 2, testFramesContainer.Count); testFramesContainer.AddFrame(testframe3); Assert.AreEqual(countFrames + 3, testFramesContainer.Count); Assert.True(called); }