Beispiel #1
0
        public bool RemovePolicy(LoadedPolicyObject policy)
        {
#if DEBUG
            PolicyTesting t = JsonConvert.DeserializeObject <PolicyTesting>(policy.PolicyObject.Data);
            FoxEventLog.VerboseWriteEventLog("REMOVEAL Testing: " + t.CheckBox1.ToString() + " " + t.CheckBox2.ToString() + " " + t.CheckBox3.ToString() + " " + t.Text, System.Diagnostics.EventLogEntryType.Information);
#endif
            return(true);
        }
Beispiel #2
0
        public bool UpdatePolicy(LoadedPolicyObject oldpolicy, LoadedPolicyObject newpolicy)
        {
#if DEBUG
            PolicyTesting t = JsonConvert.DeserializeObject <PolicyTesting>(oldpolicy.PolicyObject.Data);
            FoxEventLog.VerboseWriteEventLog("[OLD] Testing: " + t.CheckBox1.ToString() + " " + t.CheckBox2.ToString() + " " + t.CheckBox3.ToString() + " " + t.Text, System.Diagnostics.EventLogEntryType.Information);
            t = JsonConvert.DeserializeObject <PolicyTesting>(newpolicy.PolicyObject.Data);
            FoxEventLog.VerboseWriteEventLog("[NEW] Testing: " + t.CheckBox1.ToString() + " " + t.CheckBox2.ToString() + " " + t.CheckBox3.ToString() + " " + t.Text, System.Diagnostics.EventLogEntryType.Information);
#endif
            return(true);
        }
Beispiel #3
0
        public bool SetData(PolicyObject obj)
        {
            Pol = obj;
            Debug.WriteLine("SetData: " + obj.Data);

            Test = JsonConvert.DeserializeObject <PolicyTesting>(obj.Data);
            if (Test == null)
            {
                Test = new PolicyTesting();
            }

            return(true);
        }
Beispiel #4
0
        public string GetData()
        {
            string        data = "";
            PolicyTesting n    = new PolicyTesting();

            n.CheckBox1 = checkBox1.Checked;
            n.CheckBox2 = checkBox2.Checked;
            n.CheckBox3 = checkBox3.Checked;
            n.Text      = textBox1.Text;

            data = JsonConvert.SerializeObject(n);

            Debug.WriteLine("GetData: \"" + data + "\"");
            return(data);
        }