private void FormMain_Load(object sender, EventArgs e) { _dropFileHandler = new DropFileHandler(this); _systemMenu = new SystemMenu(this); // add an item to the system menu _systemMenu.AppendSeparator(); _systemMenu.AppendMenu(_InstallSysMenuId, "Add to Folder Context Menu"); _systemMenu.AppendMenu(_AboutSysMenuId, "About FindFiles..."); _systemMenu.SysCommandEvent += new SystemMenu.SysCommandEventHandler(_systemMenu_SysCommandEvent); // accept path as command line arg string[] args = Environment.GetCommandLineArgs(); if (args.Length > 1) { textPath.Text = args[1]; } // restore previous settings try { RegistryKey key = Registry.CurrentUser.CreateSubKey(@"Software\BrettRobichaud\FindFiles"); _includeAttributes = (FileAttributes)key.GetValue("IncludedAttributes", 32759); _excludeAttributes = (FileAttributes)key.GetValue("ExcludedAttributes", 0); } catch { } }
private void MainForm_Load(object sender, EventArgs e) { _dropFileHandler = new DropFileHandler(this); }