BF2Statistics.SnapshotViewForm.SnapshotFile.SnapshotFile C# (CSharp) Method

SnapshotFile() public method

public SnapshotFile ( string fileName ) : System
fileName string
return System
            public SnapshotFile(string fileName)
            {
                // Seperate Server prefix from the snapshot data
                string[] data = Path.GetFileNameWithoutExtension(fileName).Split('-'); // Prefix-MapData

                // Parse Map data
                string[] parts = data[1].Split('_');
                string date = parts[parts.Length - 2] + "_" + parts[parts.Length - 1];

                // Create new snapshot file into
                FileName = fileName;
                ServerPrefix = data[0];
                MapName = String.Join("_", parts, 0, parts.Length - 2);
                ProcessedDate = DateTime.ParseExact(date, "yyyyMMdd_HHmm", CultureInfo.InvariantCulture);
            }
        }
SnapshotViewForm.SnapshotFile