Exemplo n.º 1
0
        private void LoadLifFile(LifFile file)
        {
            LifTreeView.Nodes.Clear();
            FolderListView.DataSource = null;
            FolderListView.ClearObjects();
            ToolBarFolderCombo.ComboBox.DataSource = null;
            CurrentFolderItems.Clear();

            if (CurrentFile != null && CurrentFile != file)
            {
                CurrentFile.Dispose();
                CurrentFile = null;
            }

            CurrentFile   = file;
            CurrentFolder = null;
            IsNewLif      = string.IsNullOrEmpty(file?.FilePath);

            CurrentFileStripLabel.Text = file?.FilePath;

            if (file != null)
            {
                FillTreeView();
                NavigateToFolder(file.RootFolder);
                if (IsNewLif)
                {
                    EnableLifEditing();
                }
            }

            UpdateMenuItems();
        }
Exemplo n.º 2
0
 public void Dispose()
 {
     if (Lif != null)
     {
         Lif.Dispose();
         Lif = null;
     }
 }