Exemplo n.º 1
0
 private void refreshList()
 {
     settings = SettingsSystem.GetSettings();
     listBoxGames.Items.Clear();
     treeViewStats.Nodes.Clear();
     treeViewStats.Nodes.Add(new TreeNode("Statistics"));
     Game games;
     for (int i = 0; i < settings.fileList.Count; i++)
     {
         games = new Game(settings.fileMap[i], settings.fileList[i]);
         listBoxGames.Items.Add(games);
         treeViewStats.Nodes[0].Nodes.Add(games.GameName, games.GameName);
         treeViewStats.Nodes[0].Nodes[i].Nodes.Add("Total Time Played");
         treeViewStats.Nodes[0].Nodes[i].Nodes[0].Nodes.Add(games.WhatIsTotalTime.Days + " days");
         treeViewStats.Nodes[0].Nodes[i].Nodes[0].Nodes.Add(games.WhatIsTotalTime.Hours + " hours");
         treeViewStats.Nodes[0].Nodes[i].Nodes[0].Nodes.Add(games.WhatIsTotalTime.Minutes + " mins");
         treeViewStats.Nodes[0].Nodes[i].Nodes[0].Nodes.Add(games.WhatIsTotalTime.Seconds + " secs");
         treeViewStats.Nodes[0].Nodes[i].Nodes[0].Nodes.Add(games.WhatIsTotalTime.TotalHours + " total hours");
     }
 }
Exemplo n.º 2
0
 public CheckedOutGame(Game game, ProcessStartInfo info, string unlocked)
 {
     this._gameName = game.GameName;
     this._filename = game.FileName;
     timeLog = TimeLogFactory.loadLog(_filename);
     timeLog.getTotalTime();
     proc = Process.Start(info);
     unlock = unlocked;
     oldGame = game;
     if (proc.StartTime != null)
     {
         timeLog.startNewSession(proc.StartTime);
         usingDetailedTime = true;
     }
     else
     {
         timeLog.startNewSession(DateTime.Now);
         usingDetailedTime = false;
     }
     checkedout = true;
 }
Exemplo n.º 3
0
 public CheckedOutGame(Game game)
 {
     this._filename = game.FileName;
     this._gameName = game.GameName;
 }