Exemplo n.º 1
0
 internal virtual bool AddButton(DialogButton button)
 {
     return(dialog_add_button(handle, button.Label, button.Enabled, IntPtr.Zero, button.Visible) == BPS.BPS_SUCCESS);
 }
Exemplo n.º 2
0
 internal virtual bool ReplaceButton(int index, DialogButton newButton)
 {
     return(dialog_update_button(handle, index, newButton.Label ?? "", newButton.Enabled, IntPtr.Zero, newButton.Visible) == BPS.BPS_SUCCESS);
 }
Exemplo n.º 3
0
        internal override bool AddButton(DialogButton button)
        {
            var icon = button is ContentMenuButton ? ((ContentMenuButton)button).Icon : ContextMenuIcon.NoIcon;

            return(dialog_context_menu_add_button(handle, button.Label, button.Enabled, IntPtr.Zero, button.Visible, icon) == BPS.BPS_SUCCESS);
        }
Exemplo n.º 4
0
        internal override bool ReplaceButton(int index, DialogButton newButton)
        {
            var icon = newButton is ContentMenuButton ? ((ContentMenuButton)newButton).Icon : ContextMenuIcon.NoIcon;

            return(dialog_context_menu_update_button(handle, index, newButton.Label, newButton.Enabled, IntPtr.Zero, newButton.Visible, icon) == BPS.BPS_SUCCESS);
        }
Exemplo n.º 5
0
 internal override bool UpdateButtonProperty(int index, DialogButton button, string property)
 {
     switch (property)
     {
         case "Label":
             return dialog_context_menu_update_button(handle, index, button.Label, button.Enabled, IntPtr.Zero, button.Visible, ContextMenuIcon.KeepIcon) == BPS.BPS_SUCCESS;
         case "Enabled":
         case "Visible":
             return dialog_context_menu_update_button(handle, index, null, button.Enabled, IntPtr.Zero, button.Visible, ContextMenuIcon.KeepIcon) == BPS.BPS_SUCCESS;
         case "Context":
             return true; // We don't actually set the context pointer, so don't worry if it changes.
         case "Icon":
             return dialog_context_menu_update_button(handle, index, null, button.Enabled, IntPtr.Zero, button.Visible, ((ContentMenuButton)button).Icon) == BPS.BPS_SUCCESS;
         default:
             throw new ArgumentException(string.Format("Unknown property: {0}", property));
     }
 }
Exemplo n.º 6
0
 internal override bool ReplaceButton(int index, DialogButton newButton)
 {
     var icon = newButton is ContentMenuButton ? ((ContentMenuButton)newButton).Icon : ContextMenuIcon.NoIcon;
     return dialog_context_menu_update_button(handle, index, newButton.Label, newButton.Enabled, IntPtr.Zero, newButton.Visible, icon) == BPS.BPS_SUCCESS;
 }
Exemplo n.º 7
0
 internal override bool AddButton(DialogButton button)
 {
     var icon = button is ContentMenuButton ? ((ContentMenuButton)button).Icon : ContextMenuIcon.NoIcon;
     return dialog_context_menu_add_button(handle, button.Label, button.Enabled, IntPtr.Zero, button.Visible, icon) == BPS.BPS_SUCCESS;
 }
Exemplo n.º 8
0
 internal virtual bool ReplaceButton(int index, DialogButton newButton)
 {
     return dialog_update_button(handle, index, newButton.Label ?? "", newButton.Enabled, IntPtr.Zero, newButton.Visible) == BPS.BPS_SUCCESS;
 }
Exemplo n.º 9
0
 internal virtual bool AddButton(DialogButton button)
 {
     return dialog_add_button(handle, button.Label, button.Enabled, IntPtr.Zero, button.Visible) == BPS.BPS_SUCCESS;
 }