protected string ResolveStringResource(INiPackage package, string key) { if (package == null) throw new ArgumentNullException("package"); if (key == null) throw new ArgumentNullException("key"); return package.ResolveStringResource(key); }
protected string ResolveStringResource(INiPackage package, string key) { if (package == null) { throw new ArgumentNullException("package"); } if (key == null) { throw new ArgumentNullException("key"); } return(package.ResolveStringResource(key)); }
private object CreateCommandBarPopup(Menu menu) { INiCommandBarPopup popup; ErrorUtil.ThrowOnFailure(_commandManager.CreateCommandBarPopup( menu.Guid != Guid.Empty ? menu.Guid : Guid.NewGuid(), menu.Priority, out popup )); popup.Text = _package.ResolveStringResource(menu.Text); popup.DisplayStyle = Enum <NiCommandDisplayStyle> .Parse(menu.Style.ToString()); ((NiCommandBarPopup)popup).Bitmap = ResolveBitmapResource(menu.Image); foreach (INiCommandBarGroup group in Build(menu.Items)) { ErrorUtil.ThrowOnFailure(popup.Controls.Add(@group)); } return(popup); }