/// <summary> /// Resets the whether the feature checkbox checked state to the initial stat. /// </summary> /// <param name="feature">The feature.</param> public static void ResetViewChecked(this FeatureItem feature) { if (feature.View is TreeNode) (feature.View as TreeNode).Checked = feature.DefaultIsToBeInstalled(); }
/// <summary> /// Returns default 'is to be installed' state of teh feature. /// </summary> /// <param name="feature">The feature.</param> /// <returns></returns> public static bool DefaultIsToBeInstalled(this FeatureItem feature) { return(feature.RequestedState != InstallState.Absent); }
/// <summary> /// Determines whether the feature checkbox is checked. /// </summary> /// <param name="feature">The feature.</param> /// <returns></returns> public static bool IsViewChecked(this FeatureItem feature) { if (feature.View is TreeNode) return (feature.View as TreeNode).Checked; return false; }