diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..29063cf --- /dev/null +++ b/.gitignore @@ -0,0 +1,329 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# User-specific files +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUNIT +*.VisualState.xml +TestResult.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ +**/Properties/launchSettings.json + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_i.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# JetBrains Rider +.idea/ +*.sln.iml + +# CodeRush +.cr/ + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ diff --git a/psobb-session-reader.sln b/psobb-session-reader.sln new file mode 100755 index 0000000..29b652a --- /dev/null +++ b/psobb-session-reader.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.27130.2036 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "psobb-session-reader", "psobb-session-reader\psobb-session-reader.csproj", "{3EF74075-3AA8-4755-B7F9-C3CCD5A3A81B}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {3EF74075-3AA8-4755-B7F9-C3CCD5A3A81B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3EF74075-3AA8-4755-B7F9-C3CCD5A3A81B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3EF74075-3AA8-4755-B7F9-C3CCD5A3A81B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3EF74075-3AA8-4755-B7F9-C3CCD5A3A81B}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {FD847DB6-225F-44BA-9C4B-19F142BFB7C5} + EndGlobalSection +EndGlobal diff --git a/psobb-session-reader/Configuration.cs b/psobb-session-reader/Configuration.cs new file mode 100755 index 0000000..6750e9c --- /dev/null +++ b/psobb-session-reader/Configuration.cs @@ -0,0 +1,73 @@ +using System; +using System.IO; +using System.Xml.Linq; + +namespace psobb_session_reader +{ + public class Configuration + { + public string PSOPath { get; set; } + public int MainWindowX { get; set; } + public int MainWindowY { get; set; } + public int MainWindowWidth { get; set; } + public int MainWindowHeight { get; set; } + + public void Save() + { + Save(DefaultPath); + } + + public void Save(string path) + { + object[] settings = + { + new XElement(nameof(PSOPath), PSOPath), + new XElement(nameof(MainWindowX), MainWindowX), + new XElement(nameof(MainWindowY), MainWindowY), + new XElement(nameof(MainWindowWidth), MainWindowWidth), + new XElement(nameof(MainWindowHeight), MainWindowHeight) + }; + + string directory = Path.GetDirectoryName(path); + Directory.CreateDirectory(directory); + + XElement root = new XElement(nameof(Configuration), settings); + XDocument document = new XDocument(root); + document.Save(path); + } + + public static Configuration Load() + { + return Load(DefaultPath); + } + + public static Configuration Load(string path) + { + Configuration configuration = new Configuration(); + XDocument document = XDocument.Load(path); + XElement root = document.Root; + configuration.PSOPath = Read(root, nameof(PSOPath)); + configuration.MainWindowX = Read(root, nameof(MainWindowX)); + configuration.MainWindowY = Read(root, nameof(MainWindowY)); + configuration.MainWindowWidth = Read(root, nameof(MainWindowWidth)); + configuration.MainWindowHeight = Read(root, nameof(MainWindowHeight)); + return configuration; + } + + private static T Read(XElement element, string name) + { + object value = (string)element.Element(name); + + if (value == null) + return default(T); + + if (typeof(T) == typeof(string)) + return (T)value; + + return (T)Convert.ChangeType(value, typeof(T)); + } + + private static readonly string ApplicationData = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData); + public static readonly string DefaultPath = Path.Combine(ApplicationData, "psobb-session-reader", "Settings.xml"); + } +} diff --git a/psobb-session-reader/Definitions/Area.cs b/psobb-session-reader/Definitions/Area.cs new file mode 100755 index 0000000..e6ee4e7 --- /dev/null +++ b/psobb-session-reader/Definitions/Area.cs @@ -0,0 +1,49 @@ +using System.Collections.Generic; + +namespace psobb_session_reader.Definitions +{ + public class Area + { + // Creates a new Area + public Area(int id, string name, bool isUnknown = false) + { + ID = id; + Name = name; + IsUnknown = isUnknown; + + if (!isUnknown) + LookupByID.Add(id, this); + } + + // Properties + public int ID { get; } + public string Name { get; } + public bool IsUnknown { get; } + public override string ToString() => Name; + + // Static lookup table by ID + private static readonly IDictionary LookupByID = new Dictionary(); + + public static Area GetArea(int id) + { + if (LookupByID.TryGetValue(id, out Area area)) + return area; + + return new Area(id, $"Unknown ({id})", true); + } + + // Area definitions + public static readonly Area Forest = new Area(0, "Forest"); + public static readonly Area Caves = new Area(1, "Caves"); + public static readonly Area Mines = new Area(2, "Mines"); + public static readonly Area Ruins = new Area(3, "Ruins"); + public static readonly Area DarkFalz = new Area(4, "Dark Falz"); + public static readonly Area CentralControlArea = new Area(5, "Central Control Area"); + public static readonly Area Seabed = new Area(6, "Seabed"); + public static readonly Area VRTemple = new Area(7, "VR Temple"); + public static readonly Area VRSpaceship = new Area(8, "VR Spaceship"); + public static readonly Area Crater_Exterior = new Area(9, "Crater (Exterior)"); + public static readonly Area Crater_Interior = new Area(10, "Crater (Interior)"); + public static readonly Area SubterraneanDesert = new Area(11, "Subterranean Desert"); + } +} diff --git a/psobb-session-reader/Definitions/Difficulty.cs b/psobb-session-reader/Definitions/Difficulty.cs new file mode 100755 index 0000000..23eddc2 --- /dev/null +++ b/psobb-session-reader/Definitions/Difficulty.cs @@ -0,0 +1,43 @@ +using System.Collections.Generic; + +namespace psobb_session_reader.Definitions +{ + public class Difficulty + { + // Creates a new Difficulty + private Difficulty(int id, string name, string shortName, bool isUnknown = false) + { + ID = id; + Name = name; + ShortName = shortName; + IsUnknown = isUnknown; + + if (!isUnknown) + LookupByID.Add(id, this); + } + + // Properties + public int ID { get; } + public string Name { get; } + public string ShortName { get; } + public bool IsUnknown { get; } + public override string ToString() => Name; + + // Static lookup table by ID + private static readonly IDictionary LookupByID = new Dictionary(); + + public static Difficulty GetDifficulty(int id) + { + if (LookupByID.TryGetValue(id, out Difficulty difficulty)) + return difficulty; + + return new Difficulty(id, $"Unknown ({id})", $"{id}?", true); + } + + // Difficulty definitions + public static readonly Difficulty Normal = new Difficulty(0, "Normal", "Norm"); + public static readonly Difficulty Hard = new Difficulty(1, "Hard", "Hard"); + public static readonly Difficulty VeryHard = new Difficulty(2, "Very Hard", "VHard"); + public static readonly Difficulty Ultimate = new Difficulty(3, "Ultimate", "Ult"); + } +} diff --git a/psobb-session-reader/Definitions/Episode.cs b/psobb-session-reader/Definitions/Episode.cs new file mode 100755 index 0000000..365f03a --- /dev/null +++ b/psobb-session-reader/Definitions/Episode.cs @@ -0,0 +1,42 @@ +using System.Collections.Generic; + +namespace psobb_session_reader.Definitions +{ + public class Episode + { + // Creates a new Episode + private Episode(int id, int number) + { + ID = id; + Number = number; + + if (number >= 0) + LookupByID.Add(id, this); + } + + // Properties + public int ID { get; } + public int Number { get; } + public bool IsUnknown => !(Number >= 0); + + public override string ToString() => (Number >= 0) + ? $"Episode {Number}" + : $"Unknown ({ID})"; + + // Static lookup table by ID + private static IDictionary LookupByID = new Dictionary(); + + public static Episode GetEpisode(int id) + { + if (LookupByID.TryGetValue(id, out Episode episode)) + return episode; + + return new Episode(id, -1); + } + + // Episode definitions + public static Episode One = new Episode(0, 1); + public static Episode Two = new Episode(1, 2); + public static Episode Four = new Episode(2, 4); + } +} diff --git a/psobb-session-reader/Definitions/Monster.cs b/psobb-session-reader/Definitions/Monster.cs new file mode 100755 index 0000000..d41bd1c --- /dev/null +++ b/psobb-session-reader/Definitions/Monster.cs @@ -0,0 +1,179 @@ +using System.Collections.Generic; + +namespace psobb_session_reader.Definitions +{ + public class Monster + { + // Creates a new Monster + private Monster(int id, string name, string ultimateName, bool isUnknown = false) + { + ID = id; + Name = name; + UltimateName = ultimateName; + IsUnknown = isUnknown; + + if (!isUnknown) + LookupByID.Add(id, this); + } + + // Properties + public int ID { get; } + public string Name { get; } + public string UltimateName { get; } + public bool IsUnknown { get; } + public override string ToString() => Name; + + public string ToString(Difficulty difficulty) => (difficulty == Difficulty.Ultimate) + ? UltimateName + : Name; + + // Static lookup table by id + private static readonly Dictionary LookupByID = new Dictionary(); + + public static Monster GetMonster(int id) + { + if (LookupByID.TryGetValue(id, out Monster monster)) + return monster; + + string name = $"Unknown ({id})"; + return new Monster(id, name, name, true); + } + + #region [ Monster Definitions ] + + // Forest + public static readonly Monster Hildebear = new Monster(1, "Hildebear", "Hildelt"); + public static readonly Monster Hildeblue = new Monster(2, "Hildeblue", "Hildetorr"); + public static readonly Monster Mothmant = new Monster(3, "Mothmant", "Mothvert"); + public static readonly Monster Monest = new Monster(4, "Monest", "Mothvist"); + public static readonly Monster RagRappy = new Monster(5, "Rag Rappy", "El Rappy"); + public static readonly Monster AlRappy = new Monster(6, "Al Rappy", "Pal Rappy"); + public static readonly Monster SavageWolf = new Monster(7, "Savage Wolf", "Gulgus"); + public static readonly Monster BarbarousWolf = new Monster(8, "Barbarous Wolf", "Gulgus-gue"); + public static readonly Monster Booma = new Monster(9, "Booma", "Bartle"); + public static readonly Monster Gobooma = new Monster(10, "Gobooma", "Barble"); + public static readonly Monster Gigobooma = new Monster(11, "Gigobooma", "Tollaw"); + + // Cave + public static readonly Monster GrassAssassin = new Monster(12, "Grass Assassin", "Crimson Assassin"); + public static readonly Monster PoisonLily = new Monster(13, "Poison Lily", "Ob Lily"); + public static readonly Monster NarLily = new Monster(14, "Nar Lily", "Mil Lily"); + public static readonly Monster NanoDragon = new Monster(15, "Nano Dragon", "Nano Dragon"); + public static readonly Monster EvilShark = new Monster(16, "Evil Shark", "Vulmer"); + public static readonly Monster PalShark = new Monster(17, "Pal Shark", "Govulmer"); + public static readonly Monster GuilShark = new Monster(18, "Guil Shark", "Melqueek"); + public static readonly Monster PofuillySlime = new Monster(19, "Pofuilly Slime", "Pofuilly Slime"); + public static readonly Monster PouillySlime = new Monster(20, "Pouilly Slime", "Pouilly Slime"); + public static readonly Monster PanArms = new Monster(21, "Pan Arms", "Pan Arms"); + public static readonly Monster Migium = new Monster(22, "Migium", "Migium"); + public static readonly Monster Hidoom = new Monster(23, "Hidoom", "Hidoom"); + + // Mine + public static readonly Monster Dubchic = new Monster(24, "Dubchic", "Dubchich"); + public static readonly Monster Garanz = new Monster(25, "Garanz", "Baranz"); + public static readonly Monster SinowBeat = new Monster(26, "Sinow Beat", "Sinow Blue"); + public static readonly Monster SinowGold = new Monster(27, "Sinow Gold", "Sinow Red"); + public static readonly Monster Canadine = new Monster(28, "Canadine", "Canabin"); + public static readonly Monster Canane = new Monster(29, "Canane", "Canune"); + public static readonly Monster Dubwitch = new Monster(49, "Dubwitch", "Dubwitch"); + public static readonly Monster Gillchic = new Monster(50, "Gillchic", "Gillchich"); + + // Ruins + public static readonly Monster Delsaber = new Monster(30, "Delsaber", "Delsaber"); + public static readonly Monster ChaosSorcerer = new Monster(31, "Chaos Sorcerer", "Gran Sorcerer"); + public static readonly Monster BeeR = new Monster(32, "Bee R", "Gee R"); + public static readonly Monster BeeL = new Monster(33, "Bee L", "Gee L"); + public static readonly Monster DarkGunner = new Monster(34, "Dark Gunner", "Dark Gunner"); + public static readonly Monster DeathGunner = new Monster(35, "Death Gunner", "Death Gunner"); + public static readonly Monster DarkBringer = new Monster(36, "Dark Bringer", "Dark Bringer"); + public static readonly Monster IndiBelra = new Monster(37, "Indi Belra", "Indi Belra"); + public static readonly Monster Claw = new Monster(38, "Claw", "Claw"); + public static readonly Monster Bulk = new Monster(39, "Bulk", "Bulk"); + public static readonly Monster Bulclaw = new Monster(40, "Bulclaw", "Bulclaw"); + public static readonly Monster Dimenian = new Monster(41, "Dimenian", "Arlan"); + public static readonly Monster LaDimenian = new Monster(42, "La Dimenian", "Merlan"); + public static readonly Monster SoDimenian = new Monster(43, "So Dimenian", "Del-D"); + + // Episode 1 Bosses + public static readonly Monster Dragon = new Monster(44, "Dragon", "Sil Dragon"); + public static readonly Monster DeRolLe = new Monster(45, "De Rol Le", "Dal Ral Lie"); + public static readonly Monster VolOpt = new Monster(46, "Vol Opt", "Vol Opt ver.2"); + public static readonly Monster DarkFalz = new Monster(47, "Dark Falz", "Dark Falz"); + + // VR Temple + public static readonly Monster LoveRappy = new Monster(51, "Love Rappy", "Love Rappy"); + public static readonly Monster BarbaRay = new Monster(73, "Barba Ray", "Barba Ray"); + public static readonly Monster PigRay = new Monster(74, "Pig Ray", "Pig Ray"); + public static readonly Monster UlRay = new Monster(75, "Ul Ray", "Ul Ray"); + public static readonly Monster StRappy = new Monster(79, "St. Rappy", "St. Rappy"); + public static readonly Monster HalloRappy = new Monster(80, "Hallo Rappy", "Hallo Rappy"); + public static readonly Monster EggRappy = new Monster(81, "Egg Rappy", "Egg Rappy"); + + // VR Spaceship + public static readonly Monster GolDragon = new Monster(76, "Gol Dragon", "Gol Dragon"); + + // Central Control Area + public static readonly Monster Merillia = new Monster(52, "Merillia", "Merillia"); + public static readonly Monster Meriltas = new Monster(53, "Meriltas", "Meriltas"); + public static readonly Monster Gee = new Monster(54, "Gee", "Gee"); + public static readonly Monster GiGue = new Monster(55, "Gi Gue", "Gi Gue"); + public static readonly Monster Mericarol = new Monster(56, "Mericarol", "Mericarol"); + public static readonly Monster Merikle = new Monster(57, "Merikle", "Merikle"); + public static readonly Monster Mericus = new Monster(58, "Mericus", "Mericus"); + public static readonly Monster UlGibbon = new Monster(59, "Ul Gibbon", "Ul Gibbon"); + public static readonly Monster ZolGibbon = new Monster(60, "Zol Gibbon", "Zol Gibbon"); + public static readonly Monster Gibbles = new Monster(61, "Gibbles", "Gibbles"); + public static readonly Monster SinowBerill = new Monster(62, "Sinow Berill", "Sinow Berill"); + public static readonly Monster SinowSpigell = new Monster(63, "Sinow Spigell", "Sinow Spigell"); + public static readonly Monster GalGryphon = new Monster(77, "Gal Gryphon", "Gal Gryphon"); + public static readonly Monster IllGill = new Monster(82, "Ill Gill", "Ill Gill"); + public static readonly Monster DelLily = new Monster(83, "Del Lily", "Del Lily"); + public static readonly Monster Epsilon = new Monster(84, "Epsilon", "Epsilon"); + public static readonly Monster Epsigard = new Monster(87, "Epsigard", "Epsigard"); + + // Seabed + public static readonly Monster Dolmolm = new Monster(64, "Dolmolm", "Dolmolm"); + public static readonly Monster Dolmdarl = new Monster(65, "Dolmdarl", "Dolmdarl"); + public static readonly Monster Morfos = new Monster(66, "Morfos", "Morfos"); + public static readonly Monster Recobox = new Monster(67, "Recobox", "Recobox"); + public static readonly Monster Recon = new Monster(68, "Recon", "Recon"); + public static readonly Monster SinowZoa = new Monster(69, "Sinow Zoa", "Sinow Zoa"); + public static readonly Monster SinowZele = new Monster(70, "Sinow Zele", "Sinow Zele"); + public static readonly Monster Deldepth = new Monster(71, "Deldepth", "Deldepth"); + public static readonly Monster Delbiter = new Monster(72, "Delbiter", "Delbiter"); + public static readonly Monster OlgaFlow = new Monster(78, "Olga Flow", "Olga Flow"); + public static readonly Monster Gael = new Monster(85, "Gael", "Gael"); + public static readonly Monster Giel = new Monster(86, "Giel", "Giel"); + + // Crater + public static readonly Monster Astark = new Monster(88, "Astark", "Astark"); + public static readonly Monster Yowie = new Monster(89, "Yowie", "Yowie"); + public static readonly Monster SatelliteLizard = new Monster(90, "Satellite Lizard", "Satellite Lizard"); + public static readonly Monster Zu = new Monster(94, "Zu", "Zu"); + public static readonly Monster Pazuzu = new Monster(95, "Pazuzu", "Pazuzu"); + public static readonly Monster Boota = new Monster(96, "Boota", "Boota"); + public static readonly Monster ZaBoota = new Monster(97, "Za Boota", "Za Boota"); + public static readonly Monster BaBoota = new Monster(98, "Ba Boota", "Ba Boota"); + public static readonly Monster Dorphon = new Monster(99, "Dorphon", "Dorphon"); + public static readonly Monster DorphonEclair = new Monster(100, "Dorphon Eclair", "Dorphon Eclair"); + public static readonly Monster SandRappy = new Monster(104, "Sand Rappy", "Sand Rappy"); + public static readonly Monster DelRappy = new Monster(105, "Del Rappy", "Del Rappy"); + + // Desert + public static readonly Monster MerissaA = new Monster(91, "Merissa A", "Merissa A"); + public static readonly Monster MerissaAA = new Monster(92, "Merissa AA", "Merissa AA"); + public static readonly Monster Girtablulu = new Monster(93, "Girtablulu", "Girtablulu"); + public static readonly Monster Goran = new Monster(101, "Goran", "Goran"); + public static readonly Monster GoranDetonator = new Monster(102, "Goran Detonator", "Goran Detonator"); + public static readonly Monster PyroGoran = new Monster(103, "Pyro Goran", "Pyro Goran"); + public static readonly Monster SaintMilion = new Monster(106, "Saint-Milion", "Saint-Milion"); + public static readonly Monster Shambertin = new Monster(107, "Shambertin", "Shambertin"); + public static readonly Monster Kondrieu = new Monster(108, "Kondrieu", "Kondrieu"); + + // Other + public static readonly Monster Container = new Monster(48, "Container", "Container"); + public static readonly Monster Darvant = new Monster(999, "Darvant", "Darvant"); + + #endregion + } +} diff --git a/psobb-session-reader/Definitions/Quest.cs b/psobb-session-reader/Definitions/Quest.cs new file mode 100755 index 0000000..da249ee --- /dev/null +++ b/psobb-session-reader/Definitions/Quest.cs @@ -0,0 +1,225 @@ +using System.Collections.Generic; + +namespace psobb_session_reader.Definitions +{ + public class Quest + { + // Creates a new Quest + private Quest(int id, string name, bool isUnknown = false) + { + ID = id; + Name = name; + IsUnknown = isUnknown; + + if (!isUnknown) + LookupByID.Add(id, this); + } + + // Properties + public int ID { get; } + public string Name { get; } + public bool IsUnknown { get; } + public override string ToString() => Name; + + // Static lookup table by ID + private static IDictionary LookupByID = new Dictionary(); + + public static Quest GetQuest(int id) + { + if (LookupByID.TryGetValue(id, out Quest quest)) + return quest; + + return new Quest(id, $"Unknown ({id})", true); + } + + #region [ Quest Definitions ] + + public static readonly Quest None = new Quest(000, "None"); + public static readonly Quest MagnitudeOfMetal = new Quest(001, "Magnitude of Metal"); + public static readonly Quest ClaimingAStake = new Quest(002, "Claiming a Stake"); + public static readonly Quest TheValueOfMoney = new Quest(003, "The Value of Money"); + public static readonly Quest BattleTraining = new Quest(004, "Battle Training"); + public static readonly Quest JournalisticPursuit = new Quest(005, "Journalistic Pursuit"); + public static readonly Quest TheFakeinYellow = new Quest(006, "The Fake in Yellow"); + public static readonly Quest NativeResearch = new Quest(007, "Native Research"); + public static readonly Quest ForestOfSorrow = new Quest(008, "Forest of Sorrow"); + public static readonly Quest GranSquall = new Quest(009, "Gran Squall"); + public static readonly Quest AddictingFood = new Quest(010, "Addicting Food"); + public static readonly Quest TheLostBride = new Quest(011, "The Lost Bride"); + public static readonly Quest WaterfallTears = new Quest(012, "Waterfall Tears"); + public static readonly Quest BlackPaper = new Quest(013, "Black Paper"); + public static readonly Quest SecretDelivery = new Quest(014, "Secret Delivery"); + public static readonly Quest SoulOfABlacksmith = new Quest(015, "Soul of a Blacksmith"); + public static readonly Quest LetterfromLionel = new Quest(016, "Letter from Lionel"); + public static readonly Quest TheGravesButler = new Quest(017, "The Grave's Butler"); + public static readonly Quest KnowingOnesHeart = new Quest(018, "Knowing One's Heart"); + public static readonly Quest TheRetiredHunter = new Quest(019, "The Retired Hunter"); + public static readonly Quest DrOstosResearch = new Quest(020, "Dr. Osto's Research"); + public static readonly Quest UnsealedDoor = new Quest(021, "Unsealed Door"); + public static readonly Quest SoulOfSteel = new Quest(022, "Soul of Steel"); + public static readonly Quest DocsSecretPlan = new Quest(023, "Doc's Secret Plan"); + public static readonly Quest SeekMyMaster = new Quest(024, "Seek my Master"); + public static readonly Quest FromTheDepths = new Quest(025, "From the Depths"); + public static readonly Quest CentralDomeFireSwirl_OfflineVersion = new Quest(026, "Central Dome Fire Swirl (Offline Version)"); + public static readonly Quest SeatOfTheHeart_OfflineVersion = new Quest(027, "Seat of The Heart (Offline Version)"); + public static readonly Quest TheEastTower_OfflineVersion = new Quest(028, "The East Tower (Offline Version)"); + public static readonly Quest TheWestTower_OfflineVersion = new Quest(029, "The West Tower (Offline Version)"); + public static readonly Quest WarriorsPride = new Quest(030, "Warrior's Pride"); + public static readonly Quest BlackPapersDangerousDeal = new Quest(031, "Black Paper's Dangerous Deal"); + public static readonly Quest TheRestlessLion = new Quest(032, "The Restless Lion"); + public static readonly Quest PioneerSpirits = new Quest(033, "Pioneer Spirits"); + public static readonly Quest BlackPapersDangerousDeal2 = new Quest(034, "Black Paper's Dangerous Deal 2"); + public static readonly Quest GallonsPlan = new Quest(035, "Gallon's Plan"); + public static readonly Quest ToTheEndOftheWilderness = new Quest(036, "To the End of the Wilderness"); + public static readonly Quest TheMissingMaracas = new Quest(068, "The Missing Maracas"); + public static readonly Quest FamitsuCup = new Quest(069, "Famitsu Cup"); + public static readonly Quest FamitsuCupv2_v1 = new Quest(070, "Famitsu Cup v2 (v1)"); + public static readonly Quest DawnOfE_Access_v1 = new Quest(071, "Dawn of E-Access (v1)"); + public static readonly Quest CentralDomeFireSwirl_OnlineVersion_V2 = new Quest(072, "Central Dome Fire Swirl (Online version) (V2)"); + public static readonly Quest TheTinkerbellsDog2 = new Quest(073, "The Tinkerbell's Dog 2"); + public static readonly Quest _FamitsuMaximumAttack_v2 = new Quest(080, "-Famitsu Maximum Attack- (v2)"); + public static readonly Quest SunsetAtTheSecretBase_v2 = new Quest(081, "Sunset at The Secret Base (v2)"); + public static readonly Quest MopUpOperation1 = new Quest(101, "Mop-up Operation #1"); + public static readonly Quest MopUpOperation2 = new Quest(102, "Mop-up Operation #2"); + public static readonly Quest MopUpOperation3 = new Quest(103, "Mop-up Operation #3"); + public static readonly Quest MopUpOperation4 = new Quest(104, "Mop-up Operation #4"); + public static readonly Quest LostHeatSword = new Quest(105, "Lost HEAT SWORD"); + public static readonly Quest LostIceSpinner = new Quest(106, "Lost ICE SPINNER"); + public static readonly Quest LostSoulBlade = new Quest(107, "Lost SOUL BLADE"); + public static readonly Quest EndlessNightmare1 = new Quest(108, "Endless Nightmare #1"); + public static readonly Quest EndlessNightmare2 = new Quest(109, "Endless Nightmare #2"); + public static readonly Quest EndlessNightmare3 = new Quest(110, "Endless Nightmare #3"); + public static readonly Quest EndlessNightmare4 = new Quest(111, "Endless Nightmare #4"); + public static readonly Quest TodaysRate = new Quest(117, "Today's Rate"); + public static readonly Quest TowardstheFuture = new Quest(118, "Towards the Future"); + public static readonly Quest FragmentsOfAMemory = new Quest(119, "Fragments of a Memory"); + public static readonly Quest LostHellPallasch = new Quest(120, "Lost HELL PALLASCH"); + public static readonly Quest StValentinesDay = new Quest(124, "St. Valentine's Day"); + public static readonly Quest WhiteDay = new Quest(125, "White Day"); + public static readonly Quest GoodLuck = new Quest(126, "Good Luck!"); + public static readonly Quest Sugoroku = new Quest(127, "Sugoroku"); + public static readonly Quest RappysHoliday = new Quest(137, "Rappy's Holiday"); + public static readonly Quest GallonsTreachery = new Quest(138, "Gallon's Treachery"); + public static readonly Quest StValentinesDay2003_v2 = new Quest(140, "St. Valentine's Day 2003 (v2)"); + public static readonly Quest LabyrinthineTrial = new Quest(141, "Labyrinthine Trial"); + public static readonly Quest AOLCUP_MaximumAttack_E = new Quest(142, "AOL CUP -Maximum Attack- (E)"); + public static readonly Quest AOLCUP_SunsetBase_ = new Quest(143, "AOL CUP -Sunset Base-"); + public static readonly Quest MaximumAttack4thStage_A_EpI_E = new Quest(144, "Maximum Attack 4th Stage -A- (Ep I, E)"); + public static readonly Quest MaximumAttack4thStage_B_EpI_E = new Quest(145, "Maximum Attack 4th Stage -B- (Ep I, E)"); + public static readonly Quest MaximumAttack4thStage_C_EpI_E = new Quest(146, "Maximum Attack 4th Stage -C- (Ep I, E)"); + public static readonly Quest DreamMessenger = new Quest(201, "Dream Messenger"); + public static readonly Quest PioneerWarehouse = new Quest(202, "Pioneer Warehouse"); + public static readonly Quest ReachfortheDream = new Quest(203, "Reach for the Dream"); + public static readonly Quest GallonsShop = new Quest(204, "Gallon's Shop"); + public static readonly Quest ItemPresent = new Quest(205, "Item Present"); + public static readonly Quest GallonsShop_QQQ = new Quest(206, "Gallon's Shop (???)"); + public static readonly Quest PioneerHalloween = new Quest(207, "Pioneer Halloween"); + public static readonly Quest MaximumAttack2_E = new Quest(211, "Maximum Attack 2 (E)"); + public static readonly Quest SingingAtTheBeach_QQQ = new Quest(214, "Singing at the Beach (???)"); + public static readonly Quest SingingAtTheBeach = new Quest(216, "Singing at the Beach"); + public static readonly Quest GallonsShop_ValentinesEvent = new Quest(219, "Gallon's Shop (Valentines Event)"); + public static readonly Quest PrincipalsGift = new Quest(220, "Principal's Gift"); + public static readonly Quest SeatOfTheHeart_OnlineVersion = new Quest(222, "Seat of the Heart (Online Version)"); + public static readonly Quest TheEastTower_OnlineVersion = new Quest(223, "The East Tower (Online Version)"); + public static readonly Quest TheWestTower_OnlineVersion = new Quest(224, "The West Tower (Online Version)"); + public static readonly Quest BlueStarMemories_QQQ = new Quest(230, "Blue Star Memories (???)"); + public static readonly Quest RespectiveTomorrow = new Quest(231, "Respective Tomorrow"); + public static readonly Quest FestivityOnTheBeach = new Quest(232, "Festivity On The Beach"); + public static readonly Quest PhantasmalWorld1 = new Quest(233, "Phantasmal World #1"); + public static readonly Quest PhantasmalWorld2 = new Quest(234, "Phantasmal World #2"); + public static readonly Quest PhantasmalWorld3 = new Quest(235, "Phantasmal World #3"); + public static readonly Quest PhantasmalWorld4 = new Quest(236, "Phantasmal World #4"); + public static readonly Quest MaximumAttack1Ver2_E = new Quest(237, "MAXIMUM ATTACK 1 Ver2 (E)"); + public static readonly Quest MaximumAttack2Ver2_E = new Quest(238, "MAXIMUM ATTACK 2 Ver2 (E)"); + public static readonly Quest BeachLaughter = new Quest(239, "Beach Laughter"); + public static readonly Quest PioneerChristmas = new Quest(240, "Pioneer Christmas"); + public static readonly Quest MaximumAttack4thStage_A_EpII_E = new Quest(241, "Maximum Attack 4th Stage -A- (Ep II, E)"); + public static readonly Quest MaximumAttack4thStage_B_EpII_E = new Quest(242, "Maximum Attack 4th Stage -B- (Ep II, E)"); + public static readonly Quest MaximumAttack4thStage_C_EpII_E = new Quest(243, "Maximum Attack 4th Stage -C- (Ep II, E)"); + public static readonly Quest CurrentlyUndecided_40000000kills = new Quest(244, "*Currently Undecided* (40,000,000 kills)"); + public static readonly Quest CurrentlyUndecided_80000000kills = new Quest(245, "*Currently Undecided* (80,000,000 kills)"); + public static readonly Quest CurrentlyUndecided_100000000kills = new Quest(246, "*Currently Undecided* (100,000,000 kills)"); + public static readonly Quest CurrentlyUndecided_40000000kills_debug = new Quest(247, "*Currently Undecided* (40,000,000 kills, debug)"); + public static readonly Quest CurrentlyUndecided_80000000kills_debug = new Quest(248, "*Currently Undecided* (80,000,000 kills, debug)"); + public static readonly Quest CurrentlyUndecided_100000000kills_debug = new Quest(249, "*Currently Undecided* (100,000,000 kills, debug)"); + public static readonly Quest MaximumAttack_3rdStage_ = new Quest(301, "Maximum Attack -3rd Stage-"); + public static readonly Quest CurrentlyUndecided = new Quest(302, "*Currently Undecided*"); + public static readonly Quest MaximumAttack4thStage_A_EpIV_E = new Quest(303, "Maximum Attack 4th Stage -A- (Ep IV, E)"); + public static readonly Quest MaximumAttack4thStage_B_EpIV_E = new Quest(304, "Maximum Attack 4th Stage -B- (Ep IV, E)"); + public static readonly Quest MaximumAttack4thStage_C_EpIV_E = new Quest(305, "Maximum Attack 4th Stage -C- (Ep IV, E)"); + public static readonly Quest CurrentlyUndecided_1 = new Quest(306, "*Currently Undecided*"); + public static readonly Quest ClairesDeal1 = new Quest(308, "Claire's Deal 1"); + public static readonly Quest ClairesDeal2 = new Quest(309, "Claire's Deal 2"); + public static readonly Quest ClairesDeal3 = new Quest(310, "Claire's Deal 3"); + public static readonly Quest ClairesDeal4 = new Quest(311, "Claire's Deal 4"); + public static readonly Quest ClairesDeal5 = new Quest(312, "Claire's Deal 5"); + public static readonly Quest BeyondTheHorizon = new Quest(313, "Beyond the Horizon"); + public static readonly Quest MaximumAttack3Ver2_E = new Quest(314, "MAXIMUM ATTACK 3 Ver2 (E)"); + public static readonly Quest CurrentlyUndecided_2 = new Quest(315, "*Currently Undecided*"); + public static readonly Quest _1_1_PlanetRagol = new Quest(401, "1-1:Planet Ragol"); + public static readonly Quest _1_2_TorrentialWoods = new Quest(402, "1-2:Torrential Woods"); + public static readonly Quest _1_3_SubterraneanDen = new Quest(403, "1-3:Subterranean Den"); + public static readonly Quest _2_1_InfernalCavern = new Quest(404, "2-1:Infernal Cavern"); + public static readonly Quest _2_2_DeepWithin = new Quest(405, "2-2:Deep Within"); + public static readonly Quest _2_3_TheMutation = new Quest(406, "2-3:The Mutation"); + public static readonly Quest _2_4_WaterwayShadow = new Quest(407, "2-4:Waterway Shadow"); + public static readonly Quest _3_1_TheFacility = new Quest(408, "3-1:The Facility"); + public static readonly Quest _3_2_MachinesAttack = new Quest(409, "3-2:Machines Attack"); + public static readonly Quest _3_3_CentralControl = new Quest(410, "3-3:Central Control"); + public static readonly Quest _4_1_TheLostRuins = new Quest(411, "4-1:The Lost Ruins"); + public static readonly Quest _4_2_BuriedRelics = new Quest(412, "4-2:Buried Relics"); + public static readonly Quest _4_3_HeroAndDaughter = new Quest(413, "4-3:Hero & Daughter"); + public static readonly Quest _4_4_TheTombStirs = new Quest(414, "4-4:The Tomb Stirs"); + public static readonly Quest _4_5_DarkInheritance = new Quest(415, "4-5:Dark Inheritance"); + public static readonly Quest _5_1_Test_VRTemple1 = new Quest(451, "5-1:Test/VR Temple 1"); + public static readonly Quest _5_2_Test_VRTemple2 = new Quest(452, "5-2:Test/VR Temple 2"); + public static readonly Quest _5_3_Test_VRTemple3 = new Quest(453, "5-3:Test/VR Temple 3"); + public static readonly Quest _5_4_Test_VRTemple4 = new Quest(454, "5-4:Test/VR Temple 4"); + public static readonly Quest _5_5_Test_VRTemple5 = new Quest(455, "5-5:Test/VR Temple 5"); + public static readonly Quest _6_1_Test_Spaceship1 = new Quest(456, "6-1:Test/Spaceship 1"); + public static readonly Quest _6_2_Test_Spaceship2 = new Quest(457, "6-2:Test/Spaceship 2"); + public static readonly Quest _6_3_Test_Spaceship3 = new Quest(458, "6-3:Test/Spaceship 3"); + public static readonly Quest _6_4_Test_Spaceship4 = new Quest(459, "6-4:Test/Spaceship 4"); + public static readonly Quest _6_5_Test_Spaceship5 = new Quest(460, "6-5:Test/Spaceship 5"); + public static readonly Quest _7_1_FromthePast = new Quest(461, "7-1:From the Past"); + public static readonly Quest _7_2_SeekingClues = new Quest(462, "7-2:Seeking Clues"); + public static readonly Quest _7_3_SilentBeach = new Quest(463, "7-3:Silent Beach"); + public static readonly Quest _7_4_CentralControl = new Quest(464, "7-4:Central Control"); + public static readonly Quest _7_5_IsleOfMutants = new Quest(465, "7-5:Isle of Mutants"); + public static readonly Quest _8_1_BelowtheWaves = new Quest(466, "8-1:Below the Waves"); + public static readonly Quest _8_2_DesiresEnd = new Quest(467, "8-2:Desire's End"); + public static readonly Quest _8_3_PurpleLamplight = new Quest(468, "8-3:Purple Lamplight"); + public static readonly Quest BlueStarMemories = new Quest(486, "Blue Star Memories"); + public static readonly Quest Battle1 = new Quest(501, "Battle1"); + public static readonly Quest Battle2 = new Quest(502, "Battle2"); + public static readonly Quest Battle3 = new Quest(503, "Battle3"); + public static readonly Quest Battle4 = new Quest(504, "Battle4"); + public static readonly Quest Battle5 = new Quest(505, "Battle5"); + public static readonly Quest Battle6 = new Quest(506, "Battle6"); + public static readonly Quest Battle7 = new Quest(507, "Battle7"); + public static readonly Quest Battle8 = new Quest(508, "Battle8"); + public static readonly Quest _9_1_MissingResearch = new Quest(701, "9-1:Missing Research"); + public static readonly Quest _9_2_DataRetrieval = new Quest(702, "9-2:Data Retrieval"); + public static readonly Quest _9_3_RealityAndTruth = new Quest(703, "9-3:Reality & Truth"); + public static readonly Quest _9_4_Pursuit = new Quest(704, "9-4:Pursuit"); + public static readonly Quest _9_5_TheChosen = new Quest(705, "9-5:The Chosen"); + public static readonly Quest _9_6_TheChosen = new Quest(706, "9-6:The Chosen"); + public static readonly Quest _9_7_SacredGround = new Quest(707, "9-7:Sacred Ground"); + public static readonly Quest _9_8_TheFinalCycle = new Quest(708, "9-8:The Final Cycle"); + public static readonly Quest PointOfDisaster = new Quest(709, "Point of Disaster"); + public static readonly Quest TheRobotsReckoning = new Quest(710, "The Robots' Reckoning"); + public static readonly Quest WarOfLimits1 = new Quest(811, "War of Limits 1"); + public static readonly Quest WarOfLimits2 = new Quest(812, "War of Limits 2"); + public static readonly Quest WarOfLimits3 = new Quest(813, "War of Limits 3"); + public static readonly Quest WarOfLimits4 = new Quest(814, "War of Limits 4"); + public static readonly Quest WarOfLimits5 = new Quest(815, "War of Limits 5"); + public static readonly Quest NewMopUpOperation1 = new Quest(816, "New Mop-up Operation #1"); + public static readonly Quest NewMopUpOperation2 = new Quest(817, "New Mop-up Operation #2"); + public static readonly Quest NewMopUpOperation3 = new Quest(818, "New Mop-up Operation #3"); + public static readonly Quest NewMopUpOperation4 = new Quest(819, "New Mop-up Operation #4"); + public static readonly Quest NewMopUpOperation5 = new Quest(820, "New Mop-up Operation #5"); + public static readonly Quest ChallengeMode = new Quest(65535, "Challenge Mode"); + + #endregion + } +} diff --git a/psobb-session-reader/Definitions/SectionID.cs b/psobb-session-reader/Definitions/SectionID.cs new file mode 100755 index 0000000..87bbb34 --- /dev/null +++ b/psobb-session-reader/Definitions/SectionID.cs @@ -0,0 +1,48 @@ + +using System.Collections.Generic; + +namespace psobb_session_reader.Definitions +{ + public class SectionID + { + // Creates a new SectionID + private SectionID(int id, string name, bool isUnknown = false) + { + ID = id; + Name = name; + IsUnknown = isUnknown; + + if (!isUnknown) + LookupByID.Add(id, this); + } + + // Properties + public int ID { get; } + public string Name { get; } + public bool IsUnknown { get; } + public override string ToString() => Name; + + // Static lookup table by ID + private static IDictionary LookupByID = new Dictionary(); + + public static SectionID GetSectionID(int id) + { + if (LookupByID.TryGetValue(id, out SectionID sectionID)) + return sectionID; + + return new SectionID(id, $"Unknown ({id})", true); + } + + // SectionID definitions + public static readonly SectionID Viridia = new SectionID(0, "Viridia"); + public static readonly SectionID Greenill = new SectionID(1, "Greenill"); + public static readonly SectionID Skyly = new SectionID(2, "Skyly"); + public static readonly SectionID Bluefull = new SectionID(3, "Bluefull"); + public static readonly SectionID Purplenum = new SectionID(4, "Purplenum"); + public static readonly SectionID Pinkal = new SectionID(5, "Pinkal"); + public static readonly SectionID Redria = new SectionID(6, "Redria"); + public static readonly SectionID Oran = new SectionID(7, "Oran"); + public static readonly SectionID Yellowboze = new SectionID(8, "Yellowboze"); + public static readonly SectionID Whitill = new SectionID(9, "Whitill"); + } +} diff --git a/psobb-session-reader/KillCount.cs b/psobb-session-reader/KillCount.cs new file mode 100755 index 0000000..8de830c --- /dev/null +++ b/psobb-session-reader/KillCount.cs @@ -0,0 +1,19 @@ +using psobb_session_reader.Definitions; + +namespace psobb_session_reader +{ + public class KillCount + { + public KillCount(Area area, Monster monster, int kills) + { + Area = area; + Monster = monster; + Kills = kills; + } + + public Area Area { get; } + public Monster Monster { get; } + public int Kills { get; } + public override string ToString() => Kills.ToString(); + } +} diff --git a/psobb-session-reader/MainWindow.Designer.cs b/psobb-session-reader/MainWindow.Designer.cs new file mode 100755 index 0000000..2e10c8e --- /dev/null +++ b/psobb-session-reader/MainWindow.Designer.cs @@ -0,0 +1,626 @@ +namespace psobb_session_reader +{ + partial class MainWindow + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainWindow)); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle13 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle14 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle15 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle(); + this._sectionIDImageList = new System.Windows.Forms.ImageList(this.components); + this._sessionDataGridView = new System.Windows.Forms.DataGridView(); + this._contentPanel = new System.Windows.Forms.Panel(); + this._sessionSplitContainer = new System.Windows.Forms.SplitContainer(); + this._sessionDetailTabControl = new System.Windows.Forms.TabControl(); + this._tabContextMenuStrip = new System.Windows.Forms.ContextMenuStrip(this.components); + this._closeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this._closeAllToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this._sessionCountLabel = new System.Windows.Forms.Label(); + this._mainMenuStrip = new System.Windows.Forms.MenuStrip(); + this.sessionToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this._closeCurrentTabToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this._closeAllTabsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator(); + this._changePSOPathToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this._reloadSessionDataToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); + this._exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this._gridHeaderContextMenuStrip = new System.Windows.Forms.ContextMenuStrip(this.components); + this._mesetaPerSecondDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this._mesetaPerMinuteDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this._mesetaPerHourDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this._mesetaPerSecondInDungeonDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this._mesetaPerMinuteInDungeonDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this._mesetaPerHourInDungeonDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this._xpPerSecondDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this._xpPerMinuteDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this._xpPerHourDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this._xpPerSecondInDungeonDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this._xpPerMinuteInDungeonDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this._xpPerHourInDungeonDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this._sessionTimeDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this._sessionFileNameDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this._difficultyDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this._episodeDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this._sectionIDDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this._questDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this._mesetaDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this._xpDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this._timeSpentDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this._timeSpentInDungeonDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this._sessionBindingSource = new System.Windows.Forms.BindingSource(this.components); + this.viewToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.columnsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + ((System.ComponentModel.ISupportInitialize)(this._sessionDataGridView)).BeginInit(); + this._contentPanel.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this._sessionSplitContainer)).BeginInit(); + this._sessionSplitContainer.Panel1.SuspendLayout(); + this._sessionSplitContainer.Panel2.SuspendLayout(); + this._sessionSplitContainer.SuspendLayout(); + this._tabContextMenuStrip.SuspendLayout(); + this._mainMenuStrip.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this._sessionBindingSource)).BeginInit(); + this.SuspendLayout(); + // + // _sectionIDImageList + // + this._sectionIDImageList.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("_sectionIDImageList.ImageStream"))); + this._sectionIDImageList.TransparentColor = System.Drawing.Color.Transparent; + this._sectionIDImageList.Images.SetKeyName(0, "Viridia"); + this._sectionIDImageList.Images.SetKeyName(1, "Greenill"); + this._sectionIDImageList.Images.SetKeyName(2, "Skyly"); + this._sectionIDImageList.Images.SetKeyName(3, "Bluefull"); + this._sectionIDImageList.Images.SetKeyName(4, "Purplenum"); + this._sectionIDImageList.Images.SetKeyName(5, "Pinkal"); + this._sectionIDImageList.Images.SetKeyName(6, "Redria"); + this._sectionIDImageList.Images.SetKeyName(7, "Oran"); + this._sectionIDImageList.Images.SetKeyName(8, "Yellowboze"); + this._sectionIDImageList.Images.SetKeyName(9, "Whitill"); + this._sectionIDImageList.Images.SetKeyName(10, "Unknown"); + // + // _sessionDataGridView + // + this._sessionDataGridView.AllowUserToAddRows = false; + this._sessionDataGridView.AllowUserToDeleteRows = false; + this._sessionDataGridView.AllowUserToResizeColumns = false; + this._sessionDataGridView.AllowUserToResizeRows = false; + this._sessionDataGridView.AutoGenerateColumns = false; + this._sessionDataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this._sessionDataGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this._sessionTimeDataGridViewTextBoxColumn, + this._sessionFileNameDataGridViewTextBoxColumn, + this._difficultyDataGridViewTextBoxColumn, + this._episodeDataGridViewTextBoxColumn, + this._sectionIDDataGridViewTextBoxColumn, + this._questDataGridViewTextBoxColumn, + this._mesetaDataGridViewTextBoxColumn, + this._mesetaPerSecondDataGridViewTextBoxColumn, + this._mesetaPerMinuteDataGridViewTextBoxColumn, + this._mesetaPerHourDataGridViewTextBoxColumn, + this._mesetaPerSecondInDungeonDataGridViewTextBoxColumn, + this._mesetaPerMinuteInDungeonDataGridViewTextBoxColumn, + this._mesetaPerHourInDungeonDataGridViewTextBoxColumn, + this._xpDataGridViewTextBoxColumn, + this._xpPerSecondDataGridViewTextBoxColumn, + this._xpPerMinuteDataGridViewTextBoxColumn, + this._xpPerHourDataGridViewTextBoxColumn, + this._xpPerSecondInDungeonDataGridViewTextBoxColumn, + this._xpPerMinuteInDungeonDataGridViewTextBoxColumn, + this._xpPerHourInDungeonDataGridViewTextBoxColumn, + this._timeSpentDataGridViewTextBoxColumn, + this._timeSpentInDungeonDataGridViewTextBoxColumn}); + this._sessionDataGridView.DataSource = this._sessionBindingSource; + this._sessionDataGridView.Dock = System.Windows.Forms.DockStyle.Fill; + this._sessionDataGridView.Location = new System.Drawing.Point(0, 0); + this._sessionDataGridView.Name = "_sessionDataGridView"; + this._sessionDataGridView.ReadOnly = true; + this._sessionDataGridView.RowHeadersVisible = false; + this._sessionDataGridView.Size = new System.Drawing.Size(581, 333); + this._sessionDataGridView.TabIndex = 0; + this._sessionDataGridView.CellMouseDoubleClick += new System.Windows.Forms.DataGridViewCellMouseEventHandler(this.SessionDataGridView_CellMouseDoubleClick); + this._sessionDataGridView.CellPainting += new System.Windows.Forms.DataGridViewCellPaintingEventHandler(this.SessionDataGridView_CellPainting); + // + // _contentPanel + // + this._contentPanel.Controls.Add(this._sessionSplitContainer); + this._contentPanel.Dock = System.Windows.Forms.DockStyle.Fill; + this._contentPanel.Location = new System.Drawing.Point(0, 24); + this._contentPanel.Name = "_contentPanel"; + this._contentPanel.Padding = new System.Windows.Forms.Padding(10); + this._contentPanel.Size = new System.Drawing.Size(601, 366); + this._contentPanel.TabIndex = 4; + // + // _sessionSplitContainer + // + this._sessionSplitContainer.Dock = System.Windows.Forms.DockStyle.Fill; + this._sessionSplitContainer.FixedPanel = System.Windows.Forms.FixedPanel.Panel2; + this._sessionSplitContainer.Location = new System.Drawing.Point(10, 10); + this._sessionSplitContainer.Name = "_sessionSplitContainer"; + this._sessionSplitContainer.Orientation = System.Windows.Forms.Orientation.Horizontal; + // + // _sessionSplitContainer.Panel1 + // + this._sessionSplitContainer.Panel1.Controls.Add(this._sessionDetailTabControl); + this._sessionSplitContainer.Panel1Collapsed = true; + // + // _sessionSplitContainer.Panel2 + // + this._sessionSplitContainer.Panel2.Controls.Add(this._sessionDataGridView); + this._sessionSplitContainer.Panel2.Controls.Add(this._sessionCountLabel); + this._sessionSplitContainer.Panel2MinSize = 100; + this._sessionSplitContainer.Size = new System.Drawing.Size(581, 346); + this._sessionSplitContainer.SplitterDistance = 193; + this._sessionSplitContainer.TabIndex = 0; + // + // _sessionDetailTabControl + // + this._sessionDetailTabControl.ContextMenuStrip = this._tabContextMenuStrip; + this._sessionDetailTabControl.Dock = System.Windows.Forms.DockStyle.Fill; + this._sessionDetailTabControl.Location = new System.Drawing.Point(0, 0); + this._sessionDetailTabControl.Name = "_sessionDetailTabControl"; + this._sessionDetailTabControl.SelectedIndex = 0; + this._sessionDetailTabControl.Size = new System.Drawing.Size(150, 193); + this._sessionDetailTabControl.TabIndex = 1; + this._sessionDetailTabControl.MouseDown += new System.Windows.Forms.MouseEventHandler(this.SessionDetailTabControl_MouseDown); + this._sessionDetailTabControl.MouseMove += new System.Windows.Forms.MouseEventHandler(this.SessionDetailTabControl_MouseMove); + // + // _tabContextMenuStrip + // + this._tabContextMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this._closeToolStripMenuItem, + this._closeAllToolStripMenuItem}); + this._tabContextMenuStrip.Name = "_tabContextMenuStrip"; + this._tabContextMenuStrip.Size = new System.Drawing.Size(149, 48); + this._tabContextMenuStrip.Opening += new System.ComponentModel.CancelEventHandler(this.TabContextMenuStrip_Opening); + // + // _closeToolStripMenuItem + // + this._closeToolStripMenuItem.Name = "_closeToolStripMenuItem"; + this._closeToolStripMenuItem.ShortcutKeyDisplayString = "Ctrl+W"; + this._closeToolStripMenuItem.Size = new System.Drawing.Size(148, 22); + this._closeToolStripMenuItem.Text = "Close"; + this._closeToolStripMenuItem.Click += new System.EventHandler(this.CloseCurrentTab_Click); + // + // _closeAllToolStripMenuItem + // + this._closeAllToolStripMenuItem.Name = "_closeAllToolStripMenuItem"; + this._closeAllToolStripMenuItem.Size = new System.Drawing.Size(148, 22); + this._closeAllToolStripMenuItem.Text = "Close All"; + this._closeAllToolStripMenuItem.Click += new System.EventHandler(this.CloseAllTabs_Click); + // + // _sessionCountLabel + // + this._sessionCountLabel.Dock = System.Windows.Forms.DockStyle.Bottom; + this._sessionCountLabel.Location = new System.Drawing.Point(0, 333); + this._sessionCountLabel.Name = "_sessionCountLabel"; + this._sessionCountLabel.Size = new System.Drawing.Size(581, 13); + this._sessionCountLabel.TabIndex = 1; + this._sessionCountLabel.Text = "Count: 0"; + // + // _mainMenuStrip + // + this._mainMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.sessionToolStripMenuItem, + this.viewToolStripMenuItem}); + this._mainMenuStrip.Location = new System.Drawing.Point(0, 0); + this._mainMenuStrip.Name = "_mainMenuStrip"; + this._mainMenuStrip.Size = new System.Drawing.Size(601, 24); + this._mainMenuStrip.TabIndex = 5; + this._mainMenuStrip.Text = "menuStrip1"; + // + // sessionToolStripMenuItem + // + this.sessionToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this._closeCurrentTabToolStripMenuItem, + this._closeAllTabsToolStripMenuItem, + this.toolStripSeparator2, + this._changePSOPathToolStripMenuItem, + this._reloadSessionDataToolStripMenuItem, + this.toolStripSeparator1, + this._exitToolStripMenuItem}); + this.sessionToolStripMenuItem.Name = "sessionToolStripMenuItem"; + this.sessionToolStripMenuItem.Size = new System.Drawing.Size(58, 20); + this.sessionToolStripMenuItem.Text = "Session"; + // + // _closeCurrentTabToolStripMenuItem + // + this._closeCurrentTabToolStripMenuItem.Enabled = false; + this._closeCurrentTabToolStripMenuItem.Name = "_closeCurrentTabToolStripMenuItem"; + this._closeCurrentTabToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.W))); + this._closeCurrentTabToolStripMenuItem.Size = new System.Drawing.Size(213, 22); + this._closeCurrentTabToolStripMenuItem.Text = "Close Current Tab"; + this._closeCurrentTabToolStripMenuItem.Click += new System.EventHandler(this.CloseCurrentTab_Click); + // + // _closeAllTabsToolStripMenuItem + // + this._closeAllTabsToolStripMenuItem.Enabled = false; + this._closeAllTabsToolStripMenuItem.Name = "_closeAllTabsToolStripMenuItem"; + this._closeAllTabsToolStripMenuItem.Size = new System.Drawing.Size(213, 22); + this._closeAllTabsToolStripMenuItem.Text = "Close All Tabs"; + this._closeAllTabsToolStripMenuItem.Click += new System.EventHandler(this.CloseAllTabs_Click); + // + // toolStripSeparator2 + // + this.toolStripSeparator2.Name = "toolStripSeparator2"; + this.toolStripSeparator2.Size = new System.Drawing.Size(210, 6); + // + // _changePSOPathToolStripMenuItem + // + this._changePSOPathToolStripMenuItem.Name = "_changePSOPathToolStripMenuItem"; + this._changePSOPathToolStripMenuItem.Size = new System.Drawing.Size(213, 22); + this._changePSOPathToolStripMenuItem.Text = "Change PSO Path..."; + this._changePSOPathToolStripMenuItem.Click += new System.EventHandler(this.ChangePSOPathToolStripMenuItem_Click); + // + // _reloadSessionDataToolStripMenuItem + // + this._reloadSessionDataToolStripMenuItem.Name = "_reloadSessionDataToolStripMenuItem"; + this._reloadSessionDataToolStripMenuItem.Size = new System.Drawing.Size(213, 22); + this._reloadSessionDataToolStripMenuItem.Text = "Reload Session Data"; + this._reloadSessionDataToolStripMenuItem.Click += new System.EventHandler(this.ReloadSessionDataToolStripMenuItem_Click); + // + // toolStripSeparator1 + // + this.toolStripSeparator1.Name = "toolStripSeparator1"; + this.toolStripSeparator1.Size = new System.Drawing.Size(210, 6); + // + // _exitToolStripMenuItem + // + this._exitToolStripMenuItem.Name = "_exitToolStripMenuItem"; + this._exitToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Alt | System.Windows.Forms.Keys.F4))); + this._exitToolStripMenuItem.Size = new System.Drawing.Size(213, 22); + this._exitToolStripMenuItem.Text = "Exit"; + this._exitToolStripMenuItem.Click += new System.EventHandler(this.ExitToolStripMenuItem_Click); + // + // _gridHeaderContextMenuStrip + // + this._gridHeaderContextMenuStrip.Name = "_gridHeaderContextMenuStrip"; + this._gridHeaderContextMenuStrip.Size = new System.Drawing.Size(61, 4); + // + // _mesetaPerSecondDataGridViewTextBoxColumn + // + this._mesetaPerSecondDataGridViewTextBoxColumn.DataPropertyName = "MesetaPerSecond"; + dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight; + dataGridViewCellStyle3.Format = "N2"; + dataGridViewCellStyle3.NullValue = null; + this._mesetaPerSecondDataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle3; + this._mesetaPerSecondDataGridViewTextBoxColumn.HeaderText = "Meseta Per Second"; + this._mesetaPerSecondDataGridViewTextBoxColumn.Name = "_mesetaPerSecondDataGridViewTextBoxColumn"; + this._mesetaPerSecondDataGridViewTextBoxColumn.ReadOnly = true; + this._mesetaPerSecondDataGridViewTextBoxColumn.Visible = false; + // + // _mesetaPerMinuteDataGridViewTextBoxColumn + // + this._mesetaPerMinuteDataGridViewTextBoxColumn.DataPropertyName = "MesetaPerMinute"; + dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight; + dataGridViewCellStyle4.Format = "N2"; + dataGridViewCellStyle4.NullValue = null; + this._mesetaPerMinuteDataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle4; + this._mesetaPerMinuteDataGridViewTextBoxColumn.HeaderText = "Meseta Per Minute"; + this._mesetaPerMinuteDataGridViewTextBoxColumn.Name = "_mesetaPerMinuteDataGridViewTextBoxColumn"; + this._mesetaPerMinuteDataGridViewTextBoxColumn.ReadOnly = true; + this._mesetaPerMinuteDataGridViewTextBoxColumn.Visible = false; + // + // _mesetaPerHourDataGridViewTextBoxColumn + // + this._mesetaPerHourDataGridViewTextBoxColumn.DataPropertyName = "MesetaPerHour"; + dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight; + dataGridViewCellStyle5.Format = "N2"; + dataGridViewCellStyle5.NullValue = null; + this._mesetaPerHourDataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle5; + this._mesetaPerHourDataGridViewTextBoxColumn.HeaderText = "Meseta Per Hour"; + this._mesetaPerHourDataGridViewTextBoxColumn.Name = "_mesetaPerHourDataGridViewTextBoxColumn"; + this._mesetaPerHourDataGridViewTextBoxColumn.ReadOnly = true; + this._mesetaPerHourDataGridViewTextBoxColumn.Visible = false; + // + // _mesetaPerSecondInDungeonDataGridViewTextBoxColumn + // + this._mesetaPerSecondInDungeonDataGridViewTextBoxColumn.DataPropertyName = "MesetaPerSecondInDungeon"; + dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight; + dataGridViewCellStyle6.Format = "N2"; + dataGridViewCellStyle6.NullValue = null; + this._mesetaPerSecondInDungeonDataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle6; + this._mesetaPerSecondInDungeonDataGridViewTextBoxColumn.HeaderText = "Meseta Per Second In Dungeon"; + this._mesetaPerSecondInDungeonDataGridViewTextBoxColumn.Name = "_mesetaPerSecondInDungeonDataGridViewTextBoxColumn"; + this._mesetaPerSecondInDungeonDataGridViewTextBoxColumn.ReadOnly = true; + this._mesetaPerSecondInDungeonDataGridViewTextBoxColumn.Visible = false; + // + // _mesetaPerMinuteInDungeonDataGridViewTextBoxColumn + // + this._mesetaPerMinuteInDungeonDataGridViewTextBoxColumn.DataPropertyName = "MesetaPerMinuteInDungeon"; + dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight; + dataGridViewCellStyle7.Format = "N2"; + dataGridViewCellStyle7.NullValue = null; + this._mesetaPerMinuteInDungeonDataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle7; + this._mesetaPerMinuteInDungeonDataGridViewTextBoxColumn.HeaderText = "Meseta Per Minute In Dungeon"; + this._mesetaPerMinuteInDungeonDataGridViewTextBoxColumn.Name = "_mesetaPerMinuteInDungeonDataGridViewTextBoxColumn"; + this._mesetaPerMinuteInDungeonDataGridViewTextBoxColumn.ReadOnly = true; + this._mesetaPerMinuteInDungeonDataGridViewTextBoxColumn.Visible = false; + // + // _mesetaPerHourInDungeonDataGridViewTextBoxColumn + // + this._mesetaPerHourInDungeonDataGridViewTextBoxColumn.DataPropertyName = "MesetaPerHourInDungeon"; + dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight; + dataGridViewCellStyle8.Format = "N2"; + dataGridViewCellStyle8.NullValue = null; + this._mesetaPerHourInDungeonDataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle8; + this._mesetaPerHourInDungeonDataGridViewTextBoxColumn.HeaderText = "Meseta Per Hour In Dungeon"; + this._mesetaPerHourInDungeonDataGridViewTextBoxColumn.Name = "_mesetaPerHourInDungeonDataGridViewTextBoxColumn"; + this._mesetaPerHourInDungeonDataGridViewTextBoxColumn.ReadOnly = true; + this._mesetaPerHourInDungeonDataGridViewTextBoxColumn.Visible = false; + // + // _xpPerSecondDataGridViewTextBoxColumn + // + this._xpPerSecondDataGridViewTextBoxColumn.DataPropertyName = "ExperiencePerSecond"; + dataGridViewCellStyle10.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight; + dataGridViewCellStyle10.Format = "N2"; + dataGridViewCellStyle10.NullValue = null; + this._xpPerSecondDataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle10; + this._xpPerSecondDataGridViewTextBoxColumn.HeaderText = "XP Per Second"; + this._xpPerSecondDataGridViewTextBoxColumn.Name = "_xpPerSecondDataGridViewTextBoxColumn"; + this._xpPerSecondDataGridViewTextBoxColumn.ReadOnly = true; + this._xpPerSecondDataGridViewTextBoxColumn.Visible = false; + // + // _xpPerMinuteDataGridViewTextBoxColumn + // + this._xpPerMinuteDataGridViewTextBoxColumn.DataPropertyName = "ExperiencePerMinute"; + dataGridViewCellStyle11.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight; + dataGridViewCellStyle11.Format = "N2"; + this._xpPerMinuteDataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle11; + this._xpPerMinuteDataGridViewTextBoxColumn.HeaderText = "XP Per Minute"; + this._xpPerMinuteDataGridViewTextBoxColumn.Name = "_xpPerMinuteDataGridViewTextBoxColumn"; + this._xpPerMinuteDataGridViewTextBoxColumn.ReadOnly = true; + this._xpPerMinuteDataGridViewTextBoxColumn.Visible = false; + // + // _xpPerHourDataGridViewTextBoxColumn + // + this._xpPerHourDataGridViewTextBoxColumn.DataPropertyName = "ExperiencePerHour"; + dataGridViewCellStyle12.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight; + dataGridViewCellStyle12.Format = "N2"; + dataGridViewCellStyle12.NullValue = null; + this._xpPerHourDataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle12; + this._xpPerHourDataGridViewTextBoxColumn.HeaderText = "XP Per Hour"; + this._xpPerHourDataGridViewTextBoxColumn.Name = "_xpPerHourDataGridViewTextBoxColumn"; + this._xpPerHourDataGridViewTextBoxColumn.ReadOnly = true; + this._xpPerHourDataGridViewTextBoxColumn.Visible = false; + // + // _xpPerSecondInDungeonDataGridViewTextBoxColumn + // + this._xpPerSecondInDungeonDataGridViewTextBoxColumn.DataPropertyName = "ExperiencePerSecondInDungeon"; + dataGridViewCellStyle13.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight; + dataGridViewCellStyle13.Format = "N2"; + this._xpPerSecondInDungeonDataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle13; + this._xpPerSecondInDungeonDataGridViewTextBoxColumn.HeaderText = "XP Per Second In Dungeon"; + this._xpPerSecondInDungeonDataGridViewTextBoxColumn.Name = "_xpPerSecondInDungeonDataGridViewTextBoxColumn"; + this._xpPerSecondInDungeonDataGridViewTextBoxColumn.ReadOnly = true; + this._xpPerSecondInDungeonDataGridViewTextBoxColumn.Visible = false; + // + // _xpPerMinuteInDungeonDataGridViewTextBoxColumn + // + this._xpPerMinuteInDungeonDataGridViewTextBoxColumn.DataPropertyName = "ExperiencePerMinuteInDungeon"; + dataGridViewCellStyle14.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight; + dataGridViewCellStyle14.Format = "N2"; + this._xpPerMinuteInDungeonDataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle14; + this._xpPerMinuteInDungeonDataGridViewTextBoxColumn.HeaderText = "XP Per Minute In Dungeon"; + this._xpPerMinuteInDungeonDataGridViewTextBoxColumn.Name = "_xpPerMinuteInDungeonDataGridViewTextBoxColumn"; + this._xpPerMinuteInDungeonDataGridViewTextBoxColumn.ReadOnly = true; + this._xpPerMinuteInDungeonDataGridViewTextBoxColumn.Visible = false; + // + // _xpPerHourInDungeonDataGridViewTextBoxColumn + // + this._xpPerHourInDungeonDataGridViewTextBoxColumn.DataPropertyName = "ExperiencePerHourInDungeon"; + dataGridViewCellStyle15.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight; + dataGridViewCellStyle15.Format = "N2"; + this._xpPerHourInDungeonDataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle15; + this._xpPerHourInDungeonDataGridViewTextBoxColumn.HeaderText = "XP Per Hour In Dungeon"; + this._xpPerHourInDungeonDataGridViewTextBoxColumn.Name = "_xpPerHourInDungeonDataGridViewTextBoxColumn"; + this._xpPerHourInDungeonDataGridViewTextBoxColumn.ReadOnly = true; + this._xpPerHourInDungeonDataGridViewTextBoxColumn.Visible = false; + // + // _sessionTimeDataGridViewTextBoxColumn + // + this._sessionTimeDataGridViewTextBoxColumn.DataPropertyName = "SessionTime"; + this._sessionTimeDataGridViewTextBoxColumn.HeaderText = "Start"; + this._sessionTimeDataGridViewTextBoxColumn.Name = "_sessionTimeDataGridViewTextBoxColumn"; + this._sessionTimeDataGridViewTextBoxColumn.ReadOnly = true; + // + // _sessionFileNameDataGridViewTextBoxColumn + // + this._sessionFileNameDataGridViewTextBoxColumn.DataPropertyName = "SessionFileName"; + this._sessionFileNameDataGridViewTextBoxColumn.HeaderText = "Session File Name"; + this._sessionFileNameDataGridViewTextBoxColumn.Name = "_sessionFileNameDataGridViewTextBoxColumn"; + this._sessionFileNameDataGridViewTextBoxColumn.ReadOnly = true; + this._sessionFileNameDataGridViewTextBoxColumn.Visible = false; + // + // _difficultyDataGridViewTextBoxColumn + // + this._difficultyDataGridViewTextBoxColumn.DataPropertyName = "Difficulty"; + this._difficultyDataGridViewTextBoxColumn.HeaderText = "Difficulty"; + this._difficultyDataGridViewTextBoxColumn.Name = "_difficultyDataGridViewTextBoxColumn"; + this._difficultyDataGridViewTextBoxColumn.ReadOnly = true; + // + // _episodeDataGridViewTextBoxColumn + // + this._episodeDataGridViewTextBoxColumn.DataPropertyName = "Episode"; + this._episodeDataGridViewTextBoxColumn.HeaderText = "Episode"; + this._episodeDataGridViewTextBoxColumn.Name = "_episodeDataGridViewTextBoxColumn"; + this._episodeDataGridViewTextBoxColumn.ReadOnly = true; + // + // _sectionIDDataGridViewTextBoxColumn + // + this._sectionIDDataGridViewTextBoxColumn.DataPropertyName = "SectionID"; + dataGridViewCellStyle1.Padding = new System.Windows.Forms.Padding(18, 0, 0, 0); + this._sectionIDDataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle1; + this._sectionIDDataGridViewTextBoxColumn.HeaderText = "Section ID"; + this._sectionIDDataGridViewTextBoxColumn.Name = "_sectionIDDataGridViewTextBoxColumn"; + this._sectionIDDataGridViewTextBoxColumn.ReadOnly = true; + // + // _questDataGridViewTextBoxColumn + // + this._questDataGridViewTextBoxColumn.DataPropertyName = "Quest"; + this._questDataGridViewTextBoxColumn.HeaderText = "Quest"; + this._questDataGridViewTextBoxColumn.Name = "_questDataGridViewTextBoxColumn"; + this._questDataGridViewTextBoxColumn.ReadOnly = true; + // + // _mesetaDataGridViewTextBoxColumn + // + this._mesetaDataGridViewTextBoxColumn.DataPropertyName = "Meseta"; + dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight; + this._mesetaDataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle2; + this._mesetaDataGridViewTextBoxColumn.HeaderText = "Meseta"; + this._mesetaDataGridViewTextBoxColumn.Name = "_mesetaDataGridViewTextBoxColumn"; + this._mesetaDataGridViewTextBoxColumn.ReadOnly = true; + // + // _xpDataGridViewTextBoxColumn + // + this._xpDataGridViewTextBoxColumn.DataPropertyName = "Experience"; + dataGridViewCellStyle9.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight; + this._xpDataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle9; + this._xpDataGridViewTextBoxColumn.HeaderText = "XP"; + this._xpDataGridViewTextBoxColumn.Name = "_xpDataGridViewTextBoxColumn"; + this._xpDataGridViewTextBoxColumn.ReadOnly = true; + // + // _timeSpentDataGridViewTextBoxColumn + // + this._timeSpentDataGridViewTextBoxColumn.DataPropertyName = "TimeSpent"; + this._timeSpentDataGridViewTextBoxColumn.HeaderText = "Time Spent"; + this._timeSpentDataGridViewTextBoxColumn.Name = "_timeSpentDataGridViewTextBoxColumn"; + this._timeSpentDataGridViewTextBoxColumn.ReadOnly = true; + // + // _timeSpentInDungeonDataGridViewTextBoxColumn + // + this._timeSpentInDungeonDataGridViewTextBoxColumn.DataPropertyName = "TimeSpentInDungeon"; + this._timeSpentInDungeonDataGridViewTextBoxColumn.HeaderText = "Dungeon Time"; + this._timeSpentInDungeonDataGridViewTextBoxColumn.Name = "_timeSpentInDungeonDataGridViewTextBoxColumn"; + this._timeSpentInDungeonDataGridViewTextBoxColumn.ReadOnly = true; + // + // _sessionBindingSource + // + this._sessionBindingSource.DataSource = typeof(psobb_session_reader.Session); + // + // viewToolStripMenuItem + // + this.viewToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.columnsToolStripMenuItem}); + this.viewToolStripMenuItem.Name = "viewToolStripMenuItem"; + this.viewToolStripMenuItem.Size = new System.Drawing.Size(44, 20); + this.viewToolStripMenuItem.Text = "View"; + // + // columnsToolStripMenuItem + // + this.columnsToolStripMenuItem.Name = "columnsToolStripMenuItem"; + this.columnsToolStripMenuItem.Size = new System.Drawing.Size(180, 22); + this.columnsToolStripMenuItem.Text = "Edit Columns..."; + // + // MainWindow + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(601, 390); + this.Controls.Add(this._contentPanel); + this.Controls.Add(this._mainMenuStrip); + this.MainMenuStrip = this._mainMenuStrip; + this.Name = "MainWindow"; + this.Text = "PSOBB Session Reader"; + this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.MainWindow_FormClosing); + this.Load += new System.EventHandler(this.MainWindow_Load); + ((System.ComponentModel.ISupportInitialize)(this._sessionDataGridView)).EndInit(); + this._contentPanel.ResumeLayout(false); + this._sessionSplitContainer.Panel1.ResumeLayout(false); + this._sessionSplitContainer.Panel2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this._sessionSplitContainer)).EndInit(); + this._sessionSplitContainer.ResumeLayout(false); + this._tabContextMenuStrip.ResumeLayout(false); + this._mainMenuStrip.ResumeLayout(false); + this._mainMenuStrip.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this._sessionBindingSource)).EndInit(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + private System.Windows.Forms.ImageList _sectionIDImageList; + private System.Windows.Forms.DataGridView _sessionDataGridView; + private System.Windows.Forms.Panel _contentPanel; + private System.Windows.Forms.BindingSource _sessionBindingSource; + private System.Windows.Forms.Label _sessionCountLabel; + private System.Windows.Forms.SplitContainer _sessionSplitContainer; + private System.Windows.Forms.MenuStrip _mainMenuStrip; + private System.Windows.Forms.ToolStripMenuItem sessionToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem _closeCurrentTabToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem _closeAllTabsToolStripMenuItem; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator1; + private System.Windows.Forms.ToolStripMenuItem _exitToolStripMenuItem; + private System.Windows.Forms.ContextMenuStrip _tabContextMenuStrip; + private System.Windows.Forms.ToolStripMenuItem _closeToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem _closeAllToolStripMenuItem; + private System.Windows.Forms.TabControl _sessionDetailTabControl; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator2; + private System.Windows.Forms.ToolStripMenuItem _reloadSessionDataToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem _changePSOPathToolStripMenuItem; + private System.Windows.Forms.ContextMenuStrip _gridHeaderContextMenuStrip; + private System.Windows.Forms.DataGridViewTextBoxColumn _sessionTimeDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn _sessionFileNameDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn _difficultyDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn _episodeDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn _sectionIDDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn _questDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn _mesetaDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn _mesetaPerSecondDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn _mesetaPerMinuteDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn _mesetaPerHourDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn _mesetaPerSecondInDungeonDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn _mesetaPerMinuteInDungeonDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn _mesetaPerHourInDungeonDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn _xpDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn _xpPerSecondDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn _xpPerMinuteDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn _xpPerHourDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn _xpPerSecondInDungeonDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn _xpPerMinuteInDungeonDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn _xpPerHourInDungeonDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn _timeSpentDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn _timeSpentInDungeonDataGridViewTextBoxColumn; + private System.Windows.Forms.ToolStripMenuItem viewToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem columnsToolStripMenuItem; + } +} + diff --git a/psobb-session-reader/MainWindow.cs b/psobb-session-reader/MainWindow.cs new file mode 100755 index 0000000..9ff0253 --- /dev/null +++ b/psobb-session-reader/MainWindow.cs @@ -0,0 +1,349 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.IO; +using System.Linq; +using System.Text; +using System.Windows.Forms; +using psobb_session_reader.Definitions; + +namespace psobb_session_reader +{ + public partial class MainWindow : Form + { + private Configuration _configuration; + private List _sessions; + private List _filteredSessions; + + public MainWindow() + { + InitializeComponent(); + } + + private void MainWindow_Load(object sender, EventArgs e) + { + BeginInvoke(new Action(() => + { + try { _configuration = Configuration.Load(); } + catch { _configuration = new Configuration(); } + + InitializePSOPath(); + CheckForSessionsDirectory(); + LoadSessions(); + + InitializeGridHeaderContextMenu(); + })); + } + + private void ReloadSessionDataToolStripMenuItem_Click(object sender, EventArgs e) + { + LoadSessions(); + } + + private void LoadSessions() + { + string psoPath = _configuration.PSOPath ?? string.Empty; + string sessionsDirectory = Path.Combine(psoPath, "sessions"); + + if (!Directory.Exists(sessionsDirectory)) + return; + + _sessions = Directory.EnumerateFiles(sessionsDirectory, "*-session-counters.txt") + .Select(filePath => new Session(filePath)) + .OrderByDescending(session => session.SessionTime) + .ToList(); + + _filteredSessions = new List(_sessions); + + _sessionBindingSource.DataSource = _filteredSessions; + _sessionDataGridView.AutoResizeColumns(); + _sessionCountLabel.Text = $"Count: {_filteredSessions.Count}"; + } + + private void MainWindow_FormClosing(object sender, FormClosingEventArgs e) + { + _configuration.MainWindowX = Location.X; + _configuration.MainWindowY = Location.Y; + _configuration.MainWindowWidth = Width; + _configuration.MainWindowHeight = Height; + + try { _configuration.Save(); } + catch { MessageBox.Show($"Unable to create settings file \"{Configuration.DefaultPath}\"", "Unable to create settings file!", MessageBoxButtons.OK, MessageBoxIcon.Error); }; + } + + private void SessionDataGridView_CellPainting(object sender, DataGridViewCellPaintingEventArgs e) + { + if (e.RowIndex < 0) + return; + + if (e.ColumnIndex != _sectionIDDataGridViewTextBoxColumn.Index) + return; + + bool selected = e.State.HasFlag(DataGridViewElementStates.Selected); + e.PaintBackground(e.ClipBounds, selected); + + SectionID sectionID = (SectionID)e.Value; + Image image = _sectionIDImageList.Images[sectionID.Name]; + Point location = e.CellBounds.Location; + location.Offset(2, 2); + e.Graphics.DrawImageUnscaled(image, location); + + e.PaintContent(e.ClipBounds); + + e.Handled = true; + } + + private void TabContextMenuStrip_Opening(object sender, CancelEventArgs e) + { + Point p = _sessionDetailTabControl.PointToClient(Cursor.Position); + int index = GetTabIndex(p); + + if (index >= 0) + _sessionDetailTabControl.SelectTab(index); + else + e.Cancel = true; + } + + private void ExitToolStripMenuItem_Click(object sender, EventArgs e) + { + Close(); + } + + #region [ Load PSO Path ] + + private void InitializePSOPath() + { + if (string.IsNullOrEmpty(_configuration.PSOPath)) + _configuration.PSOPath = FindPSOPath(); + + if (string.IsNullOrEmpty(_configuration.PSOPath)) + { + string promptText = new StringBuilder() + .AppendLine("Unable to locate PSO directory with Kill Counter addon installed.") + .AppendLine("Enter the path to the initialization script (init.lua) for the Kill Counter addon:") + .ToString(); + + _configuration.PSOPath = PromptForPSOPath(promptText); + } + } + + private void CheckForSessionsDirectory() + { + string psoPath = _configuration.PSOPath ?? string.Empty; + string sessionsDirectory = Path.Combine(psoPath, "sessions"); + + if (!Directory.Exists(sessionsDirectory)) + { + string messageText = new StringBuilder() + .AppendLine("Unable to locate the sessions directory.") + .AppendLine("Session data is saved only if the sessions directory exists.") + .AppendLine("Would you like the session reader to attempt to create it?") + .ToString(); + + DialogResult messageBoxResult = MessageBox.Show(messageText, "Create sessions directory?", MessageBoxButtons.YesNo); + + if (messageBoxResult != DialogResult.Yes) + return; + + try + { + Directory.CreateDirectory(sessionsDirectory); + } + catch (Exception ex) + { + MessageBox.Show(ex.ToString(), "Error creating sessions directory", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + } + + private string FindPSOPath() + { + string[] searchDirectories = + { + Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), + Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86) + }; + + List killCounterDirectories = new[] { Path.GetDirectoryName(Application.ExecutablePath) } + .Concat(searchDirectories.SelectMany(EnumerateDirectories)) + .Where(directory => Directory.Exists(Path.Combine(directory, "addons", "Kill Counter"))) + .ToList(); + + if (killCounterDirectories.Count != 1) + return null; + + return killCounterDirectories[0]; + } + + private string PromptForPSOPath(string promptText = null) + { + using (PathPrompt prompt = new PathPrompt()) + { + if (promptText != null) + prompt.PromptText = promptText; + + prompt.InitializationScriptPath = _configuration.PSOPath; + DialogResult result = prompt.ShowDialog(); + + if (result == DialogResult.OK) + { + string killCounterDirectory = Path.GetDirectoryName(prompt.InitializationScriptPath); + string addonsDirectory = Path.GetDirectoryName(killCounterDirectory); + return Path.GetDirectoryName(addonsDirectory); + } + + return null; + } + } + + private static IEnumerable EnumerateDirectories(string path) + { + try { return Directory.EnumerateDirectories(path, "*"); } + catch { return Enumerable.Empty(); } + } + + private static IEnumerable EnumerateFiles(string path, string searchPattern) + { + try { return Directory.EnumerateFiles(path, searchPattern); } + catch { return Enumerable.Empty(); } + } + + private void ChangePSOPathToolStripMenuItem_Click(object sender, EventArgs e) + { + PromptForPSOPath(); + CheckForSessionsDirectory(); + LoadSessions(); + } + + #endregion + + #region [ Show / Hide Data Columns ] + + private void InitializeGridHeaderContextMenu() + { + foreach (DataGridViewColumn column in _sessionDataGridView.Columns) + { + column.HeaderCell.ContextMenuStrip = _gridHeaderContextMenuStrip; + + string text = column.HeaderText; + ToolStripMenuItem item = new ToolStripMenuItem(text); + item.CheckOnClick = true; + item.Checked = column.Visible; + item.CheckedChanged += (sender, args) => column.Visible = item.Checked; + _gridHeaderContextMenuStrip.Items.Add(item); + } + } + + #endregion + + #region [ Opening / Closing Tabs ] + + private void SessionDataGridView_CellMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e) + { + if (e.Button != MouseButtons.Left) + return; + + if (e.RowIndex < 0) + return; + + DataGridViewRow row = _sessionDataGridView.Rows[e.RowIndex]; + Session session = (Session)row.DataBoundItem; + + TabPage detailTab = _sessionDetailTabControl.TabPages + .Cast() + .FirstOrDefault(tab => Equals(session, tab.Tag)); + + if (detailTab == null) + { + detailTab = new TabPage(session.SessionTime.ToString("g")); + detailTab.Tag = session; + + RichTextBox detailTextBox = new RichTextBox(); + detailTextBox.Dock = DockStyle.Fill; + detailTextBox.Text = session.ToDetail(); + detailTextBox.ReadOnly = true; + + detailTab.Controls.Add(detailTextBox); + _sessionDetailTabControl.TabPages.Add(detailTab); + + UpdateTabs(); + } + + _sessionDetailTabControl.SelectTab(detailTab); + } + + private void CloseCurrentTab_Click(object sender, EventArgs e) + { + TabPage selectedTab = _sessionDetailTabControl.SelectedTab; + _sessionDetailTabControl.TabPages.Remove(selectedTab); + UpdateTabs(); + } + + private void CloseAllTabs_Click(object sender, EventArgs e) + { + _sessionDetailTabControl.TabPages.Clear(); + UpdateTabs(); + } + + private void UpdateTabs() + { + bool hasTab = (_sessionDetailTabControl.TabPages.Count > 0); + _closeCurrentTabToolStripMenuItem.Enabled = hasTab; + _closeAllTabsToolStripMenuItem.Enabled = hasTab; + _sessionSplitContainer.Panel1Collapsed = !hasTab; + } + + #endregion + + #region [ Tab Reordering ] + + private int _dragTabIndex = -1; + + private void SessionDetailTabControl_MouseDown(object sender, MouseEventArgs e) + { + if (e.Button != MouseButtons.Left) + return; + + _dragTabIndex = _sessionDetailTabControl.SelectedIndex; + } + + private void SessionDetailTabControl_MouseMove(object sender, MouseEventArgs e) + { + if (e.Button != MouseButtons.Left) + _dragTabIndex = -1; + + if (_dragTabIndex == -1) + return; + + Point mouseLocation = e.Location; + int hoverTabIndex = GetTabIndex(mouseLocation); + + if (hoverTabIndex == -1 || hoverTabIndex == _dragTabIndex) + return; + + TabPage dragTab = _sessionDetailTabControl.TabPages[_dragTabIndex]; + TabPage hoverTab = _sessionDetailTabControl.TabPages[hoverTabIndex]; + _sessionDetailTabControl.TabPages[_dragTabIndex] = hoverTab; + _sessionDetailTabControl.TabPages[hoverTabIndex] = dragTab; + _sessionDetailTabControl.SelectTab(dragTab); + _dragTabIndex = hoverTabIndex; + } + + private int GetTabIndex(Point location) + { + for (int i = 0; i < _sessionDetailTabControl.TabCount; i++) + { + Rectangle r = _sessionDetailTabControl.GetTabRect(i); + + if (r.Contains(location)) + return i; + } + + return -1; + } + + #endregion + } +} diff --git a/psobb-session-reader/MainWindow.resx b/psobb-session-reader/MainWindow.resx new file mode 100755 index 0000000..fba8b2f --- /dev/null +++ b/psobb-session-reader/MainWindow.resx @@ -0,0 +1,380 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + + + AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w + LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 + ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAAo + LwAAAk1TRnQBSQFMAgEBCwEAATABAgEwAQIBEAEAARABAAT/ASEBAAj/AUIBTQE2BwABNgMAASgDAAFA + AwABMAMAAQEBAAEgBgABMCcAAucB/wEAAucB/wEAAucB/wEAAucB/wEAAucB/wEAAucB/wEAAucB/yQA + A+cB/wPnAf8D5wH/A+cB/wPnAf8D5wH/A+cB/50AAucB/wEAAucB/wEA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+AEP + AfgBDwHgAQMB4AEDAeABAwHgAQMBwAEBAcABAQHAAQEBwAEBAcABAQHAAQEBwAEBAcABAQGAAQABgAEA + AYABAAGAAQABgAEAAYABAAGAAQABgBkAAYABAAGAAQABgAEAAYABAAGAAQABgAEAAYABAAGAAQABgAEB + AYABAQGAAQEBgAEBAcABAQHAAQEBwAEBAcABAQHgAQMB4AEDAeABAwHgAQMB8AEPAfABDwHwAQ8B8AEP + Af4BPwH+AT8B/gE/Af4BPws= + + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + 173, 17 + + + 488, 17 + + + 348, 17 + + + 662, 17 + + \ No newline at end of file diff --git a/psobb-session-reader/PathPrompt.Designer.cs b/psobb-session-reader/PathPrompt.Designer.cs new file mode 100755 index 0000000..176cbb7 --- /dev/null +++ b/psobb-session-reader/PathPrompt.Designer.cs @@ -0,0 +1,169 @@ +namespace psobb_session_reader +{ + partial class PathPrompt + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this._pathTextBox = new System.Windows.Forms.TextBox(); + this._pathLabel = new System.Windows.Forms.Label(); + this._mainPanel = new System.Windows.Forms.Panel(); + this._buttonPanel = new System.Windows.Forms.Panel(); + this._okButton = new System.Windows.Forms.Button(); + this._cancelButton = new System.Windows.Forms.Button(); + this._pathPanel = new System.Windows.Forms.Panel(); + this._browseButton = new System.Windows.Forms.Button(); + this._initializationScriptPathDialog = new System.Windows.Forms.OpenFileDialog(); + this._mainPanel.SuspendLayout(); + this._buttonPanel.SuspendLayout(); + this._pathPanel.SuspendLayout(); + this.SuspendLayout(); + // + // _pathTextBox + // + this._pathTextBox.Dock = System.Windows.Forms.DockStyle.Fill; + this._pathTextBox.Location = new System.Drawing.Point(0, 0); + this._pathTextBox.Name = "_pathTextBox"; + this._pathTextBox.Size = new System.Drawing.Size(458, 20); + this._pathTextBox.TabIndex = 0; + // + // _pathLabel + // + this._pathLabel.AutoSize = true; + this._pathLabel.Dock = System.Windows.Forms.DockStyle.Top; + this._pathLabel.Location = new System.Drawing.Point(10, 10); + this._pathLabel.Name = "_pathLabel"; + this._pathLabel.Size = new System.Drawing.Size(352, 13); + this._pathLabel.TabIndex = 1; + this._pathLabel.Text = "Enter the path to the initialization script (init.lua) for the Kill Counter addon" + + ":"; + // + // _mainPanel + // + this._mainPanel.Controls.Add(this._buttonPanel); + this._mainPanel.Controls.Add(this._pathPanel); + this._mainPanel.Controls.Add(this._pathLabel); + this._mainPanel.Dock = System.Windows.Forms.DockStyle.Fill; + this._mainPanel.Location = new System.Drawing.Point(0, 0); + this._mainPanel.Name = "_mainPanel"; + this._mainPanel.Padding = new System.Windows.Forms.Padding(10); + this._mainPanel.Size = new System.Drawing.Size(553, 89); + this._mainPanel.TabIndex = 2; + // + // _buttonPanel + // + this._buttonPanel.AutoSize = true; + this._buttonPanel.Controls.Add(this._okButton); + this._buttonPanel.Controls.Add(this._cancelButton); + this._buttonPanel.Dock = System.Windows.Forms.DockStyle.Top; + this._buttonPanel.Location = new System.Drawing.Point(10, 45); + this._buttonPanel.Name = "_buttonPanel"; + this._buttonPanel.Size = new System.Drawing.Size(533, 36); + this._buttonPanel.TabIndex = 6; + // + // _okButton + // + this._okButton.Anchor = System.Windows.Forms.AnchorStyles.Top; + this._okButton.DialogResult = System.Windows.Forms.DialogResult.OK; + this._okButton.Location = new System.Drawing.Point(178, 10); + this._okButton.Name = "_okButton"; + this._okButton.Size = new System.Drawing.Size(75, 23); + this._okButton.TabIndex = 3; + this._okButton.Text = "OK"; + this._okButton.UseVisualStyleBackColor = true; + // + // _cancelButton + // + this._cancelButton.Anchor = System.Windows.Forms.AnchorStyles.Top; + this._cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this._cancelButton.Location = new System.Drawing.Point(259, 10); + this._cancelButton.Name = "_cancelButton"; + this._cancelButton.Size = new System.Drawing.Size(75, 23); + this._cancelButton.TabIndex = 5; + this._cancelButton.Text = "Cancel"; + this._cancelButton.UseVisualStyleBackColor = true; + // + // _pathPanel + // + this._pathPanel.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this._pathPanel.Controls.Add(this._pathTextBox); + this._pathPanel.Controls.Add(this._browseButton); + this._pathPanel.Dock = System.Windows.Forms.DockStyle.Top; + this._pathPanel.Location = new System.Drawing.Point(10, 23); + this._pathPanel.Name = "_pathPanel"; + this._pathPanel.Size = new System.Drawing.Size(533, 22); + this._pathPanel.TabIndex = 4; + // + // _browseButton + // + this._browseButton.Dock = System.Windows.Forms.DockStyle.Right; + this._browseButton.Location = new System.Drawing.Point(458, 0); + this._browseButton.Name = "_browseButton"; + this._browseButton.Size = new System.Drawing.Size(75, 22); + this._browseButton.TabIndex = 2; + this._browseButton.Text = "Browse..."; + this._browseButton.UseVisualStyleBackColor = true; + this._browseButton.Click += new System.EventHandler(this.BrowseButton_Click); + // + // _initializationScriptPathDialog + // + this._initializationScriptPathDialog.Filter = "Initialization Script|init.lua"; + // + // PathPrompt + // + this.AcceptButton = this._okButton; + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.AutoSize = true; + this.CancelButton = this._cancelButton; + this.ClientSize = new System.Drawing.Size(553, 89); + this.Controls.Add(this._mainPanel); + this.Name = "PathPrompt"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; + this.Text = "Where is PSO?"; + this.Load += new System.EventHandler(this.PathPrompt_Load); + this._mainPanel.ResumeLayout(false); + this._mainPanel.PerformLayout(); + this._buttonPanel.ResumeLayout(false); + this._pathPanel.ResumeLayout(false); + this._pathPanel.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.TextBox _pathTextBox; + private System.Windows.Forms.Label _pathLabel; + private System.Windows.Forms.Panel _mainPanel; + private System.Windows.Forms.Button _browseButton; + private System.Windows.Forms.Button _okButton; + private System.Windows.Forms.Panel _pathPanel; + private System.Windows.Forms.Button _cancelButton; + private System.Windows.Forms.OpenFileDialog _initializationScriptPathDialog; + private System.Windows.Forms.Panel _buttonPanel; + } +} \ No newline at end of file diff --git a/psobb-session-reader/PathPrompt.cs b/psobb-session-reader/PathPrompt.cs new file mode 100755 index 0000000..bf5ab25 --- /dev/null +++ b/psobb-session-reader/PathPrompt.cs @@ -0,0 +1,51 @@ +using System; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Windows.Forms; + +namespace psobb_session_reader +{ + public partial class PathPrompt : Form + { + public PathPrompt() + { + InitializeComponent(); + } + + public string PromptText + { + get => _pathLabel.Text; + set => _pathLabel.Text = value; + } + + public string InitializationScriptPath + { + get => _pathTextBox.Text; + set => _pathTextBox.Text = value; + } + + private void BrowseButton_Click(object sender, EventArgs e) + { + _initializationScriptPathDialog.FileName = InitializationScriptPath; + DialogResult result = _initializationScriptPathDialog.ShowDialog(); + + if (result == DialogResult.OK) + InitializationScriptPath = _initializationScriptPathDialog.FileName; + } + + private void PathPrompt_Load(object sender, EventArgs e) + { + int height = _mainPanel.Controls + .Cast() + .Sum(control => control.Height); + + Size clientSize = ClientSize; + clientSize.Height = height + _mainPanel.Padding.Vertical; + ClientSize = clientSize; + + MaximumSize = new Size(int.MaxValue, Height); + MinimumSize = new Size(0, Height); + } + } +} diff --git a/psobb-session-reader/PathPrompt.resx b/psobb-session-reader/PathPrompt.resx new file mode 100755 index 0000000..74a14fb --- /dev/null +++ b/psobb-session-reader/PathPrompt.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + \ No newline at end of file diff --git a/psobb-session-reader/Program.cs b/psobb-session-reader/Program.cs new file mode 100755 index 0000000..6c71544 --- /dev/null +++ b/psobb-session-reader/Program.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace psobb_session_reader +{ + static class Program + { + /// + /// The main entry point for the application. + /// + [STAThread] + static void Main() + { + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new MainWindow()); + } + } +} diff --git a/psobb-session-reader/Properties/AssemblyInfo.cs b/psobb-session-reader/Properties/AssemblyInfo.cs new file mode 100755 index 0000000..1fed8f8 --- /dev/null +++ b/psobb-session-reader/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("psobb-session-reader")] +[assembly: AssemblyDescription("Reads session data from the kill counter addon")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("psobb-session-reader")] +[assembly: AssemblyCopyright("Copyright © 2018")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("3ef74075-3aa8-4755-b7f9-c3ccd5a3a81b")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/psobb-session-reader/Properties/DataSources/Session.datasource b/psobb-session-reader/Properties/DataSources/Session.datasource new file mode 100755 index 0000000..653425a --- /dev/null +++ b/psobb-session-reader/Properties/DataSources/Session.datasource @@ -0,0 +1,10 @@ + + + + psobb_session_reader.Session, psobb-session-reader, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + \ No newline at end of file diff --git a/psobb-session-reader/Properties/Resources.Designer.cs b/psobb-session-reader/Properties/Resources.Designer.cs new file mode 100755 index 0000000..f5bef00 --- /dev/null +++ b/psobb-session-reader/Properties/Resources.Designer.cs @@ -0,0 +1,63 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace psobb_session_reader.Properties { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("psobb_session_reader.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + } +} diff --git a/psobb-session-reader/Properties/Resources.resx b/psobb-session-reader/Properties/Resources.resx new file mode 100755 index 0000000..ffecec8 --- /dev/null +++ b/psobb-session-reader/Properties/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/psobb-session-reader/Properties/Settings.Designer.cs b/psobb-session-reader/Properties/Settings.Designer.cs new file mode 100755 index 0000000..d9cb4c9 --- /dev/null +++ b/psobb-session-reader/Properties/Settings.Designer.cs @@ -0,0 +1,26 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace psobb_session_reader.Properties { + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.6.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default { + get { + return defaultInstance; + } + } + } +} diff --git a/psobb-session-reader/Properties/Settings.settings b/psobb-session-reader/Properties/Settings.settings new file mode 100755 index 0000000..abf36c5 --- /dev/null +++ b/psobb-session-reader/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + diff --git a/psobb-session-reader/Session.cs b/psobb-session-reader/Session.cs new file mode 100755 index 0000000..c431e1e --- /dev/null +++ b/psobb-session-reader/Session.cs @@ -0,0 +1,156 @@ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.IO; +using System.Linq; +using System.Text; +using psobb_session_reader.Definitions; + +namespace psobb_session_reader +{ + public class Session + { + private IList _killCounters; + + public Session(string sessionPath) + { + if (!File.Exists(sessionPath)) + throw new ArgumentException($"Session file not found: {sessionPath}", nameof(sessionPath)); + + IDictionary sessionData = ReadSession(sessionPath); + int difficulty = ReadInt(sessionData, nameof(Difficulty)); + int episode = ReadInt(sessionData, nameof(Episode)); + int sectionID = ReadInt(sessionData, nameof(SectionID)); + int quest = ReadInt(sessionData, nameof(Quest)); + int meseta = ReadInt(sessionData, nameof(Meseta)); + int experience = ReadInt(sessionData, nameof(Experience)); + int timeSpent = ReadInt(sessionData, nameof(TimeSpent)); + int timeSpentInDungeon = ReadInt(sessionData, nameof(TimeSpentInDungeon)); + + SessionFilePath = sessionPath; + Difficulty = Difficulty.GetDifficulty(difficulty); + Episode = Episode.GetEpisode(episode); + SectionID = SectionID.GetSectionID(sectionID); + Quest = Quest.GetQuest(quest); + Meseta = meseta; + Experience = experience; + TimeSpent = TimeSpan.FromSeconds(timeSpent); + TimeSpentInDungeon = TimeSpan.FromSeconds(timeSpentInDungeon); + + string sessionDirectory = Path.GetDirectoryName(sessionPath); + string fileName = Path.GetFileName(sessionPath); + string timestamp = fileName.Split('-')[0]; + + KillCountersPath = Path.Combine(sessionDirectory, $"{timestamp}-kill-counters.txt"); + + if (File.Exists(KillCountersPath)) + { + _killCounters = ReadKillCounters(KillCountersPath) + .OrderBy(killCount => killCount.Area.ID) + .ThenBy(killCount => killCount.Monster.ToString(Difficulty)) + .ToList(); + } + + if (DateTime.TryParseExact(timestamp, "yyyyMMddHHmmss", CultureInfo.InvariantCulture, DateTimeStyles.AssumeLocal, out DateTime sessionTime)) + SessionTime = sessionTime; + } + + public string SessionFileName => Path.GetFileName(SessionFilePath); + public string SessionFilePath { get; } + public DateTime SessionTime { get; } + public Difficulty Difficulty { get; } + public Episode Episode { get; } + public SectionID SectionID { get; } + public Quest Quest { get; } + public int Meseta { get; } + public int Experience { get; } + public TimeSpan TimeSpent { get; } + public TimeSpan TimeSpentInDungeon { get; } + + public double MesetaPerSecond => Meseta / TimeSpent.TotalSeconds; + public double MesetaPerMinute => Meseta / TimeSpent.TotalMinutes; + public double MesetaPerHour => Meseta / TimeSpent.TotalHours; + public double MesetaPerSecondInDungeon => Meseta / TimeSpentInDungeon.TotalSeconds; + public double MesetaPerMinuteInDungeon => Meseta / TimeSpentInDungeon.TotalMinutes; + public double MesetaPerHourInDungeon => Meseta / TimeSpentInDungeon.TotalHours; + + public double ExperiencePerSecond => Experience / TimeSpent.TotalSeconds; + public double ExperiencePerMinute => Experience / TimeSpent.TotalMinutes; + public double ExperiencePerHour => Experience / TimeSpent.TotalHours; + public double ExperiencePerSecondInDungeon => Experience / TimeSpentInDungeon.TotalSeconds; + public double ExperiencePerMinuteInDungeon => Experience / TimeSpentInDungeon.TotalMinutes; + public double ExperiencePerHourInDungeon => Experience / TimeSpentInDungeon.TotalHours; + + public string KillCountersFileName => Path.GetFileName(KillCountersPath); + public string KillCountersPath { get; } + public IList KillCounters => new List(_killCounters); + + public override string ToString() => SessionTime.ToString(); + + public string ToDetail() + { + StringBuilder details = new StringBuilder(); + + details.AppendLine($"File name: {SessionFileName}"); + details.AppendLine(); + details.AppendLine($"Session time: {SessionTime:M/d/yyyy hh:mm:ss}"); + details.AppendLine($"Difficulty: {Difficulty}"); + details.AppendLine($"Episode: {Episode}"); + details.AppendLine($"Section ID: {SectionID}"); + details.AppendLine($"Quest: {Quest}"); + details.AppendLine($"Meseta earned: {Meseta}"); + details.AppendLine($"Experience earned: {Experience}"); + details.AppendLine($"Time spent: {TimeSpent}"); + details.AppendLine($"Dungeon time: {TimeSpentInDungeon}"); + details.AppendLine(); + details.AppendLine($"Kill counters: {KillCountersFileName}"); + + foreach (KillCount killCount in _killCounters) + details.AppendLine($"({killCount.Area}) {killCount.Monster.ToString(Difficulty)}: {killCount}"); + + return details.ToString(); + } + + private static IDictionary ReadSession(string sessionPath) + { + return File.ReadAllLines(sessionPath) + .Where(line => line.Contains('=')) + .Select(line => line.Split('=')) + .ToDictionary(line => line[0], line => line[1], StringComparer.OrdinalIgnoreCase); + } + + private static IEnumerable ReadKillCounters(string killCountersPath) + { + return File.ReadAllLines(killCountersPath) + .Where(line => line.Count(c => c == ',') >= 5) + .Select(line => line.Split(',')) + .Select(ToKillCount); + } + + private static int ReadInt(IDictionary sessionData, string key) + { + if (sessionData.TryGetValue(key, out string value)) + return ParseInt(value); + + return int.MinValue; + } + + private static KillCount ToKillCount(string[] line) + { + int areaID = ParseInt(line[3]); + int monsterID = ParseInt(line[4]); + int kills = ParseInt(line[5]); + Area area = Area.GetArea(areaID); + Monster monster = Monster.GetMonster(monsterID); + return new KillCount(area, monster, kills); + } + + private static int ParseInt(string value) + { + if (int.TryParse(value, out int num)) + return num; + + return int.MinValue; + } + } +} diff --git a/psobb-session-reader/psobb-session-reader.csproj b/psobb-session-reader/psobb-session-reader.csproj new file mode 100755 index 0000000..12cbdbb --- /dev/null +++ b/psobb-session-reader/psobb-session-reader.csproj @@ -0,0 +1,100 @@ + + + + + Debug + AnyCPU + {3EF74075-3AA8-4755-B7F9-C3CCD5A3A81B} + WinExe + psobb_session_reader + psobb-session-reader + v4.0 + 512 + true + + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + + + + Form + + + MainWindow.cs + + + + Form + + + PathPrompt.cs + + + + + + MainWindow.cs + + + PathPrompt.cs + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + True + Resources.resx + True + + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + + \ No newline at end of file