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


C# System.Utils类代码示例

本文整理汇总了C#中System.Utils的典型用法代码示例。如果您正苦于以下问题:C# Utils类的具体用法?C# Utils怎么用?C# Utils使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Utils类属于System命名空间,在下文中一共展示了Utils类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: AddOrbOptionButton

        public static void AddOrbOptionButton(Utils.Controls.Ribbon.Ribbon ribbon, AbstractCommand command)
        {
            var oob = new RibbonOrbOptionButtonEx(command);
            ribbon.OrbDropDown.OptionItems.Add(oob);

            CommandManager.Instance.Register(command);
        }
开发者ID:AlexGaidukov,项目名称:gipertest_streaming,代码行数:7,代码来源:RibbonHelper.cs

示例2: serialize

        public void serialize(Utils.Objects.Packet sender)
        {
            // --------------- //
            // --- MINIMAL --- //
            // --------------- //

            sender.WriteInt(_character.Guid);
            sender.WriteByte( (byte)_character.Level );
            sender.WriteUTF(_character.Name);

            // ------------ //
            // --- LOOK --- //
            // ------------ //

            sender.WriteShort(1); // bones ID

            sender.WriteShort(1); // nSkins
            sender.WriteShort( (short)( (int)_character.Classe * 10 + (int)_character.Sexe) );

            sender.WriteShort((short)5);
            for (int i = 0; i < 5; ++i)
                sender.WriteInt(_character.Colors[i] | (i + 1) * 0x1000000);

            sender.WriteShort(1); // nScales
            sender.WriteShort( (short)140 );

            sender.WriteShort(0); // nSubEntities

            // ------------ //
            // --- BASE --- //
            // ------------ //

            sender.WriteByte( (byte)_character.Classe );
            sender.WriteByte( (byte)_character.Sexe );
        }
开发者ID:Emudofus,项目名称:Aldos,代码行数:35,代码来源:CharacterBaseInformations.cs

示例3: serialize

 public static void serialize(Utils.Objects.Packet sender, List<int> path, Global.Character actor)
 {
     sender.WriteShort( (short)path.Count );
     foreach (int cell in path)
         sender.WriteShort((short)cell);
     sender.WriteInt(actor.Guid);
 }
开发者ID:Emudofus,项目名称:Aldos,代码行数:7,代码来源:GameMapMovementMessage.cs

示例4: SearchEmployeeOp

        public List<EmployeeDto> SearchEmployeeOp(Utils.AppCommand appComandUser)
        {
            List<EmployeeDto> allEmployeesList = null;

            switch (appComandUser)
            {
                case Utils.AppCommand.InvalidInput:
                    ErrorOp();
                    break;

                case Utils.AppCommand.OrderByName:
                    allEmployeesList = _employeeAppService.GetAllEmployeesBy("FirstName");
                    PrintDataTable(allEmployeesList);
                    break;

                case Utils.AppCommand.OrderByPosition:
                    allEmployeesList = _employeeAppService.GetAllEmployeesBy("Position");
                    PrintDataTable(allEmployeesList);
                    break;

                case Utils.AppCommand.OrderByLastName:
                    allEmployeesList = _employeeAppService.GetAllEmployeesBy("LastName");
                    PrintDataTable(allEmployeesList);
                    break;
            }

            return allEmployeesList;
        }
开发者ID:SogetiSpain,项目名称:code-challenge-4,代码行数:28,代码来源:EmployeeApp.cs

示例5: ADTChunk

 /// <summary>
 /// Initializes all parameters of the chunk without performing any load operation.
 /// </summary>
 /// <param name="parent">The parent large terrain file of this chunk</param>
 /// <param name="baseFile">The MPQ-file which contains the general information about placement and doodads</param>
 /// <param name="texFile">The MPQ-stream which contains all the texture related information (MCLY, MCAL, ...)</param>
 /// <param name="offset">The offset inside baseFile and texFile where this chunks MCNK is located</param>
 public ADTChunk(ADTFile parent, Stormlib.MPQFile baseFile, Utils.StreamedMpq texFile, ChunkOffset offset)
 {
     mFile = baseFile;
     mTexFile = texFile;
     mOffset = offset;
     mParent = parent;
 }
开发者ID:remixod,项目名称:sharpwow,代码行数:14,代码来源:ADTChunk.cs

示例6: serialize

 public static void serialize(Utils.Objects.Packet sender)
 {
     int wrapper1 = 0;
     Utils.BooleanByteWrapper.setFlag(ref wrapper1, 0, false); // cantBeAggressed
     Utils.BooleanByteWrapper.setFlag(ref wrapper1, 1, false); // cantBeChallenged
     Utils.BooleanByteWrapper.setFlag(ref wrapper1, 2, false); // cantTrade
     Utils.BooleanByteWrapper.setFlag(ref wrapper1, 3, false); // cantBeAttackedByMutant
     Utils.BooleanByteWrapper.setFlag(ref wrapper1, 4, false); // cantRun
     Utils.BooleanByteWrapper.setFlag(ref wrapper1, 5, false); // forceSlowWalk
     Utils.BooleanByteWrapper.setFlag(ref wrapper1, 6, false); // cantMinimize
     Utils.BooleanByteWrapper.setFlag(ref wrapper1, 7, false); // cantMove
     sender.WriteByte((byte)wrapper1);
     int wrapper2 = 0;
     Utils.BooleanByteWrapper.setFlag(ref wrapper2, 0, false); // cantAggress
     Utils.BooleanByteWrapper.setFlag(ref wrapper2, 1, false); // cantChallenge
     Utils.BooleanByteWrapper.setFlag(ref wrapper2, 2, false); // cantExchange
     Utils.BooleanByteWrapper.setFlag(ref wrapper2, 3, false); // cantAttack
     Utils.BooleanByteWrapper.setFlag(ref wrapper2, 4, false); // cantChat
     Utils.BooleanByteWrapper.setFlag(ref wrapper2, 5, false); // cantBeMerchant
     Utils.BooleanByteWrapper.setFlag(ref wrapper2, 6, false); // cantUseObject
     Utils.BooleanByteWrapper.setFlag(ref wrapper2, 7, false); // cantUseTaxCollector
     sender.WriteByte((byte)wrapper2);
     int wrapper3 = 0;
     Utils.BooleanByteWrapper.setFlag(ref wrapper3, 0, false); // cantUseInteractive
     Utils.BooleanByteWrapper.setFlag(ref wrapper3, 1, false); // cantSpeakToNPC
     Utils.BooleanByteWrapper.setFlag(ref wrapper3, 2, false); // cantChangeZone
     Utils.BooleanByteWrapper.setFlag(ref wrapper3, 3, false); // cantAttackMonster
     Utils.BooleanByteWrapper.setFlag(ref wrapper3, 4, false); // cantWalk8Directions
     sender.WriteByte((byte)wrapper3);
 }
开发者ID:Emudofus,项目名称:Aldos,代码行数:30,代码来源:SetCharacterRestrictionsMessage.cs

示例7: OfflineLogForm

        public OfflineLogForm(Utils.BasePlugin.Plugin plugin, Framework.Interfaces.ICore core, Utils.API.GeocachingLiveV6 client) :
            this()
        {
            _core = core;
            _client = client;
            _plugin = plugin;

            this.Text = Utils.LanguageSupport.Instance.GetTranslation(STR_TITLE);
            this.groupBox1.Text = Utils.LanguageSupport.Instance.GetTranslation(STR_ADDGEOCACHES);
            this.label5.Text = Utils.LanguageSupport.Instance.GetTranslation(STR_CODE);
            this.button6.Text = Utils.LanguageSupport.Instance.GetTranslation(STR_ADD);
            this.button7.Text = Utils.LanguageSupport.Instance.GetTranslation(STR_ADDALLSELECTED);
            this.groupBox2.Text = Utils.LanguageSupport.Instance.GetTranslation(STR_OFFLINELOGS);
            this.label1.Text = Utils.LanguageSupport.Instance.GetTranslation(STR_GEOCACHES);
            this.label2.Text = Utils.LanguageSupport.Instance.GetTranslation(STR_LOGTYPE);
            this.label3.Text = Utils.LanguageSupport.Instance.GetTranslation(STR_LOGDATE);
            this.label4.Text = Utils.LanguageSupport.Instance.GetTranslation(STR_LOGTEXT);
            this.button1.Text = Utils.LanguageSupport.Instance.GetTranslation(STR_LOGSELECTED);
            this.button2.Text = Utils.LanguageSupport.Instance.GetTranslation(STR_LOGALL);
            this.button8.Text = Utils.LanguageSupport.Instance.GetTranslation(STR_OK);
            this.groupBox3.Text = Utils.LanguageSupport.Instance.GetTranslation(STR_LOGONLINE);

            int[] ids = new int[] { 2, 3, 4, 7, 45 };
            comboBoxLogType1.SetLogTypes(core, (from Framework.Data.LogType l in core.LogTypes join a in ids on l.ID equals a select l).ToList());

            if (core.ActiveGeocache != null)
            {
                textBox2.Text = core.ActiveGeocache.Code;
            }
            button7.Enabled = Utils.DataAccess.GetSelectedGeocaches(core.Geocaches).Count > 0;

            loadOfflineLogs();
        }
开发者ID:gahadzikwa,项目名称:GAPP,代码行数:33,代码来源:OfflineLogForm.cs

示例8: serialize

 public static void serialize(Utils.Objects.Packet sender, int accountId)
 {
     sender.WriteInt(accountId);
     sender.WriteBool(false); // tutorial available
     sender.WriteShort(8191); // breeds visible
     sender.WriteShort(2047); // breeds available
 }
开发者ID:Emudofus,项目名称:Aldos,代码行数:7,代码来源:AccountCapabilitiesMessage.cs

示例9: serialize

 public static void serialize(Utils.Objects.Packet sender)
 {
     int nFlags = 0;
     sender.WriteShort((short)nFlags);
     for (int i = 0; i < nFlags; ++i)
         sender.WriteInt(0);
 }
开发者ID:Emudofus,项目名称:Aldos,代码行数:7,代码来源:NotificationListMessage.cs

示例10: Read

 /// <summary>
 /// 反序列化
 /// </summary>
 /// <param name="formatter"></param>
 public void Read(Utils.IFormatter formatter)
 {
     this.ProtocolVersion = formatter.ReadInt32();
     this.SessionTimeOut = formatter.ReadInt32();
     this.SessionID = formatter.ReadInt64();
     this.SessionPassword = formatter.ReadBuffer();
 }
开发者ID:RANENTONG,项目名称:Zookeeper.Net,代码行数:11,代码来源:ConnectResponse.cs

示例11: Write

 /// <summary>
 /// write
 /// </summary>
 /// <param name="formatter"></param>
 public void Write(Utils.IFormatter formatter)
 {
     formatter.Write(this.RelativeZxid);
     formatter.Write(this.DataWatches);
     formatter.Write(this.ExistWatches);
     formatter.Write(this.ChildWatches);
 }
开发者ID:RANENTONG,项目名称:Zookeeper.Net,代码行数:11,代码来源:SetWatchesRequest.cs

示例12: serialize

        public void serialize(Utils.Objects.Packet sender)
        {
            // MINIMAL INFO
            sender.WriteInt(Member.Guid);
            sender.WriteByte((byte)Member.Level);
            sender.WriteUTF(Member.Name);

            // LOOK
            sender.WriteShort(1); // bones ID

            sender.WriteShort(1); // nSkins
            sender.WriteShort((short)((int)Member.Classe * 10 + (int)Member.Sexe));

            sender.WriteShort((short)5);
            for (int i = 0; i < 5; ++i)
                sender.WriteInt(Member.Colors[i] | (i + 1) * 0x1000000);

            sender.WriteShort(1); // nScales
            sender.WriteShort((short)140);

            sender.WriteShort(0); // nSubEntities

            // PARTY
            sender.WriteInt(Member.Characteristics.lifePoints);
            sender.WriteInt(Member.Characteristics.maxLifePoints);
            sender.WriteShort((short)Member.Characteristics.prospecting.Total);
            sender.WriteByte(0); // regenRate
            sender.WriteShort((short)Member.Characteristics.initiative.Total);
            sender.WriteBool(false); // pvp enabled
            sender.WriteByte(0); // alignment side
        }
开发者ID:Emudofus,项目名称:Aldos,代码行数:31,代码来源:PartyMemberInformations.cs

示例13: VisitMyFindsForm

        public VisitMyFindsForm(Utils.BasePlugin.Plugin plugin, Framework.Interfaces.ICore core): this()
        {
            _plugin = plugin;
            _core = core;

            _context = SynchronizationContext.Current;
            if (_context == null)
            {
                _context = new SynchronizationContext();
            }
            dateTimePicker1.Value = new DateTime(2000, 1, 1);

            this.Text = Utils.LanguageSupport.Instance.GetTranslation(STR_TITLE);
            this.groupBox1.Text = Utils.LanguageSupport.Instance.GetTranslation(STR_EXPLANATION);
            this.label1.Text = Utils.LanguageSupport.Instance.GetTranslation(STR_EXPLANATIONTXT);
            this.groupBox2.Text = Utils.LanguageSupport.Instance.GetTranslation(STR_SELECTTRACKABLE);
            this.label2.Text = Utils.LanguageSupport.Instance.GetTranslation(STR_TRACKINGNUMBER);
            this.button1.Text = Utils.LanguageSupport.Instance.GetTranslation(STR_CHECK);
            this.label4.Text = Utils.LanguageSupport.Instance.GetTranslation(STR_OR);
            this.button2.Text = Utils.LanguageSupport.Instance.GetTranslation(STR_GETOWNED);
            this.listView1.Columns[0].Text = Utils.LanguageSupport.Instance.GetTranslation(STR_ICON);
            this.listView1.Columns[1].Text = Utils.LanguageSupport.Instance.GetTranslation(STR_CODE);
            this.listView1.Columns[2].Text = Utils.LanguageSupport.Instance.GetTranslation(STR_NAME);
            this.groupBox3.Text = Utils.LanguageSupport.Instance.GetTranslation(STR_AVAILABLELOGS);
            this.label6.Text = Utils.LanguageSupport.Instance.GetTranslation(STR_MISSING);
            this.label7.Text = Utils.LanguageSupport.Instance.GetTranslation(STR_PRESENT);
            this.button3.Text = Utils.LanguageSupport.Instance.GetTranslation(STR_GETALLLOGS);
            this.label8.Text = Utils.LanguageSupport.Instance.GetTranslation(STR_LOGTEXT);
            this.label9.Text = Utils.LanguageSupport.Instance.GetTranslation(STR_BETWEEN);
            this.button4.Text = Utils.LanguageSupport.Instance.GetTranslation(STR_DOLOG);
            this.groupBox3.Text = Utils.LanguageSupport.Instance.GetTranslation(STR_MESSAGES);
        }
开发者ID:RH-Code,项目名称:GAPP,代码行数:32,代码来源:VisitMyFindsForm.cs

示例14: serialize

        public void serialize(Utils.Objects.Packet sender)
        {
            sender.WriteInt(_target.Guid);

            ////// ENTITY LOOK //////

            sender.WriteShort(1); // bones ID

            sender.WriteShort(1); // nSkins
            sender.WriteShort( (short)( (int)_target.Classe * 10 + (int)_target.Sexe) );

            sender.WriteShort((short)5);
            for (int i = 0; i < 5; ++i)
                sender.WriteInt(_target.Colors[i] | (i + 1) * 0x1000000);

            sender.WriteShort(1); // nScales
            sender.WriteShort( (short)140 );

            sender.WriteShort(0); // nSubEntities

            ////// ENTITY DISPOSITION

            sender.WriteShort((short)Types.game.context.EntityDispositionInformations.ProtocolID);
            _target.Disposition.serialize(sender);
        }
开发者ID:Emudofus,项目名称:Aldos,代码行数:25,代码来源:GameRolePlayActorInformations.cs

示例15: UpdatesForm

        public UpdatesForm(Languages.Language language, Utils.AppSettings settings)
        {
            // Windows Forms designer support.
            InitializeComponent();

            // Show first panel
            ShowPanel(panChecking);

            // Setup settings reference
            Settings = settings;

            // Setup language for the form
            Lang = language;
            Text = Lang.Get("updates");
            btnClose.Text = Lang.Get("close");

            // Language setup
            lblChecking.Text = Lang.Get("updates_checking") + "...";
            lblUpdated.Text = Lang.Get("updates_updated");
            lblError.Text = Lang.Get("updates_error");
            chkAuto.Text = Lang.Get("updates_auto");

            // Auto check
            chkAuto.Checked = (Settings.Get("updates_auto").ToString() == "1");
            chkAuto.CheckedChanged += delegate { Settings.Set("updates_auto", chkAuto.Checked ? 1 : 0); };
        }
开发者ID:suxiaojack,项目名称:todomoo,代码行数:26,代码来源:UpdatesForm.cs


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