Example #1
0
 public void Close()
 {
     YellowstonePathology.Business.Interface.IPersistPageChanges page = (YellowstonePathology.Business.Interface.IPersistPageChanges) this.m_CurrentPage;
     if (page.OkToSaveOnClose() == true)
     {
         page.Save();
     }
 }
Example #2
0
 private void MainWindow_Closing(object sender, System.ComponentModel.CancelEventArgs e)
 {
     YellowstonePathology.Business.Interface.IPersistPageChanges page = (YellowstonePathology.Business.Interface.IPersistPageChanges) this.MainFrame.NavigationService.Content;
     if (page != null)
     {
         page.UpdateBindingSources();
         page.Save();
     }
 }
Example #3
0
 private void MainFrame_Navigating(object sender, NavigatingCancelEventArgs e)
 {
     if (this.MainFrame.Content != null)
     {
         YellowstonePathology.Business.Interface.IPersistPageChanges navigatingToPage   = (YellowstonePathology.Business.Interface.IPersistPageChanges)e.Content;
         YellowstonePathology.Business.Interface.IPersistPageChanges navigatingFromPage = (YellowstonePathology.Business.Interface.IPersistPageChanges) this.MainFrame.Content;
         navigatingFromPage.UpdateBindingSources();
         if (navigatingFromPage.OkToSaveOnNavigation(navigatingToPage.GetType()) == true)
         {
             navigatingFromPage.Save();
         }
     }
 }
Example #4
0
        public void Navigate(UserControl page)
        {
            YellowstonePathology.YpiConnect.Client.NavigatingEventArgs eventArgs = new NavigatingEventArgs(this.m_CurrentPage, page);

            YellowstonePathology.Business.Interface.IPersistPageChanges navigatingFromPage = (YellowstonePathology.Business.Interface.IPersistPageChanges) this.m_CurrentPage;
            YellowstonePathology.Business.Interface.IPersistPageChanges navigatingToPage   = (YellowstonePathology.Business.Interface.IPersistPageChanges)page;

            if (navigatingFromPage != null)
            {
                if (navigatingFromPage.OkToSaveOnNavigation(navigatingToPage.GetType()) == true)
                {
                    navigatingFromPage.Save();
                }
            }

            this.m_CurrentPage            = page;
            this.m_ContentControl.Content = page;
        }