IEnumerable <THUMBBUTTON> GetNativeButtons() { return(buttons.Select(b => { THUMBBUTTONMASK mask = THUMBBUTTONMASK.THB_FLAGS; THUMBBUTTON native_button = new THUMBBUTTON() { uId = (uint)b.Id, dwFlags = GetFlags(b) }; if (b.Icon != null) { mask |= THUMBBUTTONMASK.THB_ICON; native_button.hIcon = b.Icon.Handle; } if (!String.IsNullOrEmpty(b.Tooltip)) { mask |= THUMBBUTTONMASK.THB_TOOLTIP; native_button.szTip = b.Tooltip; } // TODO: ImageLIst index support. native_button.dwMask = mask; return native_button; }).ToList()); }
IEnumerable<THUMBBUTTON> GetNativeButtons() { return buttons.Select (b => { THUMBBUTTONMASK mask = THUMBBUTTONMASK.THB_FLAGS; THUMBBUTTON native_button = new THUMBBUTTON () { uId = (uint)b.Id, dwFlags = GetFlags (b) }; if (b.Icon != null) { mask |= THUMBBUTTONMASK.THB_ICON; native_button.hIcon = b.Icon.Handle; } if (!String.IsNullOrEmpty (b.Tooltip)) { mask |= THUMBBUTTONMASK.THB_TOOLTIP; native_button.szTip = b.Tooltip; } // TODO: ImageLIst index support. native_button.dwMask = mask; return native_button; }).ToList (); }