void bRunAnalitics_Click(object sender, RoutedEventArgs e)
 {
     if (cp2 == null)
     {
         cp2 = new CheckPage(RunCalculationOK, CheckCancel);
     }
     else
     {
         cp2.Visibility = Visibility.Visible;
     }
     MainFrame.Visibility = Visibility.Visible;
     MainFrame.Content    = cp2;
 }
        void bCheck_Click(object sender, RoutedEventArgs e)
        {
            if (dp != null)
            {
                MainFrame.Visibility = Visibility.Visible;
                MainFrame.Content    = dp;
                return;
            }

            if (cp == null)
            {
                cp = new CheckPage(CheckOK, CheckCancel);
            }
            else
            {
                cp.Visibility = Visibility.Visible;
            }
            MainFrame.Visibility = Visibility.Visible;
            MainFrame.Content    = cp;
        }