using System; using System.Net; using System.Net.Sockets; namespace go01 { partial class CreerPartieReseau_serv { public string GetLocalIPAddress() { var host = Dns.GetHostEntry(Dns.GetHostName()); foreach (var ip in host.AddressList) { if (ip.AddressFamily == AddressFamily.InterNetwork) { return ip.ToString(); } } throw new Exception("No network adapters with an IPv4 address in the system!"); } /// /// Required designer variable. /// private System.ComponentModel.IContainer components = null; /// /// Clean up any resources being used. /// /// true if managed resources should be disposed; otherwise, false. protected override void Dispose(bool disposing) { if (disposing && (components != null)) { components.Dispose(); } base.Dispose(disposing); } #region Windows Form Designer generated code /// /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// private void InitializeComponent() { this.tbUid = new System.Windows.Forms.TextBox(); this.lblUid = new System.Windows.Forms.Label(); this.lblIp = new System.Windows.Forms.Label(); this.tbIp = new System.Windows.Forms.TextBox(); this.lblNomPartie = new System.Windows.Forms.Label(); this.tbPartName = new System.Windows.Forms.TextBox(); this.tbNomJoeur = new System.Windows.Forms.TextBox(); this.lblNomJoeur = new System.Windows.Forms.Label(); this.btnCreatePart = new System.Windows.Forms.Button(); this.tbTaille = new System.Windows.Forms.TextBox(); this.lblTaille = new System.Windows.Forms.Label(); this.tbPionaAligner = new System.Windows.Forms.TextBox(); this.label2 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label(); this.cbNic = new System.Windows.Forms.ComboBox(); this.lblPort = new System.Windows.Forms.Label(); this.tbPort = new System.Windows.Forms.TextBox(); this.SuspendLayout(); // // tbUid // this.tbUid.Enabled = false; this.tbUid.Location = new System.Drawing.Point(45, 12); this.tbUid.Name = "tbUid"; this.tbUid.ReadOnly = true; this.tbUid.Size = new System.Drawing.Size(198, 20); this.tbUid.TabIndex = 1; this.tbUid.Text = "f89cf97049ed4e33925d712ec38890b6"; // // lblUid // this.lblUid.AutoSize = true; this.lblUid.Location = new System.Drawing.Point(13, 15); this.lblUid.Name = "lblUid"; this.lblUid.Size = new System.Drawing.Size(26, 13); this.lblUid.TabIndex = 10; this.lblUid.Text = "UID"; // // lblIp // this.lblIp.AutoSize = true; this.lblIp.Location = new System.Drawing.Point(350, 15); this.lblIp.Name = "lblIp"; this.lblIp.Size = new System.Drawing.Size(17, 13); this.lblIp.TabIndex = 16; this.lblIp.Text = "IP"; // // tbIp // this.tbIp.Enabled = false; this.tbIp.Location = new System.Drawing.Point(278, 38); this.tbIp.Name = "tbIp"; this.tbIp.ReadOnly = true; this.tbIp.Size = new System.Drawing.Size(152, 20); this.tbIp.TabIndex = 3; // // lblNomPartie // this.lblNomPartie.AutoSize = true; this.lblNomPartie.Location = new System.Drawing.Point(12, 100); this.lblNomPartie.Name = "lblNomPartie"; this.lblNomPartie.Size = new System.Drawing.Size(59, 13); this.lblNomPartie.TabIndex = 12; this.lblNomPartie.Text = "Nom Partie"; // // tbPartName // this.tbPartName.Location = new System.Drawing.Point(89, 97); this.tbPartName.Name = "tbPartName"; this.tbPartName.Size = new System.Drawing.Size(154, 20); this.tbPartName.TabIndex = 5; // // tbNomJoeur // this.tbNomJoeur.Location = new System.Drawing.Point(326, 97); this.tbNomJoeur.Name = "tbNomJoeur"; this.tbNomJoeur.Size = new System.Drawing.Size(154, 20); this.tbNomJoeur.TabIndex = 6; // // lblNomJoeur // this.lblNomJoeur.AutoSize = true; this.lblNomJoeur.Location = new System.Drawing.Point(249, 100); this.lblNomJoeur.Name = "lblNomJoeur"; this.lblNomJoeur.Size = new System.Drawing.Size(55, 13); this.lblNomJoeur.TabIndex = 15; this.lblNomJoeur.Text = "Nom joeur"; // // btnCreatePart // this.btnCreatePart.Location = new System.Drawing.Point(15, 160); this.btnCreatePart.Name = "btnCreatePart"; this.btnCreatePart.Size = new System.Drawing.Size(465, 23); this.btnCreatePart.TabIndex = 9; this.btnCreatePart.Text = "Creer partie"; this.btnCreatePart.UseVisualStyleBackColor = true; this.btnCreatePart.Click += new System.EventHandler(this.btnCreatePart_Click); // // tbTaille // this.tbTaille.Location = new System.Drawing.Point(90, 123); this.tbTaille.Name = "tbTaille"; this.tbTaille.Size = new System.Drawing.Size(154, 20); this.tbTaille.TabIndex = 7; // // lblTaille // this.lblTaille.AutoSize = true; this.lblTaille.Location = new System.Drawing.Point(13, 126); this.lblTaille.Name = "lblTaille"; this.lblTaille.Size = new System.Drawing.Size(32, 13); this.lblTaille.TabIndex = 13; this.lblTaille.Text = "Taille"; // // tbPionaAligner // this.tbPionaAligner.Location = new System.Drawing.Point(326, 123); this.tbPionaAligner.Name = "tbPionaAligner"; this.tbPionaAligner.Size = new System.Drawing.Size(154, 20); this.tbPionaAligner.TabIndex = 8; // // label2 // this.label2.AutoSize = true; this.label2.Location = new System.Drawing.Point(250, 126); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(71, 13); this.label2.TabIndex = 14; this.label2.Text = "Pion à aligner"; // // label1 // this.label1.AutoSize = true; this.label1.Location = new System.Drawing.Point(13, 42); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(25, 13); this.label1.TabIndex = 11; this.label1.Text = "NIC"; // // cbNic // this.cbNic.FormattingEnabled = true; this.cbNic.Location = new System.Drawing.Point(45, 39); this.cbNic.Name = "cbNic"; this.cbNic.Size = new System.Drawing.Size(198, 21); this.cbNic.TabIndex = 2; this.cbNic.SelectedIndexChanged += new System.EventHandler(this.cbNic_SelectedIndexChanged); // // lblPort // this.lblPort.AutoSize = true; this.lblPort.Location = new System.Drawing.Point(443, 15); this.lblPort.Name = "lblPort"; this.lblPort.Size = new System.Drawing.Size(26, 13); this.lblPort.TabIndex = 0; this.lblPort.Text = "Port"; // // tbPort // this.tbPort.Location = new System.Drawing.Point(436, 38); this.tbPort.Name = "tbPort"; this.tbPort.Size = new System.Drawing.Size(42, 20); this.tbPort.TabIndex = 4; this.tbPort.Text = "9999"; // // CreerPartieReseau_serv // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(490, 193); this.Controls.Add(this.tbPort); this.Controls.Add(this.lblPort); this.Controls.Add(this.cbNic); this.Controls.Add(this.label1); this.Controls.Add(this.tbPionaAligner); this.Controls.Add(this.label2); this.Controls.Add(this.tbTaille); this.Controls.Add(this.lblTaille); this.Controls.Add(this.btnCreatePart); this.Controls.Add(this.tbNomJoeur); this.Controls.Add(this.lblNomJoeur); this.Controls.Add(this.tbPartName); this.Controls.Add(this.lblNomPartie); this.Controls.Add(this.lblIp); this.Controls.Add(this.tbIp); this.Controls.Add(this.lblUid); this.Controls.Add(this.tbUid); this.Name = "CreerPartieReseau_serv"; this.Text = "CreerPartieReseau_serv"; this.ResumeLayout(false); this.PerformLayout(); } #endregion private System.Windows.Forms.TextBox tbUid; private System.Windows.Forms.Label lblUid; private System.Windows.Forms.Label lblIp; private System.Windows.Forms.TextBox tbIp; private System.Windows.Forms.Label lblNomPartie; private System.Windows.Forms.TextBox tbPartName; private System.Windows.Forms.TextBox tbNomJoeur; private System.Windows.Forms.Label lblNomJoeur; private System.Windows.Forms.Button btnCreatePart; private System.Windows.Forms.TextBox tbTaille; private System.Windows.Forms.Label lblTaille; private System.Windows.Forms.TextBox tbPionaAligner; private System.Windows.Forms.Label label2; private System.Windows.Forms.Label label1; private System.Windows.Forms.ComboBox cbNic; private System.Windows.Forms.Label lblPort; private System.Windows.Forms.TextBox tbPort; } }