コード例 #1
0
ファイル: CabinaDeDus.cs プロジェクト: FeedFestival/Survival
    public void DoorInteraction(DoorState doorstate)
    {
        if (CurrentDoorstate == doorstate)
        {
            return;
        }
        CurrentDoorstate = doorstate;

        CabinaDeDusController.Play(doorstate.ToString());
    }
コード例 #2
0
        private void UpdateUi(DoorState doorState)
        {
            switch (doorState)
            {
            case SamsungWatchGarage.Integration.Models.DoorState.opening:
            case SamsungWatchGarage.Integration.Models.DoorState.closing:
                button.BackgroundColor = Color.Brown;
                button.Text            = doorState.ToString();
                button.IsEnabled       = false;
                break;

            case SamsungWatchGarage.Integration.Models.DoorState.open:
                button.BackgroundColor = Color.Red;
                button.IsEnabled       = true;
                button.Text            = "Close";
                break;

            case SamsungWatchGarage.Integration.Models.DoorState.closed:
                button.BackgroundColor = Color.Green;
                button.IsEnabled       = true;
                button.Text            = "Open";
                break;
            }
        }
コード例 #3
0
 private async Task SaveDoorStateAsync(string vehicleId, DoorKind kind, DoorState state, CancellationToken cancellation)
 {
     string key      = MakeCacheKey(vehicleId, kind);
     var    stateStr = state.ToString().ToLowerInvariant();
     await cache.SetStringAsync(key, stateStr, cancellation);
 }