private void RenameCollectionButton_Click(object sender, EventArgs e) { Collection collection = collections[CollectionsListBox.SelectedIndex]; ChangeCollection form = new ChangeCollection(collection); form.ShowDialog(); InterplayForServer.UpdateCollection(collection); FindCollections(); }
private void AddChannelBox_Click(object sender, EventArgs e) { Channel item = new Channel(); ChangeChannel form = new ChangeChannel(item); form.ShowDialog(); InterplayForServer.CreateChannel(item.Name, item.Url, collections[CollectionsListBox.SelectedIndex]); FindChanels(); }
private void AddCollectionButton_Click(object sender, EventArgs e) { Collection collection = new Collection(); ChangeCollection form = new ChangeCollection(collection); form.ShowDialog(); InterplayForServer.CreateCollection(collection.Name); FindCollections(); }
private void RenameChannelButton_Click(object sender, EventArgs e) { Channel item = channels[ChannelListBox.SelectedIndex]; ChangeChannel form = new ChangeChannel(item); form.ShowDialog(); InterplayForServer.UpdateChannel(item); FindChanels(); }
private void OkButton_Click(object sender, EventArgs e) { string Email = EmailField.Text; string Password = PasswordField.Text; string Confirm = ConfirmField.Text; //Проверка введенных данных if (Email.Length < 4) { ErrorMessage.Text = "Too short login"; return; } if (Password.Length < 4) { ErrorMessage.Text = "Too short password"; return; } if (TypeForm & String.Compare(Password, Confirm) != 0) { ErrorMessage.Text = "Incorrect data"; return; } if (TypeForm) { if (String.Compare(InterplayForServer.Register(Email, Password), "OK") == 0) { MessageBox.Show("Successful registration!!! \n Now authorized"); ChangeType(); EmailField.Text = ""; PasswordField.Text = ""; ConfirmField.Text = ""; } else { ErrorMessage.Text = "Registration error"; } } else { if (String.Compare(InterplayForServer.Authorization(Email, Password), "OK") == 0) { this.Close(); } else { ErrorMessage.Text = "Authorisation error"; } } }
private void DeleteChannelButton_Click(object sender, EventArgs e) { InterplayForServer.DeleteChannel(channels[ChannelListBox.SelectedIndex]); FindCollections(); }
private void FindChanels() { channels = InterplayForServer.FindChannels(collections[CollectionsListBox.SelectedIndex]); ChannelListBox.DataSource = channels; }
private void FindCollections() { collections = InterplayForServer.FindCollections(); CollectionsListBox.DataSource = collections; }
private void DeleteCollectionButton_Click(object sender, EventArgs e) { InterplayForServer.DeleteCollection(collections[CollectionsListBox.SelectedIndex]); FindCollections(); }
//блокировка главного окна модальным окном регистрации/авторизации private void logoutToolStripMenuItem_Click(object sender, EventArgs e) { string result = InterplayForServer.Logout(); Authentication(); }
private void ChannelListBox_SelectedValueChanged(object sender, EventArgs e) { Channel news = InterplayForServer.Loadnews(channels[ChannelListBox.SelectedIndex]); DisplayHtml(CreateHTML(news)); }