Exemplo n.º 1
0
 private void Construct()
 {
     //GadgetContent.Visibility = System.Windows.Visibility.Visible;
     bViewModel = new BinomialStatCalcViewModel();
     bViewModel.StatCalcLoadedEvent += new EventHandler <SimpleMvvmToolkit.NotificationEventArgs <Exception> >(bViewModel_StatCalcLoadedEvent);
     bViewModel.ErrorNotice         += new EventHandler <SimpleMvvmToolkit.NotificationEventArgs <Exception> >(bViewModel_ErrorNotice);
 }
Exemplo n.º 2
0
        private void btnGo_Click(object sender, RoutedEventArgs e)
        {
            int    numerator    = 0;
            int    observed     = 0;
            double expected     = 0;
            bool   parseResult1 = int.TryParse(txtNumerator.Text, out numerator);
            bool   parseResult2 = int.TryParse(txtObserved.Text, out observed);
            bool   parseResult3 = double.TryParse(txtExpected.Text, out expected);

            bViewModel = new BinomialStatCalcViewModel();
            if (parseResult1 && parseResult2 && parseResult3 && numerator < observed)
            {
                bViewModel.GetBinomialStatCalc(txtNumerator.Text, txtObserved.Text, txtExpected.Text);
                waitCursor.Visibility = System.Windows.Visibility.Visible;
            }
            else
            {
                txtLessThan.Text         = "";
                txtLessThanEqual.Text    = "";
                txtEqual.Text            = "";
                txtGreaterThanEqual.Text = "";
                txtGreaterThan.Text      = "";
                txtPValue.Text           = "";
                txt95Ci.Text             = "";
            }
        }