示例#1
0
        private void CloneLevel()
        {
            Panel panel = (Panel)this.Parent;

            Level level = new Level();
            panel.Children.Add(level);

            foreach (var child in this.spMain.Children)
            {
                FilePanel fp = (FilePanel)child;

                FilePanel newFp = new FilePanel();
                newFp.FilePanelSettings = fp.FilePanelSettings;

                //newFp.Width = fp.Width;
                //newFp.Path = fp.Path;

                level.spMain.Children.Add(newFp);
            }

            level.Height = this.Height;
        }
示例#2
0
        /// <summary>
        /// строем отображения уровней и панелей в окне на основе currentTemplate
        /// </summary>
        private void BuildTemplateView()
        {
            spMain.Children.Clear();

            foreach (var levelTemplate in currentTemplate.Levels)
            {
                Level level = new Level();
                level.Height = levelTemplate.Height;

                foreach (var filePanelTemplate in levelTemplate.FilePanels)
                {
                    FilePanel filePanel = new FilePanel();
                    filePanel.filePanel.FilePanelSettings = filePanelTemplate.FilePanelSettings;
                    //filePanel.Width = filePanelTemplate.Width;
                    //filePanel.Path = filePanelTemplate.Path;

                    level.spMain.Children.Add(filePanel);
                }

                spMain.Children.Add(level);
            }
        }
示例#3
0
 /// <summary>
 /// Добавляем новый уровень
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnAddLevel_Click(object sender, RoutedEventArgs e)
 {
     Level newLevel = new Level();
     spMain.Children.Add(newLevel);
 }