void DeleteJiraTemplateItemFromRegistry(JiraTemplate jiraTemplate) { if (jiraTemplate == null) { return; } RegistryOperation.DeleteRegistrySubKey(RegistryOperation.szAppRegPathTemplates, jiraTemplate.Name); }
void WriteJiraTemplateListToRegistry() { // delete an existing subkey and re-populate from data model RegistryOperation.DeleteRegistrySubKey(RegistryOperation.szAppRegPath, RegistryOperation.szSubkeyTemplate); // Add all what is in datamodel jira list. foreach (JiraTemplate item in JiraTemplates) { if ( item.Name != null && item.Name.Length > 0 && item.Content != null && item.Content.Length > 0 ) { RegistryOperation.CreateSubKey(RegistryOperation.szAppRegPathTemplates, item.Name); RegistryOperation.CreateBinaryKeyValue(RegistryOperation.szAppRegPathTemplates + "\\" + item.Name, RegistryOperation.szKeyNameTemplateContent, item.Content); } } }