Ejemplo n.º 1
0
 /// <summary>
 /// Reload the Taxonomy tree
 /// </summary>
 internal void ReloadNodes()
 {
     this.Nodes.Clear();
     using (WorkerHelper backgroundworker = new WorkerHelper(GetMMSTree, (this.FindForm() as frmBase).WorkerHelper_ProgressChanged, NodeLoadCompleted))
     {
         backgroundworker.RunWorkerAsync();
     }
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Connect button click handler
        /// </summary>
        /// <param name="sender">sender who invokes this method</param>
        /// <param name="e">Event Arguments</param>
        private void btnConnect_Click(object sender, EventArgs e)
        {
            if (string.Equals(this.btnConnect.Tag.ToString(), "Disconnected", StringComparison.OrdinalIgnoreCase))
            {
                if (txtSiteUrl.Text == string.Empty)
                {
                    MessageBox.Show("Please enter a valied Url!", "RBEI 3M");
                    return;
                }

                else if (txtUsername.Text == string.Empty)
                {
                    MessageBox.Show("Please enter Username!", "RBEI 3M");
                    return;
                }
                else if (ddlSiteType.Text.Equals("", StringComparison.OrdinalIgnoreCase))
                {
                    MessageBox.Show("Please Select Site Type!", "RBEI 3M");
                    return;
                }
                else if (txtPassword.Text == string.Empty)
                {
                    MessageBox.Show("Please enter Password!", "RBEI 3M");
                    return;
                }
                if (txtSiteUrl.Text != string.Empty)
                {
                    string pattern = default(string);
                    pattern = "http(s)?://([\\w+?\\.\\w+])+([a-zA-Z0-9\\~\\!\\@\\#\\$\\%\\^\\&\\*\\(\\)_\\-\\=\\+\\\\\\/\\?\\.\\:\\;\\\'\\,]*)?";
                    if (Regex.IsMatch(txtSiteUrl.Text, pattern) == false)
                    {
                        MessageBox.Show("The url address you have entered is incorrect!.. its not well formated!", "RBEI 3M");
                        return;
                    }
                }
            }

            this.Parent.Enabled = false;
            this.Parent.Cursor = Cursors.WaitCursor;
            isO365 = ddlSiteType.Text.Equals("O365", StringComparison.OrdinalIgnoreCase);
            using (WorkerHelper bgworker = new WorkerHelper(ConnectMMS, (this.FindForm() as frmBase).WorkerHelper_ProgressChanged, UpdateUI))
            {
                bgworker.RunWorkerAsync();
            }
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Sync changes to server
 /// </summary>
 internal void SyncToServer()
 {
     syncStatus.Clear();
     using (WorkerHelper backgroundworker = new WorkerHelper(SyncTreeToServer, (this.FindForm() as frmBase).WorkerHelper_ProgressChanged, SyncTreeToServerCompleted))
     {
         backgroundworker.RunWorkerAsync();
     }
 }