Exemple #1
0
        public DeckListLayout()
        {
            InitializeComponent();

            FieldName.FieldName           = nameof(DeckModel.Name);
            _fieldGeneratedMana.FieldName = nameof(DeckModel.Mana);

            _fieldLegality.FieldName = nameof(DeckModel.Legal);
            FieldSaved.FieldName     = nameof(DeckModel.Saved);



            _fieldLandCount.FieldName     = nameof(DeckModel.LandCount);
            _fieldCreatureCount.FieldName = nameof(DeckModel.CreatureCount);
            _fieldOtherCount.FieldName    = nameof(DeckModel.OtherSpellCount);

            _fieldMainCount.FieldName                 = nameof(DeckModel.MainCount);
            _fieldMainCollectedCount.FieldName        = nameof(DeckModel.MainCollectedCount);
            _fieldMainCollectedCountPercent.FieldName = nameof(DeckModel.MainCollectedCountPercent);

            _fieldSideCount.FieldName                 = nameof(DeckModel.SideCount);
            _fieldSideCollectedCount.FieldName        = nameof(DeckModel.SideCollectedCount);
            _fieldSideCollectedCountPercent.FieldName = nameof(DeckModel.SideCollectedCountPercent);



            _fieldLandPrice.FieldName     = nameof(DeckModel.LandPrice);
            _fieldCreaturePrice.FieldName = nameof(DeckModel.CreaturePrice);
            _fieldOtherPrice.FieldName    = nameof(DeckModel.OtherSpellPrice);

            _fieldMainPrice.FieldName                 = nameof(DeckModel.MainPrice);
            _fieldMainCollectedPrice.FieldName        = nameof(DeckModel.MainCollectedPrice);
            _fieldMainCollectedPricePercent.FieldName = nameof(DeckModel.MainCollectedPricePercent);

            _fieldSidePrice.FieldName                 = nameof(DeckModel.SidePrice);
            _fieldSideCollectedPrice.FieldName        = nameof(DeckModel.SideCollectedPrice);
            _fieldSideCollectedPricePercent.FieldName = nameof(DeckModel.SideCollectedPricePercent);



            _fieldLandUnknownPrice.FieldName     = nameof(DeckModel.LandUnknownPriceCount);
            _fieldCreatureUnknownPrice.FieldName = nameof(DeckModel.CreatureUnknownPriceCount);
            _fieldOtherUnknownPrice.FieldName    = nameof(DeckModel.OtherSpellUnknownPriceCount);

            _fieldMainUnknownPrice.FieldName                 = nameof(DeckModel.MainUnknownPriceCount);
            _fieldMainCollectedUnknownPrice.FieldName        = nameof(DeckModel.MainCollectedUnknownPriceCount);
            _fieldMainCollectedUnknownPricePercent.FieldName = nameof(DeckModel.MainCollectedUnknownPricePercent);

            _fieldSideUnknownPrice.FieldName                 = nameof(DeckModel.SideUnknownPriceCount);
            _fieldSideCollectedUnknownPrice.FieldName        = nameof(DeckModel.SideCollectedUnknownPriceCount);
            _fieldSideCollectedUnknownPricePercent.FieldName = nameof(DeckModel.SideCollectedUnknownPricePercent);

            DeckListLayoutCustomButtons.SetCustomButtons(this);

            SubscribeToFieldEvents();
        }
Exemple #2
0
 public override IEnumerable <ButtonLayout> GetCustomButtons(FieldControl field) =>
 DeckListLayoutCustomButtons.GetCustomButtons(
     base.GetCustomButtons(field),
     field,
     (DeckModel)DataSource);
Exemple #3
0
        public DeckListLayout()
        {
            InitializeComponent();

            FieldName.FieldName           = nameof(DeckModel.Name);
            _fieldGeneratedMana.FieldName = nameof(DeckModel.Mana);

            _fieldLegality.FieldName = nameof(DeckModel.Legal);
            FieldSaved.FieldName     = nameof(DeckModel.Saved);



            _fieldLandCount.FieldName     = nameof(DeckModel.LandCount);
            _fieldCreatureCount.FieldName = nameof(DeckModel.CreatureCount);
            _fieldOtherCount.FieldName    = nameof(DeckModel.OtherSpellCount);

            _fieldMainCount.FieldName                 = nameof(DeckModel.MainCount);
            _fieldMainCollectedCount.FieldName        = nameof(DeckModel.MainCollectedCount);
            _fieldMainCollectedCountPercent.FieldName = nameof(DeckModel.MainCollectedCountPercent);

            _fieldSideCount.FieldName                 = nameof(DeckModel.SideCount);
            _fieldSideCollectedCount.FieldName        = nameof(DeckModel.SideCollectedCount);
            _fieldSideCollectedCountPercent.FieldName = nameof(DeckModel.SideCollectedCountPercent);



            _fieldLandPrice.FieldName     = nameof(DeckModel.LandPrice);
            _fieldCreaturePrice.FieldName = nameof(DeckModel.CreaturePrice);
            _fieldOtherPrice.FieldName    = nameof(DeckModel.OtherSpellPrice);

            _fieldMainPrice.FieldName                 = nameof(DeckModel.MainPrice);
            _fieldMainCollectedPrice.FieldName        = nameof(DeckModel.MainCollectedPrice);
            _fieldMainCollectedPricePercent.FieldName = nameof(DeckModel.MainCollectedPricePercent);

            _fieldSidePrice.FieldName                 = nameof(DeckModel.SidePrice);
            _fieldSideCollectedPrice.FieldName        = nameof(DeckModel.SideCollectedPrice);
            _fieldSideCollectedPricePercent.FieldName = nameof(DeckModel.SideCollectedPricePercent);



            _fieldLandUnknownPrice.FieldName     = nameof(DeckModel.LandUnknownPriceCount);
            _fieldCreatureUnknownPrice.FieldName = nameof(DeckModel.CreatureUnknownPriceCount);
            _fieldOtherUnknownPrice.FieldName    = nameof(DeckModel.OtherSpellUnknownPriceCount);

            _fieldMainUnknownPrice.FieldName                 = nameof(DeckModel.MainUnknownPriceCount);
            _fieldMainCollectedUnknownPrice.FieldName        = nameof(DeckModel.MainCollectedUnknownPriceCount);
            _fieldMainCollectedUnknownPricePercent.FieldName = nameof(DeckModel.MainCollectedUnknownPricePercent);

            _fieldSideUnknownPrice.FieldName                 = nameof(DeckModel.SideUnknownPriceCount);
            _fieldSideCollectedUnknownPrice.FieldName        = nameof(DeckModel.SideCollectedUnknownPriceCount);
            _fieldSideCollectedUnknownPricePercent.FieldName = nameof(DeckModel.SideCollectedUnknownPricePercent);

            DeckListLayoutCustomButtons.SetCustomButtons(this);

            SubscribeToFieldEvents();

            new[]
            {
                _labelCreature,
                _labelLand,
                _labelOtherSpell,

                _labelMain,
                _labelMainCollected,
                _labelMainPercent,

                _labelSide,
                _labelSideCollected,
                _labelSidePercent,

                _labelPrice,
                _labelCount,
                _labelCountUnknown
            }.ForEach(setupLabel);

            void setupLabel(FieldControl label)
            {
                label.SearchOptions.Allow = false;
                label.AllowSort           = false;
            }

            ImageDeckBoxOpened = Resources.deckbox_opened;
            ImageDeckBox       = Resources.deckbox;
        }