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

传奇3寄售代码 C# Zircon源代码

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

187

主题

189

帖子

7505

积分

霸王教主

Rank: 9Rank: 9Rank: 9

积分
7505
2022-4-19 20:41:02   显示全部楼层   阅读模式  
zircon元宝寄售代码也是单独独立出来的NPC寄售 可以直接照搬 完整代码附件下载。

该代码需要用户组达到影魅之刃,升级用户组可通过日常发帖,资源共享活跃获得。
1.jpg
[C#] 纯文本查看 复制代码
    /// <summary>
    /// 寄售
    /// </summary>
    public sealed class MarketPlaceDialog : DXWindow1
    {
        #region Properites
        public DXMessageBox ConsignWindow;
        public DXTabControl TabControl;
        #region Search
        public DXTab SearchTab;
        public DXLabel SellNameLabel;
        public DXLabel SellDateLabel;
        public DXTextBox ItemNameBox, BuyTotalBox, SearchNumberSoldBox, SearchLastPriceBox, SearchAveragePriceBox;
        public DXNumberBox BuyCountBox, BuyPriceBox;
        public DXComboBox ItemTypeBox, SortBox;
        public DXControl MessagePanel, BuyPanel, HistoryPanel;
        public DXButton BuyButton, SearchButton, SearchButton1, ShangjiaButton;
        public DXCheckBox BuyGuildBox;
        public DXLabel MessageLabel;
        public DXVScrollBar SearchScrollBar;

        public MarketPlaceRow[] SearchRows;
        public ClientMarketPlaceInfo[] SearchResults;
        #endregion

        #region Consign
        public DXTab ConsignTab;

        public DXTextBox ConsignPriceBox, ConsignCostBox, NumberSoldBox, LastPriceBox, AveragePriceBox, ConsignMessageBox;
        public DXControl ConsignPanel, ConsignBuyPanel, ConsignConfirmPanel;
        public DXButton ConsignButton;
        public DXCheckBox ConsignGuildBox;
        public DXItemGrid ConsignGrid;
        public DXLabel ConsignPriceLabel;
        public DXVScrollBar ConsignScrollBar;
        public DXImageControl ItemImage;
        public MarketPlaceRow[] ConsignRows;
        #endregion

        #region Store
        public DXTab StoreTab;

        public DXTextBox UserNameBox;
        public DXTextBox StoreItemNameBox, StoreBuyTotalBox;
        public DXNumberBox StoreBuyCountBox, StoreBuyPriceBox, GameGoldBox, HuntGoldBox;
        public DXComboBox StoreItemTypeBox, StoreSortBox;
        public DXControl StoreBuyPanel;
        public DXButton StoreBuyButton, StoreSearchButton;
        public DXCheckBox UseHuntGoldBox;
        public DXVScrollBar StoreScrollBar;
        public DXLabel StoreBuyPriceLabel;

        public List<StoreInfo> StoreSearchResults;
        #endregion

        #region SelectedRow

        public MarketPlaceRow SelectedRow
        {
            get => _SelectedRow;
            set
            {
                if (_SelectedRow == value) return;

                MarketPlaceRow oldValue = _SelectedRow;
                _SelectedRow = value;

                OnSelectedRowChanged(oldValue, value);
            }
        }
        private MarketPlaceRow _SelectedRow;
        public event EventHandler<EventArgs> SelectedRowChanged;
        public void OnSelectedRowChanged(MarketPlaceRow oValue, MarketPlaceRow nValue)
        {
            if (oValue != null)
                oValue.Selected = false;

            if (nValue != null)
                nValue.Selected = true;

            if (nValue?.MarketInfo == null)
            {
                MessagePanel.Enabled = false;
                MessageLabel.Text = "";
                ItemImage.Index = -1;
                BuyPanel.Enabled = false;
                SellNameLabel.Text = "";
                BuyCountBox.MinValue = 0;
                BuyCountBox.ValueTextBox.TextBox.Text = "";
                SellDateLabel.Text = "";
                BuyPriceBox.MinValue = 0;
                BuyPriceBox.ValueTextBox.TextBox.Text = "";

                HistoryPanel.Enabled = false;

                SearchNumberSoldBox.TextBox.Text = "";
                SearchLastPriceBox.TextBox.Text = "";
                SearchAveragePriceBox.TextBox.Text = "";
            }
            else
            {
                MessagePanel.Enabled = true;
                MessageLabel.Text = nValue.MarketInfo.Message;
                SellNameLabel.Text = nValue.MarketInfo.Seller;
                SellDateLabel.Text = nValue.MarketInfo.Item.Info.ItemName;
                BuyPanel.Enabled = !GameScene.Game.Observer;

                BuyCountBox.MinValue = 1;
                BuyCountBox.MaxValue = nValue.MarketInfo.Item.Count;
                BuyCountBox.Value = 1;

                BuyPriceBox.MinValue = nValue.MarketInfo.Price;
                BuyPriceBox.MaxValue = nValue.MarketInfo.Price;
                BuyPriceBox.Value = nValue.MarketInfo.Price;
                ItemImage.Index = nValue.MarketInfo.Item.Info.Image;
                ItemImage.Location = new Point(610 - ItemImage.Size.Width / 2, 200 - ItemImage.Size.Height / 2);
                ItemImage.MouseEnter += (o, e) =>
                {
                    if (nValue.MarketInfo!=null)
                    GameScene.Game.MouseItem = nValue.MarketInfo.Item;
                };
                HistoryPanel.Enabled = true;

                SearchNumberSoldBox.TextBox.Text = "Searching...";
                SearchLastPriceBox.TextBox.Text = "Searching...";
                SearchAveragePriceBox.TextBox.Text = "Searching...";

                if (nValue.MarketInfo.Item != null && nValue.MarketInfo.Item.AddedStats.Count > 0)
                    SellDateLabel.ForeColour = Color.FromArgb(148, 255, 206);
                else
                    SellDateLabel.ForeColour = Color.FromArgb(255, 255, 255);
                CEnvir.Enqueue(new C.MarketPlaceHistory { Index = nValue.MarketInfo.Item.Info.Index, PartIndex = nValue.MarketInfo.Item.AddedStats[Stat.ItemIndex], Display = 1 });
            }

            SelectedRowChanged?.Invoke(this, EventArgs.Empty);
        }

        #endregion

        #region SelectedStoreRow


        public event EventHandler<EventArgs> SelectedStoreRowChanged;


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








上一篇:Mir2x C++服务端含客户端全套源代码
下一篇:C#传奇3 Zircon商城代码源代码
回复 关闭延时

使用道具 举报

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

高级模式

Powered by Discuz! X3.4 © Comsenz Inc.

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