コード例 #1
0
        private void RemoveUserControl()
        {
            if (m_expander_level != null)
                m_grid_main.Children.Remove(m_expander_level);
            m_expander_level = null;
            m_userControl_level = null;

            if (m_userControl_levelLayout != null)
                m_grid_main.Children.Remove(m_userControl_levelLayout);
            m_userControl_levelLayout = null;
        }
コード例 #2
0
        private void Select(Level level)
        {
            RemoveUserControl();
            m_userControl_level = new UserControl_Level(level);
            m_expander_level = new Expander() { Header = level.Name, Content = m_userControl_level, ExpandDirection = System.Windows.Controls.ExpandDirection.Down, IsExpanded = !level.HasLayout() };
            m_grid_main.SetRowColumn(m_expander_level, 1, 0);

            if (level != null)
            {
                m_userControl_levelLayout = new UserControl_LevelEditor(level);
                m_grid_main.SetRowColumn(m_userControl_levelLayout, 2, 0);
            }
        }
コード例 #3
0
 private void New()
 {
     RemoveUserControl();
     m_userControl_level = new UserControl_Level(null);
     m_grid_main.SetRowColumn(m_userControl_level, 1, 0);
 }