コード例 #1
0
        private void RenameCollectionButton_Click(object sender, EventArgs e)
        {
            Collection       collection = collections[CollectionsListBox.SelectedIndex];
            ChangeCollection form       = new ChangeCollection(collection);

            form.ShowDialog();
            InterplayForServer.UpdateCollection(collection);
            FindCollections();
        }
コード例 #2
0
        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();
        }
コード例 #3
0
        private void AddCollectionButton_Click(object sender, EventArgs e)
        {
            Collection       collection = new Collection();
            ChangeCollection form       = new ChangeCollection(collection);

            form.ShowDialog();
            InterplayForServer.CreateCollection(collection.Name);
            FindCollections();
        }
コード例 #4
0
        private void RenameChannelButton_Click(object sender, EventArgs e)
        {
            Channel       item = channels[ChannelListBox.SelectedIndex];
            ChangeChannel form = new ChangeChannel(item);

            form.ShowDialog();
            InterplayForServer.UpdateChannel(item);
            FindChanels();
        }
コード例 #5
0
        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";
                }
            }
        }
コード例 #6
0
 private void DeleteChannelButton_Click(object sender, EventArgs e)
 {
     InterplayForServer.DeleteChannel(channels[ChannelListBox.SelectedIndex]);
     FindCollections();
 }
コード例 #7
0
 private void FindChanels()
 {
     channels = InterplayForServer.FindChannels(collections[CollectionsListBox.SelectedIndex]);
     ChannelListBox.DataSource = channels;
 }
コード例 #8
0
 private void FindCollections()
 {
     collections = InterplayForServer.FindCollections();
     CollectionsListBox.DataSource = collections;
 }
コード例 #9
0
 private void DeleteCollectionButton_Click(object sender, EventArgs e)
 {
     InterplayForServer.DeleteCollection(collections[CollectionsListBox.SelectedIndex]);
     FindCollections();
 }
コード例 #10
0
        //блокировка главного окна модальным окном регистрации/авторизации

        private void logoutToolStripMenuItem_Click(object sender, EventArgs e)
        {
            string result = InterplayForServer.Logout();

            Authentication();
        }
コード例 #11
0
        private void ChannelListBox_SelectedValueChanged(object sender, EventArgs e)
        {
            Channel news = InterplayForServer.Loadnews(channels[ChannelListBox.SelectedIndex]);

            DisplayHtml(CreateHTML(news));
        }