Example #1
0
 private void AddEntries(TreeNode Log, SA_Log log)
 {
     TreeNode node1 = new TreeNode("Begivenheder");
       foreach (SA_LogEntry saLogEntry in (Collection<SA_LogEntry>) log.Entries)
       {
     TreeNode node2 = new TreeNode(saLogEntry.State);
     node1.Nodes.Add(node2);
       }
       Log.Nodes.Add(node1);
 }
Example #2
0
 private void AddSubLogs(TreeNode Log, SA_Log log)
 {
     if (log.SubLogs.Count <= 0)
     return;
       TreeNode node1 = new TreeNode("Jobs");
       foreach (SA_Log log1 in (Collection<SA_Log>) log.SubLogs)
       {
     TreeNode node2 = this.MakeLogNode(log1, (FileInfo) null);
     node1.Nodes.Add(node2);
       }
       Log.Nodes.Add(node1);
 }
Example #3
0
 private TreeNode MakeLogNode(SA_Log log, FileInfo fi)
 {
     TreeNode Log = new TreeNode();
       Log.Tag = (object) fi;
       TimeSpan timeSpan = log.End.Subtract(log.Start);
       string str = "";
       Log.Text = string.Concat(new object[4]
       {
     (object) log.Name,
     (object) " (",
     (object) log.Start,
     (object) ")"
       });
       Log.Name = log.Name;
       Log.Nodes.Add(new TreeNode("Start:" + (object) log.Start));
       Log.Nodes.Add(new TreeNode("S**t:" + (object) log.End));
       Log.Nodes.Add(new TreeNode("Varighed:" + (object) timeSpan.Seconds + "s"));
       if (log.Quantity > 0L)
       {
     Log.Nodes.Add(new TreeNode("Størrelse:" + SA_Convert.BytesToPrefixedValue(log.Quantity)));
     if (timeSpan.Seconds > 0)
       str = SA_Convert.BytesToPrefixedValue(Convert.ToInt64((Decimal) (log.Quantity / (long) timeSpan.Seconds)), PrefixType.Binary, OutputForm.Short, SuffixType.Bit, OutputForm.Short) + "/s (" + SA_Convert.BytesToPrefixedValue(Convert.ToInt64((Decimal) (log.Quantity * 3600L / (long) timeSpan.Seconds)), PrefixType.Binary, OutputForm.Short, SuffixType.Byte, OutputForm.Short) + "/time)";
     Log.Nodes.Add(new TreeNode("Effektiv hastighed:" + str));
       }
       this.AddEntries(Log, log);
       this.AddSubLogs(Log, log);
       return Log;
 }