Пример #1
0
        /// <summary>
        /// Create sub folder panel and change the node status
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>

        private void Node_MouseClick(object sender, EventArgs e)
        {
            if ((currentFolder != null) && (folderName != currentFolder.folderName))
            {
                currentFolder.DeselectedCurrentFolder();
            }

            if (Is_Selected)
            {
                Is_Selected = ChangeState();
            }
            else
            {
                ProgramData.SelectedFolder = folderName;

                // Skip if the directory do not exsist
                if (!touchIMAGE.Fonctions.IO.DirectoryExsiste(ProgramData.SelectedFolder))
                {
                    MessageBox.Show("Folder not exists");
                    return;
                }

                // Control View
                touchIMAGE.Graphs.Controllers.NavigationFolderController.RefershImageListAndHeader();

                if (!Is_Opened)
                {
                    createPanels();
                }
                Is_Selected   = ChangeState();
                currentFolder = this;
            }
        }
Пример #2
0
            public void AddElement(PNL_Folder panel)
            {
                int size = GetSize(panel);

                _peacksValues.Add(GetSize(panel));
                _peacksKey.Add(panel.folderName);
                Resize();
                return;
            }
Пример #3
0
            public void DeleteElement(PNL_Folder panel)
            {
                foreach (PNL_Folder moment in panel.pnl_Children.Controls)
                {
                    string key   = moment.folderName;
                    int    index = _peacksKey.IndexOf(key);
                    _peacksValues.RemoveAt(index);
                    _peacksKey.RemoveAt(index);
                    DeleteElement(moment);
                }

                Resize();
                return;
            }
Пример #4
0
 private int GetSize(PNL_Folder panel)
 {
     return((panel.inside * 10) + panel.pic_Folder.Width + panel.lbl_FolderName.Width + 10);
 }