Example #1
0
        void bViewModel_StatCalcLoadedEvent(object sender, SimpleMvvmToolkit.NotificationEventArgs <Exception> e)
        {
            BinomialStatCalcDTO bDto = bViewModel.DataBag;
            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);

            if (parseResult1 && parseResult2 && parseResult3 && numerator < observed)
            {
                lblLessThan.Text         = "< " + numerator;
                lblLessThanEqual.Text    = "<= " + numerator;
                lblEqual.Text            = "= " + numerator;
                lblGreaterThanEqual.Text = ">= " + numerator;
                lblGreaterThan.Text      = "> " + numerator;

                txtLessThan.Text         = bDto.LessThanTxt;
                txtLessThanEqual.Text    = bDto.LessThanEqualTxt;
                txtEqual.Text            = bDto.EqualTxt;
                txtGreaterThanEqual.Text = bDto.GreaterThanEqualTxt;
                txtGreaterThan.Text      = bDto.GreaterThanTxt;
                txtPValue.Text           = bDto.PValueTxt;
                txt95Ci.Text             = bDto.NinefiveCiTxt;
            }

            waitCursor.Visibility = System.Windows.Visibility.Collapsed;
        }
Example #2
0
        // TODO: Add methods that will be called by the view

        #endregion

        #region Completion Callbacks

        // TODO: Optionally add callback methods for async calls to the service agent
        /// <summary>
        /// Completion for allColumns
        /// </summary>
        /// <param name="result"></param>
        /// <param name="e"></param>

        private void GetBinomialStatCalcCompleted(BinomialStatCalcDTO result, Exception e)
        {
            if (e != null)
            {
                NotificationEventArgs <Exception> notification = new NotificationEventArgs <Exception>("", e);
                this.Notify(ErrorNotice, notification);
            }
            else
            {
                this.DataBag = result;
                Notify(StatCalcLoadedEvent, new NotificationEventArgs <Exception>());
            }
        }
Example #3
0
        void dResults_Completed(object sender, EventArgs e)
        {
            InvokeOperation <BinomialStatCalcDTO> result =
                (InvokeOperation <BinomialStatCalcDTO>)sender;
            Exception ex = null;

            if (result.HasError)
            {
                ex = result.Error;
                result.MarkErrorAsHandled();
            }
            //else
            //{
            BinomialStatCalcDTO returnedData = ((InvokeOperation <BinomialStatCalcDTO>)sender).Value;

            completed(returnedData, null);
            //}
        }