void ReleaseDesignerOutlets() { if (InputLayout != null) { InputLayout.Dispose(); InputLayout = null; } if (PasswordLabel != null) { PasswordLabel.Dispose(); PasswordLabel = null; } if (CatImage != null) { CatImage.Dispose(); CatImage = null; } if (PasswordText != null) { PasswordText.Dispose(); PasswordText = null; } }
void ReleaseDesignerOutlets() { if (InputLayout != null) { InputLayout.Dispose(); InputLayout = null; } if (EmailLabel != null) { EmailLabel.Dispose(); EmailLabel = null; } if (CatImage != null) { CatImage.Dispose(); CatImage = null; } if (EmailText != null) { EmailText.Dispose(); EmailText = null; } }
void Awake() { delayCollapseForSeconds = delayCollapse; parent = this.transform.parent.parent.GetComponent <Field>(); catImage = this.transform.Find("catImage").GetComponent <CatImage>(); board = GameObject.Find("board").GetComponent <Board>(); catImage.gameObject.SetActive(false); }
public async Task CatAsync(EventContext e) { WebClient c = new WebClient(); byte[] b = c.DownloadData("http://random.cat/meow"); string str = Encoding.Default.GetString(b); CatImage cat = JsonConvert.DeserializeObject <CatImage>(str); await e.Channel.SendMessage(cat.File); }
public async Task CatAsync(EventContext e) { WebClient c = new WebClient(); byte[] b = c.DownloadData("http://random.cat/meow"); string str = Encoding.Default.GetString(b); CatImage cat = JsonConvert.DeserializeObject <CatImage>(str); await Utils.Embed .SetTitle("🐱 Kitties!") .SetColor(0.8f, 0.6f, 0.4f) .SetImageUrl(cat.File) .QueueToChannel(e.Channel); }
public async Task CatAsync(IContext e) { using WebClient c = new WebClient(); byte[] b = c.DownloadData("http://aws.random.cat/meow"); string str = Encoding.Default.GetString(b); CatImage cat = JsonConvert.DeserializeObject <CatImage>(str); await new EmbedBuilder() .SetTitle("🐱 Kitties!") .SetColor(0.8f, 0.6f, 0.4f) .SetImage(cat.File) .ToEmbed() .QueueAsync(e, e.GetChannel()); }
public Task CatAsync(EventContext e) { WebClient c = new WebClient(); byte[] b = c.DownloadData("http://aws.random.cat/meow"); string str = Encoding.Default.GetString(b); CatImage cat = JsonConvert.DeserializeObject <CatImage>(str); new EmbedBuilder() .SetTitle("🐱 Kitties!") .SetColor(0.8f, 0.6f, 0.4f) .SetImage(cat.File) .ToEmbed() .QueueToChannel(e.Channel); return(Task.CompletedTask); }
// Insert Add below here public async Task <Response> Add(CatImage image) { var result = await this.PostAsync( $"https://api.thecatapi.com/v1/favourites", JsonSerializer.Serialize( new Dictionary <string, string> { { "image_id", image.Id }, { "sub_id", "uno-client" } }), _defaultHeaders); if (result != null) { return(JsonSerializer.Deserialize <Response>(result)); } return(null); }
void ReleaseDesignerOutlets() { if (CatImage != null) { CatImage.Dispose(); CatImage = null; } if (WelcomeLabel != null) { WelcomeLabel.Dispose(); WelcomeLabel = null; } if (GoToLoginButton != null) { GoToLoginButton.Dispose(); GoToLoginButton = null; } }