Esempio n. 1
0
        private static void parseArgs(FrmBlackboard frmBlackboard, string[] args)
        {
            if (File.Exists(Path.Combine(Application.StartupPath, "bb.xml")))
            {
                frmBlackboard.ConfigFile = Path.Combine(Application.StartupPath, "bb.xml");
            }
            if (frmBlackboard.LogFile == "")
            {
                frmBlackboard.LogFile = Path.Combine(Application.StartupPath, "log.log.xml");
            }
            if ((args.Length < 1) || !File.Exists(args[0]))
            {
                return;
            }
            frmBlackboard.ConfigFile = args[0];

            for (int i = 1; i < args.Length; ++i)
            {
                switch (args[i].ToLower())
                {
                case "autostart":
                    frmBlackboard.AutoStart = true;
                    break;

                case "-h":
                case "--h":
                case "-help":
                case "--help":
                case "/h":
                    showHelp();
                    break;

                case "-log":
                    if (++i > args.Length)
                    {
                        return;
                    }
                    if (File.Exists(args[i]))
                    {
                        frmBlackboard.LogFile = args[i];
                    }
                    else
                    {
                        frmBlackboard.LogFile = args[i];
                    }
                    break;
                }
            }
        }
Esempio n. 2
0
        static void Main(string[] args)
        {
            string pName = Process.GetCurrentProcess().ProcessName;

            Process[] p = Process.GetProcessesByName(pName);
#if !DEBUG
            if (Process.GetProcessesByName(Process.GetCurrentProcess().ProcessName).Length > 1)
            {
                return;
            }
#endif
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            FrmBlackboard frmBlackboard = new FrmBlackboard();
            parseArgs(frmBlackboard, args);
            Application.Run(frmBlackboard);
        }
Esempio n. 3
0
 public FrmBlackboardSecondaryScreen(FrmBlackboard bbForm)
 {
     InitializeComponent();
     this.bbForm = bbForm;
 }