/// <summary> /// /// </summary> /// <param name="newDevice"></param> /// <param name="isEdit"></param> /// <returns></returns> public String CreateDeviceOnClick(MWDevice newDevice, bool isEdit) { string result = ""; // Check if device Name is set if (newDevice.deviceName.Equals("")) { return("Error no device name set!"); } // Check if vendor name is set if (newDevice.vendorName.Equals("")) { return("Error no vendor name set!"); } if (newDevice.deviceName != null && newDevice.vendorName != null) { // create the device result = mWData.CreateDevice(newDevice, isEdit); } // update the device list if (isEdit) { } else { devices.Add(newDevice); } return(result); }
/// <summary> /// /// </summary> /// <param name="newDevice"></param> /// <param name="isEdit"></param> /// <returns></returns> public String CreateDeviceOnClick(MWDevice newDevice, bool isEdit) { // Check if device Name is set if (newDevice.deviceName.Equals("")) { return("Error no device name set!"); } // Check if vendor name is set if (newDevice.vendorName.Equals("")) { return("Error no vendor name set!"); } // create the device string result = mWData.CreateDevice(newDevice, isEdit); // update the device list if (isEdit) { ReloadObjects(); } else { devices.Add(newDevice); GetStartGUI().updateDeviceDropdown(devices); } ChangeGui(MWController.MWGUIType.Start); return(result); }
/// <summary> /// /// </summary> /// <param name="newDevice"></param> /// <param name="isEdit"></param> /// <returns></returns> public String CreateDeviceOnClick(MWDevice newDevice, bool isEdit) { string result = ""; if (newDevice.deviceName != null && newDevice.vendorName != null) { // create the device result = mWData.CreateDevice(newDevice, isEdit); } // update the device list if (isEdit) { } else { devices.Add(newDevice); } return(result); }