示例#1
0
        private void MainForm_Load(object sender, EventArgs e)
        {
            string version = FileVersionInfo.GetVersionInfo(Application.ExecutablePath).FileVersion;

            Text = string.Format("幻兽传说卡片版 v{0}", version);

            try
            {
                ConfigData.LoadData();
                Scene.Instance = new Scene(tabPageGame, tabPageGame.Width, tabPageGame.Height);
                SystemMenuManager.Load(tabPageGame.Width, tabPageGame.Height);
                MainTipManager.Init(tabPageGame.Height);
                PanelManager.Init(tabPageGame.Width, tabPageGame.Height);
                CardConfigManager.Init();
                DbSerializer.Init();
                WorldInfoManager.Load();
            }
            catch (Exception ex)
            {
                NLog.Warn(ex);
                Close();
            }

            tabPageLogin.BackgroundImage = PicLoader.Read("System", "LogBack.JPG");
            textBoxName.Text             = WorldInfoManager.LastAccountName;
            ChangePage(0);
            myCursor.ChangeCursor("default");
            Scene.Instance.Init();

            workThread = new Thread(TimeGo);
            workThread.IsBackground = true;
            workThread.Start();
        }