コード例 #1
0
ファイル: MainForm.cs プロジェクト: Paltr/SceneEditor
 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);
 }
コード例 #2
0
ファイル: Solution.cs プロジェクト: Paltr/SceneEditor
 public Solution(IEditor editor)
 {
   Solution.Instance = this;
   m_Editor = editor;
 }
コード例 #3
0
ファイル: MainForm.cs プロジェクト: Paltr/SceneEditor
 private void OnProjectNameChanged(Solution sender, string previous)
 {
   string title = "SceneEditor";
   if(!string.IsNullOrEmpty(sender.ProjectName))
   {
     title += " - " + sender.ProjectName;
   }
   
   this.Text = title;
 }
コード例 #4
0
ファイル: MainForm.cs プロジェクト: Paltr/SceneEditor
 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;
   }
 }