Пример #1
0
        public OpenFilePanel()
        {
            InitializeComponent();
            NodeDesktop = TreeView1.Nodes[0];
            NodeMyComputer = TreeView1.Nodes[1];
            NodeMyDocuments = TreeView1.Nodes[2];
            NodeSpecialFolders = TreeView1.Nodes[3];
            NodeTemplateFolders = TreeView1.Nodes[4];

            Misc = new MiscSettings(MiscSettings_PropertyChanged);
            Default = new DefaultSettings(Misc, DefaultableSettings_PropertyChanged);
            Desktop = new DesktopSettings(Default, DefaultableSettings_PropertyChanged);
            MyComputer = new MyComputerSettings(Default, DefaultableSettings_PropertyChanged);
            MyDocuments = new MyDocumentsSettings(Default, DefaultableSettings_PropertyChanged);
            SpecialFolders = new SpecialFoldersSettings(Default, DefaultableSettings_PropertyChanged);
            TemplateFolders = new TemplateFoldersSettings(Default, DefaultableSettings_PropertyChanged);
            Misc.SetCategoryPanelWidth(splitContainer1.Panel1.Width);
            Localization = new OpenFileLocalization(LocalizationSettings_PropertyChanged);
            Localization.RaisePropertyChanged("");
            FileSystemHandler = new FileSystemManager();

            ToolStripContainer1_ContentPanel_SizeChanged(this, new EventArgs());
            ShowAll();
            this.Load += new EventHandler(OpenFilePanel_Load);
        }
Пример #2
0
 /// <summary>
 /// Creates an instance of the class
 /// </summary>
 /// <param name="parent">Parent panel</param>
 internal DefaultSettings(MiscSettings miscSettings, PropertyChangedEventHandler eventHandler = null)
 {
     MiscSettings = miscSettings;
     PropertyBag = new PropertyBagCollection<bool>(false, RaisePropertyChanged, new KeyValuePair<string, bool>[] 
                 { 
                   new KeyValuePair<string, bool>("Visible", true),  
                   new KeyValuePair<string, bool>("AllowBrowseFolders", true), 
                      });
     if (null != eventHandler)
         this.PropertyChanged += eventHandler;
 }
Пример #3
0
 /// <summary>
 /// Creates an instance of the class
 /// </summary>
 /// <param name="parent">Parent panel</param>
 internal DefaultSettings(MiscSettings miscSettings, PropertyChangedEventHandler eventHandler = null)
 {
     MiscSettings = miscSettings;
     PropertyBag  = new PropertyBagCollection <bool>(false, RaisePropertyChanged, new KeyValuePair <string, bool>[]
     {
         new KeyValuePair <string, bool>("Visible", true),
         new KeyValuePair <string, bool>("AllowBrowseFolders", true),
     });
     if (null != eventHandler)
     {
         this.PropertyChanged += eventHandler;
     }
 }