public static void Main(string[] args) { Log = new ServerLog(); if (args.Length > 0) { if(args[0].ToLower().Trim() == "--silent") { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Log.Insert(DateTime.Now.ToString(), "Running server in silent mode"); mainForm = new MainForm(); mainForm.RunSilent(); Application.Run(); } else { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); mainForm = new MainForm(); Application.Run(mainForm); } } else { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); mainForm = new MainForm(); Application.Run(mainForm); } }
public UnlockForm(MainForm parent) { Font = SystemFonts.MessageBoxFont; InitializeComponent(); _parent = parent; Shown += (sender, e) => _parent.notifyIcon1.Visible = false; }