private void SaveToXML() { XmlImportExport <PlaylistList> xmlImportExport = new XmlImportExport <PlaylistList>(); xmlImportExport.SerializeToXml(playlistList, "playlists.xml" + "", "PlaylistList"); }
public bool LoadFromXML(XmlDocument xmlDoc) { XmlImportExport.ImportKeystoningConfiguration(this, xmlDoc); Optimize(); return(true); }
private void Form1_Load(object sender, EventArgs e) { XmlImportExport <PlaylistList> xmlImport = new XmlImportExport <PlaylistList>(); playlistList = xmlImport.DeserializeXml("playlists.xml", "PlaylistList"); var form = new Forms.FormAllPlaylists(playlistList); form.playlistEventHandler += OpenPlaylistFromReceivingEvent; OpenChildForm(form, null); Application.DoEvents(); }
public bool SaveToXML(XmlElement displayXmlElement) { return(XmlImportExport.ExportKeystoningConfiguration(this, displayXmlElement)); }
public bool SaveToXML(XmlElement xmlElement) { return(XmlImportExport.ExportKeystoning(this, xmlElement)); }
public bool Export(string filename) { return(XmlImportExport.ExportInputManager(this, filename)); }
public bool Import(string filename) { return(XmlImportExport.ImportInputManager(this, coordinateSystem, filename, xmlSchema)); }
public bool SaveToXML() { return(XmlImportExport.ExportDisplay(this, xmlFilename)); }
public bool LoadFromXML() { return(XmlImportExport.ImportDisplay(this, xmlFilename, displaySchema, loadFromFileInEditor)); }
private void handleInfotexts() { GameObject infotext_Changes_saved = this.transform.Find("NGUIControls/Panel/selectAndConfigureDevices/Infotexts/Saving/Label - Changes saved").gameObject; GameObject infotext_Changes_are_not_saved_in_free_version = this.transform.Find( "NGUIControls/Panel/selectAndConfigureDevices/Infotexts/Saving/Label - Changes are not saved in free version").gameObject; GameObject infotext_Changes_not_saved_yet = this.transform.Find("NGUIControls/Panel/selectAndConfigureDevices/Infotexts/Saving/Label - Changes not saved yet").gameObject; GameObject infotext_Rift_not_Detected = this.transform.Find("NGUIControls/Panel/selectAndConfigureDevices/Infotexts/Rift/Label - Rift not detected").gameObject; GameObject infotext_Oculus_DK1_detected = this.transform.Find("NGUIControls/Panel/selectAndConfigureDevices/Infotexts/Rift/Label - Oculus DK1 detected").gameObject; GameObject infotext_Oculus_DK2_detected = this.transform.Find("NGUIControls/Panel/selectAndConfigureDevices/Infotexts/Rift/Label - Oculus DK2 detected").gameObject; bool isRiftConnected = false; // #if UNITY_EDITOR // if(UnityEditorInternal.InternalEditorUtility.HasPro()) // #endif { try { if (OVRManager.display != null) { isRiftConnected = OVRManager.display.isPresent; } if (OVRManager.capiHmd != null) { ovrHmdVersion = OVRManager.capiHmd.GetDesc().Type; } } catch (UnityException e) { Debug.LogError(e); } } if (isRiftConnected && ovrHmdVersion == Ovr.HmdType.DK1) { infotext_Rift_not_Detected.SetActive(false); infotext_Oculus_DK1_detected.SetActive(true); infotext_Oculus_DK2_detected.SetActive(false); } else if (isRiftConnected && (ovrHmdVersion == Ovr.HmdType.DK2 || ovrHmdVersion == Ovr.HmdType.Other)) { infotext_Rift_not_Detected.SetActive(false); infotext_Oculus_DK2_detected.SetActive(true); infotext_Oculus_DK1_detected.SetActive(false); } else { infotext_Rift_not_Detected.SetActive(true); infotext_Oculus_DK1_detected.SetActive(false); infotext_Oculus_DK2_detected.SetActive(false); } if (!XmlImportExport.XmlHandlingFunctionalityAvailable()) { infotext_Changes_are_not_saved_in_free_version.SetActive(true); infotext_Changes_saved.SetActive(false); infotext_Changes_not_saved_yet.SetActive(false); } else { infotext_Changes_are_not_saved_in_free_version.SetActive(false); if (originalPSMoveIP == inputManager.PSMoveIP && originalPSMovePort == inputManager.PSMovePort && originalEnablePSMove == inputManager.enablePSMove && originalEnableKinect == inputManager.enableKinect && originalEnableKinect2 == inputManager.enableKinect2 && originalEnableJumpGesture == inputManager.jumpGestureEnabled && originalEnableHydra == inputManager.enableRazerHydra && originalKinectDriftCorrection == inputManager.kinectDriftCorrectionPreferred) { infotext_Changes_saved.SetActive(true); infotext_Changes_not_saved_yet.SetActive(false); } else { infotext_Changes_not_saved_yet.SetActive(true); infotext_Changes_saved.SetActive(false); } } }
private void handleInfotexts() { GameObject infotext_Changes_saved = this.transform.Find("NGUIControls/Panel/selectAndConfigureDevices/Infotexts/Saving/Label - Changes saved").gameObject; GameObject infotext_Changes_are_not_saved_in_free_version = this.transform.Find( "NGUIControls/Panel/selectAndConfigureDevices/Infotexts/Saving/Label - Changes are not saved in free version").gameObject; GameObject infotext_Changes_not_saved_yet = this.transform.Find("NGUIControls/Panel/selectAndConfigureDevices/Infotexts/Saving/Label - Changes not saved yet").gameObject; GameObject infotext_Hmd_Not_Detected = this.transform.Find("NGUIControls/Panel/selectAndConfigureDevices/Infotexts/HMD/Label - HMD not detected").gameObject; // Was "Rift not detected" GameObject infotext_Hmd_Detected = this.transform.Find("NGUIControls/Panel/selectAndConfigureDevices/Infotexts/HMD/Label - HMD detected").gameObject; // Was "Oculus DK1 detected" if (RUISDisplayManager.IsHmdPresent()) { if (infotext_Hmd_Detected) { UILabel hmdDetectedLabel = infotext_Hmd_Detected.GetComponent <UILabel>(); if (hmdDetectedLabel) { hmdDetectedLabel.text = RUISDisplayManager.GetHmdModel() + " detected"; } } infotext_Hmd_Not_Detected.SetActive(false); infotext_Hmd_Detected.SetActive(true); } else if (infotext_Hmd_Not_Detected) { infotext_Hmd_Not_Detected.SetActive(true); infotext_Hmd_Detected.SetActive(false); } // bool isRiftConnected = false; // { // try // { // if(OVRManager.display != null) //06to08 // isRiftConnected = OVRManager.display.isPresent; //06to08 // if(OVRManager.capiHmd != null) // ovrHmdVersion = OVRManager.capiHmd.GetDesc().Type; //06to08 // // // } // catch(UnityException e) // { // Debug.LogError(e); // } // } // if(isRiftConnected && ovrHmdVersion == Ovr.HmdType.DK1) //06to08 // { // infotext_Rift_not_Detected.SetActive(false); // infotext_Oculus_DK1_detected.SetActive(true); // infotext_Oculus_DK2_detected.SetActive(false); // } // else if(isRiftConnected && (ovrHmdVersion == Ovr.HmdType.DK2 || ovrHmdVersion == Ovr.HmdType.Other)) //06to08 // { // infotext_Rift_not_Detected.SetActive(false); // infotext_Oculus_DK2_detected.SetActive(true); // infotext_Oculus_DK1_detected.SetActive(false); // } // else { // infotext_Rift_not_Detected.SetActive(true); // infotext_Oculus_DK1_detected.SetActive(false); // infotext_Oculus_DK2_detected.SetActive(false); // } if (!XmlImportExport.XmlHandlingFunctionalityAvailable()) { infotext_Changes_are_not_saved_in_free_version.SetActive(true); infotext_Changes_saved.SetActive(false); infotext_Changes_not_saved_yet.SetActive(false); } else { infotext_Changes_are_not_saved_in_free_version.SetActive(false); if (originalPSMoveIP == inputManager.PSMoveIP && originalPSMovePort == inputManager.PSMovePort && originalEnablePSMove == inputManager.enablePSMove && originalEnableKinect == inputManager.enableKinect && originalEnableKinect2 == inputManager.enableKinect2 && originalEnableJumpGesture == inputManager.jumpGestureEnabled && originalEnableHydra == inputManager.enableRazerHydra) // && originalKinectDriftCorrection == inputManager.kinectDriftCorrectionPreferred) { infotext_Changes_saved.SetActive(true); infotext_Changes_not_saved_yet.SetActive(false); } else { infotext_Changes_not_saved_yet.SetActive(true); infotext_Changes_saved.SetActive(false); } } }