本文整理汇总了C#中Image.Show方法的典型用法代码示例。如果您正苦于以下问题:C# Image.Show方法的具体用法?C# Image.Show怎么用?C# Image.Show使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Image
的用法示例。
在下文中一共展示了Image.Show方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ToolBarImage
public ToolBarImage (string image)
{
Image i = new Image (PintaCore.Resources.GetIcon (image));
i.Show ();
Add (i);
Show ();
}
示例2: HoverImageButton
public HoverImageButton()
{
CanFocus = true;
image = new Image();
image.Show();
Add(image);
}
示例3: SyncButton
public SyncButton()
: base()
{
Image image = new Image (Stock.Copy, IconSize.Menu);
Add (image);
Relief = ReliefStyle.None;
image.Show ();
}
示例4: CreateSmallStockButton
public static Button CreateSmallStockButton(string stock)
{
Button button = new Button ();
Image image = new Image (stock, IconSize.Menu);
button.Add (image);
button.Relief = ReliefStyle.None;
image.Show ();
return button;
}
示例5: ToolBarButton
public ToolBarButton (string image, string label, string tooltip) : base (null, label)
{
Image i = new Image (PintaCore.Resources.GetIcon (image));
i.Show ();
this.IconWidget = i;
TooltipText = tooltip;
Show ();
}
示例6: AvatarSelector
public AvatarSelector()
{
pixbuf = Utilities.GetIcon("blank-photo-128", 32);
avatarImage = new Image (pixbuf);
avatarImage.Show ();
this.BorderWidth = 0;
this.Relief = Gtk.ReliefStyle.None;
this.Add(avatarImage);
}
示例7: HelpPage
public HelpPage()
: base(0.5f, 0.5f, 0.0f, 0.0f)
{
Image help = new Image ();
help.Pixbuf = Gdk.Pixbuf.LoadFromResource ("jcastro.png");
help.Show ();
Add (help);
tab_widget = new HBox ();
tab_widget.Spacing = 2;
tab_widget.PackStart (new Image (Stock.Help, IconSize.Menu), false, false, 0);
tab_widget.PackStart (new Label (Title), true, true, 0);
tab_widget.ShowAll ();
}
示例8: NewsMenuItem
public NewsMenuItem()
{
HBox box = new HBox (false, 0);
menuLabel = new Label ();
box.Add (menuLabel);
newsicon = new Image (Gdk.Pixbuf.LoadFromResource ("QSSupportLib.icons.internet-news-reader.png"));
newsicon.TooltipText = "Нет непрочитанных новостей.";
newsicon.Show ();
box.Add (newsicon);
this.Add (box);
this.RightJustified = true;
this.ShowAll ();
menuLabel.Visible = false;
}
示例9: MenuButton
public MenuButton()
{
hbox = new HBox ();
Image = new Image ();
hbox.PackStart (Image, false, false, 1);
Image.Show ();
this.titleLabel = new Label ();
this.titleLabel.Xalign = 0;
hbox.PackStart (this.titleLabel, true, true, 1);
this.titleLabel.Show ();
this.arrow = new Arrow (ArrowType.Down, ShadowType.None);
hbox.PackStart (arrow, false, false, 1);
arrow.Show ();
this.Add (hbox);
hbox.Show ();
}
示例10: SetButtonIcon
static void SetButtonIcon (Button button, string stockIcon)
{
Alignment alignment = new Alignment (0.5f, 0.5f, 0f, 0f);
Label label = new Label (button.Label);
HBox hbox = new HBox (false, 2);
Image image = new Image ();
image.Pixbuf = Stetic.IconLoader.LoadIcon (button, stockIcon, IconSize.Button);
image.Show ();
hbox.Add (image);
label.Show ();
hbox.Add (label);
hbox.Show ();
alignment.Add (hbox);
button.Child.Destroy ();
alignment.Show ();
button.Add (alignment);
}
示例11: DockItemGrip
protected DockItemGrip()
{
WidgetFlags |= WidgetFlags.NoWindow;
Widget.PushCompositeChild ();
closeButton = new Button ();
Widget.PopCompositeChild ();
closeButton.WidgetFlags &= ~WidgetFlags.CanFocus;
closeButton.Parent = this;
closeButton.Relief = ReliefStyle.None;
closeButton.Show ();
Image image = new Image (GdlStock.Close, IconSize.Menu);
closeButton.Add (image);
image.Show ();
closeButton.Clicked += new EventHandler (CloseClicked);
Widget.PushCompositeChild ();
iconifyButton = new Button ();
Widget.PopCompositeChild ();
iconifyButton.WidgetFlags &= ~WidgetFlags.CanFocus;
iconifyButton.Parent = this;
iconifyButton.Relief = ReliefStyle.None;
iconifyButton.Show ();
image = new Image (GdlStock.MenuLeft, IconSize.Menu);
iconifyButton.Add (image);
image.Show ();
iconifyButton.Clicked += new EventHandler (IconifyClicked);
tooltips = new Tooltips ();
tooltips.SetTip (iconifyButton, "Iconify", "Iconify this dock");
tooltips.SetTip (closeButton, "Close", "Close this dock");
}
示例12: AnimateLeftToRight
public void AnimateLeftToRight(Image water, Action done)
{
Action FilteredDone = AnimationComplete(done);
HasWater = true;
water.ClipTo(0, 0, 0, 0);
water.Show();
Enumerable.Range(1, Pipe.Size / 2).ForEach(
(Current_, Next) =>
{
var Current = Current_ * 2;
water.ClipTo(
0,
0,
Current,
Pipe.Size
);
this.WaterAnimationSpeed.AtDelay(Next);
}
)(FilteredDone);
}
示例13: Init
private void Init()
{
Logger.Debug("Called Init");
this.Icon = Utilities.GetIcon ("giver-48", 48);
// Update the window title
this.Title = string.Format ("Giver Preferences");
//this.DefaultSize = new Gdk.Size (300, 500);
this.VBox.Spacing = 0;
this.VBox.BorderWidth = 0;
this.SetDefaultSize (450, 100);
this.AddButton(Stock.Close, Gtk.ResponseType.Ok);
this.DefaultResponse = ResponseType.Ok;
// Start with an event box to paint the background white
EventBox eb = new EventBox();
eb.Show();
eb.BorderWidth = 0;
eb.ModifyBg(StateType.Normal, new Gdk.Color(255,255,255));
eb.ModifyBase(StateType.Normal, new Gdk.Color(255,255,255));
VBox mainVBox = new VBox();
mainVBox.BorderWidth = 10;
mainVBox.Spacing = 5;
mainVBox.Show ();
eb.Add(mainVBox);
this.VBox.PackStart(eb);
Label label = new Label();
label.Show();
label.Justify = Gtk.Justification.Left;
label.SetAlignment (0.0f, 0.5f);
label.LineWrap = false;
label.UseMarkup = true;
label.UseUnderline = false;
label.Markup = "<span weight=\"bold\" size=\"large\">Your Name</span>";
mainVBox.PackStart(label, true, true, 0);
// Name Box at the top of the Widget
HBox nameBox = new HBox();
nameBox.Show();
nameEntry = new Entry();
nameEntry.Show();
nameBox.PackStart(nameEntry, true, true, 0);
nameBox.Spacing = 10;
mainVBox.PackStart(nameBox, false, false, 0);
label = new Label();
label.Show();
label.Justify = Gtk.Justification.Left;
label.SetAlignment (0.0f, 0.5f);
label.LineWrap = false;
label.UseMarkup = true;
label.UseUnderline = false;
label.Markup = "<span weight=\"bold\" size=\"large\">Your Picture</span>";
mainVBox.PackStart(label, true, true, 0);
Gtk.Table table = new Table(4, 3, false);
table.Show();
// None Entry
noneButton = new RadioButton((Gtk.RadioButton)null);
noneButton.Show();
table.Attach(noneButton, 0, 1, 0, 1, AttachOptions.Shrink, AttachOptions.Shrink, 0, 0);
VBox vbox = new VBox();
vbox.Show();
Gtk.Image image = new Image(Utilities.GetIcon("computer", 48));
image.Show();
vbox.PackStart(image, false, false, 0);
label = new Label("None");
label.Show();
vbox.PackStart(label, false, false, 0);
table.Attach(vbox, 1, 2, 0 ,1, AttachOptions.Shrink, AttachOptions.Shrink, 0, 0);
vbox = new VBox();
vbox.Show();
table.Attach(vbox, 2,3,1,2, AttachOptions.Expand | AttachOptions.Fill, AttachOptions.Expand | AttachOptions.Fill, 0, 0);
// Local Entry
localButton = new RadioButton(noneButton);
localButton.Show();
table.Attach(localButton, 0, 1, 1, 2, AttachOptions.Shrink, AttachOptions.Shrink, 0, 0);
vbox = new VBox();
vbox.Show();
localImage = new Image(Utilities.GetIcon("stock_person", 48));
localImage.Show();
vbox.PackStart(localImage, false, false, 0);
label = new Label("File");
label.Show();
vbox.PackStart(label, false, false, 0);
table.Attach(vbox, 1, 2, 1 ,2, AttachOptions.Shrink, AttachOptions.Shrink, 0, 0);
photoButton = new Button("Change Photo");
photoButton.Show();
table.Attach(photoButton, 2,3,1,2, AttachOptions.Expand | AttachOptions.Fill, AttachOptions.Shrink, 0, 0);
// Web Entry
webButton = new RadioButton(noneButton);
webButton.Show();
table.Attach(webButton, 0, 1, 2, 3, AttachOptions.Shrink, AttachOptions.Shrink, 0, 0);
//.........这里部分代码省略.........
示例14: SetLabel
public void SetLabel (Gtk.Widget page, Gdk.Pixbuf icon, string label)
{
this.label = label;
this.page = page;
if (Child != null) {
Gtk.Widget oc = Child;
Remove (oc);
oc.Destroy ();
}
Gtk.HBox box = new HBox ();
box.Spacing = 2;
if (icon != null) {
tabIcon = new Gtk.Image (icon);
tabIcon.Show ();
box.PackStart (tabIcon, false, false, 0);
} else
tabIcon = null;
if (!string.IsNullOrEmpty (label)) {
labelWidget = new ExtendedLabel (label);
labelWidget.DropShadowVisible = true;
labelWidget.UseMarkup = true;
box.PackStart (labelWidget, true, true, 0);
} else {
labelWidget = null;
}
btnDock = new ImageButton ();
btnDock.Image = pixAutoHide;
btnDock.TooltipText = GettextCatalog.GetString ("Auto Hide");
btnDock.CanFocus = false;
// btnDock.WidthRequest = btnDock.HeightRequest = 17;
btnDock.Clicked += OnClickDock;
btnDock.ButtonPressEvent += (o, args) => args.RetVal = true;
btnDock.WidthRequest = btnDock.SizeRequest ().Width;
btnClose = new ImageButton ();
btnClose.Image = pixClose;
btnClose.TooltipText = GettextCatalog.GetString ("Close");
btnClose.CanFocus = false;
// btnClose.WidthRequest = btnClose.HeightRequest = 17;
btnClose.WidthRequest = btnDock.SizeRequest ().Width;
btnClose.Clicked += delegate {
item.Visible = false;
};
btnClose.ButtonPressEvent += (o, args) => args.RetVal = true;
Gtk.Alignment al = new Alignment (0, 0, 1, 1);
HBox btnBox = new HBox (false, 3);
btnBox.PackStart (btnDock, false, false, 0);
btnBox.PackStart (btnClose, false, false, 0);
al.Add (btnBox);
al.LeftPadding = 3;
al.TopPadding = 1;
box.PackEnd (al, false, false, 0);
Add (box);
// Get the required size before setting the ellipsize property, since ellipsized labels
// have a width request of 0
box.ShowAll ();
Show ();
UpdateBehavior ();
UpdateVisualStyle ();
}
示例15: SyncTitleConflictDialog
public SyncTitleConflictDialog (Note existingNote, IList<string> noteUpdateTitles) :
base (Catalog.GetString ("Note Conflict"), null, Gtk.DialogFlags.Modal)
{
this.existingNote = existingNote;
this.noteUpdateTitles = noteUpdateTitles;
// Suggest renaming note by appending " (old)" to the existing title
string suggestedRenameBase = existingNote.Title + Catalog.GetString (" (old)");
string suggestedRename = suggestedRenameBase;
for (int i = 1; !IsNoteTitleAvailable (suggestedRename); i++)
suggestedRename = suggestedRenameBase + " " + i.ToString();
VBox outerVBox = new VBox (false, 12);
outerVBox.BorderWidth = 12;
outerVBox.Spacing = 8;
HBox hbox = new HBox (false, 8);
Image image = new Image (GuiUtils.GetIcon (Gtk.Stock.DialogWarning, 48)); // TODO: Is this the right icon?
image.Show ();
hbox.PackStart (image, false, false, 0);
VBox vbox = new VBox (false, 8);
headerLabel = new Label ();
headerLabel.UseMarkup = true;
headerLabel.Xalign = 0;
headerLabel.UseUnderline = false;
headerLabel.Show ();
vbox.PackStart (headerLabel, false, false, 0);
messageLabel = new Label ();
messageLabel.Xalign = 0;
messageLabel.UseUnderline = false;
messageLabel.LineWrap = true;
messageLabel.Wrap = true;
messageLabel.Show ();
vbox.PackStart (messageLabel, false, false, 0);
vbox.Show ();
hbox.PackStart (vbox, true, true, 0);
hbox.Show ();
outerVBox.PackStart (hbox);
VBox.PackStart (outerVBox);
Gtk.HBox renameHBox = new Gtk.HBox ();
renameRadio = new Gtk.RadioButton (Catalog.GetString ("Rename local note:"));
renameRadio.Toggled += radio_Toggled;
Gtk.VBox renameOptionsVBox = new Gtk.VBox ();
renameEntry = new Gtk.Entry (suggestedRename);
renameEntry.Changed += renameEntry_Changed;
renameUpdateCheck = new Gtk.CheckButton (Catalog.GetString ("Update links in referencing notes"));
renameOptionsVBox.PackStart (renameEntry);
//renameOptionsVBox.PackStart (renameUpdateCheck); // This seems like a superfluous option
renameHBox.PackStart (renameRadio);
renameHBox.PackStart (renameOptionsVBox);
VBox.PackStart (renameHBox);
deleteExistingRadio = new Gtk.RadioButton (renameRadio, Catalog.GetString ("Overwrite local note"));
deleteExistingRadio.Toggled += radio_Toggled;
VBox.PackStart (deleteExistingRadio);
alwaysDoThisCheck = new Gtk.CheckButton (Catalog.GetString ("Always perform this action"));
VBox.PackStart (alwaysDoThisCheck);
continueButton = (Gtk.Button) AddButton (Gtk.Stock.GoForward, Gtk.ResponseType.Accept);
// Set initial dialog text
HeaderText = Catalog.GetString ("Note conflict detected");
MessageText = string.Format (Catalog.GetString ("The server version of \"{0}\" conflicts with your local note."
+ " What do you want to do with your local note?"),
existingNote.Title);
ShowAll ();
}