Ejemplo n.º 1
0
        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;
            }
        }
Ejemplo n.º 2
0
        /// <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);
        }
Ejemplo n.º 3
0
        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;
        }
Ejemplo n.º 4
0
        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;
        }
Ejemplo n.º 5
0
 public VenueState(Venue venue, PrivateVenueState pvs)
 {
     this.privateVenueState = pvs;
     this.venue = venue;
 }
Ejemplo n.º 6
0
 public VenueState() 
 {
     venue = new Venue();
     privateVenueState = new PrivateVenueState();
 }
Ejemplo n.º 7
0
 public VenueState(Venue venue, PrivateVenueState pvs)
 {
     this.privateVenueState = pvs;
     this.venue             = venue;
 }
Ejemplo n.º 8
0
 public VenueState()
 {
     venue             = new Venue();
     privateVenueState = new PrivateVenueState();
 }
Ejemplo n.º 9
0
 public void AddVenue(Venue venue, PrivateVenueState privateVenueState)
 {
     AddVenue(new VenueState(venue, privateVenueState));
 }
Ejemplo n.º 10
0
 public void AddVenue(Venue venue, PrivateVenueState privateVenueState)
 {
     AddVenue(new VenueState(venue, privateVenueState));
 }
Ejemplo n.º 11
0
        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;
            }
        }