예제 #1
0
        internal CSecurityPolicy(String sPolName, PolicyLevel pl)
        {
            m_sGuid        = "FCB061F5-A43B-43b3-91B6-36249F29E60B";
            m_sHelpSection = "";

            m_aPropSheetPage = null;

            m_sPolicyName = sPolName;

            m_sDisplayName = LocalizedPolicyName;

            if (pl == null)
            {
                pl = Security.GetMachinePolicyLevelFromLabel(sPolName);
            }

            m_pl = pl;
            DiscoverModifyofPolicy();

            // Put in the icon
            if (m_sPolicyName.Equals("Enterprise"))
            {
                m_hIcon = CResourceStore.GetHIcon("enterprisepolicy_ico");
            }
            else if (m_sPolicyName.Equals("Machine"))
            {
                m_hIcon = CResourceStore.GetHIcon("machinepolicy_ico");
            }
            else if (m_sPolicyName.Equals("User"))
            {
                m_hIcon = CResourceStore.GetHIcon("userpolicy_ico");
            }



            if (ReadOnly)
            {
                m_sDisplayName = String.Format(CResourceStore.GetString("CSecurityPolicy:ReadOnlyPolicy"), LocalizedPolicyName);
            }

            m_oResults = new CSecurityPolicyTaskPad(this, m_sDisplayName, m_pl.StoreLocation, m_pl.StoreLocation, m_fReadOnly);

            m_sOriginalConfigFile = m_pl.StoreLocation;
            m_fRedo = false;
            m_fUndo = false;
        }// CSecurityPolicy
예제 #2
0
        }// isNoSave


        internal void SetNewSecurityPolicyLevel(PolicyLevel pl)
        {
            m_pl = pl;

            m_sDisplayName = LocalizedPolicyName;

            DiscoverModifyofPolicy();

            if (ReadOnly)
            {
                m_sDisplayName = String.Format(CResourceStore.GetString("CSecurityPolicy:ReadOnlyPolicy"), LocalizedPolicyName);
            }

            m_oResults = new CSecurityPolicyTaskPad(this, m_sDisplayName, m_pl.StoreLocation, m_sOriginalConfigFile, m_fReadOnly);
            RedoChildren();

            RefreshDisplayName();
            RefreshResultView();

            // Check to see if this affects us at all
            base.SecurityPolicyChanged(false);
            m_fUndo = false;
        }// SetNewSecurityPolicyLevel