private void ok_button_Click(object sender, EventArgs e)
        {
            ok_button.Enabled = false;
            Scanner scanner = new Scanner(new Credential(username_textbox.Text, password_textbox.Text));
            scanner.global_handler += this.HandleEvent;

            List<List<string>> data = new List<List<string>>();
            data.Add(new List<string>(new string[] { "Server", "Volume", "Capacity", "Free Space" }));
            List<string> servers = new RDGReader("nksd_servers.rdg").read("name");
            foreach (string server in servers)
            {
                data = data.Concat(scanner.scan(server)).ToList();
            }
            new XLSWriter("Server Spaces.xlsx").overwrite(data);
            Hide();

            string message = "Operation complete.";
            if (scanner.getErrors().Count() > 0)
            {
                message += "\n\nCannot connect to:";
                foreach (string server in scanner.getErrors())
                {
                    message += "\n" + server;
                }
            }
            MessageBox.Show(message);

            System.Diagnostics.Process.Start(@"Server Spaces.xlsx");
            Close();
        }
        private void ok_button_Click(object sender, EventArgs e)
        {
            ok_button.Enabled = false;
            Scanner scanner = new Scanner(new Credential(username_textbox.Text, password_textbox.Text));

            scanner.global_handler += this.HandleEvent;

            List <List <string> > data = new List <List <string> >();

            data.Add(new List <string>(new string[] { "Server", "Volume", "Capacity", "Free Space" }));
            List <string> servers = new RDGReader("nksd_servers.rdg").read("name");

            foreach (string server in servers)
            {
                data = data.Concat(scanner.scan(server)).ToList();
            }
            new XLSWriter("Server Spaces.xlsx").overwrite(data);
            Hide();


            string message = "Operation complete.";

            if (scanner.getErrors().Count() > 0)
            {
                message += "\n\nCannot connect to:";
                foreach (string server in scanner.getErrors())
                {
                    message += "\n" + server;
                }
            }
            MessageBox.Show(message);

            System.Diagnostics.Process.Start(@"Server Spaces.xlsx");
            Close();
        }