示例#1
0
        private void btnItem_Click(object sender, EventArgs e)
        {
            OtherNetApis.GetVersion();
            //JsonSerializerSettings settings = new JsonSerializerSettings();

            //string strOutput = JsonConvert.SerializeObject(CEVEMarketFile.lstItem, Formatting.Indented, settings);
            //FilesHelper.OutputJsonFile("SDE\\ItemID", strOutput);

            //CEVESwaggerAPI.ReadWikiWormhole("B274");
            //CEVESwaggerAPI.ReadEVEAlmanac("");

            //CEVESwaggerAPI.ReadWormholeWeb("ABCD");
            //CEVESwaggerAPI.ReadSearchCharacter("梦逐");

            //模块化
            Dictionary <string, Lazy <IMessageRequest> > dicRequestModule = new Dictionary <string, Lazy <IMessageRequest> >();
            Dictionary <string, IMessageRequest>         dicModule        = new Dictionary <string, IMessageRequest>();
            Assembly Extend    = Assembly.LoadFile(@"E:\Project\[Tools]\EVE_Bot\Bot.DerbyRequest\bin\Debug\Bot.DerbyRequest.dll");
            var      catalog   = new AssemblyCatalog(Extend.CodeBase);
            var      container = new CompositionContainer(catalog, true);

            foreach (ComposablePartDefinition Parts in catalog.Parts)
            {
                foreach (ExportDefinition Module in Parts.ExportDefinitions)
                {
                    List <Lazy <IMessageRequest> > lstModule = container.GetExports <IMessageRequest>(Module.ContractName).ToList();
                    if (lstModule.Count != 1)
                    {
                        MessageBox.Show("Warning");
                    }
                    dicRequestModule.Add(Module.ContractName, lstModule[0]);
                }
            }
            JORecvGroupMsg jORecvGroup = new JORecvGroupMsg();

            jORecvGroup.message = "赛马娘 科学养马";
            jORecvGroup.user_id = 173965593;
            dicRequestModule["DerbyRequest"].Value.DealGroupRequest(jORecvGroup);
        }
示例#2
0
 private void btnSetu_Click(object sender, EventArgs e)
 {
     string strResult = OtherNetApis.getSetu();
 }
示例#3
0
 private void btnZGJM_Click(object sender, EventArgs e)
 {
     string strResult = OtherNetApis.ReadZGJMWorm("ABCD");
 }