Skip to content

Commit

Permalink
Update Program.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
Traderain committed Mar 28, 2016
1 parent 9cdc268 commit 6b86d7c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Program.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System;
using System.Diagnostics;
using System.IO;
using System.Linq;
using static System.Console;
using static System.Convert;

Expand All @@ -15,7 +16,6 @@ private static void Main(string[] args)
try
{
datapath = args[0];

}
catch (Exception e)
{
Expand All @@ -32,7 +32,7 @@ private static void Main(string[] args)
var a = DemoParser.ParseDemo(args[0]);
ForegroundColor = ConsoleColor.White;
#region print
WriteLine("Analyzed demo. Results.");
WriteLine(@"Analyzed demo. Results.");
WriteLine($@"
Demoname: : {Path.GetFileName(datapath)}
GameName : {a.GameName}
Expand Down Expand Up @@ -95,8 +95,9 @@ private static void Main(string[] args)
try
{
convert = ToInt32(ReadLine());
var time = (a.Flags.Count(x => x.Type.Contains("SAVE")) == 0) ? a.TotalTime.ToString("#,0.000") : a.Flags.First(x => x.Type.Contains("SAVE")).Time.ToString("#,0.000");
File.Move(datapath, convert + "-" + a.MapName.Substring(3,a.MapName.Length-3) + "-" +
$"{a.TotalTime:#,0.000}" + "-" + a.PlayerName + ".dem");
$"{time}" + "-" + a.PlayerName + ".dem");
}
catch(Exception e)
{
Expand Down

0 comments on commit 6b86d7c

Please sign in to comment.