Ejemplo n.º 1
0
        private void frm_main_Load(object sender, EventArgs e)
        {
            Boolean success = frm_main.RegisterHotKey(this.Handle, this.GetType().GetHashCode(), 0x0000, 0x42);//Set hotkey as 'b'Boolean success = Form1.RegisterHotKey(this.Handle, this.GetType().GetHashCode(), 0x0000, 0x42);//Set hotkey as 'b'
            this.lbl_1.Focus();
            if(this.settings["serverPort"] == null || this.settings["serverHost"] == null || this.settings["clientPort"] == null)
            {
                this.changeState("full");
                frm_settings f = new frm_settings();
                f.Show();
                MessageBox.Show("Er ontbreken instellingen!");
            }
            else
            {
                Con = new UDPlink(this.settings["serverHost"], Convert.ToInt32(this.settings["serverPort"]), Convert.ToInt32(this.settings["clientPort"]));
                Con.subscribeMatchMaker();
                userH = new userH(this, Con);
                P = new Pipe("OTMPipe");
                P.form = this;
                P.createPipeServer();

                this.KeyPreview = true;
                this.KeyDown += new KeyEventHandler(userH.keyDown);
            }
        }
Ejemplo n.º 2
0
 private void brn_settings_Click(object sender, EventArgs e)
 {
     if (this.formState == "full")
     {
         frm_settings f = new frm_settings();
         f.Show();
     }
     else if(this.formState == "dialing")
     {
         this.changeState("full");
     }
 }