private void src_Add_Click(object sender, EventArgs e)
        {
            //open add window
            AddForm addWindow = new AddForm();

            //show as modal
            if (addWindow.ShowDialog() == DialogResult.OK)
            {
                ch_mngr.add_Channel("Sources", addWindow.add_Name,
                                    addWindow.add_IP, Convert.ToInt32(addWindow.add_Port));

                addWindow.Close();
            }
            else
            {
                return;
            }

            //update the list
            refresh_ListBoxes();
        }
        private void src_Add_Click(object sender, EventArgs e)
        {
            //no colons allowed
            if (src_nameBox.Text.Contains(":") || src_portBox.Text.Contains(":") || src_ipBox.Text.Contains(":"))
            {
                //
                return;
            }

            //check if ip is in correct format
            try
            {
                IPAddress.Parse(src_ipBox.Text);
            }
            catch (ArgumentNullException s)
            {
                MessageBox.Show(s.Message);
            }
            catch (FormatException f)
            {
                MessageBox.Show(f.Message);
            }

            //check if port is only numbers
            for (int j = 0; j < src_portBox.Text.Length; j++)
            {
                if (!Char.IsNumber(src_portBox.Text, j))
                {
                    return;
                }
            }

            //add to hd stored file
            if (ch_mngr.add_Channel("Sources", src_nameBox.Text, src_ipBox.Text, Convert.ToInt32(src_portBox.Text)))
            {
                //add to list and combo boxes
                src_listBox.Items.Add(src_nameBox.Text);

                for (int j = 0; j < in_combobox_array.Length; j++)
                {
                    //
                    in_combobox_array[j].Items.Add(src_nameBox.Text);
                }
            }
            else
            {
                //clear all lists and reinitialize them
                src_listBox.Items.Clear();

                for (int m = 0; m < ch_mngr.Number_of_Channels("Sources"); m++)
                {
                    src_listBox.Items.Add(ch_mngr.get_Channel_Information("Sources", m, 0));
                }

                for (int j = 0; j < in_combobox_array.Length; j++)
                {
                    //
                    in_combobox_array[j].Items.Clear();

                    for (int k = 0; k < ch_mngr.Number_of_Channels("Sources"); k++)
                    {
                        in_combobox_array[j].Items.Add(ch_mngr.get_Channel_Information("Sources", k, 0));
                    }
                }
            }
        }