Ejemplo n.º 1
0
        private void buddyListToolStripMenuItem_Click(object sender, EventArgs e)
        {
            buddies_online bo = new buddies_online();

            bo.Owner     = (Form)this;
            bo.MdiParent = this;
            bo.Show();
        }
Ejemplo n.º 2
0
        private void startProgram()
        {
            System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
            Debug.WriteLine(System.Net.ServicePointManager.SecurityProtocol.ToString());
            Invoke((MethodInvoker)async delegate()
            {
                try
                {
                    if (this == null)
                    {
                        return;
                    }

                    if (Handle == null)
                    {
                        return;
                    }

                    if (IsWindow(Handle) == false)
                    {
                        return;
                    }

                    // open fake dial up window
                    dial_up du   = new dial_up();
                    du.Owner     = (Form)this;
                    du.MdiParent = this;
                    du.Show();

                    // wait for dial up to finish
                    if (accForm.tmpLocation == "Dial-Up")
                    {
                        await Task.Delay(TimeSpan.FromSeconds(26));
                    }
                    else
                    {
                        await Task.Delay(TimeSpan.FromSeconds(1));
                    }

                    // open buddies online window
                    if (accForm.tmpUsername != "Guest")
                    {
                        buddies_online bo = new buddies_online();
                        bo.Owner          = (Form)this;
                        bo.MdiParent      = this;
                        bo.Show();
                    }

                    // open home menu
                    home_menu hm = new home_menu();
                    hm.Owner     = (Form)this;
                    hm.MdiParent = this;
                    hm.Show();

                    if (accForm.tmpUsername != "Guest")
                    {
                        checkMail.Enabled = true;
                        checkMail.Start();

                        reloadAddressBarHistory();
                        if (!backgroundWorker1.IsBusy)
                        {
                            backgroundWorker1.RunWorkerAsync();
                        }
                    }

                    signOffBtn.Text = "Sign Off";
                }
                catch
                {
                    return; // object was disposed
                }
            });

            // enable buttons
            internet_btn.Image = Properties.Resources.internet_icon_enabled;
            channels_btn.Image = Properties.Resources.channels_icon_enabled;
            people_btn.Image   = Properties.Resources.people_icon_enabled;
            quotes_btn.Image   = Properties.Resources.quotes_icon_enabled;
            perks_btn.Image    = Properties.Resources.perks_icon_enabled;
            weather_btn.Image  = Properties.Resources.weather_icon_enabled;
            preferencesToolStripMenuItem.Enabled = true; // settings holds email info

            chat.startConnection();
        }