private void OnWidgetActivatedMessageReceived(WidgetActivatedMessage message)
        {
            if (message.Handled || !(message.Widget is DisusedMatchingRuleWidget)) return;

            var rules = DisusedMatchingRuleWidget.QueryRules(this.ruleService.MatchingRules);
            DisusedRules = new ObservableCollection<DisusedRuleViewModel>(rules.Select(r => new DisusedRuleViewModel { MatchingRule = r, RemoveCommand = RemoveRuleCommand }));
            this.removedRules = new List<MatchingRule>();
            MessengerInstance.Send(new ShellDialogRequestMessage(BudgetAnalyserFeature.Dashboard, this, ShellDialogType.Ok)
            {
                CorrelationId = this.dialogCorrelationId,
                Title = "Disused Matching Rules"
            });
        }
        private void OnWidgetActivatedMessageReceived(WidgetActivatedMessage message)
        {
            if (message.Handled || !(message.Widget is EncryptWidget))
            {
                return;
            }

            if (this.appDbService.IsEncrypted)
            {
                ShowDecryptFilesDialog();
            }
            else
            {
                ShowEncryptFilesDialog();
            }
        }
        private void ProcessLoadDemoWidgetActivated(WidgetActivatedMessage message)
        {
            var widget = message.Widget as LoadDemoWidget;
            if (widget == null)
            {
                return;
            }

            message.Handled = true;

            // Could possibily go direct to PersistenceOperation class here.
            PersistenceOperationCommands.LoadDemoDatabaseCommand.Execute(this);
        }
        private void ProcessCurrentFileWidgetActivated(WidgetActivatedMessage message)
        {
            var widget = message.Widget as CurrentFileWidget;
            if (widget == null)
            {
                return;
            }

            message.Handled = true;

            PersistenceOperationCommands.LoadDatabaseCommand.Execute(this);
        }
        private void ProcessCurrentFileWidgetActivated(WidgetActivatedMessage message)
        {
            var widget = message.Widget as CurrentFilesWidget;
            if (widget == null)
            {
                return;
            }

            message.Handled = true;
            if (!widget.HasStatement)
            {
                OnTransactionExecuted();
                return;
            }

            if (!widget.HasBudget)
            {
                OnBudgetExecuted();
                return;
            }

            if (!widget.HasLedgerBook)
            {
                OnLedgerBookExecuted();
            }
        }
        private void OnWidgetActivatedMessageReceived(WidgetActivatedMessage message)
        {
            if (message.Handled || !(message.Widget is EncryptWidget)) return;

            if (this.appDbService.IsEncrypted)
            {
                ShowDecryptFilesDialog();
            }
            else
            {
                ShowEncryptFilesDialog();
            }
        }
 private void OnWidgetActivatedMessageReceived(WidgetActivatedMessage message)
 {
     this.widget = message.Widget as UpdateMobileDataWidget;
     if (this.widget != null && this.widget.Enabled)
     {
         AccessKeyId = this.widget.LedgerBook.MobileSettings.AccessKeyId;
         AccessKeySecret = this.widget.LedgerBook.MobileSettings.AccessKeySecret;
         AmazonRegion = this.widget.LedgerBook.MobileSettings.AmazonS3Region;
         MessengerInstance.Send(new ShellDialogRequestMessage(BudgetAnalyserFeature.Dashboard, this, ShellDialogType.OkCancel)
         {
             CorrelationId = this.correlationId,
             Title = "Upload Mobile Summary Data"
         });
     }
 }