当前位置: 首页>>代码示例>>C#>>正文


C# IHost.SendText方法代码示例

本文整理汇总了C#中IHost.SendText方法的典型用法代码示例。如果您正苦于以下问题:C# IHost.SendText方法的具体用法?C# IHost.SendText怎么用?C# IHost.SendText使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IHost的用法示例。


在下文中一共展示了IHost.SendText方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Initialize

        //Required for Plugin - Called on first load
        //Parameters:
        //              IHost Host:  The host (instance of Genie) making the call
        public void Initialize(IHost Host)
        {
            //Set Decimal Seperator to a period (.) if not set that way
            if (System.Threading.Thread.CurrentThread.CurrentCulture.NumberFormat.NumberDecimalSeparator != ".")
            {
                System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("en-US");
            }

            //Set _host variable to the Instance of Genie that started the plugin (so can call host API commands)
            _host = Host;
            //Set startTime to the time the plugin was called (used in how long tracking has been occuring)
            _startTime = DateTime.Now;
            //Create hash table for all skills
            _skillList = new Hashtable(67);

            //Set Genie Variables if not already set

            if (_host.get_Variable("ExpTracker.Window") == "")
                _host.SendText("#var ExpTracker.Window 0");

            if (_host.get_Variable("ExpTracker.ShowRankGain") == "")
                _host.SendText("#var ExpTracker.ShowRankGain 1");

            if (_host.get_Variable("ExpTracker.LearningRate") == "")
                _host.SendText("#var ExpTracker.LearningRate 1");

            if (_host.get_Variable("ExpTracker.LearningRateNumber") == "")
                _host.SendText("#var ExpTracker.LearningRateNumber 0");

            if (_host.get_Variable("ExpTracker.TrackSleep") == "")
                _host.SendText("#var ExpTracker.TrackSleep 0");

            if (_host.get_Variable("ExpTracker.EchoSleep") == "")
                _host.SendText("#var ExpTracker.EchoSleep 0");

            if (_host.get_Variable("ExpTracker.SortType") == "")
                _host.SendText("#var ExpTracker.SortType 0");

            if (_host.get_Variable("ExpTracker.GagExp") == "")
                _host.SendText("#var ExpTracker.GagExp 0");

            if (_host.get_Variable("ExpTracker.Color.Normal") == "")
                _host.SendText("#var {ExpTracker.Color.Normal} {WhiteSmoke}");

            if (_host.get_Variable("ExpTracker.Color.RankGained") == "")
                _host.SendText("#var {ExpTracker.Color.RankGained} {WhiteSmoke}");

            if (_host.get_Variable("ExpTracker.Color.Learned") == "")
                _host.SendText("#var {ExpTracker.Color.Learned} {WhiteSmoke}");

            if (_host.get_Variable("ExpTracker.ShortNames") == "")
                _host.SendText("#var ExpTracker.ShortNames 0");

            //create AND popluate the master hashtables
            //This in theory should front load processing time for when Genie loads
            //and speed up the time it takes to parse, and generate EXP window data.
            MasterSkill = new Hashtable(72);
            //Armor skills
            MasterSkill.Add("Shield Usage", new ItemMasterSkill { SortLR = 0, ShortName = "Shield" });
            MasterSkill.Add("Leather Armor", new ItemMasterSkill { SortLR = 1, ShortName = "Leather" });
            MasterSkill.Add("Light Chain", new ItemMasterSkill { SortLR = 2, ShortName = "LC" });
            MasterSkill.Add("Heavy Chain", new ItemMasterSkill { SortLR = 3, ShortName = "HC" });
            MasterSkill.Add("Light Plate", new ItemMasterSkill { SortLR = 4, ShortName = "LP" });
            MasterSkill.Add("Heavy Plate", new ItemMasterSkill { SortLR = 5, ShortName = "HP" });
            MasterSkill.Add("Cloth Armor", new ItemMasterSkill { SortLR = 6, ShortName = "Cloth" });
            MasterSkill.Add("Bone Armor", new ItemMasterSkill { SortLR = 7, ShortName = "Bone" });
            //Weapon Skills            
            MasterSkill.Add("Parry Ability", new ItemMasterSkill { SortLR = 100, ShortName = "Parry" });
            MasterSkill.Add("Multi Opponent", new ItemMasterSkill { SortLR = 101, ShortName = "MO" });
            MasterSkill.Add("Light Edged", new ItemMasterSkill { SortLR = 102, ShortName = "LE" });
            MasterSkill.Add("Medium Edged", new ItemMasterSkill { SortLR = 103, ShortName = "ME" });
            MasterSkill.Add("Heavy Edged", new ItemMasterSkill { SortLR = 104, ShortName = "HE" });
            MasterSkill.Add("Twohanded Edged", new ItemMasterSkill { SortLR = 105, ShortName = "2HE" });
            MasterSkill.Add("Light Blunt", new ItemMasterSkill { SortLR = 106, ShortName = "LB" });
            MasterSkill.Add("Medium Blunt", new ItemMasterSkill { SortLR = 107, ShortName = "MB" });
            MasterSkill.Add("Heavy Blunt", new ItemMasterSkill { SortLR = 108, ShortName = "HB" });
            MasterSkill.Add("Twohanded Blunt", new ItemMasterSkill { SortLR = 109, ShortName = "2HB" });
            MasterSkill.Add("Slings", new ItemMasterSkill { SortLR = 110, ShortName = "Sling" });
            MasterSkill.Add("Staff Sling", new ItemMasterSkill { SortLR = 111, ShortName = "S Sling" });
            MasterSkill.Add("Short Bow", new ItemMasterSkill { SortLR = 112, ShortName = "S Bow" });
            MasterSkill.Add("Long Bow", new ItemMasterSkill { SortLR = 113, ShortName = "L Bow" });
            MasterSkill.Add("Composite Bow", new ItemMasterSkill { SortLR = 114, ShortName = "C Bow" });
            MasterSkill.Add("Light Crossbow", new ItemMasterSkill { SortLR = 115, ShortName = "LX" });
            MasterSkill.Add("Heavy Crossbow", new ItemMasterSkill { SortLR = 116, ShortName = "HX" });
            MasterSkill.Add("Short Staff", new ItemMasterSkill { SortLR = 117, ShortName = "S Staff" });
            MasterSkill.Add("Quarter Staff", new ItemMasterSkill { SortLR = 118, ShortName = "Q Staff" });
            MasterSkill.Add("Pikes", new ItemMasterSkill { SortLR = 119, ShortName = "Pike" });
            MasterSkill.Add("Halberds", new ItemMasterSkill { SortLR = 120, ShortName = "Halberd" });
            MasterSkill.Add("Light Thrown", new ItemMasterSkill { SortLR = 121, ShortName = "LT" });
            MasterSkill.Add("Heavy Thrown", new ItemMasterSkill { SortLR = 122, ShortName = "HT" });
            MasterSkill.Add("Brawling", new ItemMasterSkill { SortLR = 123, ShortName = "Brawl" });
            MasterSkill.Add("Offhand Weapon", new ItemMasterSkill { SortLR = 124, ShortName = "Offhand" });
            //Magic Skills
            MasterSkill.Add("Lunar Magic", new ItemMasterSkill { SortLR = 200, ShortName = "Magic" });
            MasterSkill.Add("Life Magic", new ItemMasterSkill { SortLR = 200, ShortName = "Magic" });
            MasterSkill.Add("Holy Magic", new ItemMasterSkill { SortLR = 200, ShortName = "Magic" });
            MasterSkill.Add("Elemental Magic", new ItemMasterSkill { SortLR = 200, ShortName = "Magic" });
//.........这里部分代码省略.........
开发者ID:monil5100,项目名称:g3-standalone-xp,代码行数:101,代码来源:EXPTracker.cs


注:本文中的IHost.SendText方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。