Example #1
0
        private void readConfigFile()
        {
            if (MAppConfig.InitFromFile())
            {
                string defaultCfgFile = MAppConfig.getValueByName("defaultCfgFile");
                string configDirStr   = MAppConfig.getValueByName("defaultCfgDir");
                string fileName       = configDirStr + "/" + defaultCfgFile;


                if (!String.IsNullOrEmpty(fileName))
                {
                    if (!NodeMgr.init(fileName))//
                    {
                        MessageBox.Show(fileName + "风场模型解析失败!检查配置文件", "出错了", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    }
                }
            }
        }
Example #2
0
        static void Main(String[] args)
        {
            string turbine;

            if (args.Count <string>() > 0) //用来传入参数
            {
                turbine = args[1];
            }
            if (!MAppConfig.InitFromFile())
            {
            }
            ;

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            _logForm = new LogForm();
            _logForm.Show();//不show 会出问题
            _logForm.Visible = false;

            Application.Run(new Form1());
        }