public DialogSpaceSelector(BirstService birstService)
        {
            InitializeComponent();

            UserSpace[] spaces = birstService.GetUserSpaces();

            foreach (var space in spaces)
            {
                ListViewItem item = new ListViewItem(space.name);
                item.SubItems.Add(space.owner);
                item.SubItems.Add(space.id);
                item.Tag = space;

                ListViewUserSpaces.Items.Add(item);
            }

            ListViewUserSpaces.Columns[0].Width = -2;
            ListViewUserSpaces.Columns[1].Width = -2;
            ListViewUserSpaces.Columns[2].Width = -2;

            if (ListViewUserSpaces.Items.Count > 0)
            {
                ListViewUserSpaces.SelectedIndices.Add(0);
            }
        }
        private void ButtonLogon_Click(object sender, EventArgs e)
        {
            Cursor c = this.Cursor;

            try
            {
                this.Cursor = Cursors.WaitCursor;
                User        = TextboxUser.Text;
                Password    = TextboxPassword.Text;
                URL         = TextboxURL.Text;
                BirstService _birstService = new BirstService(URL);
                _birstService.Login(TextboxUser.Text, TextboxPassword.Text);
                DialogResult = DialogResult.OK;
                Close();
                Cursor = c;
            }
            catch
            {
                Cursor = c;
                MessageBox.Show(this, "An error has occured when signing in. Please check your credentials.");
            }
        }