Пример #1
0
 void btnSaveCustomIcon_Click(object sender, EventArgs e)
 {
     if (validFile())
     {
         if (validCustomIcon())
         {
             try
             {
                 IconInjector.InjectIconFromFile(mFilePath, mIconPath);
                 refreshIconCache();
             }
             catch (Exception x)
             {
                 Console.WriteLine("Exception occurred trying to set icon from file to file " + mFilePath + ", " + mIconPath + ", " + x.ToString());
                 MessageBox.Show("Setting custom icon failed.");
             }
         }
     }
 }
Пример #2
0
 void btnSave_Click(object sender, EventArgs e)
 {
     if (validFile())
     {
         if (iconSelected())
         {
             try
             {
                 Icon icon = getSelectedIcon();
                 IconInjector.InjectIconFromResource(mFilePath, icon);
                 refreshIconCache();
             }
             catch (Exception x)
             {
                 Console.WriteLine("Exception occurred trying to set icon from resource to file " + mFilePath + ", " + x.ToString());
                 MessageBox.Show("Setting icon failed.");
             }
         }
     }
 }