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); }
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); }
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); }
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); }