private new void ControlsToData() { if (itemDescription == null) itemDescription = new Controller(); base.ControlsToData(); var controller = itemDescription as Controller; if (controller != null) { controller.PhysicalMemory = edtDatumPhysicalMemory.DoubleValue; controller.InstalledSoftware = InstalledSoftware.ItemsDescriptions; controller.Storage = ControllerDrive.ControllerDrive; controller.Processor = controllerProcessorControl1.ControllerProcessor; controller.Peripherals = Peripherals.ItemsDescriptions; controller.OperatingSystems = controllerOperatingSystemListControl1.OperatingSystems; List<List<string>> table = VideoCapabilities.GetTable(); controller.VideoCapabilities = new List<string>(); foreach (var tableRow in table) { if (tableRow.Count > 0) controller.VideoCapabilities.Add(tableRow[0]); } List<List<string>> table2 = AudioCapabilities1.GetTable(); controller.AudioCapabilities = new List<string>(); foreach (var tableRow in table2) { if (tableRow.Count > 0) controller.AudioCapabilities.Add(tableRow[0]); } } }
public static bool LoadFromFile(string fileName, out Controller obj) { System.Exception exception; return LoadFromFile(fileName, out obj, out exception); }
public static bool Deserialize(string input, out Controller obj) { System.Exception exception; return Deserialize(input, out obj, out exception); }
/// <summary> /// Deserializes xml markup from file into an Controller object /// </summary> /// <param name="fileName">string xml file to load and deserialize</param> /// <param name="obj">Output Controller object</param> /// <param name="exception">output Exception value if deserialize failed</param> /// <returns>true if this Serializer can deserialize the object; otherwise, false</returns> public static bool LoadFromFile(string fileName, out Controller obj, out System.Exception exception) { exception = null; obj = default(Controller); try { obj = LoadFromFile(fileName); return true; } catch (System.Exception ex) { exception = ex; return false; } }
/// <summary> /// Deserializes workflow markup into an Controller object /// </summary> /// <param name="input">string workflow markup to deserialize</param> /// <param name="obj">Output Controller object</param> /// <param name="exception">output Exception value if deserialize failed</param> /// <returns>true if this Serializer can deserialize the object; otherwise, false</returns> public static bool Deserialize(string input, out Controller obj, out System.Exception exception) { exception = null; obj = default(Controller); try { obj = Deserialize(input); return true; } catch (System.Exception ex) { exception = ex; return false; } }