Example #1
0
        /// <summary>
        /// Converts to.
        /// </summary>
        /// <param name="profile">The profile.</param>
        public static WinsConfiguration ValueOf(NetworkProfile profile)
        {
            WinsConfiguration config = new WinsConfiguration();

            config.Enabled         = profile.NetworkCardInfo.WinsEnabled;
            config.PrimaryServer   = profile.NetworkCardInfo.WinsPrimaryServer;
            config.SecondaryServer = profile.NetworkCardInfo.WinsSecondaryServer;

            return(config);
        }
Example #2
0
        /// <summary>
        /// Displays the configuration.
        /// </summary>
        public WinsConfiguration StoreConfiguration()
        {
            WinsConfiguration config = new WinsConfiguration();

            config.Enabled = cbEnabled.Checked;

            if (lstWinsServer.Items.Count > 0)
            {
                config.PrimaryServer   = (string)lstWinsServer.Items[0];
                config.SecondaryServer = (string)lstWinsServer.Items[1];
            }


            return(config);
        }
Example #3
0
        /// <summary>
        /// Displays the configuration.
        /// </summary>
        public void DisplayConfiguration(WinsConfiguration config)
        {
            cbEnabled.Checked = config.Enabled;

            lstWinsServer.Items.Clear();
            if (config.SecondaryServer != null && config.SecondaryServer.Length > 0)
            {
                lstWinsServer.Items.Add(config.SecondaryServer);
            }

            if (config.PrimaryServer != null && config.PrimaryServer.Length > 0)
            {
                lstWinsServer.Items.Add(config.PrimaryServer);
            }
        }