private void closeToolStripMenuItem_Click(object sender, EventArgs e) { if (!ResourceLoader.CanClose()) { return; } ResourceLoader.Close(); }
public void loadCards() { CardSlotAnimData = new int[CardSlotAnimFrames.Length]; for (int i = 0; i < CardSlotAnimData.Length; i++) { switch (i) { case 0: CardSlotAnimData[i] = 0x1000000; break; case 3: CardSlotAnimData[i] = 0x10000000; break; case 6: CardSlotAnimData[i] = 0x40000000; break; case 15: CardSlotAnimData[i] = 0x8000000; break; case 0x12: CardSlotAnimData[i] = 0x2000000; break; case 9: CardSlotAnimData[i] = 0x4000000; break; case 12: CardSlotAnimData[i] = 0x20000000; break; default: CardSlotAnimData[i] = 0; break; } } ResourceLoader loader = new ResourceLoader(@"AssetIcons\Cards\Panel\Panel.resources"); invite_ad_colour = new Random().Next(5); string assetURI = ""; string str2 = ""; switch (Program.mySettings.LanguageIdent) { case "fr": assetURI = "ad_invite__0006__fr"; str2 = "ad_invite_quest_top__0006__fr"; break; case "de": assetURI = "ad_invite__0004__de"; str2 = "ad_invite_quest_top__0004__de"; break; case "ru": assetURI = "ad_invite__0005__ru"; str2 = "ad_invite_quest_top__0005__ru"; break; case "pl": assetURI = "ad_invite__0008__pl"; str2 = "ad_invite_quest-top__0008__pl"; break; case "pt": assetURI = "ad_invite__0001__pt"; str2 = "ad_invite_quest_top__0001__pt"; break; case "tr": assetURI = "ad_invite__0007__tr"; str2 = "ad_invite_quest_top__0007__tr"; break; case "es": assetURI = "ad_invite__0002__sp"; str2 = "ad_invite_quest_top__0002__sp"; break; case "it": assetURI = "ad_invite__0003__it"; str2 = "ad_invite_quest_top__0003__it"; break; default: assetURI = "ad_invite__0000__en"; str2 = "ad_invite_quest_top__0000__en"; break; } assetURI = assetURI + ".png"; banner_ad_friend = new BaseImage(AssetPaths.AssetIconsCardPanel, assetURI); str2 = str2 + ".png"; banner_ad_friend_quest = new BaseImage(AssetPaths.AssetIconsCardPanel, str2); loader.Close(); Image image = new Bitmap(1, 1); using (Graphics graphics = Graphics.FromImage(image)) { graphics.Clear(ARGBColors.Transparent); } dummy = image; }