CadEditor.UtilsGui.setCbCheckedWithoutUpdateLevel C# (CSharp) Метод

setCbCheckedWithoutUpdateLevel() публичный статический Метод

public static setCbCheckedWithoutUpdateLevel ( CheckBox cb, EventHandler ev, bool index = false ) : void
cb System.Windows.Forms.CheckBox
ev EventHandler
index bool
Результат void
        public static void setCbCheckedWithoutUpdateLevel(CheckBox cb, EventHandler ev, bool index = false)
        {
            cb.CheckedChanged -= ev;
            cb.Checked = index;
            cb.CheckedChanged += ev;
        }

Usage Example

Пример #1
0
        private void updateMappingControls(int index)
        {
            ushort word = tiles[index];

            UtilsGui.setCbIndexWithoutUpdateLevel(cbTile, cbTile_SelectedIndexChanged, Mapper.tileIdx(word));
            UtilsGui.setCbIndexWithoutUpdateLevel(cbPal, cbPal_SelectedIndexChanged, Mapper.palIdx(word));
            UtilsGui.setCbCheckedWithoutUpdateLevel(cbHFlip, cbHFlip_CheckedChanged, Mapper.hf(word));
            UtilsGui.setCbCheckedWithoutUpdateLevel(cbVFlip, cbVFlip_CheckedChanged, Mapper.vf(word));
            UtilsGui.setCbCheckedWithoutUpdateLevel(cbPrior, cbPrior_CheckedChanged, Mapper.p(word));
        }