private void InitializeAnalytics(DTDPlatform platform) { var targetCredential = Credentials.FirstOrDefault(item => item.Platform == platform); if (targetCredential != null) { Analytics.Initialize(targetCredential.Key, targetCredential.Secret); } }
internal DTDCredentials GetPlatformInfo(DTDPlatform platform) { foreach (DTDCredentials credential in Model.Credentials) { if (credential.Platform == platform) { return(credential); } } DTDCredentials credentials = new DTDCredentials(Model.ActivePlatform, "", ""); Model.Credentials.Add(credentials); return(credentials); }
private void DrawPlatformsList() { EditorGUILayout.BeginVertical(Styles.TopStyle); EditorGUILayout.LabelField("Supported Platforms", Styles.SideLogoStyle); EditorGUILayout.BeginHorizontal(new GUIStyle(GUIStyle.none) { padding = new RectOffset(20, 15, 10, 0) }); Array platforms = Enum.GetValues(typeof(DTDPlatform)); for (int i = 0; i < platforms.Length / 2; i++) { DTDPlatform platform = (DTDPlatform)platforms.GetValue(i); if (GUILayout.Button(platform.ToString(), Styles.PlatformButtonStyle(ViewModel.ActivePlatform == platform))) { ViewModel.ActivePlatform = platform; GUI.FocusControl(""); } } EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(new GUIStyle(GUIStyle.none) { padding = new RectOffset(20, 15, 5, 0) }); for (int i = platforms.Length / 2; i < platforms.Length; i++) { DTDPlatform platform = (DTDPlatform)platforms.GetValue(i); if (GUILayout.Button(platform.ToString(), Styles.PlatformButtonStyle(ViewModel.ActivePlatform == platform))) { ViewModel.ActivePlatform = platform; GUI.FocusControl(""); } } EditorGUILayout.EndHorizontal(); EditorGUILayout.EndVertical(); }
public DTDCredentials(DTDPlatform platform, string key, string secret) { this.Platform = platform; this.Key = key; this.Secret = secret; }
public DTDCredentials() { this.Platform = DTDPlatform.Android; this.Key = string.Empty; this.Secret = string.Empty; }