using System;
using System.IO;
using System.Net;
using System.Windows.Forms;
//using System.Text;

namespace MioStar_GUI
{
    class DonateRequest : Form
    {
        private Button ButtonNever;
        private Button Always;
        private WebBrowser WebBrowser;
        private Panel panel1;
        private Button ButtonClose;
 

        public DonateRequest()
        {
            InitializeComponent();
        }

        public static void SendRequest(string pURL)
        {
            WebBrowser lBrowser = new WebBrowser();

            lBrowser.Name = "WebBrowser";
            lBrowser.ScriptErrorsSuppressed = true;
            lBrowser.Visible = false;
            lBrowser.Navigate(pURL);
        }


        private void InitializeComponent()
        {
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(DonateRequest));
            this.ButtonNever = new System.Windows.Forms.Button();
            this.Always = new System.Windows.Forms.Button();
            this.ButtonClose = new System.Windows.Forms.Button();
            this.WebBrowser = new System.Windows.Forms.WebBrowser();
            this.panel1 = new System.Windows.Forms.Panel();
            this.panel1.SuspendLayout();
            this.SuspendLayout();
            // 
            // ButtonNever
            // 
            this.ButtonNever.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.ButtonNever.Location = new System.Drawing.Point(16, 276);
            this.ButtonNever.Name = "ButtonNever";
            this.ButtonNever.Size = new System.Drawing.Size(75, 23);
            this.ButtonNever.TabIndex = 1;
            this.ButtonNever.TabStop = false;
            this.ButtonNever.Text = "Never";
            this.ButtonNever.UseVisualStyleBackColor = true;
            this.ButtonNever.Click += new System.EventHandler(this.ButtonNever_Click);
            // 
            // Always
            // 
            this.Always.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.Always.Location = new System.Drawing.Point(97, 276);
            this.Always.Name = "Always";
            this.Always.Size = new System.Drawing.Size(75, 23);
            this.Always.TabIndex = 2;
            this.Always.Text = "Always";
            this.Always.UseVisualStyleBackColor = true;
            this.Always.Click += new System.EventHandler(this.Always_Click);
            // 
            // ButtonClose
            // 
            this.ButtonClose.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.ButtonClose.Location = new System.Drawing.Point(246, 276);
            this.ButtonClose.Name = "ButtonClose";
            this.ButtonClose.Size = new System.Drawing.Size(75, 23);
            this.ButtonClose.TabIndex = 3;
            this.ButtonClose.TabStop = false;
            this.ButtonClose.Text = "Close";
            this.ButtonClose.UseVisualStyleBackColor = true;
            this.ButtonClose.Click += new System.EventHandler(this.ButtonClose_Click);
            // 
            // WebBrowser
            // 
            this.WebBrowser.Location = new System.Drawing.Point(3, 3);
            this.WebBrowser.MinimumSize = new System.Drawing.Size(20, 20);
            this.WebBrowser.Name = "WebBrowser";
            this.WebBrowser.ScriptErrorsSuppressed = true;
            this.WebBrowser.ScrollBarsEnabled = false;
            this.WebBrowser.Size = new System.Drawing.Size(307, 247);
            this.WebBrowser.TabIndex = 4;
            this.WebBrowser.TabStop = false;
            this.WebBrowser.Url = new System.Uri("http://www.megapanzer.com/DonateRequest/miostar.php", System.UriKind.Absolute);
            this.WebBrowser.WebBrowserShortcutsEnabled = false;
            // 
            // panel1
            // 
            this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
            this.panel1.Controls.Add(this.WebBrowser);
            this.panel1.Location = new System.Drawing.Point(13, 13);
            this.panel1.Name = "panel1";
            this.panel1.Size = new System.Drawing.Size(317, 257);
            this.panel1.TabIndex = 5;
            // 
            // DonateRequest
            // 
            this.ClientSize = new System.Drawing.Size(342, 311);
            this.Controls.Add(this.panel1);
            this.Controls.Add(this.ButtonClose);
            this.Controls.Add(this.Always);
            this.Controls.Add(this.ButtonNever);
            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
            this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
            this.MaximizeBox = false;
            this.Name = "DonateRequest";
            this.Text = "  MioStar";
            this.panel1.ResumeLayout(false);
            this.ResumeLayout(false);

        }

        private void ButtonNever_Click(object sender, EventArgs e)
        {
            RegFUnctions.SetValue("DonateRequest", "0");
            Dispose();
        }

        private void Always_Click(object sender, EventArgs e)
        {
            RegFUnctions.SetValue("DonateRequest", "1");
            Dispose();
        }

        private void ButtonClose_Click(object sender, EventArgs e)
        {
            Dispose();
        }
    }




}