Exemplo n.º 1
0
 void ExportToCsv()
 {
     if (saveFileDialog.ShowDialog() == DialogResult.OK)
     {
         var builder = new EnumerableToCsvBuilder <CombatActorViewModel>(viewModelsMap.Values.ToArray())
                       .AddMapping("Pair", model => model.CombatPair)
                       .AddMapping("Attacker", model => model.AttackerName)
                       .AddMapping("Defender", model => model.DefenderName)
                       .AddMapping("Target choices", model => model.TargetPrefs)
                       .AddMapping("Damage caused", model => model.DamageCaused)
                       .AddMapping("Spell triggers", model => model.WeaponSpellAttacks)
                       .AddMapping("Misses", model => model.Misses)
                       .AddMapping("Glancing blows", model => model.GlancingBlows)
                       .AddMapping("Parried", model => model.Parries)
                       .AddMapping("Evaded", model => model.Evasions)
                       .AddMapping("Shield blocked", model => model.ShieldBlocks)
                       .AddMapping("Total hits", model => model.TotalHits.ToString())
                       .AddMapping("Total attacks", model => model.TotalMainActorAttacks.ToString())
                       .AddMapping("Hit ratio", model => model.HitRatio)
                       .AddMapping("Miss ratio", model => model.MissRatio)
                       .AddMapping("Glance ratio", model => model.GlanceRatio)
                       .AddMapping("Blocked ratio", model => model.BlockRatio)
                       .AddMapping("Parried ratio", model => model.ParryRatio)
                       .AddMapping("Evaded ratio", model => model.EvadeRatio);
         var csv      = builder.BuildCsv();
         var filePath = saveFileDialog.FileName;
         File.WriteAllText(filePath, csv);
         processStarter.StartSafe(Path.GetDirectoryName(filePath));
     }
 }
Exemplo n.º 2
0
 private void sampleSoundPackLink_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
 {
     processStarter.StartSafe(Resources.SampleSoundPackUrl);
 }
Exemplo n.º 3
0
 private void showAppLog_Click(object sender, EventArgs e)
 {
     processStarter.StartSafe(loggingConfig.GetCurrentReadableLogFileFullPath());
 }
Exemplo n.º 4
0
 private void postOnForumBtn_Click(object sender, EventArgs e)
 {
     processStarter.StartSafe(
         "http://forum.wurmonline.com/index.php?/topic/68031-wurm-assistant-enrich-your-wurm-experience/?view=getnewpost");
 }
Exemplo n.º 5
0
 private void officialForumToolStripMenuItem_Click(object sender, System.EventArgs e)
 {
     processStarter.StartSafe(
         "http://forum.wurmonline.com/index.php?/topic/68031-wurm-assistant-enrich-your-wurm-experience/?view=getnewpost");
 }