Пример #1
0
        private void mnuAddServer_Click(object sender, EventArgs e)
        {
            var f = new AddEditServerDialog();
            var result = f.ShowDialog();

            if (result == System.Windows.Forms.DialogResult.OK)
            {
                this.queueEvent(MineAction.ACTION_ADD_SERVER, f.ServerName, f.ServerAddress,
                    f.ServerPassword, f.ServerPort);
            }
        }
Пример #2
0
        private void ctxMnuEditServer_Click(object sender, EventArgs e)
        {
            if (clickedNode == null || clickedNode.Tag == null)
                return;

            var f = new AddEditServerDialog(true);
            var server = clickedNode.Tag as MineServer;

            f.ServerAddress = server.Address;
            f.ServerName = server.Name;
            f.ServerPassword = server.RconPassword;
            f.ServerPort = server.Port;

            var result = f.ShowDialog();

            if (result == System.Windows.Forms.DialogResult.OK)
            {
                this.queueEvent(MineAction.ACTION_EDIT_SERVER, f.ServerName, f.ServerAddress,
                    f.ServerPassword, f.ServerPort, server.GUID);
            }
        }