public MasterViewModel( IComService comService, IGrblStatus grblStatus, ICommandSender commandSender, IGrblDispatcher grblDispatcher, IApplicationSettingsService applicationSettingsService, IGCodeFileService gCodeFileService) { _grblDispatcher = grblDispatcher; _applicationSettingsService = applicationSettingsService; _applicationSettingsService.Upgrade(); _applicationSettingsService.Load(); ComConnectionViewModel = new COMConnectionViewModel(comService, applicationSettingsService); _comService = comService; _grblStatus = grblStatus; _commandSender = commandSender; _gCodeFileService = gCodeFileService; _grblStatus.GrblStatusModel.MachineStateChanged += GrblStatusModelMachineStateChanged; _grblStatus.GrblStatusModel.PropertyChanged += GrblStatusModelPropertyChanged; _comService.ConnectionStateChanged += ComServiceConnectionStateChanged; _commandSender.CommunicationLogUpdated += CommandSenderCommunicationLogUpdated; _commandSender.CommandQueueLengthChanged += CommandSenderCommandQueueLengthChanged; _commandSender.FileCommands.CommandList.CollectionChanged += (sender, args) => { NotifyOfPropertyChange(() => FileLinesProcessed); }; StartNotifications(); }
public COMConnectionViewModel(IComService comService, IApplicationSettingsService applicationSettingsService) { _comService = comService; _comService.ConnectionStateChanged += ComServiceConnectionStateChanged; _applicationSettingsService = applicationSettingsService; ReloadComPorts(); }
public CommandSender(IComService comService, IGrblResponseTypeFinder responseTypeFinder, IGrblCommandPreProcessor commandPreProcessor) { _uiContext = SynchronizationContext.Current; _comService = comService; _responseTypeFinder = responseTypeFinder; _commandPreProcessor = commandPreProcessor; _comService.LineReceived += ComServiceLineReceived; _comService.ConnectionStateChanged += ComServiceConnectionStateChanged; }
//private static bool CanWrite = false; public SmsService(MainDbContext mainDbContext, IConfiguration configuration, IComService comService, IGammuService gammuService) { _mainDbContext = mainDbContext; _configuration = configuration; _comHelper = (ComHelper)comService; _gammuService = gammuService; }
public ComController(IComService comService) { this.comService = comService; }
public GrblPrompt(IComService comService) { comService.LineReceived += ComServiceLineReceived; }
public GrblDispatcher(IComService comService, IGrblPrompt grblPrompt, IGrblStatus grblStatus) { _grblStatus = grblStatus; grblPrompt.PromptReceived += GrblPromptPromptReceived; comService.ConnectionStateChanged += ComServiceConnectionStateChanged; }