Beispiel #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;
     }
 }
Beispiel #2
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;
         InfoButton.Hidden           = true;
         TitleLabel.Text             = "Brand Preference";
         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
     {
         LoadResults(results.Length, results);
     }
 }
Beispiel #3
0
 private void SetImages(bool b)
 {
     if (!b)
     {
         TopLeft_Button.SetBackgroundImage(UIImage.FromFile("Blank.png"), UIControlState.Normal);
         TopRight_Button.SetBackgroundImage(UIImage.FromFile("Blank.png"), UIControlState.Normal);
         BottomLeft_Button.SetBackgroundImage(UIImage.FromFile("Blank.png"), UIControlState.Normal);
         BottomRight_Button.SetBackgroundImage(UIImage.FromFile("Blank.png"), UIControlState.Normal);
     }
     else
     {
         counter++;
         TitleLabel.Text = TitleNames[counter];
         TopLeft_Button.SetBackgroundImage(UIImage.FromFile(ImagesArray[counter, 0]), UIControlState.Normal);
         TopRight_Button.SetBackgroundImage(UIImage.FromFile(ImagesArray[counter, 1]), UIControlState.Normal);
         BottomLeft_Button.SetBackgroundImage(UIImage.FromFile(ImagesArray[counter, 2]), UIControlState.Normal);
         BottomRight_Button.SetBackgroundImage(UIImage.FromFile(ImagesArray[counter, 3]), UIControlState.Normal);
     }
 }