public MainWindowViewModel()
        {
            _modelCore   = new ModelCore();
            _angleLogger = new AngleLogger(_modelCore);

            //描画とFPSの表示設定
            var drawer = new KinectBodyDrawer(_modelCore.KinectConnector);

            ImageSource = drawer.ImageSource;

            var timerForFps = new DispatcherTimer();

            timerForFps.Interval = TimeSpan.FromMilliseconds(100.0);
            timerForFps.Tick    += (_, __) =>
            {
                FpsFrameArrived = _modelCore.FpsFrameArrived;
                FpsDataSend     = _modelCore.FpsDataSend;
            };

            //イベントとコマンド設定
            SubscribeToModelEvents(_modelCore);
            SendDataChangeToModel(_modelCore);

            ConnectToServerCommand      = new RelayCommand(() => _modelCore.AngleDataSender.Connect(IPAddress, Port));
            DisconnectFromServerCommand = new RelayCommand(() => _modelCore.AngleDataSender.Close());

            CloseWindowCommand = new RelayCommand(() =>
            {
                _modelCore.Dispose();
                _angleLogger.Dispose();
                timerForFps.Stop();
            });

            timerForFps.Start();
        }
        public MainWindowViewModel()
        {
            _modelCore = new ModelCore();
            _angleLogger = new AngleLogger(_modelCore);

            //描画とFPSの表示設定
            var drawer = new KinectBodyDrawer(_modelCore.KinectConnector);
            ImageSource = drawer.ImageSource;

            var timerForFps = new DispatcherTimer();
            timerForFps.Interval = TimeSpan.FromMilliseconds(100.0);
            timerForFps.Tick += (_, __) =>
            {
                FpsFrameArrived = _modelCore.FpsFrameArrived;
                FpsDataSend = _modelCore.FpsDataSend;
            };

            //イベントとコマンド設定
            SubscribeToModelEvents(_modelCore);
            SendDataChangeToModel(_modelCore);

            ConnectToServerCommand = new RelayCommand(() => _modelCore.AngleDataSender.Connect(IPAddress, Port));
            DisconnectFromServerCommand = new RelayCommand(() => _modelCore.AngleDataSender.Close());

            CloseWindowCommand = new RelayCommand(() =>
            {
                _modelCore.Dispose();
                _angleLogger.Dispose();
                timerForFps.Stop();
            });

            timerForFps.Start();
        }