public static bool OpenFile(TreeViewHandler treeViewHandler, string file, ref CurrentAssembly currentAssembly, bool clear = false) { if (string.IsNullOrEmpty(file)) { throw new ArgumentException("No path provided!"); } var newCurrentAssembly = new CurrentAssembly(file); if (newCurrentAssembly.ManifestModule == null) { HandleToolStripItemsState(treeViewHandler); return(false); } currentAssembly = newCurrentAssembly; treeViewHandler.LoadAssembly(currentAssembly.ManifestModule, file, clear); HandleToolStripItemsState(treeViewHandler); return(true); }