本文整理汇总了C#中Gtk.Image.SetAlignment方法的典型用法代码示例。如果您正苦于以下问题:C# Image.SetAlignment方法的具体用法?C# Image.SetAlignment怎么用?C# Image.SetAlignment使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Gtk.Image
的用法示例。
在下文中一共展示了Image.SetAlignment方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: iFolderCreationDialog
public iFolderCreationDialog(iFolderWeb ifolder)
: base()
{
this.Title = "";
this.HasSeparator = false;
this.Resizable = false;
this.Icon = new Gdk.Pixbuf(Util.ImagesPath("ifolder16.png"));
Gdk.Pixbuf bigiFolder =
new Gdk.Pixbuf(Util.ImagesPath("ifolder48.png"));
Image folderImage = new Image(bigiFolder);
VBox vbox = new VBox();
vbox.BorderWidth = 10;
vbox.Spacing = 10;
HBox h = new HBox();
h.Spacing = 12;
folderImage.SetAlignment(0.5F, 0);
h.PackStart(folderImage, false, false, 0);
VBox vbox2 = new VBox();
vbox2.Spacing = 10;
Label l = new Label("<span weight=\"bold\" size=\"larger\">" +
Util.GS("iFolder Created") +
"</span>");
l.LineWrap = false;
l.UseMarkup = true;
l.Selectable = false;
l.Xalign = 0;
l.Yalign = 0;
vbox2.PackStart(l, false, false, 0);
l = new Label(Util.GS("The folder you selected is now an iFolder. To learn more about using iFolder and sharing iFolders with other users, see \"Managing iFolders\" in iFolder Help."));
l.LineWrap = true;
l.Xalign = 0;
vbox2.PackStart(l, true, true, 0);
h.PackEnd(vbox2, true, true, 0);
vbox.PackStart(h);
Alignment cbAlignment = new Alignment(1, 1, 1, 0);
vbox.PackStart(cbAlignment, true, true, 0);
cbutton =
new CheckButton(Util.GS("Do not show this message again."));
cbAlignment.Add(cbutton);
vbox.ShowAll();
this.VBox.Add(vbox);
this.AddButton(Stock.Close, ResponseType.Ok);
this.AddButton(Stock.Help, ResponseType.Help);
}
示例2: iFolderNetworkDialog
public iFolderNetworkDialog()
: base()
{
this.Title = "";
this.HasSeparator = false;
this.Resizable = false;
this.Icon = new Gdk.Pixbuf(Util.ImagesPath("ifolder16.png"));
Gdk.Pixbuf bigiFolder =
new Gdk.Pixbuf(Util.ImagesPath("ifolder48.png"));
Image folderImage = new Image(bigiFolder);
VBox vbox = new VBox();
vbox.BorderWidth = 10;
vbox.Spacing = 10;
HBox h = new HBox();
h.Spacing = 12;
folderImage.SetAlignment(0.5F, 0);
h.PackStart(folderImage, false, false, 0);
VBox vbox2 = new VBox();
vbox2.Spacing = 10;
Label l = new Label("<span weight=\"bold\" size=\"larger\">" +
Util.GS("Network Events") +
"</span>");
l.LineWrap = false;
l.UseMarkup = true;
l.Selectable = false;
l.Xalign = 0;
l.Yalign = 0;
vbox2.PackStart(l, false, false, 0);
l = new Label(Util.GS("Novell iFolder does not currently support this machine's Network card to detect Network events. DBus failed to initialize for the Network card."));
l.LineWrap = true;
l.Xalign = 0;
vbox2.PackStart(l, true, true, 0);
h.PackEnd(vbox2, true, true, 0);
vbox.PackStart(h);
Alignment cbAlignment = new Alignment(1, 1, 1, 0);
vbox.PackStart(cbAlignment, true, true, 0);
cbutton =
new CheckButton(Util.GS("Do not show this message again."));
cbAlignment.Add(cbutton);
vbox.ShowAll();
this.VBox.Add(vbox);
this.AddButton(Stock.Close, ResponseType.Ok);
}
示例3: iFolderCrashDialog
public iFolderCrashDialog(System.Exception e)
: base()
{
this.SetDefaultSize (600, 400);
this.Title = "";
this.HasSeparator = false;
this.Resizable = true;
this.Icon = new Gdk.Pixbuf(Util.ImagesPath("ifolder-crash.png"));
Image crashImage =
new Image(new Gdk.PixbufAnimation(Util.ImagesPath("ifolder-crash.gif")));
VBox vbox = new VBox();
vbox.BorderWidth = 10;
vbox.Spacing = 10;
Label l = new Label("<span weight=\"bold\" size=\"larger\">" +
Util.GS("iFolder crashed because of an unhandled exception") +
"</span>");
l.LineWrap = false;
l.UseMarkup = true;
l.Selectable = false;
l.Xalign = 0; l.Yalign = 0;
vbox.PackStart(l, false, false, 0);
HBox h = new HBox();
h.BorderWidth = 10;
h.Spacing = 12;
crashImage.SetAlignment(0.5F, 0);
h.PackStart(crashImage, false, false, 0);
TextView tv = new TextView();
tv.WrapMode = Gtk.WrapMode.Word;
tv.Editable = false;
tv.Buffer.Text = e.ToString();
ScrolledWindow sw = new ScrolledWindow();
sw.ShadowType = Gtk.ShadowType.EtchedIn;
sw.Add(tv);
h.PackEnd(sw, true, true, 0);
vbox.PackEnd(h);
vbox.ShowAll();
this.VBox.Add(vbox);
this.AddButton(Stock.Close, ResponseType.Ok);
}
示例4: ImageContainer
ImageContainer()
{
image = new Gtk.Image ();
Add (image);
image.SetAlignment (0.5f, 0f);
Show ();
}