コード例 #1
0
        // set with button recreation
        public void SetEndPointViewModel(EndpointSettingViewModel endpointSettingViewModel)
        {
            this.endpointSettingviewModel = endpointSettingViewModel;

            endpointSettingViewModel.connected.Subscribe(state =>
            {
                if (state == ConnectionCheckStatus.Connected)
                {
                    image.color = successColor;
                }
                else if (state == ConnectionCheckStatus.Checking)
                {
                    image.color = checkingColor;
                }
                else
                {
                    image.color = failColor;
                }
            }).AddTo(this);
        }
コード例 #2
0
        public static EndpointSettingDataModel Translate(EndpointSettingViewModel viewModel)
        {
            var dataModel = new EndpointSettingDataModel(viewModel.EndPoint, viewModel.EndPointName, viewModel.OffsetFrame, viewModel.ConnectionEnabled);

            return(dataModel);
        }
コード例 #3
0
        // set with button recreation
        public void SetEndPointViewModel(EndpointSettingViewModel endpointSettingViewModel)
        {
            this.endpointSettingviewModel = endpointSettingViewModel;

            endpointSettingViewModel.connectionEnabled.Subscribe(ChangeBackground).AddTo(this);
        }