Ejemplo n.º 1
0
        protected bool ConfigureShared()
        {
            FolderBrowserDialog dlg = new FolderBrowserDialog();

            dlg.ShowNewFolderButton = true;
            dlg.Description         =
                @"Select folder for Shared Libraries.
Make sure you have permission to create files at this location.";

            if (LibraryData.Shared != null)
            {
                dlg.SelectedPath = LibraryData.Shared.FullPath;
            }
            if (dlg.ShowDialog() == System.Windows.Forms.DialogResult.Cancel)
            {
                uxWhere.Focus();
                return(false);
            }

            //TODO: Check if possible to write


            LibraryData.ConfigureSharedGroup(dlg.SelectedPath);
            if (LibraryData.Shared != null)
            {
                LibraryData.Shared.LoadFiles(false);
                treeBuilder.UpdateShared();
            }

            uxWhere.Refresh();
            uxWhere.Properties.TreeList.ExpandAll();
            uxWhere.Focus();
            //Filter();  Do not filter here
            OnConfigChanged();
            return(true);
        }