private static void GenerateClothing(IClothingGenerator generator, Bitmap bmp) { try { ItemDescriptor item = generator.Generate(bmp); string s = CommandGenerator.SpawnItem(item); string file = string.Format("{0} {1}.txt", generator.FileName, DateTime.Now.ToString("MM-dd h.mm.ss")); File.WriteAllText(file, s); Clipboard.SetText(s); WaitAndExit("Saved command to {0} and copied into clipboard", file); } catch (Exception exc) { WaitAndExit("Failed to create clothing: {0}", exc.Message); } }