Esempio n. 1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="LOIC.frmMain"/> class.
        /// </summary>
        /// <param name="hive">Whether to enter hive mode.</param>
        /// <param name="hide">Whether to hide the form.</param>
        /// <param name="ircserver">The irc server.</param>
        /// <param name="ircport">The irc port.</param>
        /// <param name="ircchannel">The irc channel.</param>
        public frmMain(bool hive, bool hide, string ircserver, string ircport, string ircchannel)
        {
            InitializeComponent();

            /* Lets try this! */
            bIsHidden = hide;
            if (hide)
            {
                this.WindowState   = FormWindowState.Minimized;
                this.ShowInTaskbar = false;
            }
            else if (!Settings.HasAcceptedEula())
            {
                // Display EULA
                using (Form f = new frmEULA())
                {
                    if (f.ShowDialog(this) != DialogResult.OK)
                    {
                        // Bail out if declined
                        Environment.Exit(0);
                        return;
                    }
                    else
                    {
                        // Save EULA acceptance
                        Settings.SaveAcceptedEula();
                    }
                }
            }
            bKonami = Konami.Check(this);
        }
Esempio n. 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="LOIC.frmMain"/> class.
        /// </summary>
        /// <param name="hive">Whether to enter hive mode.</param>
        /// <param name="hide">Whether to hide the form.</param>
        /// <param name="ircserver">The irc server.</param>
        /// <param name="ircport">The irc port.</param>
        /// <param name="ircchannel">The irc channel.</param>
        public frmMain(bool hive, bool hide, string ircserver, string ircport, string ircchannel)
        {
            InitializeComponent();

            if (hide)
            {
                this.WindowState   = FormWindowState.Minimized;
                this.ShowInTaskbar = false;
            }
            else if (!Settings.HasAcceptedEula())
            {
                // Display EULA
                using (Form f = new frmEULA())
                {
                    if (f.ShowDialog() != DialogResult.OK)
                    {
                        // Bail out if declined
                        Environment.Exit(0);
                        return;
                    }
                    else
                    {
                        // Save EULA acceptance
                        Settings.SaveAcceptedEula();
                    }
                }
            }

            // IRC
            if (ircserver.Length > 0)
            {
                txtIRCserver.Text = ircserver;
            }
            if (ircport.Length > 0)
            {
                txtIRCport.Text = ircport;
            }
            if (ircchannel.Length > 0)
            {
                txtIRCchannel.Text = ircchannel;
            }

            enableHive.Checked  |= hive;
            disableHive.Checked |= !hive;
        }
Esempio n. 3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="LOIC.frmMain"/> class.
        /// </summary>
        /// <param name="hive">Whether to enter hive mode.</param>
        /// <param name="hide">Whether to hide the form.</param>
        /// <param name="ircserver">The irc server.</param>
        /// <param name="ircport">The irc port.</param>
        /// <param name="ircchannel">The irc channel.</param>
        public frmMain(bool hive, bool hide, string ircserver, string ircport, string ircchannel)
        {
            InitializeComponent();

            /* Lets try this! */
            bIsHidden = hide;
            if(hide)
            {
                this.WindowState = FormWindowState.Minimized;
                this.ShowInTaskbar = false;
            }
            else if(!Settings.HasAcceptedEula())
            {
                // Display EULA
                using(Form f = new frmEULA())
                {
                    if(f.ShowDialog(this) != DialogResult.OK) {
                        // Bail out if declined
                        Environment.Exit(0);
                        return;
                    } else {
                        // Save EULA acceptance
                        Settings.SaveAcceptedEula();
                    }
                }
            }

            // IRC
            if(ircserver.Length > 0)
                txtIRCserver.Text = ircserver;
            if(ircport.Length > 0)
                txtIRCport.Text = ircport;
            if(ircchannel.Length > 0)
                txtIRCchannel.Text = ircchannel;

            enableHive.Checked |= hive;
            disableHive.Checked |= !hive;
        }