Beispiel #1
0
        private void LoadEventOptionsDefaultValues()
        {
            //load all person, location & tag list into combo box
            gui.MainGrid.EventOptions.PersonList = HoroscopeCore.GetAllPeopleList();

            //set default start & end times
            gui.MainGrid.EventOptions.StartTimeText = "00:00 19/03/2021 +08:00";
            gui.MainGrid.EventOptions.EndTimeText   = "23:59 20/03/2021 +08:00";
        }
Beispiel #2
0
        private void CalculateAndUpdateEvents(object threadCanceler)
        {
            //get all the needed values
            var person = gui.MainGrid.EventOptions.SelectedPerson;
            var tag    = gui.MainGrid.EventOptions.SelectedTag;

            //pass thread canceler MuhurthaCore, so that methods inside can be stopped if needed
            HoroscopeCore.threadCanceler = (CancellationToken)threadCanceler;

            //calculate events from values
            var events = HoroscopeCore.GetPrediction(person, tag);

            //set event into view
            gui.MainGrid.EventView.EventList = events;
        }