public void Init() { ParseInit(); msgApi = new ProtoMsg(); msgApi.BindMsgId(); msgApi.BindParser(); ParseText(GetProtoclLog()); Log.WriteLine("Parse done!"); }
private void MainForm_Load(object sender, EventArgs e) { LogManager.inst.Init(this); PathExt.InitPath(); InitXml(); LoadXml(); if (bIsAssembly) { if (ParseInit()) { msgApi = new AssemblyProtoMsg(); } } else { msgApi = new ProtoMsg(); } if (msgApi == null) { Log.ErrorLine("msgApi is null"); return; } msgApi.BindMsgId(); msgApi.BindParser(); Connect(); AssemblyHandler handler; AssemblyResult result; AssemblyParser.GetAsseblyResult(out handler, out result); if (result == null) { Log.ErrorLine("AssemblyResult is null"); } foreach (var item in result.ClassList) { if (item.Value.Contains("Message") && item.Key.Contains("MSG_CG")) { AssemblyClassInfo classInfo = handler.GetClassInfo(ConstData.ClientMsgDll, item.Value); list.Add(classInfo.ClassName, classInfo); comboBox2.Items.Add(classInfo.ClassName); } } }