public SettingsPage( SettingsPageViewModel viewModel , INavigationService navigationService , IMessageDisplayer messageDisplayer ) { InitializeComponent(); _navigationService = navigationService; _messageDisplayer = messageDisplayer; BindingContext = _viewModel = viewModel; MessagingCenter.Subscribe <SettingsPageViewModel, Exception>(_viewModel , MessengerKeys.SettingsFailedLoadSettings , (_, ex) => { Debug.WriteLine($"Error while searching for xpub: {Environment.NewLine}{ex}"); Device.BeginInvokeOnMainThread(async() => { // needs to be at root to show alerts await _navigationService.ClearStack(); await DisplayAlert("Erro", "Erro ao carregar configuração", "Cancelar"); }); } ); }
public SpotifySaveModeStopper(IMessageDisplayer messageDisplayer, IPreventSleepScreen preventSleepScreen, ISoundAnalyser soundAnalyser, IAppStatusReporting appState1) { _messageDisplayer = messageDisplayer; _preventSleepScreen = preventSleepScreen; _soundAnalyser = soundAnalyser; _appState = appState1; }
public KundeViewModel(IMessageDisplayer displayer) { AddNewKundeCommand = new RelayCommand <Kunde>(param => SaveKunde(param)); RemoveKundeCommand = new RelayCommand <Kunde>(param => DeleteKunde(param)); kundeManager = new KundeManager(); this.displayer = displayer; }
public ReservationDetailViewModel(IMessageDisplayer displayer) { this.displayer = displayer; Von = DateTime.Now; Bis = DateTime.Now.AddDays(1); Autos = new ObservableCollection<Auto>(); foreach (Auto a in new AutoManager().List) { Autos.Add(a); } Kunden = new ObservableCollection<Kunde>(); foreach (Kunde k in new KundeManager().List) { Kunden.Add(k); } if (Autos.Count == 0 || Kunden.Count == 0) { //MessageBox.Show("Achtung: Sie müssen zuerst Autos und Kunden registrieren, bevor Sie Reservationen anlegen können"); displayer.DisplayWarning("Achtung", "Sie müssen zuerst Autos und Kunden registrieren, bevor Sie Reservationen anlegen können"); Application.Current.Windows.OfType<ReservationAddWindow>().First().Loaded += (s, e) => Application.Current.Windows.OfType<ReservationAddWindow>().First().DialogResult = false; } KundeId = 1; SaveReservationCommand = new RelayCommand<Window>(param => SaveReservation(param)); CancelCommand = new RelayCommand<Window>(param => Cancel(param)); }
public AutoViewModel(IMessageDisplayer displayer) { Autos = new ObservableCollection <Auto>(); AddNewAutoCommand = new RelayCommand <Auto>(param => SaveAuto(param)); RemoveAutoCommand = new RelayCommand <Auto>(param => DeleteAuto(param)); autoManager = new AutoManager(); this.displayer = displayer; }
public MainViewModel(ITemperatureListener listener, IBandOperator bandOperator, IMessageDisplayer messageDisplayer, IErrorLogger errorLogger) { _listener = listener; _bandOperator = bandOperator; _messageDisplayer = messageDisplayer; _errorLogger = errorLogger; }
public AutoDetailViewModel(IMessageDisplayer displayer) { ChangeAutoType(AutoKlasse); SaveAutoCommand = new RelayCommand <Window>(param => SaveAuto(param)); CancelCommand = new RelayCommand <Window>(param => Cancel(param)); autoManager = new AutoManager(); this.displayer = displayer; }
// ---------------- Constructor ---------------- // ---------------- Properties ---------------- public GitPusher( Options options, ICommandRunner cmdRunner, IMessageDisplayer msgDisplayer, ILogger logger ) : base(options, cmdRunner, msgDisplayer, logger) { }
public InteractiveWorker(Options options, ICommandRunner commandRunner, string gitConfigCommandArguments, IMessageDisplayer messageDisplayer, ILogger logger) : base(options, commandRunner, messageDisplayer, logger) { _gitConfigCommandArguments = gitConfigCommandArguments; }
public Worker(Options options, ICommandRunner commandRunner, IMessageDisplayer messageDisplayer, ILogger logger) { _options = options; _commandRunner = commandRunner; _messageDisplayer = messageDisplayer; _logger = logger; }
public Migrator(Options options, string[] args, ICommandRunner commandRunner, IMessageDisplayer messageDisplayer, ILoggerFactory loggerFactory) : base(options, commandRunner, messageDisplayer, loggerFactory.CreateLogger <Migrator>()) { _args = args; _loggerFactory = loggerFactory; }
public Fixer(MetaInfo metaInfo, Options options, ICommandRunner commandRunner, string gitConfigCommandArguments, IMessageDisplayer messageDisplayer, ILogger logger) : base(options, commandRunner, gitConfigCommandArguments, messageDisplayer, logger) { _metaInfo = metaInfo; }
public ReservationViewModel(IMessageDisplayer messageDisplayer) { this.displayer = messageDisplayer; resManager = new ReservationManager(); Hidden = true; RemoveReservationCommand = new RelayCommand <Reservation>(param => DeleteReservation(param)); AddReservationCommand = new RelayCommand <Reservation>(param => SaveReservation(param)); timer = new Timer(1000); timer.Elapsed += StartUpdate; timer.Start(); }
public Worker( Options options, ICommandRunner commandRunner, IMessageDisplayer messageDisplayer, ILogger logger ) { this.Options = options; this.CommandRunner = commandRunner; this.MessageDisplayer = messageDisplayer; this.Logger = logger; }
// ---------------- Constructor ---------------- public Migrator( Options options, string[] args, ICommandRunner commandRunner, IMessageDisplayer messageDisplayer, ILoggerFactory loggerFactory ) : base(options, commandRunner, messageDisplayer, loggerFactory.CreateLogger <Migrator>()) { this._args = args; this._loggerFactory = loggerFactory; this.fileSystem = new FileSystem(options, this._loggerFactory.CreateLogger <FileSystem>()); }
public MainForm() { InitializeComponent(); messageDisplayer = new RichTextBoxMessageDisplayer(richTextBox1); appSettings = Config.Default.Get <AppSettings>(); waitHandleCommands = new WaitHandleCommands(); waitHandleCommands.Add(Commands.GET_SYSTEM_INFO); waitHandleCommands.Add(Commands.TAKE_SCREENSHOT); txtAppName.Text = appSettings.AppName; txtServerAddress.Text = appSettings.ServerAddress; chkTopMost.Checked = appSettings.TopMost; TopMost = appSettings.TopMost; }
// ---------------- Constructor ---------------- public StaleSvnBranchDeleter( string svnUrl, Options options, ICommandRunner cmdRunner, IMessageDisplayer msgDisplayer, ILogger logger, MetaInfo metaInfo, IFileSystem fileSystem ) : base(options, cmdRunner, msgDisplayer, logger) { this.svnUrl = svnUrl; this.metaInfo = metaInfo; this.fileSystem = fileSystem; }
public Grabber(string svnUrl, Options options, ICommandRunner commandRunner, string gitConfigCommandArguments, IMessageDisplayer messageDisplayer, ILogger logger) : base(options, commandRunner, gitConfigCommandArguments, messageDisplayer, logger) { _svnUrl = svnUrl; _metaInfo = new MetaInfo() { RemoteBranches = new List <string>(), LocalBranches = new List <string>(), Tags = new List <string>() }; }
public SpotifySaveModeStopperFacade(IMessageDisplayer messageDisplayer, IPreventSleepScreen preventSleepScreen, ISoundAnalyser soundAnalyser, IProcessAnalyser processAnalyser, IAppStatusReporting appState, IAutoStartManager autoStartManager, ISettingsManager <AppSettings> settingsManager, int refreshRate = -1) { _messageDisplayer = messageDisplayer; _preventSleepScreen = preventSleepScreen; _soundAnalyser = soundAnalyser; _appState = appState; _autoStartManager = autoStartManager; _settingsManager = settingsManager; _processAnalyser = processAnalyser; _screenSleepEnabled = IsScreenSleepEnabled(); if (refreshRate > 0) { _checkInterval = TimeSpan.FromSeconds(refreshRate); } }
public PaymentFinalizationPage( PaymentFinalizationPageViewModel viewModel , INavigationService navigationService , IMessageDisplayer msgDisplayer ) { InitializeComponent(); _navigationService = navigationService; _msgDisplayer = msgDisplayer; BindingContext = _viewModel = viewModel; MessagingCenter.Subscribe <PaymentFinalizationPageViewModel, decimal>( _viewModel , MessengerKeys.PaymentFullyReceived , (_, value) => { Device.BeginInvokeOnMainThread(async() => { _viewModel.HandleCompletePayment(value); await _msgDisplayer.ShowMessageAsync($"Pagamento efetuado!\nPago: {value:N8}"); await ExitPageAsync(); }); } ); MessagingCenter.Subscribe <PaymentFinalizationPageViewModel, (decimal totalValue, decimal txValue)>( _viewModel , MessengerKeys.PaymentPartiallyReceived , (_, partialPayment) => { Device.BeginInvokeOnMainThread(async() => { _viewModel.HandlePartialValuePayment(partialPayment); await _msgDisplayer.ShowMessageAsync( $"Valor recebido: {partialPayment.totalValue:N8}\n" + $"Aguardando o restante ({_viewModel.MissingAmount:N8})..." ); }); } ); }
public MainPage( MainPageViewModel viewModel , INavigationService navigationService , IMessageDisplayer msgDisplayer ) { InitializeComponent(); BindingContext = _viewModel = viewModel; _navigationService = navigationService; _msgDisplayer = msgDisplayer; MessagingCenter.Subscribe <MainPageViewModel, bool>( _viewModel , MessengerKeys.MainCheckXPubExistence , (_, xpubExists) => { if (xpubExists) { return; } Debug.WriteLine("Asking user to set xpub key", "UI"); Device.BeginInvokeOnMainThread(async() => { var alertResult = await DisplayAlert( "Configurações" , "Para usar o aplicativo é necessário configurar uma Extended Public Key" + " para poder gerar endereços de pagamento." , "Ok" , "Cancelar" ); if (alertResult) { await OpenSettingsPageAsync(); } }); } ); }
/// <summary> /// Constructs and initializes the instance of this class /// </summary> /// <param name="args">Command line aruments</param> public SerializerViewer(string[] args) { messageDisplayer = new ConsoleMessageDisplayer(this); settingsPath=RetrieveSettingsPath(args); if ((settingsPath == null)) { OutputParametersHelp(); return; } try { Configuration config=ParseSettingsFile(settingsPath); PrintDescriptions(config.Descriptions); messageDisplayer.DisplayInfo("Settings reading done.Press any key to continue..."); } catch (Exception e) { messageDisplayer.DisplayError(e.Message+"\n"+e.StackTrace); } }
public CsCoreSoundAnalyser(IMessageDisplayer messageDisplayer1) { _messageDisplayer = messageDisplayer1; }
public RobotGame(Board board1, Robot robot1, IMessageDisplayer messageDisplayer) { _robot = robot1; _board = board1; _messageDisplayer = messageDisplayer; }
public static async Task <ActionStatus> DoActionByGetMethod(this HttpClient httpClient, string actionUrl, IMessageDisplayer messageDisplayer) { var response = await httpClient.GetAsync(actionUrl); return(await TreatResponse(response, messageDisplayer)); }
public static async Task <ActionStatus> DoActionByPost <T>(this HttpClient httpClient, string actionUrl, T value, IMessageDisplayer messageDisplayer) { var response = await httpClient.PostAsJsonAsync(actionUrl, value); return(await TreatResponse(response, messageDisplayer)); }
private static async Task <ActionStatus> TreatResponse(HttpResponseMessage response, IMessageDisplayer messageDisplayer) { if (!response?.IsSuccessStatusCode ?? false) { #pragma warning disable CS8602 // Dereference of a possibly null reference. await messageDisplayer.DisplayErrorMessage(await response.Content.ReadAsStringAsync()); return(ActionStatus.Failed); #pragma warning restore CS8602 // Dereference of a possibly null reference. } return(ActionStatus.Done); }
public Watcher(IMessageDisplayer messageDisplayer) { _messageDisplayer = messageDisplayer; }