Пример #1
0
        public Form_AddPost(preposts prPost)
        {
            InitializeComponent();

            Program.statusBarGlobal.onChangeDescription += StatusBarGlobal_onChangeDescription;
            Program.statusBarGlobal.onChangeMessage     += StatusBarGlobal_onChangeMessage;
            Program.statusBarGlobal.onChangeProgress    += StatusBarGlobal_onChangeProgress;

            post = new Post(prPost);

            textBox_NamePost.Text = post.Name;

            textBox_TorrentFile.Text         = post.TorrentPath;
            openFileDialog1.InitialDirectory = Path.GetDirectoryName(post.TorrentPath);

            imgsSlider = new Slider <string>(post.Imgs.AllCollection);
            imgsSlider.onChangeSlide += ImgsSlider_onChangeImg;
            imgsSlider.Initialize();

            textBox_Description.Text = post.Description;

            spoilerSlider = new Slider <SpoilersItem>(post.Spoilers);
            spoilerSlider.onChangeSlide += SpoilerSlider_onChangeSlide;
            spoilerSlider.Initialize();

            searchStr = new SearchStr(post.Name);
            searchStr.onChangeName    += SearchStr_onChangeName;
            textBox_SearchProgram.Text = searchStr.ShortName;

            dataGridView_Search.DataSource         = SearchList.UpdateProgramsGrid(textBox_SearchProgram.Text);
            dataGridView_Search.Columns[0].Visible = false;
        }
Пример #2
0
 private void SearchStr_onChangeName(object sender, EventArgs e)
 {
     textBox_SearchProgram.Text     = searchStr.ShortName;
     dataGridView_Search.DataSource = SearchList.UpdateProgramsGrid(textBox_SearchProgram.Text);
 }
Пример #3
0
 private void Form_AddProgram_FormClosed(object sender, FormClosedEventArgs e)
 {
     dataGridView_Search.DataSource = SearchList.UpdateProgramsGrid(textBox_SearchProgram.Text);
 }