コード例 #1
0
 private static void AddCapabilitySenderClass(string fileName, Type type, string capName,
                                              CapabilitySenderClassHashtable capabilitySenderClasses)
 {
     try
     {
         if (!capabilitySenderClasses.ContainsKey(capName))
         {
             capabilitySenderClasses.Add(capName, type);
         }
         else
         {
             string msg = string.Format(CultureInfo.CurrentCulture, Strings.FoundDuplicateCapabilitySender,
                                        capName, fileName);
             eventLog.WriteEntry(msg, EventLogEntryType.Error, 23);
             RtlAwareMessageBox.Show(null, msg, Strings.ErrorInitializingCapabilityClasses,
                                     MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1,
                                     (MessageBoxOptions)0);
         }
     }
     catch (Exception e)
     {
         eventLog.WriteEntry(string.Format(CultureInfo.CurrentCulture, Strings.AccessingFile, fileName,
                                           e.ToString()), EventLogEntryType.Error, 99);
         RtlAwareMessageBox.Show(null, string.Format(CultureInfo.CurrentCulture, Strings.AccessingFile,
                                                     fileName, e.ToString()), Strings.ErrorInitializingCapabilitySender, MessageBoxButtons.OK,
                                 MessageBoxIcon.Error, MessageBoxDefaultButton.Button1, (MessageBoxOptions)0);
     }
 }
コード例 #2
0
 private static void AddCapabilitySenderClass(string fileName, Type type, string capName,
                                              CapabilitySenderClassHashtable capabilitySenderClasses)
 {
     try
     {
         if (!capabilitySenderClasses.ContainsKey(capName))
         {
             capabilitySenderClasses.Add(capName, type);
         }
         else
         {
             string msg = "Found duplicate CapabilitySender " + capName + " in " + fileName;
             eventLog.WriteEntry(msg, EventLogEntryType.Error, 23);
             MessageBox.Show(msg, "Error Initializing Capability Classes", MessageBoxButtons.OK, MessageBoxIcon.Error);
         }
     }
     catch (Exception e)
     {
         eventLog.WriteEntry("Accessing file " + fileName + "\n" +
                             e.ToString(), EventLogEntryType.Error, 99);
         MessageBox.Show("Accessing file " + fileName + "\n" +
                         e.ToString(), "Error Initializing Capability Sender", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
コード例 #3
0
 private static void AddCapabilitySenderClass(string fileName, Type type, string capName,
     CapabilitySenderClassHashtable capabilitySenderClasses)
 {
     try
     {
         if (!capabilitySenderClasses.ContainsKey(capName))
         {
             capabilitySenderClasses.Add(capName, type);
         }
         else
         {
             string msg = string.Format(CultureInfo.CurrentCulture, Strings.FoundDuplicateCapabilitySender, 
                 capName, fileName);
             eventLog.WriteEntry(msg, EventLogEntryType.Error, 23);
             RtlAwareMessageBox.Show(null, msg, Strings.ErrorInitializingCapabilityClasses, 
                 MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1, 
                 (MessageBoxOptions)0);
         }
     }
     catch (Exception e)
     {
         eventLog.WriteEntry(string.Format(CultureInfo.CurrentCulture, Strings.AccessingFile, fileName, 
             e.ToString()), EventLogEntryType.Error, 99);
         RtlAwareMessageBox.Show(null, string.Format(CultureInfo.CurrentCulture, Strings.AccessingFile, 
             fileName, e.ToString()), Strings.ErrorInitializingCapabilitySender, MessageBoxButtons.OK, 
             MessageBoxIcon.Error, MessageBoxDefaultButton.Button1, (MessageBoxOptions)0);
     }
 }
コード例 #4
0
 private static void AddCapabilitySenderClass(string fileName, Type type, string capName,
     CapabilitySenderClassHashtable capabilitySenderClasses)
 {
     try
     {
         if (!capabilitySenderClasses.ContainsKey(capName))
         {
             capabilitySenderClasses.Add(capName, type);
         }
         else
         {
             string msg = "Found duplicate CapabilitySender " + capName + " in " + fileName;
             eventLog.WriteEntry(msg, EventLogEntryType.Error, 23);
             MessageBox.Show(msg, "Error Initializing Capability Classes", MessageBoxButtons.OK, MessageBoxIcon.Error);
         }
     }
     catch (Exception e)
     {
         eventLog.WriteEntry("Accessing file " + fileName + "\n" +
             e.ToString(), EventLogEntryType.Error, 99);
         MessageBox.Show("Accessing file " + fileName + "\n" +
             e.ToString(), "Error Initializing Capability Sender", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }