コード例 #1
0
        public void syncProgressMessage()
        {
            try
            {
                AppDelegate.dataSync.notifiy -= syncProgressHandler;

                UIAlertView alert = new UIAlertView("Alert", "Sync is in progress", null, NSBundle.MainBundle.LocalizedString("OK", "OK"));
                alert.Show();

                if (this.NavigationController != null)
                {
                    if (this.NavigationController.ViewControllers[this.NavigationController.ViewControllers.Count() - 2] != null)
                    {
                        DashBoardViewController dashBoardViewController = (DashBoardViewController)(this.NavigationController.ViewControllers[this.NavigationController.ViewControllers.Count() - 2]);
                        int syncCount = syn.getPendingSyncCount();
                        dashBoardViewController.updateSyncCount(syncCount);
                    }

                    if (this.NavigationController.ViewControllers.Contains(this))
                    {
                        this.NavigationController.PopViewController(true);
                    }
                }
            }
            catch (Exception ex) {
                Debug.WriteLine("Exception occured method PdfViewer due to : " + ex.Message);
            }
        }
コード例 #2
0
 void Del_doneWithPreview(object sender, EventArgs e)
 {
     try
     {
         if (InspectionDataTableViewController.FilePath != null)
         {
             if (File.Exists(InspectionDataTableViewController.FilePath))
             {
                 File.Delete(InspectionDataTableViewController.FilePath);
                 Sync syn       = new Sync(AppDelegate.DatabaseContext);
                 int  syncCount = syn.getPendingSyncCount();
                 dashViewController.updateSyncCount(syncCount);
                 dashViewController.Dispose();
             }
         }
     }
     catch (Exception ex) {
         Debug.WriteLine("Exception occured method Del_doneWithPreview due to : " + ex.Message);
     }
 }