using System; using System.Collections.Generic; using System.Linq; using System.Windows.Forms; using LFP_Manager.Forms; namespace LFP_Manager { static class Program { /// /// The main entry point for the application. /// [STAThread] static void Main() { EnsureDeltaLogoIcon(); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new fmxMain()); } public static System.Drawing.Bitmap DeltaLogoBitmap { get; private set; } public static System.Drawing.Icon DeltaLogoIcon { get; private set; } private static void EnsureDeltaLogoIcon() { try { string mediaPath = @"C:\Users\B1801003.AMOTECH\.gemini\antigravity-ide\brain\cbd44053-f528-42b6-844e-ed1cb6a3234d\media__1785212352524.png"; string projectRootIco = @"d:\Project\GUI\Delta (Brazil)\Common\LFP_Manager_DELTA_(V1.0.1.7)_AG\LFP_Manager\Delta_Logo_1.ico"; string projectResIco = @"d:\Project\GUI\Delta (Brazil)\Common\LFP_Manager_DELTA_(V1.0.1.7)_AG\LFP_Manager\Resources\Delta_Logo_1.ico"; if (System.IO.File.Exists(mediaPath)) { System.Drawing.Bitmap bmp = new System.Drawing.Bitmap(mediaPath); DeltaLogoBitmap = (System.Drawing.Bitmap)bmp.Clone(); IntPtr hIcon = bmp.GetHicon(); System.Drawing.Icon icon = System.Drawing.Icon.FromHandle(hIcon); DeltaLogoIcon = (System.Drawing.Icon)icon.Clone(); try { using (System.IO.FileStream fs = new System.IO.FileStream(projectRootIco, System.IO.FileMode.Create)) { icon.Save(fs); } } catch { } try { using (System.IO.FileStream fs = new System.IO.FileStream(projectResIco, System.IO.FileMode.Create)) { icon.Save(fs); } } catch { } try { string exeDirIco = System.IO.Path.Combine(Application.StartupPath, "Delta_Logo_1.ico"); using (System.IO.FileStream fs = new System.IO.FileStream(exeDirIco, System.IO.FileMode.Create)) { icon.Save(fs); } } catch { } } } catch { } } } }