Exemplo n.º 1
0
 public void Start()
 {
     ProgressBar.Progress = 1F;
     for (int a = 0; a < 9; a++)
     {
         Console.WriteLine(DataCollection[a]);
     }
     fit     = new Algorithm(DataCollection, ImportanceCollection);
     results = fit.FindPutter();
     fit.setCharacteristic();
     //If results are greater than 3 provide question ten
     if (results.Length > 3)
     {
         ImportanceLevelLabel.Hidden = true;
         ImportanceTextBox.Hidden    = true;
         OneToFiveLabel2.Hidden      = true;
         HighLowLabel.Hidden         = true;
         BackButton.Hidden           = true;
         //**SelectedButton.Hidden = true;
         InfoButton.Hidden = true;
         TitleLabel.Text   = "Brand Preference";
         //OLDM.SetData(fit.putter.PutterBrands());
         SetImages(false);
         ptdata = fit.putter.PutterBrands();
         if (ptdata[0] != null && ptdata.Length > 0)
         {
             TopLeft_Button.SetBackgroundImage(UIImage.FromFile(ptdata[0] + ".png"), UIControlState.Normal);
         }
         if (ptdata[0] != null && ptdata.Length > 1)
         {
             TopRight_Button.SetBackgroundImage(UIImage.FromFile(ptdata[1] + ".png"), UIControlState.Normal);
         }
         if (ptdata[0] != null && ptdata.Length > 2)
         {
             BottomLeft_Button.SetBackgroundImage(UIImage.FromFile(ptdata[2] + ".png"), UIControlState.Normal);
         }
         if (ptdata[0] != null && ptdata.Length > 3)
         {
             BottomRight_Button.SetBackgroundImage(UIImage.FromFile(ptdata[3] + ".png"), UIControlState.Normal);
         }
     }
     else
     {
         ResultsSetup();
         ResultsTitleLabel.Text = "Results: ( " + results.Length + " )";
         OLDM.SetData(results);
         ResultsView.Model     = OLDM;
         PutterSpecsLabel.Text = "Length: " + fit.putter.PutterLength + Environment.NewLine + "Grip: " + fit.putter.PutterGrip;
     }
 }
Exemplo n.º 2
0
 public void LoadResults(int itemCount, string[] resultsArray)
 {
     ResultsSetup();
     ResultsTitleLabel.Text = "Results: ( " + itemCount + " )";
     OLDM.SetData(resultsArray);
     ResultsView.Model     = OLDM;
     PutterSpecsLabel.Text = "Length: " + fit.putter.PutterLength + Environment.NewLine + "Grip: " + fit.putter.PutterGrip;
     ShowMore_Clicked(new UIButton());
 }