Esempio n. 1
0
        private void bypassAllRedirectsToolStripMenuItem_Click(object sender, EventArgs e)
        {
            #if !DEBUG
            if (MessageBox.Show("Replacement of links to redirects with direct links is strongly discouraged, " +
                                "however it could be useful in some circumstances. Are you sure you want to continue?",
                                "Bypass redirects", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) != DialogResult.Yes)
                return;
            #endif

            BackgroundRequest r = new BackgroundRequest();

            Enabled = false;
            r.BypassRedirects(txtEdit.Text, TheSession.Editor.SynchronousEditor.Clone());
            r.Wait();
            Enabled = true;

            txtEdit.Text = (string)r.Result;
        }
Esempio n. 2
0
        private void bypassAllRedirectsToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (MessageBox.Show("Replacement of links to redirects with direct links is strongly discouraged, " +
                "however it could be useful in some circumstances. Are you sure you want to continue?",
                "Bypass redirects", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) != DialogResult.Yes)

                return;

            BackgroundRequest r = new BackgroundRequest();

            Enabled = false;
            r.BypassRedirects(txtEdit.Text);
            while (!r.Done) Application.DoEvents();
            Enabled = true;

            txtEdit.Text = (string)r.Result;
        }