ExecuteWorker() public method

public ExecuteWorker ( System.Action funcToRun ) : void
funcToRun System.Action
return void
 private void BTN_ChangeOwner_Click(object sender, EventArgs e)
 {
     if (LV_Projects.SelectedItems.Count <= 0 || LV_EnterpiseResources.SelectedItems.Count <= 0) return;
     _bgeProject = new BackgroundExecutorWithStatus(TB_Status, "Updating Project owner of the selected project");
     _bgws.Add(_bgeProject);
     _bgeProject.ExecuteWorker(UpdateProjectOwner);
 }
Example #2
0
        private void LoadCustomFields()
        {
            BackgroundExecutorWithStatus bgeCustomFields = new BackgroundExecutorWithStatus(TB_Status, "Querying for Enterprise Custom Fields");

            _bgws.Add(bgeCustomFields);
            bgeCustomFields.ExecuteWorker(LoadCustomFieldsList);
        }
 private void CB_ProjectList_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (CB_ProjectList.SelectedIndex == 0)
     {
         DGV_Tasks.Columns.Clear();
         DGV_Tasks.DataSource         = null;
         DGV_Tasks.AllowUserToAddRows = false;
         DGV_Assignments.Columns.Clear();
         DGV_Assignments.DataSource         = null;
         DGV_Assignments.AllowUserToAddRows = false;
         DGV_Resources.Columns.Clear();
         DGV_Resources.DataSource         = null;
         DGV_Resources.AllowUserToAddRows = false;
         DGV_Project.Columns.Clear();
         DGV_Project.DataSource         = null;
         DGV_Project.AllowUserToAddRows = false;
         TP_Tasks.Text       = "Tasks";
         TP_Assignments.Text = "Assignments";
         TP_Resources.Text   = "Resources";
     }
     else
     {
         _beProjectLoad = new BackgroundExecutorWithStatus(TB_Status, "Querying for Project info");
         _beProjectLoad.ExecuteWorker(LoadProjectInfo);
     }
 }
Example #4
0
        private void CheckInCheckOutSelectedProjects()
        {
            string statusText = _checkin ? "Checking in Enterprise Projects" : "Checking out Enterprise Projects";

            _backgroundExecutorWithStatus = new BackgroundExecutorWithStatus(TB_Status, statusText);
            _backgroundExecutorWithStatus.ExecuteWorker(CheckInCheckoutProjects);
        }
 private void BTN_Publish_Click(object sender, EventArgs e)
 {
     if (_publishedProject == null)
     {
         return;
     }
     _backgroundExecutorWithStatus = new BackgroundExecutorWithStatus(TB_Status, "Publishing project " + _publishedProject.Draft.Name);
     _backgroundExecutorWithStatus.ExecuteWorker(PublishProject);
 }
 private void BTN_RemoveResources_Click(object sender, EventArgs e)
 {
     if (LV_Projects.SelectedItems.Count <= 0 || LV_ProjectResources.SelectedItems.Count <= 0)
     {
         return;
     }
     _bgeRemoveProjectResources = new BackgroundExecutorWithStatus(TB_Status, "Removing Project Resources on the selected Project");
     _bgws.Add(_bgeRemoveProjectResources);
     _bgeRemoveProjectResources.ExecuteWorker(RemoveResources);
 }
Example #7
0
 private void BTN_ChangeOwner_Click(object sender, EventArgs e)
 {
     if (LV_Projects.SelectedItems.Count <= 0 || LV_EnterpiseResources.SelectedItems.Count <= 0)
     {
         return;
     }
     _bgeProject = new BackgroundExecutorWithStatus(TB_Status, "Updating Project owner of the selected project");
     _bgws.Add(_bgeProject);
     _bgeProject.ExecuteWorker(UpdateProjectOwner);
 }
 private void BTN_AddResources_Click(object sender, EventArgs e)
 {
     if (LV_Projects.SelectedItems.Count <= 0)
     {
         return;
     }
     _bgeAddResourcesToProject = new BackgroundExecutorWithStatus(TB_Status, "Adding Enterprise resources to the selected project");
     _bgws.Add(_bgeAddResourcesToProject);
     _bgeAddResourcesToProject.ExecuteWorker(AddResourcesToProject);
 }
        private void LV_Projects_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (LV_Projects.SelectedItems.Count <= 0)
            {
                return;
            }
            BackgroundExecutorWithStatus bgeProjectResources = new BackgroundExecutorWithStatus(TB_Status, "Querying for Project Resources on the selected Project");

            _bgws.Add(bgeProjectResources);
            bgeProjectResources.ExecuteWorker(GetDraftTeamForSelectedProject);
        }
Example #10
0
        private void Btn_Login_Click(object sender, EventArgs e)
        {
            Settings.Default.Url = TB_Url.Text;
            Settings.Default.UserName = TB_UserName.Text;
            Settings.Default.WindowsAuthenticationMode = RB_Windows.Checked;
            Settings.Default.ProjectOnLine = CB_Online.Checked;
            Settings.Default.Save();

            _bge = new BackgroundExecutorWithStatus(LBL_Status, "Authenticating");
            _bge.ExecuteWorker(LoginProjectServer);
        }
Example #11
0
        private void Btn_Login_Click(object sender, EventArgs e)
        {
            Settings.Default.Url      = TB_Url.Text;
            Settings.Default.UserName = TB_UserName.Text;
            Settings.Default.WindowsAuthenticationMode = RB_Windows.Checked;
            Settings.Default.ProjectOnLine             = CB_Online.Checked;
            Settings.Default.Save();

            _bge = new BackgroundExecutorWithStatus(LBL_Status, "Authenticating");
            _bge.ExecuteWorker(LoginProjectServer);
        }
        private void LoadProjectsAndResources()
        {
            BackgroundExecutorWithStatus bgeProject  = new BackgroundExecutorWithStatus(TB_Status, "Querying for all projects");
            BackgroundExecutorWithStatus bgeResource = new BackgroundExecutorWithStatus(TB_Status, "Querying for all Enterprise Resources");

            _bgws.Add(bgeProject);
            _bgws.Add(bgeResource);

            bgeProject.ExecuteWorker(GetDraftProjectsList);
            bgeResource.ExecuteWorker(GetEnterpriseResourcesList);
            Log.WriteVerbose(new SourceInfo(), "Loading Projects and Enterprise resources.");
        }
        private void CustomFieldsCreation_Load(object sender, EventArgs e)
        {
            CB_Type.DataSource   = Enum.GetValues(typeof(CustomFieldType));
            CB_Type.SelectedItem = CustomFieldType.TEXT;

            Dictionary <string, EntityType> entityType = new Dictionary <string, EntityType>
            {
                { "Task", ProjContext.EntityTypes.TaskEntity },
                { "Resource", ProjContext.EntityTypes.ResourceEntity },
                { "Project", ProjContext.EntityTypes.ProjectEntity }
            };

            CB_EntityType.DataSource    = new BindingSource(entityType, null);
            CB_EntityType.DisplayMember = "Key";
            CB_EntityType.ValueMember   = "Value";
            CB_EntityType.SelectedIndex = 2;

            _backgroundExecutorWithStatus = new BackgroundExecutorWithStatus(TB_Status, "Loading LookupTables");
            _backgroundExecutorWithStatus.ExecuteWorker(LoadLookupTables);
        }
 private void DeleteSelectedCustomFields()
 {
     _bgeCustomFieldsDelete = new BackgroundExecutorWithStatus(TB_Status, "Deleting Enterprise Custom Fields");
     _bgws.Add(_bgeCustomFieldsDelete);
     _bgeCustomFieldsDelete.ExecuteWorker(DeleteCustomFields);
 }
 private void BTN_Create_Click(object sender, EventArgs e)
 {
     BackgroundExecutorWithStatus bews = new BackgroundExecutorWithStatus(TB_Status, "Creating CustomFields");
     bews.ExecuteWorker(CreateCustomFields);
 }
 private void BTN_Create_Click(object sender, EventArgs e)
 {
     _backgroundExecutorWithStatus = new BackgroundExecutorWithStatus(TB_Status, "Creating Enterprise Resources");
     _backgroundExecutorWithStatus.ExecuteWorker(CreateResources);
 }
 private void BTN_Create_Click(object sender, EventArgs e)
 {
     _backgroundExecutorWithStatus = new BackgroundExecutorWithStatus(TB_Status, "Creating Enterprise Resources");
     _backgroundExecutorWithStatus.ExecuteWorker(CreateResources);
 }
 private void BTN_AddResources_Click(object sender, EventArgs e)
 {
     if (LV_Projects.SelectedItems.Count <= 0) return;
     _bgeAddResourcesToProject = new BackgroundExecutorWithStatus(TB_Status, "Adding Enterprise resources to the selected project");
     _bgws.Add(_bgeAddResourcesToProject);
     _bgeAddResourcesToProject.ExecuteWorker(AddResourcesToProject);
 }
 private void LoadLookupTables()
 {
     BackgroundExecutorWithStatus bgeLookupTables = new BackgroundExecutorWithStatus(TB_Status, "Querying for Enterprise LookupTables");
     _bgws.Add(bgeLookupTables);
     bgeLookupTables.ExecuteWorker(LoadLookupTablesList);
 }
 private void DeleteSelectedResources()
 {
     _bgeResourcesDelete = new BackgroundExecutorWithStatus(TB_Status, "Deleting Enterprise Resources");
     _bgws.Add(_bgeResourcesDelete);
     _bgeResourcesDelete.ExecuteWorker(DeleteResources);
 }
        private void LoadProjectsAndResources()
        {
            BackgroundExecutorWithStatus bgeProject = new BackgroundExecutorWithStatus(TB_Status, "Querying for all projects");
            BackgroundExecutorWithStatus bgeResource = new BackgroundExecutorWithStatus(TB_Status, "Querying for all Enterprise Resources");

            _bgws.Add(bgeProject);
            _bgws.Add(bgeResource);

            bgeProject.ExecuteWorker(GetDraftProjectsList);
            bgeResource.ExecuteWorker(GetEnterpriseResourcesList);
            Log.WriteVerbose(new SourceInfo(), "Loading Projects and Enterprise resources.");
        }
Example #22
0
 private void CheckInSelectedResources()
 {
     _backgroundExecutorWithStatus = new BackgroundExecutorWithStatus(TB_Status, "Checking in Enterprise Resources");
     _backgroundExecutorWithStatus.ExecuteWorker(CheckInResources);
 }
 private void LoadCalendars()
 {
     _bgeCalendars = new BackgroundExecutorWithStatus(TB_Status, "Querying for Enterprise Calendars");
     _bgws.Add(_bgeCalendars);
     _bgeCalendars.ExecuteWorker(LoadCalendarsList);
 }
 private void LoadProjects()
 {
     _backgroundExecutorWithStatus = new BackgroundExecutorWithStatus(TB_Status, "Querying for all Enterprise projects");
     _backgroundExecutorWithStatus.ExecuteWorker(LoadProjectsList);
 }
 private void PublishSelectedProjects()
 {
     _backgroundExecutorWithStatus = new BackgroundExecutorWithStatus(TB_Status, "Publishing Enterprise Projects");
     _backgroundExecutorWithStatus.ExecuteWorker(PublishProjects);
 }
 private void LoadResources()
 {
     _bgeResource = new BackgroundExecutorWithStatus(TB_Status, "Querying for all Enterprise Resources");
     _bgws.Add(_bgeResource);
     _bgeResource.ExecuteWorker(LoadResourcesList);
 }
        private void CustomFieldsCreation_Load(object sender, EventArgs e)
        {
            CB_Type.DataSource = Enum.GetValues(typeof(CustomFieldType));
            CB_Type.SelectedItem = CustomFieldType.TEXT;

            Dictionary<string, EntityType> entityType = new Dictionary<string, EntityType>
            {
                {"Task", ProjContext.EntityTypes.TaskEntity},
                {"Resource", ProjContext.EntityTypes.ResourceEntity},
                {"Project", ProjContext.EntityTypes.ProjectEntity}
            };
            CB_EntityType.DataSource = new BindingSource(entityType, null);
            CB_EntityType.DisplayMember = "Key";
            CB_EntityType.ValueMember = "Value";
            CB_EntityType.SelectedIndex = 2;

            _backgroundExecutorWithStatus = new BackgroundExecutorWithStatus(TB_Status, "Loading LookupTables");
            _backgroundExecutorWithStatus.ExecuteWorker(LoadLookupTables);
        }
Example #28
0
 private void LoadResources()
 {
     _bgeResource = new BackgroundExecutorWithStatus(TB_Status, "Querying for all Enterprise Resources");
     _bgws.Add(_bgeResource);
     _bgeResource.ExecuteWorker(LoadResourcesList);
 }
 private void BTN_RemoveResources_Click(object sender, EventArgs e)
 {
     if (LV_Projects.SelectedItems.Count <= 0 || LV_ProjectResources.SelectedItems.Count <= 0) return;
     _bgeRemoveProjectResources = new BackgroundExecutorWithStatus(TB_Status, "Removing Project Resources on the selected Project");
     _bgws.Add(_bgeRemoveProjectResources);
     _bgeRemoveProjectResources.ExecuteWorker(RemoveResources);
 }
 private void DeleteSelectedProjects()
 {
     _bgeProjectsDelete = new BackgroundExecutorWithStatus(TB_Status, "Deleting Enterprise Projects");
     _bgws.Add(_bgeProjectsDelete);
     _bgeProjectsDelete.ExecuteWorker(DeleteProjects);
 }
 private void LV_Projects_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (LV_Projects.SelectedItems.Count <= 0) return;
     BackgroundExecutorWithStatus bgeProjectResources = new BackgroundExecutorWithStatus(TB_Status, "Querying for Project Resources on the selected Project");
     _bgws.Add(bgeProjectResources);
     bgeProjectResources.ExecuteWorker(GetDraftTeamForSelectedProject);
 }
Example #32
0
 private void PublishSelectedProjects()
 {
     _backgroundExecutorWithStatus = new BackgroundExecutorWithStatus(TB_Status, "Publishing Enterprise Projects");
     _backgroundExecutorWithStatus.ExecuteWorker(PublishProjects);
 }
 private void BTN_Create_Click(object sender, EventArgs e)
 {
     _backgroundExecutorWithStatus = new BackgroundExecutorWithStatus(TB_Status, "Creating Text LookupTables");
     _backgroundExecutorWithStatus.ExecuteWorker(CreateLookupTables);
 }
 private void LoadCustomFields()
 {
     BackgroundExecutorWithStatus bgeCustomFields = new BackgroundExecutorWithStatus(TB_Status, "Querying for Enterprise Custom Fields");
     _bgws.Add(bgeCustomFields);
     bgeCustomFields.ExecuteWorker(LoadCustomFieldsList);
 }
Example #35
0
 private void LoadCalendars()
 {
     _bgeCalendars = new BackgroundExecutorWithStatus(TB_Status, "Querying for Enterprise Calendars");
     _bgws.Add(_bgeCalendars);
     _bgeCalendars.ExecuteWorker(LoadCalendarsList);
 }
        private void BTN_Create_Click(object sender, EventArgs e)
        {
            BackgroundExecutorWithStatus bews = new BackgroundExecutorWithStatus(TB_Status, "Creating CustomFields");

            bews.ExecuteWorker(CreateCustomFields);
        }
Example #37
0
 private void DeleteSelectedCalendars()
 {
     _bgeCalendarsDelete = new BackgroundExecutorWithStatus(TB_Status, "Deleting Enterprise Calendars");
     _bgws.Add(_bgeCalendarsDelete);
     _bgeCalendarsDelete.ExecuteWorker(DeleteCalendars);
 }
 private void LoadProjectList()
 {
     _backgroundExecutorWithStatus = new BackgroundExecutorWithStatus(TB_Status, "Querying for all Enterprise projects");
     _backgroundExecutorWithStatus.ExecuteWorker(LoadProjects);
 }