Example #1
0
        private void SetStatus(TreeNode selectedNode, PolicySetVersionStatus status)
        {
            if (null == selectedNode)
                return;

            LocalPolicySetVersionCache policySetVersion = selectedNode.Tag as LocalPolicySetVersionCache;
            if (null == policySetVersion)
                return;

            policySetVersion.Status = status;
            selectedNode.Text = GetVersionNodeString(policySetVersion);

            LocalPolicySetCache policySetCache = GetPolicySetCache(selectedNode);
            if (null == policySetCache)
                return;

            PolicyFileWriter fileWriter = new PolicyFileWriter();
            fileWriter.WriteFile(policySetCache, policySetCache.FileName, false);
        }
Example #2
0
        private void ReplacePolicySetFile(LocalPolicySetCache policySetCache)
        {
            if (null == policySetCache)
                return;

            PolicyFileWriter fileWriter = new PolicyFileWriter();
            fileWriter.WriteFile(policySetCache, policySetCache.FileName, false);
        }
        public Stream SaveToStream(SaveOption option)
        {
            SetVersionStatus(option);

            PolicyFileWriter fileWriter = new PolicyFileWriter();
            return fileWriter.WriteToStream(this, false);
        }
        public void ExportCompiledPolicySet(string filename, bool runtime)
        {
            Save(SaveOption.Publish);

            PolicyFileWriter fileWriter = new PolicyFileWriter();
            fileWriter.WriteFile(this, filename, runtime); 
        }
        public void Save(SaveOption option)
		{
            SetVersionStatus(option);

            PolicyFileWriter fileWriter = new PolicyFileWriter();
			fileWriter.WriteFile(this, m_filename, false);
		}