예제 #1
0
파일: DLI.cs 프로젝트: fa8ntomas/blck
        public static DLI Load(Map map, XElement dliElement)
        {
            byte row        = (byte)Int32.Parse(dliElement.Attribute("row").Value);
            byte colbak     = (byte)Int32.Parse(dliElement.Attribute("colbk").Value);
            byte colpf0     = (byte)Int32.Parse(dliElement.Attribute("colpf0").Value);
            byte colpf1     = (byte)Int32.Parse(dliElement.Attribute("colpf1").Value);
            byte colpf2     = (byte)Int32.Parse(dliElement.Attribute("colpf2").Value);
            byte colpf3     = (byte)Int32.Parse(dliElement.Attribute("colpf3").Value);
            var  OrderValue = OrderEntry.GetNormalizedValue(dliElement.Attribute("order")?.Value);
            var  Order      = OrderEntry.GetEntries().Find(val => val.Value == OrderValue.ToString());

            return(new DLI(map, new AtariPFColors(colbak, colpf3, colpf2, colpf1, colpf0), row, Order, false));
        }
예제 #2
0
파일: ASM.cs 프로젝트: fa8ntomas/blck
        private Dictionary <RbgPFColors.PlayFieldColor, byte> SortColors(Dictionary <RbgPFColors.PlayFieldColor, byte> colorsDelta, object orderValue)
        {
            Dictionary <RbgPFColors.PlayFieldColor, byte> result = new Dictionary <RbgPFColors.PlayFieldColor, byte>();

            var OrderValue = OrderEntry.GetNormalizedValue(orderValue);

            OrderEntry Order = OrderEntry.GetEntries().Find(val => val.Value == OrderValue.ToString());

            foreach (var color in Order.Order)
            {
                if (colorsDelta.ContainsKey(color))
                {
                    result.Add(color, colorsDelta[color]);
                }
            }

            return(result);
        }
예제 #3
0
파일: FormDLI.cs 프로젝트: fa8ntomas/blck
 private void populateOrderCombo()
 {
     comboBoxOrder.DisplayMember = "Value";
     comboBoxOrder.ValueMember   = "Value";
     comboBoxOrder.DataSource    = OrderEntry.GetEntries();
 }