Example #1
0
        protected override void DrawItemOn(GDI.Gdi g, NativeItemData nativeItem, Rectangle rItem, int nItem)
        {
            ExNativeItemData item     = (ExNativeItemData)nativeItem;
            Rectangle        itemrect = new Rectangle(rItem.Right - item.WorkAreaWidth, rItem.Top, item.WorkAreaWidth, rItem.Height);

            item.DrawItemOn(g, itemrect);
        }
        protected override List <NativeItemData> BuildNativeControlItems()
        {
            List <NativeItemData> result = new List <NativeItemData>();

            foreach (SettingsListViewItems element in Items)
            {
                ExNativeItemData item = null;

                if (element.OptionType == SettingsKineticControlOptionType.CheckBox)
                {
                    item = new CheckBoxNativeItemData();
                    ((CheckBoxNativeItemData)item).CheckBoxEmpty    = MasterForm.SkinManager.GetImage("MultiValueCheckNone");
                    ((CheckBoxNativeItemData)item).CheckBoxSelected = MasterForm.SkinManager.GetImage("MultiValueCheck");
                }

                if (item != null)
                {
                    item.InfoLeftIndents    = new int[1];
                    item.InfoTopIndents     = new int[1];
                    item.InfoLeftIndents[0] = UISettings.CalcPix(10);
                    item.InfoTopIndents[0]  = UISettings.CalcPix(10);

                    item.WorkAreaWidth = UISettings.CalcPix(100);
                    item.PrimaryText   = element.OptionName;
                    item.DataSource    = element;
                    item.Group         = element.GroupName;
                    result.Add(item);
                }
            }

            return(result);
        }
Example #3
0
        protected override List <NativeItemData> BuildNativeControlItems()
        {
            List <NativeItemData> result = new List <NativeItemData>();

            foreach (SettingsListViewItems element in Items)
            {
                ExNativeItemData item = null;

                if (element.OptionType == SettingsKineticControlOptionType.CheckBox)
                {
                    item = new CheckBoxNativeItemData();
                    ((CheckBoxNativeItemData)item).CheckBoxEmpty    = MasterForm.SkinManager.GetImage("SettingsUnchecked");
                    ((CheckBoxNativeItemData)item).CheckBoxSelected = MasterForm.SkinManager.GetImage("SettingsChecked");
                }
                else if (element.OptionType == SettingsKineticControlOptionType.MultiValue)
                {
                    item = new MultiItemsNativeItemData();
                    ((MultiItemsNativeItemData)item).SelectButton = MasterForm.SkinManager.GetImage("SettingsEnum");
                    item.Font = Settings.SecondaryTextFontGdi;
                    ((MultiItemsNativeItemData)item).Select += (EventHandler)element.Tag;
                }
                else if (element.OptionType == SettingsKineticControlOptionType.TwoButtonValue)
                {
                    item = new TwoItemsNativeItemData();
                    ((TwoItemsNativeItemData)item).ItemLeft          = MasterForm.SkinManager.GetImage(/*"LeftDeselectedSettingButton"*/ "ButtonOther");
                    ((TwoItemsNativeItemData)item).ItemLeftSelected  = MasterForm.SkinManager.GetImage(/*"LeftSelectedSettingButton"*/ "ButtonOther");
                    ((TwoItemsNativeItemData)item).ItemRight         = MasterForm.SkinManager.GetImage(/*"RightDeselectedSettingButton"*/ "ButtonOther");
                    ((TwoItemsNativeItemData)item).ItemRightSelected = MasterForm.SkinManager.GetImage(/*"RightSelectedSettingButton"*/ "ButtonOther");
                    item.Font = FontCache.CreateFont("Tahoma", 14, FontStyle.Bold, true);
                }

                if (item != null)
                {
                    item.InfoLeftIndents    = new int[1];
                    item.InfoTopIndents     = new int[1];
                    item.InfoLeftIndents[0] = UISettings.CalcPix(10);
                    item.InfoTopIndents[0]  = UISettings.CalcPix(10);

                    item.WorkAreaWidth = UISettings.CalcPix(100);
                    item.PrimaryText   = element.OptionName;
                    item.DataSource    = element;
                    item.Group         = element.GroupName;
                    result.Add(item);
                }
            }

            return(result);
        }