示例#1
0
        public void loadFilesInFolder(string folderPath)
        {
            if (!String.IsNullOrWhiteSpace(folderPath))
            {
                ClearControls();

                string[] files = Directory.GetFiles(folderPath, "DinoExport*.ini");
                foreach (string f in files)
                {
                    ExportedCreatureControl ecc = new ExportedCreatureControl(ImportExported.importExportedCreature(f));
                    ecc.Dock = DockStyle.Top;
                    ecc.CopyValuesToExtractor += CopyValuesToExtractor;
                    ecc.CheckGuidInLibrary    += CheckGuidInLibrary;
                    ecc.DoCheckGuidInLibrary();
                    eccs.Add(ecc);
                }

                // sort according to date and if already in library (order seems reversed here, because controls get added reversely)
                eccs = eccs.OrderByDescending(e => e.Status).ThenBy(e => e.AddedToLibrary).ToList();

                foreach (var ecc in eccs)
                {
                    panel1.Controls.Add(ecc);
                }
            }
        }
示例#2
0
        public void loadFilesInFolder(string folderPath)
        {
            if (!String.IsNullOrWhiteSpace(folderPath))
            {
                ClearControls();

                string[] files = Directory.GetFiles(folderPath, "*.ini");
                foreach (string f in files)
                {
                    addCreatureValuesControl(ImportExported.importExportedCreature(f));
                }
            }
        }