Esempio n. 1
0
 public void Change(List<CustomFileSystemCover> files, FilePanel activeFilePanel)
 {
     if (ChangeSelected != null)
     {
         ChangeSelected(files, activeFilePanel);
     }
 }
Esempio n. 2
0
        /// <summary>
        /// Панель клонируется
        /// </summary>
        private void CloneFilePanel()
        {
            Panel     panel = (Panel)this.Parent;
            FilePanel fp    = new FilePanel();

            fp.FilePanelSettings = (FilePanelSettings)this.FilePanelSettings.Clone();
            panel.Children.Add(fp);
        }
Esempio n. 3
0
        /// <summary>
        /// Добавляем новую файловую панель
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnNewFilePanel_Click(object sender, RoutedEventArgs e)
        {
            FilePanel filePanel = new FilePanel();
            filePanel.Height = spMain.Height;
            spMain.Children.Add(filePanel);

            Binding binding = new Binding();
            binding.Source = spMain;
            binding.Path = new PropertyPath("Height");
            binding.Mode = BindingMode.OneWay;
            filePanel.SetBinding(FilePanel.HeightProperty, binding);

            //Binding binding = new Binding();
            //binding.Source = filePanel;
            //binding.Path = new PropertyPath("Height");
            //binding.Mode = BindingMode.OneWay;
            //this.SetBinding(UserControl.HeightProperty, binding);
        }
Esempio n. 4
0
        /// <summary>
        /// Добавляем новую файловую панель
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnNewFilePanel_Click(object sender, RoutedEventArgs e)
        {
            FilePanel filePanel = new FilePanel();

            filePanel.Height = spMain.Height;
            spMain.Children.Add(filePanel);

            Binding binding = new Binding();

            binding.Source = spMain;
            binding.Path   = new PropertyPath("Height");
            binding.Mode   = BindingMode.OneWay;
            filePanel.SetBinding(FilePanel.HeightProperty, binding);

            //Binding binding = new Binding();
            //binding.Source = filePanel;
            //binding.Path = new PropertyPath("Height");
            //binding.Mode = BindingMode.OneWay;
            //this.SetBinding(UserControl.HeightProperty, binding);
        }
Esempio n. 5
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;
        }
Esempio n. 6
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;
        }
Esempio n. 7
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);
            }
        }
Esempio n. 8
0
 /// <summary>
 /// Панель клонируется
 /// </summary>
 private void CloneFilePanel()
 {
     Panel panel = (Panel)this.Parent;
     FilePanel fp = new FilePanel();
     fp.FilePanelSettings = (FilePanelSettings)this.FilePanelSettings.Clone();
     panel.Children.Add(fp);
 }