コード例 #1
0
        public CurrencyTabViewModel()
        {
            MainWindow.Instance.currencyTabSelect.SelectionChanged += CurrencyTabSelect_SelectionChanged;
            MainWindow.Instance.currencyTabButtonAdd.Click         += CurrencyTabButtonAdd_Click;
            CurrencyAsset empty = new CurrencyAsset();

            Currency = empty;
            UpdateTabs();

            ContextMenu cmenu2 = new ContextMenu();

            cmenu2.Items.Add(ContextHelper.CreateAddFromTemplateButton(typeof(CurrencyEntry), (result) =>
            {
                if (result is CurrencyEntry item)
                {
                    AddEntry(item);
                }
            }));

            MainWindow.Instance.currencyAddItemButton.ContextMenu = cmenu2;
        }
コード例 #2
0
 public GameCurrencyAsset(CurrencyAsset asset, EGameAssetOrigin origin) : base(asset.ValueFormat, 0, Guid.Parse(asset.GUID), "currency", origin)
 {
     valueFormat = asset.ValueFormat;
     entries     = asset.Entries.ToArray();
 }