예제 #1
0
 void list_box_index_change(object sender, EventArgs e)
 {
     if (child_folder != null)
     {
         child_folder.Dispose();
         child_folder = null;
     }
     child_folder = new GUI_node_folder(form, Lenghten_path(path, (string)list_box.SelectedItem + "\\"), new Point(location.X + 130, location.Y));
 }
예제 #2
0
 public void Dispose()
 {
     form.Controls.Remove(list_box);
     if (child_folder != null)
     {
         child_folder.Dispose();
         child_folder = null;
     }
     if (child_file != null)
     {
         child_file.Dispose();
         child_file = null;
     }
 }
예제 #3
0
        private void Pick_folder_button_Click(object sender, EventArgs e)
        {
            if (node != null)
            {
                node.Dispose();
                node = null;
            }

            //folderBrowserDialog1.ShowDialog();
            pick_folder_dialog.ShowDialog();
            main_path = pick_folder_dialog.FileName.Remove(pick_folder_dialog.FileName.Length - "Folder selection".Length);

            node = new GUI_node_folder(this, main_path, new Point(30, 60));

            //Console.WriteLine(Folder_tools.Is_units_folder(main_path));
            Console.WriteLine(main_path);

            //string[] folders = Folder_tools.Shorten_path(main_path, Directory.GetDirectories(main_path));
            //list = new GUI_components.FolderPickList(new Point(10, 50), "main", main_path , folders, this);
        }