Ejemplo n.º 1
0
 public MainForm()
 {
   InitializeComponent();
   CustomControls.Controls.Helper.InsertAutoScrollLosingWorkaround(m_SplitContainer.Panel1, m_SceneView);
   m_ProjectExplorer.Editor = this;
   m_TemplatesExplorer.Editor = this;
   m_SceneView.Editor = this;
   
   ScalingHelper scalingHelper = new GLScalingHelper(m_SceneView, m_GLBackground,
     m_MinusBtn, m_PercentsTextBox, m_PlusBtn);
   m_SceneView.ScalingHelper = scalingHelper;
   scalingHelper.ScaleChanged += this.OnScaleChanged;
   scalingHelper.ScalePercents = Settings.ScalePercentsDefault;
   scalingHelper.MinScalePercents = Settings.ScalePercentsMin;
   scalingHelper.MaxScalePercents = Settings.ScalePercentsMax;
   
   Solution solution = new Solution(this);
   solution.NewScenes += this.OnNewScenes;
   solution.ProjectNameChanged += this.OnProjectNameChanged;
   
   CreateScenes();
   OnProjectNameChanged(solution, null);
 }
Ejemplo n.º 2
0
 public Solution(IEditor editor)
 {
   Solution.Instance = this;
   m_Editor = editor;
 }
Ejemplo n.º 3
0
 private void OnProjectNameChanged(Solution sender, string previous)
 {
   string title = "SceneEditor";
   if(!string.IsNullOrEmpty(sender.ProjectName))
   {
     title += " - " + sender.ProjectName;
   }
   
   this.Text = title;
 }
Ejemplo n.º 4
0
 private void OnNewScenes(Solution sender, ScenesSet previous)
 {
   if(previous != null)
   {
     previous.SceneRemoved -= this.OnSceneRemoved;
   }
   
   m_ProjectExplorer.Scenes = sender.Scenes;
   m_TemplatesExplorer.Scenes = sender.Scenes;
   if(sender.Scenes != null)
   {
     sender.Scenes.SceneRemoved += this.OnSceneRemoved;
   }
 }