private void textBox1_TextChanged(object sender, EventArgs e) { SingleConnection.send("%" + textBox1.Text); string message = SingleConnection.recv(); this.change_list_view(message); }
private void download() { string str = SingleConnection.recv(); Console.WriteLine(str); this.with_for = true; }
private void FormHandler() { string s = SingleConnection.recv(); Console.WriteLine(s); string[] movie_time_rate_download = s.Split('$'); string movie_time_str = movie_time_rate_download[0]; string movies_rates = movie_time_rate_download[1]; string download_videos = movie_time_rate_download[2]; this.movie_time_dict = convert_movie_time_str_to_dict(movie_time_str); this.movie_rate_dict = convert_movies_rates_str_to_dict(movies_rates); this.download_videos_array = download_videos.Split('&'); Array.Resize(ref this.download_videos_array, this.download_videos_array.Length - 1); }
private void button2_Click(object sender, EventArgs e) { string username = textBox1.Text; string password = textBox2.Text; SingleConnection.send(username + "<&>" + password); string message = SingleConnection.recv(); if (message == "ok") { Select_Video_Form form1 = new Select_Video_Form(); this.Hide(); form1.ShowDialog(); } else { MessageBox.Show(message); } }
private void receive_thread() { string message = SingleConnection.recv(); Console.WriteLine(message); if (message.Equals("finish and open rate")) { if (InvokeRequired) { this.open = false; this.Invoke(new Action(() => { FormHandler1(); })); } } if (message.Equals("closing the thread in buttonsForm and open")) { this.close = false; } else { this.open = false; } }