コード例 #1
0
ファイル: GraphForm.cs プロジェクト: IanMadlenya/VisualSail
 public GraphForm(Replay replay, string statName, List <SelectedStatisticCell> selection, StatisticUnitType unitType)
 {
     if (selection.Count > 0)
     {
         InitializeComponent();
         _replay        = replay;
         _statisticName = statName;
         _statistics    = selection;
         _unitType      = unitType;
         if (selection[0].TackIndex.HasValue)
         {
             _type = StatisticGroupType.Tack;
         }
         else if (selection[0].LegIndex.HasValue)
         {
             _type = StatisticGroupType.Leg;
         }
         else
         {
             _type = StatisticGroupType.Boat;
         }
         WireEvents();
         ConfigureGraph();
         _painter = new Thread(new ThreadStart(this.Run));
         _painter.Start();
     }
     else
     {
         throw new Exception("You must specify at least one statistic");
     }
 }
コード例 #2
0
ファイル: GraphForm.cs プロジェクト: brookpatten/VisualSail
 public GraphForm(Replay replay, string statName, List<SelectedStatisticCell> selection, StatisticUnitType unitType)
 {
     if (selection.Count > 0)
     {
         InitializeComponent();
         _replay = replay;
         _statisticName = statName;
         _statistics = selection;
         _unitType = unitType;
         if (selection[0].TackIndex.HasValue)
         {
             _type = StatisticGroupType.Tack;
         }
         else if (selection[0].LegIndex.HasValue)
         {
             _type = StatisticGroupType.Leg;
         }
         else
         {
             _type = StatisticGroupType.Boat;
         }
         WireEvents();
         ConfigureGraph();
         _painter = new Thread(new ThreadStart(this.Run));
         _painter.Start();
     }
     else
     {
         throw new Exception("You must specify at least one statistic");
     }
 }