Exemple #1
0
 private void MainForm_Load(object sender, EventArgs e)
 {
     if (Global.ClientManger.Init())
     {
         var loadForm = LoadingForm.GetLoad();
         Global.ClientManger.GetInstance(() => {
             this.Invoke(new InvokeDelegate(() =>
             {
                 //当获取到数据
                 Global.ClientManger.TestInstances.ForEach(s =>
                 {
                     this.lv_TestInstances.Items.Add(new ListViewItem(new string[] { s }));
                 });
                 loadForm.Close();
             }));
         });
         loadForm.ShowDialog();
     }
     else
     {
         //TODO:配置项为空的处理
     }
 }
        public static LoadingForm GetLoad()
        {
            var loadForm = new LoadingForm();

            return(loadForm);
        }