Example #1
0
 /// <summary>
 /// MenuItem_Click
 /// menu item to open history window
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void MenuItem_Click_Hist(object sender, RoutedEventArgs e)
 {
     try
     {
         DisplayHistory histWind = new DisplayHistory(m_biz.GetFullHistory());
         if (histWind.ShowDialog() == true)
         {
             if (histWind.HistEntry != null)
             {
                 m_xValue = histWind.HistEntry.X;
                 m_yValue = histWind.HistEntry.Y;
                 m_zoom   = histWind.HistEntry.Zoom;
                 LoadTile(false);
             }
         }
     }
     catch (InvalidOperationException)
     {
         MessageBox.Show("An Error Occurred while loading the history window\n");
     }
     catch (CommunicationException)
     {
         MessageBox.Show("An Error Occurred while loading the history window\nThe Server is Not Communicating, Please Try Again Later");
         this.Close();
     }
 }
        private void ShowHistory_Click(object sender, RoutedEventArgs e)
        {
            History = m_biz.GetFullHistory();
            DisplayHistory disp = new DisplayHistory(History);

            disp.Show();
        }
Example #3
0
        private void btn_View_Click(object sender, RoutedEventArgs e)
        {
            BrowseHistory  bh          = m_tmBiz.GetFullHistory();
            DisplayHistory displayHist = new DisplayHistory(bh);

            displayHist.ShowDialog();
        }
Example #4
0
        //New form window is opened to display history
        //ShowDialog() method blocks accessing main window until the new dialog window is closed
        private void btnViewHistory_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                DisplayHistory History = new DisplayHistory(m_biz.GetFullHistory());
                History.ShowDialog();
            }

            //If Connection with the biz tier is lost
            catch (CommunicationObjectFaultedException)
            {
                MessageBox.Show("Error: Lost the connection with the server");
            }

            //Errors in forms
            catch (InvalidOperationException)
            {
                MessageBox.Show("Error: The form is already bieng shown");
            }
        }