private void Reset() { SquadronContext.StartMonitoringExceptions(); SPSecurity.RunWithElevatedPrivileges(delegate() { try { int count = 0; foreach (int i in ItemsList.CheckedIndices) { if (_permissionUtility.ResetToInherit(_selectedList[i].InternalObject as SPSecurableObject)) { count++; } } if (count < ItemsList.CheckedIndices.Count) { SquadronContext.Warn("Reset operation of some item(s) invoked errors. Please refresh & retry."); } } catch (Exception ex) { SquadronContext.HandleException(ex); } finally { SquadronContext.StopMonitoringExceptions(); FooterPanel.Text = "Operation completed!"; } }); }
private bool InputsValid() { if (!File.Exists(FileText.Text)) { SquadronContext.Warn("File do not exists!"); return(false); } return(true); }
private bool Valid() { if (SourcePermissions.GetSelectedPermissions().Count == 0) { SquadronContext.Warn("Please select atleast one permission to copy!"); return(false); } return(true); }
private bool Valid() { bool result = ItemsList.CheckedIndices.Count > 0; if (!result) { SquadronContext.Warn("Please check atleast one item!" + Environment.NewLine + Environment.NewLine + "(You can right click & check/uncheck items)"); } return(result); }
private void Copy() { var permissions = SourcePermissions.GetSelectedPermissions(); _permissionUtility.SetPermissions(DestUserText.Text, permissions); FooterPanel.Text = "Copy operation completed!"; if (_permissionUtility.SkippedPermissions) { SquadronContext.Warn(FooterPanel.Text + Environment.NewLine + Environment.NewLine + "('Limited Access' permissions were skipped!)"); } }
private void LaunchPSISEButton_Click(object sender, EventArgs e) { string powerShellISEPath = Helper.Instance.GetPowerShellISEPath(); if (File.Exists(powerShellISEPath)) { Process.Start(powerShellISEPath); } else { SquadronContext.Warn("Unable to find PowerShell ISE Path!"); } }
private void LaunchPSButton_Click(object sender, EventArgs e) { string powerShellPath = Helper.Instance.GetPowerShellPath(); string sharePointPS1Path = Helper.Instance.GetSharePointPS1Path(); if (File.Exists(powerShellPath) & File.Exists(sharePointPS1Path)) { string command = " -NoExit " + "\" & ' " + sharePointPS1Path + " ' \""; Process.Start(powerShellPath, command); } else { SquadronContext.Warn("Unable to find PowerShell/SharePoin PS1 Path!"); } }
private void FindButton_Click(object sender, EventArgs e) { if (list.CheckedItems.Count == 0) { SquadronContext.Warn("No list(s) selected!" + Environment.NewLine + "Please choose a Site from Step 1 & Select a list from Step 2!"); } else { SquadronHelper.Instance.StartAnimation(); try { FindVersions(); } finally { SquadronHelper.Instance.StopAnimation(); } } }
private void ExecuteButton_Click(object sender, EventArgs e) { if (OptionsList.CheckedIndices.Count > 0) { SquadronHelper.Instance.StartAnimation(); try { // Clear ClearControls(); // Farm Section if (IsChecked(Option_CoreInfo)) { Refresh_CoreInfo(); } if (IsChecked(Option_FarmServers)) { Refresh_FarmServers(); } if (IsChecked(Option_Services)) { Refresh_Services(); } if (IsChecked(Option_ServiceApplications)) { Refresh_ServiceApplications(); } if (IsChecked(Option_ContentDatabases)) { Refresh_ContentDatabases(); } if (IsChecked(Option_FarmSolutions)) { Refresh_FarmSolutions(); } if (IsChecked(Option_UserSolutions)) { Refresh_UserSolutions(); } if (IsChecked(Option_ManagedPaths)) { Refresh_ManagedPaths(); } // Application Section if (IsChecked(Option_WebApplications)) { Refresh_WebApplications(); } if (IsChecked(Option_SiteCollections)) { Refresh_SiteCollections(); } if (IsChecked(Option_Sites)) { Refresh_Sites(); } if (IsChecked(Option_Lists)) { Refresh_Lists(); } if (IsChecked(Option_Items)) { Refresh_Items(); } } finally { SquadronHelper.Instance.StopAnimation(); SquadronContext.WriteMessage(this.Text + " operation completed!"); } } else { SquadronContext.Warn("Please select atleast one item!"); } }