Example #1
0
 public MainViewModel(MainLoop mainLoop, BitmapGraphProvider bitmapGraphProvider, Log log, DrawingWindowState drawingWindowState, ConnectionData connectionData)
 {
     _mainLoop = mainLoop;
     _bitmapGraphProvider = bitmapGraphProvider;
     _drawingWindowState = drawingWindowState;
     Log = log;
     Log.PropertyChanged += OnTextChanged;
     _bitmapGraphProvider.PropertyChanged += OnBitmapGraphChanged;
     DisplayName = $"{connectionData.Host}:{connectionData.Port}";
 }
Example #2
0
        public MainLoop(Commands commands, Log log, DrawingWindowState drawingWindowState, BitmapGraphProvider bitmapGraphProvider, ConnectionData connectionData)
        {
            _commands            = commands;
            _log                 = log;
            _drawingWindowState  = drawingWindowState;
            _bitmapGraphProvider = bitmapGraphProvider;

            _drawFinishedEvent  = new AutoResetEvent(true);
            _iterationStopwatch = new Stopwatch();

            _logicState = new LogicState();
            _logic      = new Logic(bitmapGraphProvider, bitmapGraphProvider, _log, _commands, connectionData);
        }