当前位置: 首页>>代码示例>>C#>>正文


C# Image.SetAlignment方法代码示例

本文整理汇总了C#中Image.SetAlignment方法的典型用法代码示例。如果您正苦于以下问题:C# Image.SetAlignment方法的具体用法?C# Image.SetAlignment怎么用?C# Image.SetAlignment使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Image的用法示例。


在下文中一共展示了Image.SetAlignment方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: iFolderExceptionDialog

 public iFolderExceptionDialog( Gtk.Window parent,
   System.Exception exception)
     : base()
 {
     this.Title = Util.GS("iFolder Error");
        this.HasSeparator = true;
        this.Resizable = false;
        this.Modal = true;
        this.ex = exception;
        if(parent != null)
     this.TransientFor = parent;
        HBox h = new HBox();
        h.BorderWidth = 10;
        h.Spacing = 10;
        Image i = new Image();
        i.SetFromStock(Gtk.Stock.DialogError, IconSize.Dialog);
        i.SetAlignment(0.5F, 0);
        h.PackStart(i, false, false, 0);
        VBox v = new VBox();
        v.BorderWidth = 10;
        v.Spacing = 10;
        Label l = new Label("<span weight=\"bold\" size=\"larger\">" +
     GLib.Markup.EscapeText(exception.Message) + "</span>");
        l.LineWrap = true;
        l.UseMarkup = true;
        l.UseUnderline = false;
        l.Selectable = true;
        l.Xalign = 0; l.Yalign = 0;
        v.PackStart(l);
        dButton = new Button(Util.GS("Show Details"));
        dButton.Clicked += new EventHandler(ButtonPressed);
        HBox bhbox = new HBox();
        bhbox.PackStart(dButton, false, false, 0);
        v.PackEnd(bhbox, false, false, 0);
        details = new Label(Util.GS("Click \"Show Details\" below to get the full message returned with this error"));
        details.LineWrap = true;
        details.Selectable = true;
        details.Xalign = 0; details.Yalign = 0;
        v.PackEnd(details);
        h.PackEnd(v);
        h.ShowAll();
        this.VBox.Add(h);
        this.AddButton(Stock.Close, ResponseType.Ok);
 }
开发者ID:RoDaniel,项目名称:featurehouse,代码行数:44,代码来源:iFolderExceptionDialog.cs

示例2: SetImage

		void SetImage (string iconName)
		{
			if (iconName == null) {
				if (img != null) {
					this.Remove (img);
					img.Destroy ();
					img = null;
				}
				return;
			}
			
			if (img == null) {
				img = new Gtk.Image (iconName, IconSize.Dialog);
				PackEnd (img, false, false, 12);
				img.SetAlignment (0.5f, 0.5f);
			} else {
				img.IconName = iconName;
			}
		}
开发者ID:yayanyang,项目名称:monodevelop,代码行数:19,代码来源:InfoBar.cs

示例3: CreateActions

 private Widget CreateActions()
 {
     VBox actionsVBox = new VBox(false, 0);
        actionsVBox.WidthRequest = 250;
        Label l = new Label("<span size=\"small\"></span>");
        actionsVBox.PackStart(l, false, false, 0);
        l.UseMarkup = true;
        l = new Label(
     string.Format(
      "<span size=\"x-large\">{0}</span>",
      Util.GS("Filter")));
        actionsVBox.PackStart(l, false, false, 0);
        l.UseMarkup = true;
        l.ModifyFg(StateType.Normal, this.Style.Base(StateType.Selected));
        l.Xalign = 0.0F;
        HBox searchHBox = new HBox(false, 4);
        actionsVBox.PackStart(searchHBox, false, false, 0);
        SearchEntry = new Entry();
        searchHBox.PackStart(SearchEntry, true, true, 0);
        SearchEntry.SelectRegion(0, -1);
        SearchEntry.CanFocus = true;
        SearchEntry.Changed +=
     new EventHandler(OnSearchEntryChanged);
        Image stopImage = new Image(Stock.Stop, Gtk.IconSize.Menu);
        stopImage.SetAlignment(0.5F, 0F);
        CancelSearchButton = new Button(stopImage);
        searchHBox.PackEnd(CancelSearchButton, false, false, 0);
        CancelSearchButton.Relief = ReliefStyle.None;
        CancelSearchButton.Sensitive = false;
        CancelSearchButton.Clicked +=
     new EventHandler(OnCancelSearchButton);
        l = new Label("<span size=\"small\"></span>");
        actionsVBox.PackStart(l, false, false, 0);
        l.UseMarkup = true;
        l = new Label(
     string.Format(
      "<span size=\"x-large\">{0}</span>",
      Util.GS("General Actions")));
        actionsVBox.PackStart(l, false, false, 0);
        l.UseMarkup = true;
        l.ModifyFg(StateType.Normal, this.Style.Base(StateType.Selected));
        l.Xalign = 0.0F;
        HBox spacerHBox = new HBox(false, 0);
        actionsVBox.PackStart(spacerHBox, false, false, 0);
        spacerHBox.PackStart(new Label(""), false, false, 4);
        VBox vbox = new VBox(false, 0);
        spacerHBox.PackStart(vbox, true, true, 0);
        HBox hbox = new HBox(false, 0);
        AddiFolderButton = new Button(hbox);
        vbox.PackStart(AddiFolderButton, false, false, 0);
        AddiFolderButton.Relief = ReliefStyle.None;
        Label buttonText = new Label(
     string.Format("<span size=\"large\">{0}</span>",
      Util.GS("Upload a folder...")));
        hbox.PackStart(buttonText, false, false, 4);
        buttonText.UseMarkup = true;
        buttonText.UseUnderline = false;
        buttonText.Xalign = 0;
        AddiFolderButton.Clicked +=
     new EventHandler(AddiFolderHandler);
        hbox = new HBox(false, 0);
        ShowHideAllFoldersButton = new Button(hbox);
        vbox.PackStart(ShowHideAllFoldersButton, false, false, 0);
        ShowHideAllFoldersButton.Relief = ReliefStyle.None;
        ShowHideAllFoldersButtonText = new Label(
     string.Format("<span size=\"large\">{0}</span>",
      Util.GS("View available iFolders")));
        hbox.PackStart(ShowHideAllFoldersButtonText, false, false, 4);
        ShowHideAllFoldersButtonText.UseMarkup = true;
        ShowHideAllFoldersButtonText.UseUnderline = false;
        ShowHideAllFoldersButtonText.Xalign = 0;
        ShowHideAllFoldersButton.Clicked +=
     new EventHandler(ShowHideAllFoldersHandler);
        l = new Label("<span size=\"small\"></span>");
        actionsVBox.PackStart(l, false, false, 0);
        l.UseMarkup = true;
        SynchronizedFolderTasks = new VBox(false, 0);
        actionsVBox.PackStart(SynchronizedFolderTasks, false, false, 0);
        l = new Label(
     string.Format(
      "<span size=\"x-large\">{0}</span>",
      Util.GS("iFolder Actions")));
        SynchronizedFolderTasks.PackStart(l, false, false, 0);
        l.UseMarkup = true;
        l.ModifyFg(StateType.Normal, this.Style.Base(StateType.Selected));
        l.Xalign = 0.0F;
        spacerHBox = new HBox(false, 0);
        SynchronizedFolderTasks.PackStart(spacerHBox, false, false, 0);
        spacerHBox.PackStart(new Label(""), false, false, 4);
        vbox = new VBox(false, 0);
        spacerHBox.PackStart(vbox, true, true, 0);
        hbox = new HBox(false, 0);
        OpenSynchronizedFolderButton = new Button(hbox);
        vbox.PackStart(OpenSynchronizedFolderButton, false, false, 0);
        OpenSynchronizedFolderButton.Relief = ReliefStyle.None;
        buttonText = new Label(
     string.Format("<span size=\"large\">{0}</span>",
      Util.GS("Open...")));
        hbox.PackStart(buttonText, false, false, 4);
        buttonText.UseMarkup = true;
//.........这里部分代码省略.........
开发者ID:RoDaniel,项目名称:featurehouse,代码行数:101,代码来源:iFolderWindow.cs

示例4: CreateWelcomePage

 private Widget CreateWelcomePage()
 {
     VBox vbox = new VBox(false, 0);
        MenuBar menubar = CreateWelcomeMenuBar();
        vbox.PackStart (menubar, false, false, 0);
        Frame frame = new Frame();
        vbox.PackStart(frame, true, true, 0);
        vbox.ModifyBase(StateType.Normal, new Gdk.Color(255, 255, 255));
        VBox welcomeVBox = new VBox(false, 0);
        frame.Add(welcomeVBox);
        Gdk.Pixbuf pixbuf = new Gdk.Pixbuf(Util.ImagesPath("ifolder128.png"));
        Image image = new Image(pixbuf);
        image.SetAlignment(0.5F, 0.5F);
        welcomeVBox.PackStart(image, false, false, 0);
        Label l = new Label(
     string.Format("<span size=\"x-large\" weight=\"bold\">{0}</span>",
     Util.GS("Welcome to iFolder")));
        welcomeVBox.PackStart(l, false, false, 0);
        l.UseMarkup = true;
        l = new Label(
     string.Format("<span>{0}</span>",
     Util.GS("iFolder is a file sharing solution for workgroup and enterprise environments.")));
        welcomeVBox.PackStart(l, false, false, 0);
        l.UseMarkup = true;
        HBox hbox = new HBox(false, 0);
        ConnectToServerButton = new Button(hbox);
        ConnectToServerButton.Relief = ReliefStyle.None;
        vbox.PackStart(ConnectToServerButton, false, false, 0);
        Gdk.Pixbuf folderPixbuf = new Gdk.Pixbuf(Util.ImagesPath("add-account.png"));
        folderPixbuf = folderPixbuf.ScaleSimple(64, 64, Gdk.InterpType.Bilinear);
        Image folderImage = new Image(folderPixbuf);
        folderImage.SetAlignment(0.5F, 0F);
        hbox.PackStart(folderImage, false, false, 0);
        VBox buttonVBox = new VBox(false, 0);
        hbox.PackStart(buttonVBox, true, true, 4);
        Label buttonText = new Label(string.Format("<span size=\"large\" weight=\"bold\">{0}</span>", Util.GS("Connect to an iFolder Server")));
        buttonVBox.PackStart(buttonText, false, false, 0);
        buttonText.UseMarkup = true;
        buttonText.UseUnderline = false;
        buttonText.Xalign = 0;
        Label buttonMessage = new Label(string.Format("<span size=\"small\">{0}</span>", Util.GS("Start synchronizing files by connecting to an iFolder server")));
        buttonVBox.PackStart(buttonMessage, false, false, 0);
        buttonMessage.UseMarkup = true;
        buttonMessage.UseUnderline = false;
        buttonMessage.LineWrap = true;
        buttonMessage.Justify = Justification.Left;
        buttonMessage.Xalign = 0;
        buttonMessage.Yalign = 0;
        ConnectToServerButton.Clicked +=
     new EventHandler(OnConnectToServerButton);
        return vbox;
 }
开发者ID:RoDaniel,项目名称:featurehouse,代码行数:52,代码来源:iFolderWindow.cs

示例5: CreateiFolderActionButtonArea

 private Widget CreateiFolderActionButtonArea()
 {
     EventBox buttonArea = new EventBox();
        VBox actionsVBox = new VBox(false, 0);
        actionsVBox.WidthRequest = 100;
        buttonArea.ModifyBg(StateType.Normal, this.Style.Background(StateType.Normal));
        buttonArea.Add(actionsVBox);
        buttontips = new Tooltips();
     HBox ButtonControl = new HBox (false, 0);
        actionsVBox.PackStart(ButtonControl, false, false, 0);
        Image stopImage = new Image(Stock.Stop, Gtk.IconSize.Menu);
        stopImage.SetAlignment(0.5F, 0F);
        CancelSearchButton = new Button(stopImage);
        CancelSearchButton.Sensitive = false;
        CancelSearchButton.Clicked +=
     new EventHandler(OnCancelSearchButton);
        CancelSearchButton.Visible = false;
        HBox spacerHBox = new HBox(false, 0);
        ButtonControl.PackStart(spacerHBox, false, false, 0);
        HBox vbox = new HBox(false, 0);
        spacerHBox.PackStart(vbox, true, true, 0);
        HBox hbox = new HBox(false, 0);
        AddiFolderButton = new Button(hbox);
        vbox.PackStart(AddiFolderButton, false, false, 0);
        Label buttonText = new Label(
     string.Format("<span>{0}</span>",
      Util.GS("Upload a folder...")));
        hbox.PackStart(buttonText, false, false, 4);
        buttonText.UseMarkup = true;
        buttonText.UseUnderline = false;
        buttonText.Xalign = 0;
        AddiFolderButton.Image = new Image(new Gdk.Pixbuf(Util.ImagesPath("ifolder48.png")));
        AddiFolderButton.Clicked +=
     new EventHandler(AddiFolderHandler);
        buttontips.SetTip(AddiFolderButton, Util.GS("Create iFolder"),"");
        hbox = new HBox(false, 0);
        ShowHideAllFoldersButton = new Button(hbox);
        vbox.PackStart(ShowHideAllFoldersButton, false, false, 0);
        ShowHideAllFoldersButtonText = new Label(
     string.Format("<span>{0}</span>",
      Util.GS("View available iFolders")));
        hbox.PackStart(ShowHideAllFoldersButtonText, false, false, 4);
        ShowHideAllFoldersButtonText.UseMarkup = true;
        ShowHideAllFoldersButtonText.UseUnderline = false;
        ShowHideAllFoldersButtonText.Xalign = 0;
        ShowHideAllFoldersButton.Image = new Image(new Gdk.Pixbuf(Util.ImagesPath("ifolder48.png")));
        ShowHideAllFoldersButton.Clicked +=
     new EventHandler(ShowHideAllFoldersHandler);
        buttontips.SetTip(ShowHideAllFoldersButton, Util.GS("Show or Hide iFolder"),"");
        hbox = new HBox(false, 0);
        DownloadAvailableiFolderButton = new Button(hbox);
        vbox.PackStart(DownloadAvailableiFolderButton, false, false, 0);
        buttonText = new Label(
     string.Format("<span>{0}</span>",
      Util.GS("Download...")));
        hbox.PackStart(buttonText, true, true, 4);
        buttonText.UseMarkup = true;
        buttonText.UseUnderline = false;
        buttonText.Xalign = 0;
        DownloadAvailableiFolderButton.Sensitive = false;
        DownloadAvailableiFolderButton.Image= new Image(new Gdk.Pixbuf(Util.ImagesPath("ifolder-download48.png")));
        DownloadAvailableiFolderButton.Clicked +=
     new EventHandler(DownloadAvailableiFolderHandler);
        buttontips.SetTip(DownloadAvailableiFolderButton, Util.GS("Download"),"");
        hbox = new HBox(false, 0);
        MergeAvailableiFolderButton = new Button(hbox);
        vbox.PackStart(MergeAvailableiFolderButton, false, false, 0);
        buttonText = new Label(
     string.Format("<span>{0}</span>",
      Util.GS("Merge")));
        hbox.PackStart(buttonText, true, true, 4);
        buttonText.UseMarkup = true;
        buttonText.UseUnderline = false;
        buttonText.Xalign = 0;
        MergeAvailableiFolderButton.Sensitive = false;
        MergeAvailableiFolderButton.Image = new Image(new Gdk.Pixbuf(Util.ImagesPath("merge48.png")));
        MergeAvailableiFolderButton.Clicked +=
     new EventHandler(MergeAvailableiFolderHandler);
        buttontips.SetTip(MergeAvailableiFolderButton, Util.GS("Merge"),"");
        hbox = new HBox(false, 0);
        RemoveMembershipButton = new Button(hbox);
        vbox.PackStart(RemoveMembershipButton, false, false, 0);
        buttonText = new Label(
     string.Format("<span>{0}</span>",
      Util.GS("Remove My Membership")));
        hbox.PackStart(buttonText, true, true, 4);
        buttonText.UseMarkup = true;
        buttonText.UseUnderline = false;
        buttonText.Xalign = 0;
        RemoveMembershipButton.Sensitive = false;
        RemoveMembershipButton.Visible = false;
        RemoveMembershipButton.Image = new Image(new Gdk.Pixbuf(Util.ImagesPath("ifolder-error48.png")));
        RemoveMembershipButton.Clicked += new EventHandler(RemoveMembershipHandler);
        buttontips.SetTip(RemoveMembershipButton, Util.GS("Remove My Membership"),"");
        hbox = new HBox(false, 0);
        DeleteFromServerButton = new Button(hbox);
        vbox.PackStart(DeleteFromServerButton, false, false, 0);
        buttonText = new Label(
     string.Format("<span>{0}</span>",
      Util.GS("Delete from server")));
//.........这里部分代码省略.........
开发者ID:RoDaniel,项目名称:featurehouse,代码行数:101,代码来源:iFolderWindow.cs

示例6: SetValues

 private void SetValues()
 {
     if(!ifolder.HasConflicts)
        {
     if(ConflictBox != null)
      ConflictBox.Visible = false;
        }
        else
        {
     if(ConflictBox == null)
     {
      ConflictBox = new HBox();
      ConflictBox.Spacing = 5;
      ConflictBox.BorderWidth = 10;
      Gdk.Pixbuf conPix = new Gdk.Pixbuf(
     Util.ImagesPath("conflict24.png"));
      Image conImage = new Image(conPix);
      conImage.SetAlignment(0.5F, 0);
      ConflictBox.PackStart(conImage, false, false, 0);
      Gtk.Label l = new Label("<span weight=\"bold\">" +
     Util.GS("This iFolder contains conflicts.") +
     "</span>");
      l.LineWrap = true;
      l.Xalign = 0;
      l.UseMarkup = true;
      ConflictBox.PackStart(l, true, true, 0);
      Button resButton = new Button(Util.GS("_Resolve conflicts"));
      ConflictBox.PackStart(resButton, false, false, 0);
      resButton.Clicked += new EventHandler(OnResolveConflicts);
      ConflictHolder.PackStart(ConflictBox, false, true, 10);
      ConflictBox.ShowAll();
     }
     else
      ConflictBox.Visible = true;
        }
        UpdateiFolder(ifolder);
 }
开发者ID:RoDaniel,项目名称:featurehouse,代码行数:37,代码来源:iFolderPropertiesDialog.cs

示例7: Init

 internal void Init(Gtk.Window parent,
 DialogType type,
 ButtonSet buttonSet,
 string title,
 string statement,
 string secondaryStatement,
 string details)
 {
     this.Title = title;
       this.HasSeparator = false;
       this.Resizable = false;
       this.Modal = true;
       if(parent != null)
        this.TransientFor = parent;
       HBox h = new HBox();
       h.BorderWidth = 10;
       h.Spacing = 10;
       dialogImage = new Image();
       switch(type)
       {
        case DialogType.Error:
     dialogImage.SetFromStock(Gtk.Stock.DialogError, IconSize.Dialog);
     break;
        case DialogType.Question:
     dialogImage.SetFromStock(Gtk.Stock.DialogQuestion, IconSize.Dialog);
     break;
        case DialogType.Warning:
     dialogImage.SetFromStock(Gtk.Stock.DialogWarning, IconSize.Dialog);
     break;
        default:
        case DialogType.Info:
     dialogImage.SetFromStock(Gtk.Stock.DialogInfo, IconSize.Dialog);
     break;
       }
       dialogImage.SetAlignment(0.5F, 0);
       h.PackStart(dialogImage, false, false, 0);
       VBox v = new VBox();
       v.Spacing = 10;
       Label l = new Label();
       l.LineWrap = true;
       l.UseMarkup = true;
       l.Selectable = false;
       l.CanFocus = false;
       l.Xalign = 0; l.Yalign = 0;
       l.Markup = "<span weight=\"bold\" size=\"larger\">" + GLib.Markup.EscapeText(statement) + "</span>";
       v.PackStart(l);
       l = new Label(secondaryStatement);
       l.LineWrap = true;
       l.Selectable = false;
       l.CanFocus = false;
       l.Xalign = 0; l.Yalign = 0;
       v.PackStart(l, true, true, 8);
       if (details != null)
       {
        detailsExpander = new Expander(Util.GS("_Details"));
        v.PackStart(detailsExpander, false, false, 0);
        TextView textView = new TextView();
        textView.Editable = false;
        textView.WrapMode = WrapMode.Char;
        TextBuffer textBuffer = textView.Buffer;
        textBuffer.Text = details;
        showDetailsScrolledWindow = new ScrolledWindow();
        detailsExpander.Add(showDetailsScrolledWindow);
        showDetailsScrolledWindow.AddWithViewport(textView);
        showDetailsScrolledWindow.Visible = false;
       }
       extraWidgetVBox = new VBox(false, 0);
       v.PackStart(extraWidgetVBox, false, false, 0);
       extraWidgetVBox.NoShowAll = true;
       extraWidget = null;
       h.PackEnd(v);
       h.ShowAll();
       this.VBox.Add(h);
       Widget defaultButton;
       switch(buttonSet)
       {
        default:
        case ButtonSet.Ok:
     defaultButton = this.AddButton(Stock.Ok, ResponseType.Ok);
     break;
        case ButtonSet.OkCancel:
     this.AddButton(Stock.Cancel, ResponseType.Cancel);
     defaultButton = this.AddButton(Stock.Ok, ResponseType.Ok);
     break;
        case ButtonSet.YesNo:
     this.AddButton(Stock.No, ResponseType.No);
     defaultButton = this.AddButton(Stock.Yes, ResponseType.Yes);
     break;
       }
       defaultButton.CanDefault = true;
       defaultButton.GrabFocus();
 }
开发者ID:RoDaniel,项目名称:featurehouse,代码行数:92,代码来源:iFolderMsgDialog.cs

示例8: InicializeComponent

        private void InicializeComponent()
        {
            Resizable = false;
            HasSeparator = false;
            BorderWidth = 12;
            //Modal = true;

            label = new Label();
            label.LineWrap = true;
            label.Selectable = true;
            label.UseMarkup = true;
            label.SetAlignment(0.0f, 0.0f);

            linkBtn = new Moscrif.IDE.Components.LinkButton();
            linkBtn.SetAlignment(0.5f, 0.5f);

            icon = new Image(Stock.DialogInfo, IconSize.Dialog);
            icon.SetAlignment(0.5f, 0.0f);

            StockItem item = Stock.Lookup(icon.Stock);
            Title = item.Label;

            HBox hbox = new HBox(false, 12);
            VBox vbox = new VBox(false, 12);

            vbox.PackStart(label, false, false, 0);
            vbox.PackStart(linkBtn, true, true, 0);

            hbox.PackStart(icon, false, false, 0);
            hbox.PackStart(vbox, true, true, 0);

            VBox.PackStart(hbox, false, false, 0);
            hbox.ShowAll();

            Buttons = MessageDialogUrl.DialogButtonType.OkCancel;
        }
开发者ID:moscrif,项目名称:ide,代码行数:36,代码来源:MessageDialogUrl.cs

示例9: InitializeWidgets

 private void InitializeWidgets()
 {
     this.SetDefaultSize (500, 400);
        this.Icon = new Gdk.Pixbuf(Util.ImagesPath("ifolder16.png"));
        VBox dialogBox = new VBox();
        dialogBox.Spacing = 10;
        dialogBox.BorderWidth = 10;
        this.VBox.PackStart(dialogBox, true, true, 0);
        Label l = new Label(
     string.Format("<span size=\"large\" weight=\"bold\">{0}</span>",
     Util.GS("Add users to this iFolder")));
        l.Xalign = 0;
        l.UseMarkup = true;
        dialogBox.PackStart(l, false, false, 0);
        HBox selBox = new HBox(false, 10);
        dialogBox.PackStart(selBox, true, true, 0);
        VBox vbox = new VBox(false, 0);
        selBox.PackStart(vbox, false, false, 0);
        HBox searchHBox = new HBox(false, 4);
        vbox.PackStart(searchHBox, false, false, 0);
        Label findLabel = new Label(Util.GS("_Find:"));
        searchHBox.PackStart(findLabel, false, false, 0);
        findLabel.Xalign = 0;
        SearchEntry = new Entry();
        searchHBox.PackStart(SearchEntry, true, true, 0);
        findLabel.MnemonicWidget = SearchEntry;
        SearchEntry.SelectRegion(0, -1);
        SearchEntry.CanFocus = true;
        SearchEntry.Changed +=
     new EventHandler(OnSearchEntryChanged);
        Image stopImage = new Image(Stock.Stop, Gtk.IconSize.Menu);
        stopImage.SetAlignment(0.5F, 0F);
        CancelSearchButton = new Button(stopImage);
        searchHBox.PackEnd(CancelSearchButton, false, false, 0);
        CancelSearchButton.Relief = ReliefStyle.None;
        CancelSearchButton.Sensitive = false;
        CancelSearchButton.Clicked +=
     new EventHandler(OnCancelSearchButton);
        memberListModel = new MemberListModel(domainID, simws);
        memberList = new BigList(memberListModel);
        ScrolledWindow sw = new ScrolledWindow(memberList.HAdjustment, memberList.VAdjustment);
        sw.ShadowType = Gtk.ShadowType.EtchedIn;
        sw.Add(memberList);
        vbox.PackStart(sw, true, true, 0);
        memberList.ItemSelected += new ItemSelected(OnMemberIndexSelected);
        memberList.ItemActivated += new ItemActivated(OnMemberIndexActivated);
        VBox btnBox = new VBox();
        btnBox.Spacing = 10;
        selBox.PackStart(btnBox, false, false, 0);
        Label spacer = new Label("");
        btnBox.PackStart(spacer, true, true, 0);
        HBox buttonHBox = new HBox(false, 4);
        spacer = new Label("");
        buttonHBox.PackStart(spacer, true, true, 0);
        Label buttonLabel = new Label(Util.GS("_Add"));
        buttonHBox.PackStart(buttonLabel, false, false, 0);
        Image buttonImage = new Image(Stock.GoForward, IconSize.Button);
        buttonHBox.PackStart(buttonImage, false, false, 0);
        spacer = new Label("");
        buttonHBox.PackStart(spacer, true, true, 0);
        UserAddButton = new Button(buttonHBox);
        btnBox.PackStart(UserAddButton, false, true, 0);
        UserAddButton.Clicked += new EventHandler(OnAddButtonClicked);
        buttonHBox = new HBox(false, 4);
        spacer = new Label("");
        buttonHBox.PackStart(spacer, true, true, 0);
        buttonImage = new Image(Stock.GoBack, IconSize.Button);
        buttonHBox.PackStart(buttonImage, false, false, 0);
        buttonLabel = new Label(Util.GS("_Remove"));
        buttonHBox.PackStart(buttonLabel, false, false, 0);
        spacer = new Label("");
        buttonHBox.PackStart(spacer, true, true, 0);
        UserDelButton = new Button(buttonHBox);
        btnBox.PackStart(UserDelButton, false, true, 0);
        UserDelButton.Clicked += new EventHandler(OnRemoveButtonClicked);
        spacer = new Label("");
        btnBox.PackStart(spacer, true, true, 0);
        vbox = new VBox(false, 0);
        selBox.PackStart(vbox, true, true, 0);
        l = new Label(Util.GS("_Users to add:"));
        l.Xalign = 0;
        vbox.PackStart(l, false, false, 0);
        SelTreeView = new TreeView();
        ScrolledWindow ssw = new ScrolledWindow();
        ssw.ShadowType = Gtk.ShadowType.EtchedIn;
        ssw.Add(SelTreeView);
        vbox.PackStart(ssw, true, true, 0);
        ssw.WidthRequest = 200;
        l.MnemonicWidget = SelTreeView;
        SelTreeStore = new ListStore(typeof(MemberInfo));
        SelTreeStore.SetSortFunc(
     0,
     new TreeIterCompareFunc(SelTreeStoreSortFunction));
        SelTreeStore.SetSortColumnId(0, SortType.Ascending);
        SelTreeView.Model = SelTreeStore;
        SelTreeView.HeadersVisible = false;
        TreeViewColumn selmemberColumn = new TreeViewColumn();
        CellRendererText smcrt = new CellRendererText();
        selmemberColumn.PackStart(smcrt, false);
        selmemberColumn.SetCellDataFunc(smcrt, new TreeCellDataFunc(
//.........这里部分代码省略.........
开发者ID:RoDaniel,项目名称:featurehouse,代码行数:101,代码来源:iFolderUserSelector.cs

示例10: RemoveAccountDialog

 public RemoveAccountDialog(DomainInformation domainInfo)
     : base()
 {
     this.Title = "";
        this.Resizable = false;
        this.HasSeparator = false;
        HBox h = new HBox();
        h.BorderWidth = 10;
        h.Spacing = 10;
        Image i = new Image();
        i.SetFromStock(Gtk.Stock.DialogQuestion, IconSize.Dialog);
        i.SetAlignment(0.5F, 0);
        h.PackStart(i, false, false, 0);
        VBox v = new VBox();
        Label l = new Label("<span weight=\"bold\" size=\"larger\">" +
      Util.GS("Remove this iFolder account?") + "</span>");
        l.LineWrap = true;
        l.UseMarkup = true;
        l.Selectable = false;
        l.Xalign = 0; l.Yalign = 0;
        v.PackStart(l, false, false, 10);
        Table table = new Table(3, 2, false);
        table.RowSpacing = 0;
        table.ColumnSpacing = 10;
        table.Homogeneous = false;
        l = new Label(Util.GS("System Name:"));
        l.Xalign = 1;
        table.Attach(l, 0,1, 0,1,
        AttachOptions.Shrink | AttachOptions.Fill, 0,0,0);
        l = new Label(domainInfo.Name);
        l.UseUnderline = false;
        l.Xalign = 0;
        table.Attach(l, 1,2, 0,1,
        AttachOptions.Fill | AttachOptions.Expand, 0,0,0);
        l = new Label(Util.GS("Server:"));
        l.Xalign = 1;
        table.Attach(l, 0,1, 1,2,
        AttachOptions.Shrink | AttachOptions.Fill, 0,0,0);
        l = new Label(domainInfo.Host);
        l.Xalign = 0;
        table.Attach(l, 1,2, 1,2,
        AttachOptions.Fill | AttachOptions.Expand, 0,0,0);
        l = new Label(Util.GS("Username:"));
        l.Xalign = 1;
        table.Attach(l, 0,1, 2,3,
        AttachOptions.Shrink | AttachOptions.Fill, 0,0,0);
        l = new Label(domainInfo.MemberName);
        l.UseUnderline = false;
        l.Xalign = 0;
        table.Attach(l, 1,2, 2,3,
        AttachOptions.Fill | AttachOptions.Expand, 0,0,0);
        v.PackEnd(table, true, true, 0);
        h.PackEnd(v);
        this.VBox.PackStart(h, true, true, 0);
        cbutton = new CheckButton(Util.GS("_Remove my iFolders and files from the server"));
        this.VBox.PackStart(cbutton, false, false, 10);
        cbutton.Toggled +=
     new EventHandler(OnRemoveiFoldersToggled);
        if (!domainInfo.Active || !domainInfo.Authenticated)
        {
     cbutton.Sensitive = false;
        }
        this.VBox.ShowAll();
        Button noButton = new Button(Stock.No);
        noButton.CanFocus = true;
        noButton.CanDefault = true;
        noButton.ShowAll();
        this.AddActionWidget(noButton, ResponseType.No);
        this.AddButton(Stock.Yes, ResponseType.Yes);
        this.DefaultResponse = ResponseType.No;
        this.FocusChild = noButton;
 }
开发者ID:RoDaniel,项目名称:featurehouse,代码行数:72,代码来源:RemoveAccountDialog.cs

示例11: InitializeWidgets

 private void InitializeWidgets()
 {
     this.Spacing = 10;
        this.BorderWidth = Util.DefaultBorderWidth;
        HBox basicBox = new HBox();
        basicBox.Spacing = 10;
        this.PackStart(basicBox, false, true, 0);
        Gdk.Pixbuf iFolderPixbuf = new Gdk.Pixbuf(Util.ImagesPath("synchronized-folder64.png"));
        Image iFolderImage = new Image(iFolderPixbuf);
        iFolderImage.SetAlignment(0.5F, 0);
        basicBox.PackStart(iFolderImage, false, false, 0);
        VBox basicLabelsBox = new VBox();
        basicLabelsBox.Spacing = 5;
        basicBox.PackStart(basicLabelsBox, false, true, 0);
        NameLabel = new Label("");
        NameLabel.UseMarkup = true;
        NameLabel.UseUnderline = false;
        NameLabel.Xalign = 0;
        basicLabelsBox.PackStart(NameLabel, false, true, 5);
        BasicTable = new Table(2, 2, false);
        basicLabelsBox.PackStart(BasicTable, true, true, 0);
        BasicTable.ColumnSpacing = 5;
        BasicTable.RowSpacing = 5;
        Label label = new Label(string.Format("<span size=\"small\">{0}</span>", Util.GS("Owner:")));
        label.UseMarkup = true;
        label.Xalign = 0;
        BasicTable.Attach(label, 0, 1, 0, 1,
      AttachOptions.Shrink | AttachOptions.Fill, 0, 0, 0);
        OwnerLabel = new Label("");
        OwnerLabel.UseMarkup = true;
        OwnerLabel.UseUnderline = false;
        OwnerLabel.Xalign = 0;
        BasicTable.Attach(OwnerLabel, 1, 2, 0, 1,
      AttachOptions.Expand | AttachOptions.Fill, 0, 0, 0);
        label = new Label(string.Format("<span size=\"small\">{0}</span>", Util.GS("Location:")));
        label.UseMarkup = true;
        label.Xalign = 0;
        BasicTable.Attach(label, 0, 1, 1, 2,
      AttachOptions.Shrink | AttachOptions.Fill, 0, 0, 0);
        LocationLabel = new Label("");
        LocationLabel.UseMarkup = true;
        LocationLabel.UseUnderline = false;
        LocationLabel.Xalign = 0;
        BasicTable.Attach(LocationLabel, 1, 2, 1, 2,
      AttachOptions.Expand | AttachOptions.Fill, 0, 0, 0);
        VBox diskSectionBox = new VBox();
        diskSectionBox.Spacing = Util.SectionTitleSpacing;
        this.PackStart(diskSectionBox, false, true, 0);
        Label diskSectionLabel = new Label("<span weight=\"bold\">" +
     Util.GS("Disk Space on Server") +
     "</span>");
        diskSectionLabel.UseMarkup = true;
        diskSectionLabel.Xalign = 0;
        diskSectionBox.PackStart(diskSectionLabel, false, true, 0);
        HBox diskSpacerBox = new HBox();
        diskSpacerBox.Spacing = 10;
        diskSectionBox.PackStart(diskSpacerBox, true, true, 0);
        Label diskSpaceLabel = new Label("");
        diskSpacerBox.PackStart(diskSpaceLabel, false, true, 0);
        diskTable = new Table(3,3,false);
        diskSpacerBox.PackStart(diskTable, true, true, 0);
        diskTable.ColumnSpacing = 20;
        diskTable.RowSpacing = 5;
        Label usedLabel = new Label(Util.GS("Used:"));
        usedLabel.Xalign = 0;
        diskTable.Attach(usedLabel, 0,1,0,1,
      AttachOptions.Expand | AttachOptions.Fill, 0,0,0);
        UsedValue = new Label("0");
        UsedValue.Xalign = 1;
        diskTable.Attach(UsedValue, 1,2,0,1,
      AttachOptions.Shrink | AttachOptions.Fill, 0,0,0);
        Label usedUnit = new Label(Util.GS("MB"));
        diskTable.Attach(usedUnit, 2,3,0,1,
      AttachOptions.Shrink | AttachOptions.Fill, 0,0,0);
        LimitUnit = new Label(Util.GS("MB"));
        diskTable.Attach(LimitUnit, 2,3,1,2,
      AttachOptions.Shrink | AttachOptions.Fill, 0,0,0);
        AvailLabel = new Label(Util.GS("Available:"));
        AvailLabel.Xalign = 0;
        diskTable.Attach(AvailLabel, 0,1,2,3,
      AttachOptions.Expand | AttachOptions.Fill, 0,0,0);
        AvailValue = new Label("0");
        AvailValue.Xalign = 1;
        diskTable.Attach(AvailValue, 1,2,2,3,
      AttachOptions.Shrink | AttachOptions.Fill, 0,0,0);
        AvailUnit = new Label(Util.GS("MB"));
        diskTable.Attach(AvailUnit, 2,3,2,3,
      AttachOptions.Shrink | AttachOptions.Fill, 0,0,0);
        DiskUsageFrame = new Frame();
        diskSpacerBox.PackStart(DiskUsageFrame, false, true, 0);
        HBox graphBox = new HBox();
        graphBox.Spacing = 5;
        graphBox.BorderWidth = 5;
        DiskUsageFrame.Add(graphBox);
        DiskUsageBar = new ProgressBar();
        graphBox.PackStart(DiskUsageBar, false, true, 0);
        DiskUsageBar.Orientation = Gtk.ProgressBarOrientation.BottomToTop;
        DiskUsageBar.Fraction = 0;
        VBox graphLabelBox = new VBox();
        graphBox.PackStart(graphLabelBox, false, true, 0);
//.........这里部分代码省略.........
开发者ID:RoDaniel,项目名称:featurehouse,代码行数:101,代码来源:iFolderPropSettingsPage.cs

示例12: DeviceChooserDialog

		public DeviceChooserDialog ()
		{
			this.Build ();
			
			/*
			var banner = new HeaderBanner () {
				Text = GettextCatalog.GetString ("Select Device"),
				Image = Gdk.Pixbuf.LoadFromResource ("banner.png"),
			};
			bannerPlaceholder.Add (banner);
			bannerPlaceholder.ShowAll ();*/
			
			deviceListTreeView.Model = store;
			var txtRenderer = new CellRendererText ();
			deviceListTreeView.AppendColumn ("Devices", txtRenderer, DeviceDataFunc);
			
			createEmulatorButton.Clicked += delegate {
				MonoDroidFramework.Toolbox.StartAvdManager ();
			};
			
			startEmulatorButton.Clicked += delegate {
				TreeIter iter;
				if (deviceListTreeView.Selection.GetSelected (out iter)) {
					var dd = (DisplayDevice) store.GetValue (iter, 0) ;
					//status.StartOperation (GettextCatalog.GetString ("Starting virtual device '{0}'...", avd.Name));
					if (dd.VirtualDevice != null) {
						MonoDroidFramework.VirtualDeviceManager.StartEmulator (dd.VirtualDevice);
					}
				}
			};
			
			deviceListTreeView.Selection.Changed += UpdatedSelection;
			
			deviceListTreeView.RowActivated += delegate(object o, RowActivatedArgs args) {
				TreeIter iter;
				if (store.GetIter (out iter, args.Path)) {
					var dd = (DisplayDevice) store.GetValue (iter, 0);
					if (dd.Device != null) {
						Device = dd.Device;
						Respond (ResponseType.Ok);
					}
				}
			};
			
			buttonOk.Sensitive = false;
			startEmulatorButton.Sensitive = false;
			
			MonoDroidFramework.DeviceManager.DevicesUpdated += OnDevicesUpdated;
			MonoDroidFramework.VirtualDeviceManager.Changed += OnVirtualDevicesUpdated;
			OnDevicesUpdated (null, EventArgs.Empty);
			
			restartAdbButton.Clicked += delegate {
				store.Clear ();
				restartAdbButton.Sensitive = false;
				MonoDroidFramework.DeviceManager.RestartAdbServer (() => {
					Gtk.Application.Invoke (delegate {
						if (!destroyed)
							restartAdbButton.Sensitive = true;
					});
				});
			};
			
			isTrial = MonoDroidFramework.IsTrial;
			
			if (isTrial) {
				var ib = new MonoDevelop.Components.InfoBar ();
				var img = new Image (typeof (DeviceChooserDialog).Assembly, "information.png");
				img.SetAlignment (0.5f, 0.5f);
				ib.PackEnd (img, false, false, 0);
				var msg = GettextCatalog.GetString ("Trial version only supports the emulator");
				ib.MessageArea.Add (new Gtk.Label (msg) {
					Yalign = 0.5f,
					Xalign = 0f,
					Style = ib.Style,
				});
				string buyMessage;
				if (PropertyService.IsMac) { 
					buyMessage = GettextCatalog.GetString ("Buy Full Version");
				} else {
					buyMessage = GettextCatalog.GetString ("Activate");
				}
				var buyButton = new Button (buyMessage);
				buyButton.Clicked += delegate {
					if (MonoDroidFramework.Activate ())
						UnTrialify ();
					};
				ib.ActionArea.Add (buyButton);
				ib.ShowAll ();
				bannerPlaceholder.Add (ib);
			}
		}
开发者ID:raufbutt,项目名称:monodevelop-old,代码行数:91,代码来源:DeviceChooserDialog.cs

示例13: CreateSidebarSearchEntry

        /*		private void OnStatusComboKeyPress (object sender, KeyPressEventArgs args)
        {
            if (args.Event.Key == Gdk.Key.Return) {
                if (PersonManager.Me != null) {
                    Logger.Debug ("FIXME: Set \"my\" status to: {0}",
                            statusComboBoxEntry.ActiveText);
                    PersonManager.Me.Presence.Message =
                            statusComboBoxEntry.ActiveText;
                }
            }
        }
        */
        /*		private void OnStatusComboChanged (object sender, EventArgs args)
        {
            Logger.Debug ("OnStatusComboChanged");
        }
        */
        private Widget CreateSidebarSearchEntry()
        {
            VBox vbox = new VBox (false, 0);

            Label l = new Label (
                    string.Format ("<span size=\"large\">{0}</span>",
                        Catalog.GetString ("Filter")));
            l.UseMarkup = true;
            l.ModifyFg (StateType.Normal, this.Style.Base (StateType.Selected));
            l.Xalign = 0;
            l.Show ();
            vbox.PackStart (l, false, false, 0);

            searchEntry = new Entry ();
            searchEntry.SelectRegion (0, -1);
            searchEntry.CanFocus = true;
            searchEntry.Changed += OnSearchEntryChanged;
            searchEntry.Show ();

            Image stopImage = new Image (Stock.Stop, Gtk.IconSize.Menu);
            stopImage.SetAlignment (0.5F, 0.0F);

            cancelSearchButton = new Button (stopImage);
            cancelSearchButton.Relief = ReliefStyle.None;
            cancelSearchButton.Sensitive = false;
            cancelSearchButton.Clicked += OnCancelSearchButton;
            cancelSearchButton.Show ();

            HBox searchHBox = new HBox (false, 4);
            searchHBox.PackStart (searchEntry, true, true, 0);
            searchHBox.PackStart (cancelSearchButton, false, false, 0);

            searchHBox.Show ();
            vbox.PackStart (searchHBox, false, false, 0);

            return vbox;
        }
开发者ID:GNOME,项目名称:banter,代码行数:54,代码来源:GroupWindow.cs


注:本文中的Image.SetAlignment方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。