async void SendMessage_Line() { if (IFTTT_path != string.Empty) { if (Pin_Queue.Count > 0) { bool Sending = false; LineNotify ln = new LineNotify(IFTTT_path); Slide Send = Pin_Queue[0]; Pin_Queue.Remove(Send); Sending = await ln.SendMessageAsync(Send.Returns); if (!Sending) { richTextBox1.SelectionColor = Color.Red; richTextBox1.AppendText("傳送失敗" + Environment.NewLine); } else { richTextBox1.SelectionColor = Color.Green; richTextBox1.AppendText("傳送成功" + Environment.NewLine); } } } }
private async void RefreshLineStatus(string path) { Line = new LineNotify(path); bool Service = await Line.CheckStatus(); if (Service) { label4.Text = "已連線"; label4.ForeColor = Color.Green; } else { label4.Text = "尚未連線"; label4.ForeColor = Color.Red; } ini ireader = new ini(); ireader.IniWriteValue("SystemInfo", "IFTTT", path, Systemini); }