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); }
public Solution(IEditor editor) { Solution.Instance = this; m_Editor = editor; }
private void OnProjectNameChanged(Solution sender, string previous) { string title = "SceneEditor"; if(!string.IsNullOrEmpty(sender.ProjectName)) { title += " - " + sender.ProjectName; } this.Text = title; }
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; } }