Exemplo n.º 1
0
        private void addSavedServer_Click(object sender, EventArgs e)
        {
            addServerDialog addServer = new addServerDialog();
            addServer.Location = new Point(Cursor.Position.X, Cursor.Position.Y);
            addServer.ShowDialog();

            if (addServer.DialogResult == System.Windows.Forms.DialogResult.OK)
            {
                RCON newServer = new IW4Rcon(addServer.serverIPBox.Text, ushort.Parse(addServer.serverPortBox.Text), addServer.serverPasswordBox.Text);
                savedServers.Items.Add(newServer);
                Serialize.Save(newServer);
            }

            addServer.Close();
            addServer.Dispose();
        }
Exemplo n.º 2
0
        private void addSavedServer_Click(object sender, EventArgs e)
        {
            addServerDialog addServer = new addServerDialog();

            addServer.Location = new Point(Cursor.Position.X, Cursor.Position.Y);
            addServer.ShowDialog();

            if (addServer.DialogResult == System.Windows.Forms.DialogResult.OK)
            {
                RCON newServer = new IW4Rcon(addServer.serverIPBox.Text, ushort.Parse(addServer.serverPortBox.Text), addServer.serverPasswordBox.Text);
                savedServers.Items.Add(newServer);
                Serialize.Save(newServer);
            }

            addServer.Close();
            addServer.Dispose();
        }