Пример #1
0
        protected override async Task SelectedIndexChangedAsync(ITashTaskHandlingStatus <ICacheckApplicationModel> status, string controlName, int selectedIndex, bool selectablesChanged)
        {
            if (selectedIndex < 0)
            {
                return;
            }

            SimpleLogger.LogInformation($"Changing selected index for {controlName} to {selectedIndex}");
            switch (controlName)
            {
            default:
                var errorMessage = $"Do not know how to select for {status.TaskBeingProcessed.ControlName}";
                SimpleLogger.LogInformation($"Communicating 'BadRequest' to remote controlling process ({errorMessage})");
                await TashCommunicator.ChangeCommunicateAndShowProcessTaskStatusAsync(status, ControllableProcessTaskStatus.BadRequest, false, "", errorMessage);

                break;
            }
        }
Пример #2
0
        public override async Task ProcessSelectComboOrResetTaskAsync(ITashTaskHandlingStatus <ICacheckApplicationModel> status)
        {
            var controlName = status.TaskBeingProcessed.ControlName;

            SimpleLogger.LogInformation($"{controlName} is a valid selector");
            var selector = Selectors[controlName];

            await SelectedIndexChangedAsync(status, controlName, -1, false);

            if (status.TaskBeingProcessed.Status == ControllableProcessTaskStatus.BadRequest)
            {
                return;
            }

            var itemToSelect = status.TaskBeingProcessed.Text;

            await SelectItemAsync(status, selector, itemToSelect, controlName);
        }
Пример #3
0
        protected override async Task ProcessSingleTaskAsync(ITashTaskHandlingStatus <ICacheckApplicationModel> status)
        {
            using (SimpleLogger.BeginScope(SimpleLoggingScopeId.Create(nameof(TashAccessor), LogId))) {
                var s = string.IsNullOrEmpty(status.TaskBeingProcessed.ControlName)
                    ? $"Processing a task of type {status.TaskBeingProcessed.Type} in {nameof(TashHandler)}"
                    : $"Processing a task of type {status.TaskBeingProcessed.Type} on {status.TaskBeingProcessed.ControlName} in {nameof(TashHandler)}";
                SimpleLogger.LogInformation(s);

                switch (status.TaskBeingProcessed.Type)
                {
                case ControllableProcessTaskType.Reset:
                    await TashCommunicator.CommunicateAndShowCompletedOrFailedAsync(status, false, "");

                    break;

                default:
                    await base.ProcessSingleTaskAsync(status);

                    break;
                }
            }
        }
Пример #4
0
 protected override Dictionary <string, ICollectionViewSource> CollectionViewSourceNamesToCollectionViewSourceDictionary(ITashTaskHandlingStatus <ICacheckApplicationModel> status)
 {
     return(new Dictionary <string, ICollectionViewSource> {
         { nameof(status.Model.OverallSums), status.Model.OverallSums },
         { nameof(status.Model.ClassificationSums), status.Model.ClassificationSums },
         { nameof(status.Model.ClassificationAverages), status.Model.ClassificationAverages },
         { nameof(status.Model.MonthlyDeltas), status.Model.MonthlyDeltas },
         { nameof(status.Model.ClassifiedPostings), status.Model.ClassifiedPostings },
     });
 }
Пример #5
0
 protected override Dictionary <string, ISimpleTextHandler> TextBoxNamesToTextHandlerDictionary(ITashTaskHandlingStatus <ICacheckApplicationModel> status)
 {
     return(new Dictionary <string, ISimpleTextHandler> {
         { nameof(status.Model.Log), CacheckHandlers.LogTextHandler }
     });
 }
Пример #6
0
 protected override Dictionary <string, ITextBox> TextBoxNamesToTextBoxDictionary(ITashTaskHandlingStatus <ICacheckApplicationModel> status)
 {
     return(new Dictionary <string, ITextBox> {
         { nameof(status.Model.Log), status.Model.Log },
         { nameof(status.Model.Status), status.Model.Status }
     });
 }
Пример #7
0
 protected override void OnValueTaskProcessed(ITashTaskHandlingStatus <ICacheckApplicationModel> status, bool verify, bool set, string actualValue)
 {
 }