/// <summary> /// verify that the last initial response file saved on the client for offline execution is valid (otherwise remove it). /// the last saved initial response file becomes invalid in the following case: /// (*) the executed program's public name (ClientManager.Instance.getPrgName()) doesn't match the one saved in the last initial response file. /// </summary> internal void VerifyLastOfflineInitialResponseFile() { InitializeEncryptor(); // extract the program's public name from the last : string initialResponsePrgName = GetPublicNameFromLastOfflineInitialResponse(); /// the last saved initial response file becomes invalid in case the executed program's public name (ClientManager.Instance.getPrgName()) /// doesn't match the one saved in the last initial response file. if (!ClientManager.Instance.getPrgName().Equals(initialResponsePrgName)) { string lastOfflineExecutionFileName = GetLastOfflineExecutionPropertiesFileName(); HandleFiles.deleteFile(lastOfflineExecutionFileName); } }
/// <summary> Creates (on the disk) the executable used the launch the application after /// the current executable exits /// </summary> /// <returns> path to the newly created executable </returns> private static string CreateRCSpawnerAssembly() { String asmName = getSpawnerAssemblyPath(); if (HandleFiles.isExists(asmName)) { HandleFiles.deleteFile(asmName); } // Get the assmbly code from the resource Byte[] asmBuf; #if PocketPC asmBuf = RichClient.Properties.Resources.MgxpaRIAMobile_spawner; #else asmBuf = RichClient.Properties.Resources.MgxpaRIA_spawner; #endif // Write the assembly code to the file BinaryWriter bw = new BinaryWriter(File.Open(asmName, FileMode.Create)); bw.Write(asmBuf); bw.Close(); return(asmName); }
/// <summary> /// Clear status /// </summary> public void Clear() { TablesIncompatibleWithDataSources = false; InvalidSources = false; HandleFiles.deleteFile(StatusFileName); }