private void buttonAdditionalResourceEmbededResourceOpen_Click(object sender, EventArgs e) { DictObj selectedResource = GetSelectedResource(); var filename = (string)selectedResource[SEBSettings.KeyAdditionalResourcesResourceDataFilename]; var path = _fileCompressor.DecompressDecodeAndSaveFile( (string)selectedResource[SEBSettings.KeyAdditionalResourcesResourceData], filename, selectedResource[SEBSettings.KeyAdditionalResourcesIdentifier].ToString()); Process.Start(path + filename); }
private void OpenEmbededResource(DictObj resource) { var launcher = (int)resource[SEBSettings.KeyAdditionalResourcesResourceDataLauncher]; var filename = (string)resource[SEBSettings.KeyAdditionalResourcesResourceDataFilename]; var path = _fileCompressor.DecompressDecodeAndSaveFile( (string)resource[SEBSettings.KeyAdditionalResourcesResourceData], filename, resource[SEBSettings.KeyAdditionalResourcesIdentifier].ToString()); //XulRunner if (launcher == 0) { SEBXULRunnerWebSocketServer.SendMessage( new SEBXULMessage( SEBXULMessage.SEBXULHandler.AdditionalResources, new { id = resource[SEBSettings.KeyAdditionalResourcesIdentifier], path = path } ) ); } else { var permittedProcess = (DictObj)SEBSettings.permittedProcessList[launcher]; var fullPath = SEBClientInfo.SebWindowsClientForm.GetPermittedApplicationPath(permittedProcess); try { Process process = SEBClientInfo.SebWindowsClientForm.CreateProcessWithExitHandler(string.Join(" ", fullPath, "\"" + path + filename + "\"")); if (SEBClientInfo.SebWindowsClientForm.permittedProcessesReferences[launcher] == null) { SEBClientInfo.SebWindowsClientForm.permittedProcessesReferences[launcher] = process; } } catch (Exception ex) { SEBMessageBox.Show(SEBUIStrings.errorOpeningResource, ex.Message, MessageBoxIcon.Error, MessageBoxButtons.OK); } } }