Example #1
0
        private void SetProject(ProjectData.Project project)
        {
            if (project != null)
            {
                try
                {
                    this.openDialog.InitialDirectory = project.InstallPath;
                    this.saveKnownFileListDialog.InitialDirectory = project.ListsPath;
                }
                catch (Exception e)
                {
                    MessageBox.Show(
                        "There was an error while loading project data." +
                        Environment.NewLine + Environment.NewLine +
                        e +
                        Environment.NewLine + Environment.NewLine +
                        "(You can press Ctrl+C to copy the contents of this dialog)",
                        "Error",
                        MessageBoxButtons.OK,
                        MessageBoxIcon.Error);
                    project = null;
                }

                this._Hashes = project.LoadListsFileNames();
            }

            // ReSharper disable RedundantCheckBeforeAssignment
            if (project != this._Manager.ActiveProject) // ReSharper restore RedundantCheckBeforeAssignment
            {
                this._Manager.ActiveProject = project;
            }

            this.projectComboBox.SelectedItem = project;
        }
Example #2
0
        private void SetProject(ProjectData.Project project)
        {
            if (project != null)
            {
                try
                {
                    this.FileHashLookup = project.LoadListsFileNames();
                    this.TypeHashLookup = project.LoadListsTypeNames();

                    this.openDialog.InitialDirectory = project.InstallPath;
                    this.saveKnownFileListDialog.InitialDirectory = project.ListsPath;
                }
                catch (Exception e)
                {
                    MessageBox.Show(
                        "There was an error while loading project data." +
                        Environment.NewLine + Environment.NewLine +
                        e.ToString() +
                        Environment.NewLine + Environment.NewLine +
                        "(You can press Ctrl+C to copy the contents of this dialog)",
                        "Error",
                        MessageBoxButtons.OK,
                        MessageBoxIcon.Error);
                    project = null;
                }
            }

            if (project != this.Manager.ActiveProject)
            {
                this.Manager.ActiveProject = project;
            }

            this.projectComboBox.SelectedItem = project;
        }
Example #3
0
 public static ProjectData.HashList <uint> LoadListsTypeNames(
     this ProjectData.Project project)
 {
     return(project.LoadLists(
                "*.typelist",
                s => s.HashFNV32(),
                s => s.ToLowerInvariant()));
 }
Example #4
0
 public static ProjectData.HashList <ulong> LoadListsFileNames(
     this ProjectData.Project project)
 {
     return(project.LoadLists(
                "*.filelist",
                s => s.HashFNV64(),
                s => s.ToLowerInvariant()));
 }
Example #5
0
 public static ProjectData.HashList <uint> LoadListsColumnNames(
     this ProjectData.Project project)
 {
     return(project.LoadLists(
                "*.columnlist",
                s => s.HashCRC32(),
                s => s.ToLowerInvariant()));
 }
Example #6
0
 public static ProjectData.HashList <uint> LoadFileLists(
     this ProjectData.Project project)
 {
     return(project.LoadLists(
                "*.filelist",
                FileHasher,
                FileModifier));
 }
Example #7
0
 public static ProjectData.HashList <uint> LoadListsFileNames(
     this ProjectData.Project project)
 {
     return(project.LoadLists(
                "*.filelist",
                s => s.HashFileName(),
                s => s.Replace('\\', '/')));
 }
Example #8
0
 public static ProjectData.HashList <uint> LoadListsFileNames(
     this ProjectData.Project project)
 {
     return(project.LoadLists(
                "*.filelist",
                s => Path.GetFileName(s).HashJenkins(),
                s => s.ToLowerInvariant()));
 }
Example #9
0
 public static ProjectData.HashList <uint> LoadListsPropertyNames(
     this ProjectData.Project project)
 {
     return(project.LoadLists(
                "*.namelist",
                s => s.HashJenkins(),
                s => s));
 }
Example #10
0
 public static ProjectData.HashList <uint> LoadFileLists(
     this ProjectData.Project project,
     Action <uint, string, string> extra)
 {
     return(project.LoadLists(
                "*.filelist",
                FileHasher,
                FileModifier,
                extra));
 }
Example #11
0
        public static ProjectData.HashList <ulong> LoadListsSubFatNames(this ProjectData.Project project,
                                                                        int bigVersion)
        {
            if (bigVersion >= 9) // TODO: check if this is right...
            {
                return(project.LoadLists("*.subfatlist",
                                         a => CRC64.Hash(a.ToLowerInvariant()),
                                         s => s.Replace("/", "\\")));
            }

            return(project.LoadLists("*.subfatlist",
                                     a => (ulong)CRC32.Hash(a.ToLowerInvariant()),
                                     s => s.Replace("\\", "/")));
        }
 public static ProjectData.HashList <uint> LoadListsFileNames(this ProjectData.Project project,
                                                              int bigVersion)
 {
     return(project.LoadLists("*.filelist", Hasher, Modifier));
 }
Example #13
0
 public static ProjectData.HashList <uint> LoadListsAnimationNames(this ProjectData.Project project)
 {
     return(project.LoadLists("*.animlist", AnimationCacheBinaryFile.ComputeNameHash, Modifier));
 }
Example #14
0
 public static ProjectData.HashList <ulong> LoadListsFileNames(this ProjectData.Project project)
 {
     return(project.LoadLists("*.filelist", ArchiveFile.ComputeNameHash, Modifier));
 }
Example #15
0
 public static ProjectData.HashList <ulong> LoadListsInstance64Names(this ProjectData.Project project)
 {
     return(project.LoadLists("*.instancelist64", a => a.HashFNV64(), a => a.ToLowerInvariant()));
 }
 public static ProjectData.HashList <uint> LoadListsPropertySetNames(this ProjectData.Project project)
 {
     return(project.LoadLists("*.propsetlist", s => s.HashFileName(), s => s.Replace('/', '\\')));
 }
 public static ProjectData.HashList <uint> LoadListsPropertySetSymbolNames(this ProjectData.Project project)
 {
     return(project.LoadLists("*.symbollist", s => s.HashSymbol(), s => s.Replace('/', '\\')));
 }