private void passwordBtn_Click(object sender, EventArgs e) { if (this.passwordStatus == PasswordStatus.NO_PASSWORD) { // set venue password PasswordForm passwordForm = new PasswordForm(); DialogResult dr = passwordForm.ShowDialog(); if (dr == DialogResult.OK) { this.passwordStatus = passwordForm.PWStatus; this.privateVenueState = GetPrivateVenueState(passwordForm.Password); } } else { this.passwordStatus = PasswordStatus.NO_PASSWORD; this.privateVenueState = null; } if (this.passwordStatus == PasswordStatus.NO_PASSWORD) { this.passwordBtn.Text = Strings.SetPassword; } else { this.passwordBtn.Text = Strings.ClearPassword; } }
/// <summary> /// Return all state (client-visible and server-private) associated with /// the complete list of venues. This is used by only by the admin /// program, so the results are not obfucated (IP addresses /// are preserved). /// </summary> /// <returns></returns> public VenueState[] GetVenuesComplete() { this.UpdateFromFile(); ICollection vals = venues.Values; VenueState[] venueArray = new VenueState[vals.Count]; int i = 0; foreach (Venue venue in vals) { PrivateVenueState pvs = this.GetPrivateVenueState(venue.Identifier); VenueState vs = new VenueState(venue, pvs); venueArray[i++] = vs; } return(venueArray); }
public VenueEditor(VenueState venueState) { // // Required for Windows Form Designer support // InitializeComponent(); iconInput.DefaultIcon = defaultVenueIcon; // Show the venue information in the UI Venue venueToEdit = venueState.Venue; this.nameInput.Text = venueToEdit.Name; this.ownerInput.Text = venueToEdit.Identifier; this.ipInput.Text = venueToEdit.IPAddress; this.portInput.Text = venueToEdit.Port.ToString(CultureInfo.InvariantCulture); this.iconInput.IconAsBytes = venueToEdit.Icon; this.newAccessList = venueToEdit.AccessList; this.original = venueToEdit; this.privateVenueState = venueState.PrivateVenueState; this.passwordStatus = venueToEdit.PWStatus; }
public VenueState(Venue venue, PrivateVenueState pvs) { this.privateVenueState = pvs; this.venue = venue; }
public VenueState() { venue = new Venue(); privateVenueState = new PrivateVenueState(); }
public void AddVenue(Venue venue, PrivateVenueState privateVenueState) { AddVenue(new VenueState(venue, privateVenueState)); }