传奇单机版,GM论坛,传奇版本库,GM基地

C#传奇3 Zircon商城代码源代码

[复制链接]
查看: 474   回复: 0     # 登录器源码

197

主题

199

帖子

7614

积分

霸王教主

Rank: 9Rank: 9Rank: 9

积分
7614
2022-4-19 21:00:40   显示全部楼层   阅读模式  
1.jpg
[C#] 纯文本查看 复制代码
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Windows.Forms;
using Client.Controls;
using Client.Envir;
using Client.Models;
using Client.UserModels;
using Library;
using Library.SystemModels;
using C = Library.Network.ClientPackets;


//Cleaned
namespace Client.Scenes.Views
{



    /// <summary>
    /// 商城
    /// </summary>
    public sealed class ShangChengDialog : DXWindow1
    {
        #region Store

        public DXTextBox StoreItemNameBox, StoreBuyTotalBox;
        public DXNumberBox StoreBuyCountBox, StoreBuyPriceBox, GameGoldBox, HuntGoldBox;
        public DXComboBox StoreItemTypeBox, StoreSortBox;
        public DXControl StoreBuyPanel;
        public DXButton StoreBuyButton, StoreSearchButton, ClearButton,YuanbaoLabel;
        public DXCheckBox UseHuntGoldBox;
        public DXVScrollBar StoreScrollBar1;
        public DXLabel StoreBuyPriceLabel;
        public DXControl Panel;
        public MarketPlaceStoreRow[] StoreRows;
        public List<StoreInfo> StoreSearchResults;
        public DXCheckBox FastBox;
        public List<DXButton> FilterButton;
        public DXVScrollBar FilterScrollBar;
        public DXControl FilterPanel;
        public DXButton CurrentButton;

        public int Xianyouyuanbao;
        public int Xianyoubangyuan;
        #endregion
            label = new DXLabel
            {
                Parent = filterPanel1,
                Location = new Point(StoreItemNameBox.Location.X + StoreItemNameBox.Size.Width + 10, 5),
                Text = "物品:",
            };



            StoreItemTypeBox = new DXComboBox
            {
                Parent = filterPanel1,
                Location = new Point(label.Location.X + label.Size.Width + 5, label.Location.Y),
                Size = new Size(95, DXComboBox.DefaultNormalHeight),
                DropDownHeight = 198
            };


            new DXListBoxItem
            {
                Parent = StoreItemTypeBox.ListBox,
                Label = { Text = $"全部" },
                Visible = false,
                Item = null
            };

            TODO Store Filter

            HashSet<string> filters = new HashSet<string>();

            foreach (StoreInfo info in Globals.StoreInfoList.Binding)
            {
                if (string.IsNullOrEmpty(info.Filter)) continue;

                string[] temp = info.Filter.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries);

                foreach (string s in temp)
                    filters.Add(s.Trim());
            }

            foreach (string filter in filters.OrderBy(x => x))
            {
                new DXListBoxItem
                {
                    Parent = StoreItemTypeBox.ListBox,
                    Label = { Text = filter },
                    Item = filter
                };
            }

            StoreItemTypeBox.ListBox.SelectItem(null);


            label = new DXLabel
            {
                Visible = false,
                Parent = filterPanel1,
                Location = new Point(StoreItemTypeBox.Location.X + StoreItemTypeBox.Size.Width + 10, 5),
                Text = "排序:",
            };

            StoreSortBox = new DXComboBox
            {
                Visible=false,
                Parent = filterPanel1,
                Location = new Point(label.Location.X + label.Size.Width + 5, label.Location.Y),
                Size = new Size(100, DXComboBox.DefaultNormalHeight)
            };

            Type storeType = typeof(MarketPlaceStoreSort);

            for (MarketPlaceStoreSort i = MarketPlaceStoreSort.Alphabetical; i <= MarketPlaceStoreSort.Favourite; i++)
            {
                MemberInfo[] infos = storeType.GetMember(i.ToString());

                DescriptionAttribute description = infos[0].GetCustomAttribute<DescriptionAttribute>();
                new DXListBoxItem
                {
                    Parent = StoreSortBox.ListBox,
                    Label = { Text = description?.Description ?? i.ToString() },
                    Item = i,
                    Opacity = 0.5f
                };
            }




游客,如果您要查看本帖隐藏内容请回复





上一篇:传奇3寄售代码 C# Zircon源代码
下一篇:C#传奇3大补帖增强免蜡源代码
回复 关闭延时

使用道具 举报

您需要登录后才可以回帖   登录 立即注册

高级模式

Powered by Discuz! X3.4 © Comsenz Inc.

Archiver|手机版|小黑屋|美林传奇GM论坛 ( 蜀ICP备2020030293号-2 )