Beispiel #1
0
        private void cmdGroup_Click(object sender, EventArgs e)
        {
            frmSelectContactConnection frmPickContactConnection = new frmSelectContactConnection();

            frmPickContactConnection.Membership       = _objContact.Membership;
            frmPickContactConnection.AreaOfInfluence  = _objContact.AreaOfInfluence;
            frmPickContactConnection.MagicalResources = _objContact.MagicalResources;
            frmPickContactConnection.MatrixResources  = _objContact.MatrixResources;
            frmPickContactConnection.GroupName        = _objContact.GroupName;
            frmPickContactConnection.Colour           = _objContact.Colour;
            frmPickContactConnection.Free             = _objContact.Free;
            frmPickContactConnection.ShowDialog(this);

            if (frmPickContactConnection.DialogResult == DialogResult.Cancel)
            {
                return;
            }

            // Update the Connection Modifier values.
            _objContact.Membership       = frmPickContactConnection.Membership;
            _objContact.AreaOfInfluence  = frmPickContactConnection.AreaOfInfluence;
            _objContact.MagicalResources = frmPickContactConnection.MagicalResources;
            _objContact.MatrixResources  = frmPickContactConnection.MatrixResources;
            _objContact.GroupName        = frmPickContactConnection.GroupName;
            _objContact.Colour           = frmPickContactConnection.Colour;
            _objContact.Free             = frmPickContactConnection.Free;
            lblGroup.Text = (_objContact.Membership + _objContact.AreaOfInfluence + _objContact.MagicalResources + _objContact.MatrixResources).ToString();

            if (_objContact.Colour.Name != "White" && _objContact.Colour.Name != "Black")
            {
                this.BackColor = _objContact.Colour;
            }
            else
            {
                this.BackColor = SystemColors.Control;
            }

            ConnectionGroupRatingChanged(this);
        }
        private void cmdGroup_Click(object sender, EventArgs e)
        {
            frmSelectContactConnection frmPickContactConnection = new frmSelectContactConnection();
            frmPickContactConnection.Membership = _objContact.Membership;
            frmPickContactConnection.AreaOfInfluence = _objContact.AreaOfInfluence;
            frmPickContactConnection.MagicalResources = _objContact.MagicalResources;
            frmPickContactConnection.MatrixResources = _objContact.MatrixResources;
            frmPickContactConnection.GroupName = _objContact.GroupName;
            frmPickContactConnection.Colour = _objContact.Colour;
            frmPickContactConnection.Free = _objContact.Free;
            frmPickContactConnection.ShowDialog(this);

            if (frmPickContactConnection.DialogResult == DialogResult.Cancel)
                return;

            // Update the Connection Modifier values.
            _objContact.Membership = frmPickContactConnection.Membership;
            _objContact.AreaOfInfluence = frmPickContactConnection.AreaOfInfluence;
            _objContact.MagicalResources = frmPickContactConnection.MagicalResources;
            _objContact.MatrixResources = frmPickContactConnection.MatrixResources;
            _objContact.GroupName = frmPickContactConnection.GroupName;
            _objContact.Colour = frmPickContactConnection.Colour;
            _objContact.Free = frmPickContactConnection.Free;

            if (_objContact.Colour.Name != "White" && _objContact.Colour.Name != "Black")
                this.BackColor = _objContact.Colour;
            else
                this.BackColor = SystemColors.Control;

            ConnectionGroupRatingChanged(this);
        }