예제 #1
0
파일: Program.cs 프로젝트: Luigifan/Skynet
        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);
            }
        }
예제 #2
0
        public UnlockForm(MainForm parent)
        {
            Font = SystemFonts.MessageBoxFont;
            InitializeComponent();

            _parent = parent;
            Shown += (sender, e) => _parent.notifyIcon1.Visible = false;
        }