예제 #1
0
        public ApiService(ActorSystemAdapter actorSystemAdapter, MainWindowViewModel model)
        {
            // in/out data model - for demo simplicity being set inside.
            this.appModel = model;

            // akka actor system handler
            this.actorSystemAdapter = actorSystemAdapter;
        }
예제 #2
0
        public MainWindow()
        {
            InitializeComponent();

            this.CommandBindings.Add(new CommandBinding(Commands.Exit, this.ExitCommand_Executed));
            this.CommandBindings.Add(new CommandBinding(Commands.Connect, this.ConnectCommand_Executed, (s, e) => e.CanExecute           = this.model.IsDisconnected));
            this.CommandBindings.Add(new CommandBinding(Commands.Disconnect, this.DisconnectCommand_Executed, (s, e) => e.CanExecute     = this.model.IsConnected));
            this.CommandBindings.Add(new CommandBinding(Commands.LoadDutyPlan, this.LoadDutyPlanCommand_Executed, (s, e) => e.CanExecute = this.model.IsConnected));

            this.actorSystemAdapter = new ActorSystemAdapter();
            this.model       = new MainWindowViewModel();
            this.DataContext = this.model;

            this.apiService = new ApiService(this.actorSystemAdapter, this.model);
            // this.apiService.LogLineGenerated += Model_LogLineGenerated;
        }
예제 #3
0
 public void Dispose()
 {
     this.actorSystemAdapter?.Dispose();
     this.actorSystemAdapter = null;
 }