Пример #1
0
        private void SearchButton_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                if (!((Int32.Parse(MainThread_Number.Text)) > 0 && (Int32.Parse(MainThread_Number.Text)) <= 10))
                {
                    MessageBox.Show("효율은 1부터 10 사이의 숫자여야합니다.");
                    return;
                }
            }
            catch (Exception ex)
            {
                return;
            }
            Dispatcher.Invoke(DispatcherPriority.Normal, new Action(delegate {
                SearchButton.IsEnabled = false;
            }));
            this.Dispatcher.Invoke(
                (ThreadStart)(() => { }), DispatcherPriority.ApplicationIdle);

            //ImageList ImageClass = new ImageList(PixivBrowser, TagTextBox.Text,cookie);

            CollectImage ImageClass;

            try
            {
                if (RadioButton1.IsChecked == true)
                {
                    ImageClass = new CollectImage(Int32.Parse(MainThread_Number.Text), this, Int32.Parse(StartPageTextBox.Text), Int32.Parse(EndPageTextBox.Text), Int32.Parse(BookMarkNumberTextBox.Text)
                                                  , TagTextBox.Text, cookie, FilePath.Text);
                }
                else
                {
                    ImageClass = new CollectImage(Int32.Parse(MainThread_Number.Text), this, Int32.Parse(ImageNumber.Text), Int32.Parse(BookMarkNumberTextBox.Text), TagTextBox.Text, cookie, FilePath.Text);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }
Пример #2
0
        private void SearchButton_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                if (!((Int32.Parse(MainThread_Number.Text)) > 0 && (Int32.Parse(MainThread_Number.Text)) <= 10))
                {
                    MessageBox.Show("효율은 1부터 10 사이의 숫자여야합니다.");
                    return;
                }
            }
            catch(Exception ex)
            {
                return;
            }
            Dispatcher.Invoke(DispatcherPriority.Normal, new Action(delegate{
                SearchButton.IsEnabled = false;
            }));
            this.Dispatcher.Invoke(
               (ThreadStart)(() => { }), DispatcherPriority.ApplicationIdle);

            //ImageList ImageClass = new ImageList(PixivBrowser, TagTextBox.Text,cookie);

            CollectImage ImageClass;
            try
            {
                if (RadioButton1.IsChecked == true) ImageClass = new CollectImage(Int32.Parse(MainThread_Number.Text), this, Int32.Parse(StartPageTextBox.Text), Int32.Parse(EndPageTextBox.Text), Int32.Parse(BookMarkNumberTextBox.Text)
                       , TagTextBox.Text, cookie,FilePath.Text);
                else ImageClass = new CollectImage(Int32.Parse(MainThread_Number.Text),this, Int32.Parse(ImageNumber.Text), Int32.Parse(BookMarkNumberTextBox.Text), TagTextBox.Text, cookie,FilePath.Text);
            }
            catch(Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }