• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# UserItem类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: GetCurrentUserReadingMessage

 private MessageList GetCurrentUserReadingMessage(UserItem item)
 {
     MessageList mList = new MessageList();
     MessageOperator mo = new MessageOperator();
     mList = mo.GetNoReadMessage4ToUserId(item.Id);
     return mList;
 }
开发者ID:caixiaodou,项目名称:GKing,代码行数:7,代码来源:Frame.aspx.cs


示例2: BindData

 protected void BindData()
 {
     UserItem userObj = new UserItem();
     PagerNavication.RecordsCount = DataBase.HEntityCommon.HEntity(userObj).EntityCount();
     UserItem[] al = UserItem.List("", "", PagerNavication.PageIndex, PagerNavication.PageSize);
     rptItems.DataSource = al;
     rptItems.DataBind();
 }
开发者ID:huyihuan,项目名称:BlueSky,代码行数:8,代码来源:UserList.ascx.cs


示例3: btnSave_ServerClick

        protected void btnSave_ServerClick(object sender, EventArgs e)
        {
            string strUserName = txt_UserName.Value.Trim();
            string strNickName = txt_NickName.Value.Trim();
            string strPassword = txt_Password.Value.Trim();
            string strPasswordSecond = txt_PasswordSecond.Value.Trim();
            if ("" == strUserName || "" == strNickName || "" == strPassword || "" == strPasswordSecond)
                return;
            if(UserItem.ExistUser(strUserName))
            {
                PageUtil.PageAlert(this.Page, "该用户名已存在!");
                return;
            }
            if (!strPassword.Equals(strPasswordSecond))
            {
                PageUtil.PageAlert(this.Page, "密码和确认密码不一致!");
                return;
            }
            if (lb_RoleSelect.Items.Count == 0)
            {
                PageUtil.PageAlert(this.Page, "请选择角色!");
                return;
            }
            UserItem addItem = new UserItem();
            addItem.UserName = strUserName;
            addItem.NickName = strNickName;
            addItem.Password = Util.MD5Encrypt(strPassword);
            addItem.Gender = rb_GenderMale.Checked ? "男" : "女";
            string strTel = txt_Tel.Value.Trim();
            if ("" != strTel)
                addItem.Tel = txt_Tel.Value.Trim();
            string strEmail = txt_Email.Value.Trim();
            if ("" != strEmail)
                addItem.Email = txt_Email.Value.Trim();
            int nNewId = UserItem.Save(addItem);
            if (nNewId <= 0)
                return;

            UserRoleItem[] alUserRoles = UserRoleItem.GetUserRoles(nNewId);
            Hashtable htExistRoles = new Hashtable();
            if (null != alUserRoles)
            {
                foreach (UserRoleItem item in alUserRoles)
                    htExistRoles[item.RoleItemId + ""] = 1;
            }
            foreach (ListItem item in lb_RoleSelect.Items)
            {
                if (htExistRoles.ContainsKey(item.Value))
                    continue;
                UserRoleItem addUserRole = new UserRoleItem();
                addUserRole.RoleItemId = int.Parse(item.Value);
                addUserRole.UserItemId = nNewId;
                UserRoleItem.Save(addUserRole);
            }
            PageUtil.PageAlert(this.Page, "保存成功!");
        }
开发者ID:huyihuan,项目名称:BlueSky,代码行数:56,代码来源:UserAdd.ascx.cs


示例4: ItemObject

        public ItemObject(MapObject dropper, UserItem item, Point manualpoint)
        {
            ExpireTime = Envir.Time + Settings.ItemTimeOut * Settings.Minute;

            Item = item;
            if (Item.IsAdded)
                NameColour = Color.Cyan;

            CurrentMap = dropper.CurrentMap;
            CurrentLocation = manualpoint;
        }
开发者ID:quttap,项目名称:mir2,代码行数:11,代码来源:ItemObject.cs


示例5: ItemCombined

        //TOADD
        //ItemSplit
        //ItemMerge

        public void ItemCombined(string source, UserItem fromItem, UserItem toItem, int slotFrom, int slotTo, MirGridType grid)
        {
            string task = string.Empty;
            if (fromItem != null && toItem != null)
            {
                task = string.Format("Item Combined - {0} with {1} from {2} to {3} in {4} ({5})", fromItem.Info.Name, toItem.Info.Name, slotFrom, slotTo, grid, toItem.UniqueID);
            }

            Action action = new Action { Source = source, Task = task };

            RecordAction(action);
        }
开发者ID:Pete107,项目名称:Mir2,代码行数:16,代码来源:Reporting.cs


示例6: AddNewItemButtonClick

        private async void AddNewItemButtonClick(object sender, RoutedEventArgs e)
        {
            var price = 0;
            int.TryParse(this.PriceTextBox.Text, out price);
            var item = new UserItem
            {
                Name = this.NameTextBox.Text,
                Price = price
            };

            await this.InsertUserAsync(item);
        }
开发者ID:TelerikAcademy,项目名称:Windows-Applications,代码行数:12,代码来源:MainPage.xaml.cs


示例7: AuctionInfo

        public AuctionInfo(BinaryReader reader)
        {
            AuctionID = reader.ReadUInt64();

            Item = new UserItem(reader);
            ConsignmentDate = DateTime.FromBinary(reader.ReadInt64());
            Price = reader.ReadUInt32();

            CharacterIndex = reader.ReadInt32();

            Expired = reader.ReadBoolean();
            Sold = reader.ReadBoolean();
        }
开发者ID:ufaith,项目名称:cmir2,代码行数:13,代码来源:AuctionInfo.cs


示例8: ItemMoved

        public void ItemMoved(string source, UserItem item, MirGridType from, MirGridType to, int slotFrom, int slotTo)
        {
            string task = string.Empty;

            if (item != null)
            {
                task = string.Format("Item Moved - {0} from {1}:{2} to {3}:{4} ({5})", item.Info.Name, from, slotFrom, to, slotTo, item.UniqueID);
            }

            Action action = new Action { Source = source, Task = task };

            RecordAction(action);
        }
开发者ID:Pete107,项目名称:Mir2,代码行数:13,代码来源:Reporting.cs


示例9: ItemObject

        public ItemObject(MapObject dropper, UserItem item, bool DeathDrop = false)
        {
            if (DeathDrop)//player dropped it when he died: allow for time to run back and pickup his drops
                ExpireTime = Envir.Time + Settings.PlayerDiedItemTimeOut * Settings.Minute;
            else
                ExpireTime = Envir.Time + Settings.ItemTimeOut * Settings.Minute;

            Item = item;
            if (Item.IsAdded)
                NameColour = Color.Cyan;

            CurrentMap = dropper.CurrentMap;
            CurrentLocation = dropper.CurrentLocation;
        }
开发者ID:Pete107,项目名称:Mir2,代码行数:14,代码来源:ItemObject.cs


示例10: SetData

 private void SetData(ConsoleNode console, SearchMode mode)
 {
     try
     {
         lvMembers.Items.Clear();
         if (mode == SearchMode.User)
         {
             lbMembers.Text = "&Users:";
             this.Text = "Users";
             UserStorageView[] users = console.Manager.Admon_GetUserList(console.Credentials);
             foreach (UserStorageView user in users)
             {
                 UserItem ui = new UserItem(user.Username);
                 ui.ImageIndex = 3;
                 ui.User = user;
                 lvMembers.Items.Add(ui);
             }
         }
         else if (mode == SearchMode.Group)
         {
             lbMembers.Text = "&Groups:";
             this.Text = "Groups";
             GroupStorageView[] groups = console.Manager.Admon_GetGroups(console.Credentials);
             foreach (GroupStorageView group in groups)
             {
                 GroupItem gi = new GroupItem(group.GroupName);
                 gi.ImageIndex = 2;
                 gi.GroupView = group;
                 lvMembers.Items.Add(gi);
             }
         }
         else if (mode == SearchMode.Permission)
         {
             lbMembers.Text = "&Permissions:";
             this.Text = "Permissions";
             PermissionStorageView[] permissions = console.Manager.Admon_GetPermissions(console.Credentials);
             foreach (PermissionStorageView permission in permissions)
             {
                 PermissionItem prm = new PermissionItem(permission.PermissionName);
                 prm.ImageIndex = 12;
                 prm.Permission = new PermissionStorageView(permission.PermissionId, permission.PermissionName);
                 lvMembers.Items.Add(prm);
             }
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("Error filling search list:" + ex.Message, "Search Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
开发者ID:JamesTryand,项目名称:alchemi,代码行数:50,代码来源:SearchForm.cs


示例11: btnUpdate_Click

    protected void btnUpdate_Click(object sender, EventArgs e)
    {
        UserItem u = new UserItem();
        u = (UserItem)HttpContext.Current.Session["User"];
        u.UserID = u.UserID;
        u.Email = txtEmail.Text;
        u.FirstName = txtFirstName.Text;
        u.LastName = txtLastName.Text;
        u.Address = txtAddress.Text;
        u.ZipCode = txtZipCode.Text;
        u.City = txtCity.Text;
        if (txtPhone.Text.Length > 1)
        {
            u.Phone = Convert.ToInt64(txtPhone.Text);
        }
        else
            u.Phone = 0;
        if (txtMobilePhone.Text.Length > 1)
        {
            u.MobilePhone = Convert.ToInt64(txtMobilePhone.Text);
        }
        else
            u.MobilePhone = 0;

        u.PassWord = txtPassword.Text;
        if (UserItem.CheckPassword(u.UserID, u.PassWord))
        {
            if (UserItem.UpdateUser(u))
            {
                litFeedback.Text = "<div style='border: 1px solid #ccc;background-color: Green;color:White;'>Dina ändringar är sparade.</div>";
            }
            else
            {
                litFeedback.Text = "<div style='border: 1px solid #ccc;background-color: Red;color:White;'>Dina ändringar är inte sparade.</div>";
            }
        }
        else
        {
            lblPassword.Text = "Fel lösenord.";
        }
    }
开发者ID:Trixxer,项目名称:ShopEr,代码行数:41,代码来源:EditAccountDetails.aspx.cs


示例12: btnRegister_Click

    protected void btnRegister_Click(object sender, ImageClickEventArgs e)
    {
        UserItem item = new UserItem();
        item.LoginPwd = this.txtPwd.Text;
        item.NickName = this.txtNickName.Text;
        item.Sex=this.rdbMan.Checked ? "男" : "女";
        item.Name = this.txtName.Text;
        item.StarId = Convert.ToInt32(this.ddlConstellation.SelectedItem.Value);
        item.BloodTypeId = Convert.ToInt32(this.ddlBloodType.SelectedItem.Value);
        item.FaceId = Convert.ToInt32(this.hidFaceId.Value);

        UsersOperator uo = new UsersOperator();
        if (uo.InsertUser(item) == 1)
        {
            this.divLoginInfo.InnerText = "你的MyQQ ID为" + uo.LastUserId.ToString();
        }
        else
        {
            this.divLoginInfo.InnerText = "服务器错误";
        }
    }
开发者ID:caixiaodou,项目名称:GKing,代码行数:21,代码来源:Register.aspx.cs


示例13: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        if (this.Request["msgId"] != "0" && this.Request["msgId"]!=null)
        {
            this.MakeMsgShow(Convert.ToInt32(this.Request["msgId"]));
        }

        this.hidHostName.Value = ((UserItem)this.Session["User"]).NickName;
        this.hidHostId.Value = ((UserItem)this.Session["User"]).Id.ToString();

        if(this.Request["hostId"]!=null && this.Request["otherId"]!=null)
        {
            this.hidOtherId.Value = this.Request["otherId"].ToString();
            UserItem other = new UserItem();
            other = (new UsersOperator()).LoadUser(Convert.ToInt32(this.Request["otherId"]));
            this.hidOtherName.Value = other.NickName;

            this.txtChatPrivateList.InnerText += "";
            this.txtChatPrivateList.InnerHtml += "";
        }
    }
开发者ID:caixiaodou,项目名称:GKing,代码行数:21,代码来源:ChatForPrivate.aspx.cs


示例14: MailInfo

        public MailInfo(BinaryReader reader, int version, int customversion)
        {
            MailID = reader.ReadUInt64();
            Sender = reader.ReadString();
            RecipientIndex = reader.ReadInt32();
            Message = reader.ReadString();
            Gold = reader.ReadUInt32();

            int count = reader.ReadInt32();

            for (int i = 0; i < count; i++)
            {
                UserItem item = new UserItem(reader, version, customversion);
                if (SMain.Envir.BindItem(item))
                    Items.Add(item);
            }

            DateSent = DateTime.FromBinary(reader.ReadInt64());
            DateOpened = DateTime.FromBinary(reader.ReadInt64());

            Locked = reader.ReadBoolean();
            Collected = reader.ReadBoolean();
            CanReply = reader.ReadBoolean();
        }
开发者ID:Pete107,项目名称:Mir2,代码行数:24,代码来源:MailInfo.cs


示例15: DropItem

        protected virtual bool DropItem(UserItem item)
        {
            if (CurrentMap.Info.NoDropMonster) return false;

            ItemObject ob = new ItemObject(this, item)
            {
                Owner = EXPOwner,
                OwnerTime = Envir.Time + Settings.Minute,
            };

            return ob.Drop(Settings.DropRange);
        }
开发者ID:GenysisGaming,项目名称:mir2,代码行数:12,代码来源:MonsterObject.cs


示例16: UserItem

    public UserItem(BinaryReader reader, int version = int.MaxValue, int Customversion = int.MaxValue)
    {
        UniqueID = reader.ReadUInt64();
        ItemIndex = reader.ReadInt32();

        CurrentDura = reader.ReadUInt16();
        MaxDura = reader.ReadUInt16();

        Count = reader.ReadUInt32();

        AC = reader.ReadByte();
        MAC = reader.ReadByte();
        DC = reader.ReadByte();
        MC = reader.ReadByte();
        SC = reader.ReadByte();

        Accuracy = reader.ReadByte();
        Agility = reader.ReadByte();
        HP = reader.ReadByte();
        MP = reader.ReadByte();

        AttackSpeed = reader.ReadSByte();
        Luck = reader.ReadSByte();

        if (version <= 19) return;
        SoulBoundId = reader.ReadInt32();
        byte Bools = reader.ReadByte();        
        Identified = (Bools & 0x01) == 0x01;
        Cursed = (Bools & 0x02) == 0x02;
        Strong = reader.ReadByte();
        MagicResist = reader.ReadByte();
        PoisonResist = reader.ReadByte();
        HealthRecovery = reader.ReadByte();
        ManaRecovery = reader.ReadByte();
        PoisonRecovery = reader.ReadByte();
        CriticalRate = reader.ReadByte();
        CriticalDamage = reader.ReadByte();
        Freezing = reader.ReadByte();
        PoisonAttack = reader.ReadByte();
        

        if (version <= 31) return;

        int count = reader.ReadInt32();
        for (int i = 0; i < count; i++)
        {
            if (reader.ReadBoolean()) continue;
            UserItem item = new UserItem(reader, version, Customversion);
            Slots[i] = item;
        }

        if (version <= 38) return;

        GemCount = reader.ReadUInt32();

        if (version <= 40) return;

        Awake = new Awake(reader);

        if (version <= 56) return;

        RefinedValue = (RefinedValue)reader.ReadByte();
        RefineAdded = reader.ReadByte();
        if (version < 60) return;
        WeddingRing = reader.ReadInt32();

        if (version < 65) return;

        if (reader.ReadBoolean())
        {
            ExpireInfo = new ExpireInfo(reader, version, Customversion);
        }

    }
开发者ID:thedeaths,项目名称:official-mir2c-,代码行数:74,代码来源:Common.cs


示例17: Clone

    public UserItem Clone()
    {
        UserItem item = new UserItem(Info)
        {
            UniqueID = UniqueID,
            CurrentDura = CurrentDura,
            MaxDura = MaxDura,
            Count = Count,

            AC = AC,
            MAC = MAC,
            DC = DC,
            MC = MC,
            SC = SC,
            Accuracy = Accuracy,
            Agility = Agility,
            HP = HP,
            MP = MP,

            AttackSpeed = AttackSpeed,
            Luck = Luck,

            DuraChanged = DuraChanged,
            SoulBoundId = SoulBoundId,
            Identified = Identified,
            Cursed = Cursed,
            Strong = Strong,
            MagicResist = MagicResist,
            PoisonResist = PoisonResist,
            HealthRecovery = HealthRecovery,
            ManaRecovery = ManaRecovery,
            PoisonRecovery = PoisonRecovery,
            CriticalRate = CriticalRate,
            CriticalDamage = CriticalDamage,
            Freezing = Freezing,
            PoisonAttack = PoisonAttack,

            Slots = Slots,
            Awake = Awake,

            RefinedValue = RefinedValue,
            RefineAdded = RefineAdded,

            ExpireInfo = ExpireInfo
            };

        return item;
    }
开发者ID:thedeaths,项目名称:official-mir2c-,代码行数:48,代码来源:Common.cs


示例18: OnMouseEnter

        protected override void OnMouseEnter()
        {
            base.OnMouseEnter();

            if (ShowItem == null) ShowItem = new UserItem(Item) { MaxDura = Item.Durability, CurrentDura = Item.Durability };

            GameScene.Scene.CreateItemLabel(ShowItem);
        }
开发者ID:rise-worlds,项目名称:mir2,代码行数:8,代码来源:QuestDialogs.cs


示例19: UpgradeAwake

    public int UpgradeAwake(UserItem item, AwakeType type, out bool[] isHit)
    {
        //return -1 condition error, -1 = dont upgrade, 0 = failed, 1 = Succeed,  
        isHit = null;
        if (CheckAwakening(item, type) != true)
            return -1;

        Random rand = new Random(DateTime.Now.Millisecond);

        if (rand.Next(0, 100) <= AwakeSuccessRate)
        {
            isHit = Awakening(item);
            return 1;
        }
        else
        {
            int idx;
            isHit = makeHit(1, out idx);
            return 0;
        }
    }
开发者ID:thedeaths,项目名称:official-mir2c-,代码行数:21,代码来源:Common.cs


示例20: ProcessItem

        public void ProcessItem(UserItem[] inventory)
        {
            for (int i = 0; i < Info.ItemTasks.Count; i++)
            {
                long count = inventory.Where(item => item != null).
                    Where(item => item.Info == Info.ItemTasks[i].Item).
                    Aggregate<UserItem, long>(0, (current, item) => current + item.Count);

                ItemTaskCount[i] = count;
            }
        }
开发者ID:ufaith,项目名称:cmir2,代码行数:11,代码来源:QuestProgressInfo.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# UserKey类代码示例发布时间:2022-05-24
下一篇:
C# UserInput类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap