Example #1
0
 internal void LoadLocations(ProgressController progressController)
 {
     if (!LocationsLoaded)
     {
         Task.Run(() =>
         {
             InvokeOnMainThread(() => progressController.ShowWindow(this));
             progressController.ProgressBar  = 0;
             progressController.ProgressText = "Loading List of Countries. Please Wait";
             countriesViewController.RefreshDocumentView(_familyTree.AllDisplayCountries);
             progressController.ProgressBar  = 20;
             progressController.ProgressText = "Loading List of Regions. Please Wait";
             regionsViewController.RefreshDocumentView(_familyTree.AllDisplayRegions);
             progressController.ProgressBar  = 40;
             progressController.ProgressText = "Loading List of SubRegions. Please Wait";
             subregionsViewController.RefreshDocumentView(_familyTree.AllDisplaySubRegions);
             progressController.ProgressBar  = 60;
             progressController.ProgressText = "Loading List of Addresses. Please Wait";
             addressesViewController.RefreshDocumentView(_familyTree.AllDisplayAddresses);
             progressController.ProgressBar  = 80;
             progressController.ProgressText = "Loading List of Places. Please Wait";
             placesViewController.RefreshDocumentView(_familyTree.AllDisplayPlaces);
             progressController.ProgressBar = 100;
             LocationsLoaded = true;
             InvokeOnMainThread(progressController.Close);
         });
     }
 }
Example #2
0
 internal void LoadErrorsAndFixes(ProgressController progressController)
 {
     if (!ErrorsAndFixesLoaded)
     {
         Task.Run(() =>
         {
             InvokeOnMainThread(() => progressController.ShowWindow(this));
             progressController.ProgressBar  = 0;
             progressController.ProgressText = "Loading Data Errors. Please Wait";
             // Flatten the data error groups into a single list until filtering implemented.
             var errors = new SortableBindingList <IDisplayDataError>(_familyTree.AllDataErrors);
             dataErrorsViewController.RefreshDocumentView(errors);
             progressController.ProgressBar = 25;
             //duplicatesViewController.RefreshDocumentView(new SortableBindingList<IDisplayDuplicateIndividual>());
             progressController.ProgressBar  = 50;
             progressController.ProgressText = "Loading Loose Births. Please Wait";
             looseBirthsViewController.RefreshDocumentView(_familyTree.LooseBirths());
             progressController.ProgressBar  = 75;
             progressController.ProgressText = "Loading Loose Deaths. Please Wait";
             looseDeathsViewController.RefreshDocumentView(_familyTree.LooseDeaths());
             progressController.ProgressBar = 100;
             ErrorsAndFixesLoaded           = true;
             InvokeOnMainThread(progressController.Close);
         });
     }
 }
Example #3
0
 internal void LoadMainLists(ProgressController progressController)
 {
     if (!MainListsLoaded)
     {
         Task.Run(() =>
         {
             InvokeOnMainThread(() => progressController.ShowWindow(this));
             progressController.ProgressBar  = 0;
             progressController.ProgressText = "Loading Individuals Data. Please Wait";
             individualsViewController.RefreshDocumentView(_familyTree.AllDisplayIndividuals);
             progressController.ProgressBar  = 20;
             progressController.ProgressText = "Loading Families Data. Please Wait";
             familiesViewController.RefreshDocumentView(_familyTree.AllDisplayFamilies);
             progressController.ProgressBar  = 40;
             progressController.ProgressText = "Loading Sources Data. Please Wait";
             sourcesViewController.RefreshDocumentView(_familyTree.AllDisplaySources);
             progressController.ProgressBar  = 60;
             progressController.ProgressText = "Loading Occupations Data. Please Wait";
             occupationsViewController.RefreshDocumentView(_familyTree.AllDisplayOccupations);
             progressController.ProgressBar  = 80;
             progressController.ProgressText = "Loading Facts Data. Please Wait";
             factsViewController.RefreshDocumentView(_familyTree.AllDisplayFacts);
             progressController.ProgressBar = 100;
             MainListsLoaded = true;
             InvokeOnMainThread(progressController.Close);
         });
     }
 }
 void SetProgress(ProgressController progressController, int percent)
 {
     if (!NSThread.IsMain)
     {
         InvokeOnMainThread(() => SetProgress(progressController, percent));
         return;
     }
     progressController.ProgressBar = percent;
 }
Example #5
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();
            var storyboard = NSStoryboard.FromName("Main", null);

            ProgressController           = storyboard.InstantiateControllerWithIdentifier("ProgressDisplay") as ProgressController;
            ProgressController.Presentor = this;
            SetupViewControllers();
        }
 public void UpdateLostCousinsReport(ProgressController progressController)
 {
     InvokeOnMainThread(() =>
     {
         Predicate <Individual> relationFilter = RelationshipTypesOutlet.BuildFilter <Individual>(x => x.RelationType);
         string reportText    = FamilyTree.Instance.UpdateLostCousinsReport(relationFilter);
         ReportsTextBox.Value = reportText;
         var newtext          = ReportsTextBox.String;
     });
 }
 public void UpdateLostCousinsReport(RelationTypes relationshipTypes, ProgressController progressController, LCReportsViewController lcReport)
 {
     RelationshipTypes  = relationshipTypes;
     ProgressController = progressController;
     LCReport           = lcReport;
     InvokeOnMainThread(() =>
     {
         Predicate <CensusIndividual> relationFilter = relationshipTypes.BuildFilter <CensusIndividual>(x => x.RelationType, true);
         LCUpdates           = new List <CensusIndividual>();
         LCInvalidReferences = new List <CensusIndividual>();
         string reportText   = FamilyTree.Instance.LCOutput(LCUpdates, LCInvalidReferences, relationFilter);
         StatsTextbox.Value  = reportText;
     });
 }
Example #8
0
 void UpdateLostCousinsReport(ProgressController progressController)
 {
     Task.Run(() =>
     {
         progressController.ProgressText = "Loading Census Statistics";
         progressController.ProgressBar  = 0;
         InvokeOnMainThread(() => progressController.ShowWindow(this));
         lCReportsViewController.UpdateLostCousinsReport(progressController);
         progressController.ProgressBar  = 50;
         progressController.ProgressText = "Loading Lost Cousins Statistics";
         lCUpdatesViewController.UpdateLostCousinsReport(lCReportsViewController.RelationshipTypes, progressController, lCReportsViewController);
         progressController.ProgressBar = 100;
         InvokeOnMainThread(progressController.Close);
     });
     if (GeneralSettings.Default.SkipCensusReferences)
     {
         UIHelpers.ShowMessage("Option to skip Census reference is set. No data can be uploaded to Lost Cousins without a Census Reference.");
     }
 }