public static void SaveToDisk(Macro item)
 {
     if (item != null)
     {
         try
         {
             XmlDocument xmlDoc = helpers.XmlDoc.CreateDoc();
             xmlDoc.AppendChild(item.ToXml(xmlDoc));
             helpers.XmlDoc.SaveXmlDoc(item.GetType().ToString(), item.Alias, xmlDoc);
         }
         catch (Exception ex)
         {
             Log.Add(LogTypes.Error, 0, String.Format("uSync: Error Saving Macro {0} - {1}", item.Name, ex.ToString()));
         }
     }
 }
Beispiel #2
0
 public static void SaveToDisk(Macro item)
 {
     if (item != null)
     {
         try
         {
             XmlDocument xmlDoc = helpers.XmlDoc.CreateDoc();
             xmlDoc.AppendChild(item.ToXml(xmlDoc));
             helpers.XmlDoc.SaveXmlDoc(item.GetType().ToString(), item.Alias, xmlDoc);
         }
         catch (Exception ex)
         {
             LogHelper.Error<SyncMacro>("uSync: Error Saving Macro", ex);
         }
     }
 }
        static void Macro_AfterDelete(Macro sender, DeleteEventArgs e)
        {
            helpers.XmlDoc.ArchiveFile(sender.GetType().ToString(), sender.Alias);

            e.Cancel = false;
        }