Beispiel #1
0
        private void buttonRefresh_Click(object sender, EventArgs e)
        {
            BindingList <DHCPClientDisplayItem> bindingList = new BindingList <DHCPClientDisplayItem>();

            try
            {
                DHCPServerConfigurationList configurationList =
                    DHCPServerConfigurationList.Read(Program.GetConfigurationPath());

                foreach (DHCPServerConfiguration configuration in configurationList)
                {
                    try
                    {
                        DHCPClientInformation clientInformation =
                            DHCPClientInformation.Read(
                                Program.GetClientInfoPath(configuration.Name, configuration.Address));

                        foreach (DHCPClient client in clientInformation.Clients)
                        {
                            bindingList.Add(new DHCPClientDisplayItem(configuration.Name, configuration.Address, client, m_MACTaster.Taste(client.HardwareAddress)));
                        }
                    }
                    catch (Exception)
                    {
                    }
                }
            }
            catch (Exception)
            {
            }

            dataGridView1.AutoGenerateColumns = false;
            dataGridView1.DataSource          = bindingList;
        }
 public FormConfigureOverview(string configurationPath)
 {
     InitializeComponent();
     m_ConfigurationPath = configurationPath;
     m_ConfigurationList = DHCPServerConfigurationList.Read(m_ConfigurationPath);
     dataGridView1.AutoGenerateColumns = false;
     dataGridView1.DataSource          = m_ConfigurationList;
     UpdateButtonStatus();
 }
Beispiel #3
0
        protected override void OnStart(string[] args)
        {
            m_Configuration = DHCPServerConfigurationList.Read(Program.GetConfigurationPath());
            m_Servers       = new List <DHCPServerResurrector>();

            foreach (DHCPServerConfiguration config in m_Configuration)
            {
                m_Servers.Add(new DHCPServerResurrector(config, m_EventLog));
            }
        }