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


C# Glade.XML.GetWidget方法代码示例

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


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

示例1: TransfersMenu

        public TransfersMenu(TreeView transfersList, IFileTransfer transfer)
        {
            Glade.XML glade = new Glade.XML(null, "FileFind.Meshwork.GtkClient.meshwork.glade", "TransfersMenu", null);
            glade.Autoconnect(this);
            this.menu = (Gtk.Menu) glade.GetWidget("TransfersMenu");

            this.transfersList = transfersList;
            this.transfer = transfer;

            if (transfer != null) {
                mnuCancelAndRemoveTransfer.Visible = true;
                mnuShowTransferDetails.Sensitive = true;
                mnuClearFinishedFailedTransfers.Sensitive = true;
                if (transfer.Status == FileTransferStatus.Paused) {
                    mnuPauseTransfer.Visible = false;
                    mnuResumeTransfer.Visible = true;
                    mnuResumeTransfer.Sensitive = true;
                    mnuCancelTransfer.Sensitive = true;
                } else if (transfer.Status == FileTransferStatus.Canceled || transfer.Status == FileTransferStatus.Completed) {
                    mnuPauseTransfer.Sensitive = false;
                    mnuResumeTransfer.Visible = false;
                    mnuCancelTransfer.Sensitive = false;
                }
            } else {
                mnuCancelAndRemoveTransfer.Visible = false;
                mnuShowTransferDetails.Sensitive = false;
                mnuPauseTransfer.Sensitive = false;
                mnuResumeTransfer.Visible = false;
                mnuCancelTransfer.Sensitive = false;
            }
        }
开发者ID:codebutler,项目名称:meshwork,代码行数:31,代码来源:TransfersMenu.cs

示例2: AccountDialog

        public AccountDialog(Gtk.Window parent, GalleryAccount account, bool show_error)
        {
            Glade.XML xml = new Glade.XML (null, "GalleryExport.glade", "gallery_add_dialog", "f-spot");
            xml.Autoconnect (this);
            add_dialog = (Gtk.Dialog) xml.GetWidget ("gallery_add_dialog");
            add_dialog.Modal = false;
            add_dialog.TransientFor = parent;
            add_dialog.DefaultResponse = Gtk.ResponseType.Ok;

            this.account = account;

            status_area.Visible = show_error;

            if (account != null) {
                gallery_entry.Text = account.Name;
                url_entry.Text = account.Url;
                password_entry.Text = account.Password;
                username_entry.Text = account.Username;
                add_button.Label = Gtk.Stock.Ok;
                add_dialog.Response += HandleEditResponse;
            }

            if (remove_button != null)
                remove_button.Visible = account != null;

            add_dialog.Show ();

            gallery_entry.Changed += HandleChanged;
            url_entry.Changed += HandleChanged;
            password_entry.Changed += HandleChanged;
            username_entry.Changed += HandleChanged;
            HandleChanged (null, null);
        }
开发者ID:iainlane,项目名称:f-spot,代码行数:33,代码来源:GalleryExport.cs

示例3: Initialize

 void Initialize(Window parent)
 {
     Stream stream = System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream("LadderLogic.Presentation.OpenFileDialog.glade");
     Glade.XML glade = new Glade.XML(stream, "OpenFileDialog", null);
     stream.Close();
     glade.Autoconnect(this);
     thisDialog = ((Gtk.Dialog)(glade.GetWidget("OpenFileDialog")));
     thisDialog.Modal = true;
     thisDialog.TransientFor = parent;
     thisDialog.SetPosition (WindowPosition.Center);
 }
开发者ID:jdpillon,项目名称:ArduinoLadder,代码行数:11,代码来源:OpenFileDialog.cs

示例4: MainUi

	public MainUi (EventHandlers handlers, out Glade.XML glade) {
		glade = new Glade.XML(null, gladeFilename, null, Base.ExecutionContext.TranslationDomain);

		window = glade.GetWidget("window") as Window;
		window.Icon = new Gdk.Pixbuf(null, iconFilename);
		window.SetDefaultSize(Base.Config.PrefsWindowWidth, Base.Config.PrefsWindowHeight);

		video = new Video();
		view = new SubtitleView();
		edit = new SubtitleEdit();
		menus = new Menus();
		status = new Status();

		glade.Autoconnect(handlers);
		Base.InitFinished += OnBaseInitFinished;

		window.Visible = true;
    }
开发者ID:GNOME,项目名称:gnome-subtitles,代码行数:18,代码来源:MainUi.cs

示例5: Initialize

        private void Initialize(Window parent)
        {
            var stream = Assembly
                .GetExecutingAssembly()
                .GetManifestResourceStream("LadderLogic.Presentation.UpdateDialog.glade");

            var glade = new Glade.XML(stream, "dialog1", null);
            if (stream != null)
            {
                stream.Close();
            }

            //Glade.XML glade = Glade.XML.FromAssembly("UnhandledExceptionDialog.glade","UnhandledExceptionDialog", null);
            //stream.Close();
            glade.Autoconnect(this);
            _thisDialog = ((Dialog)(glade.GetWidget("dialog1")));
            _thisDialog.SetPosition(WindowPosition.Center);
        }
开发者ID:jdpillon,项目名称:ArduinoLadder,代码行数:18,代码来源:UpdateDialog.cs

示例6: Initialize

        void Initialize(Window parent)
        {
            var gladeRes = AppController.Instance.Config.AboutDialog;
            var stream = Assembly
                .GetExecutingAssembly()
                .GetManifestResourceStream(gladeRes);

            var glade = new Glade.XML(stream, AppController.Instance.Config.AboutDialogName, null);
            if (stream != null)
            {
                stream.Close();
            }

            glade.Autoconnect(this);
            _thisDialog = ((Dialog)(glade.GetWidget(AppController.Instance.Config.AboutDialogName)));
            _thisDialog.Modal = true;
            _thisDialog.TransientFor = parent;
            _thisDialog.SetPosition (WindowPosition.Center);
        }
开发者ID:jdpillon,项目名称:ArduinoLadder,代码行数:19,代码来源:AboutDialog.cs

示例7: GtkGladeCodeGenerator

    public GtkGladeCodeGenerator()
    {
        Gtk.Application.Init();

        Glade.XML glade = new Glade.XML(null, "gladecodegenerator.glade", "MainWindow", null);
        glade.Autoconnect(this);
        window = (Gtk.Window)glade.GetWidget("MainWindow");

        //mainEventBox.ModifyBg(Gtk.StateType.Normal, new Gdk.Color(0xff,0xff,0xff));
        mainEventBox.ModifyBg(Gtk.StateType.Normal, mainEventBox.Style.White);

        widgetTreeStore =  new Gtk.TreeStore(typeof(Gdk.Pixbuf), typeof(string), typeof(bool), typeof(Widget));

        Gtk.TreeViewColumn completeColumn = new Gtk.TreeViewColumn();

        Gtk.CellRendererToggle toggleRenderer = new Gtk.CellRendererToggle();
        toggleRenderer.Toggled += new Gtk.ToggledHandler (on_toggleRenderer_Toggled);
        completeColumn.PackStart(toggleRenderer, false);
        completeColumn.SetCellDataFunc(toggleRenderer, new Gtk.TreeCellDataFunc(toggleRendererFunc));

        Gtk.CellRendererPixbuf imageRenderer = new Gtk.CellRendererPixbuf();
        completeColumn.PackStart(imageRenderer, false);
        completeColumn.AddAttribute(imageRenderer, "pixbuf", 0);
        completeColumn.AddAttribute(imageRenderer, "visible", 2);

        Gtk.CellRendererText textRenderer = new Gtk.CellRendererText();
        completeColumn.PackStart(textRenderer, false);
        completeColumn.AddAttribute(textRenderer, "text", 1);

        widgetTree.AppendColumn(completeColumn);

        widgetTree.Model = widgetTreeStore;

        widgetTreeStore.SetSortColumnId(2,Gtk.SortType.Ascending);

        languageComboBox.Active = 0;

        window.Show();

        Gtk.Application.Run();
    }
开发者ID:codebutler,项目名称:glade-sharp-code-generator,代码行数:41,代码来源:GtkGladeCodeGenerator.cs

示例8: DoGetDecision

		private bool DoGetDecision ()
		{
			Glade.XML glade_xml = new Glade.XML (
					null, "TrustError.glade", DialogName,
					"f-spot");
			glade_xml.Autoconnect (this);

			dialog = (Gtk.Dialog) glade_xml.GetWidget (DialogName);

			url_label.Markup = String.Format (
					url_label.Text, String.Format (
							"<b>{0}</b>",
							request.RequestUri));

			Gtk.ResponseType response =
					(Gtk.ResponseType) dialog.Run ();
			Log.DebugFormat ("Decision dialog response: " + response);

			dialog.Destroy ();

			decision = Decision.DontTrust;
			if (0 == response) {
				if (abort_radiobutton.Active) {
					decision = Decision.DontTrust;
				} else if (once_radiobutton.Active) {
					decision = Decision.TrustOnce;
				} else if (always_radiobutton.Active) {
					decision = Decision.TrustAlways;
				} else {
					Debug.Assert (false,
							"Unhandled decision");
				}
			}

			decision_event.Set ();
			return false;
		}
开发者ID:guadalinex-archive,项目名称:guadalinex-v6,代码行数:37,代码来源:UserDecisionCertificatePolicy.cs

示例9: Initialize

        void Initialize(Window parent, Exception ex)
        {
            var stream = Assembly
                .GetExecutingAssembly()
                .GetManifestResourceStream(AppController.Instance.Config.UnhandledExceptionDialog);

            var glade = new Glade.XML(stream, AppController.Instance.Config.UnhandledExceptionDialogName, null);
            if (stream != null)
            {
                stream.Close();
            }

            //Glade.XML glade = Glade.XML.FromAssembly("UnhandledExceptionDialog.glade","UnhandledExceptionDialog", null);
            //stream.Close();
            glade.Autoconnect(this);
            _thisDialog = ((Dialog)(glade.GetWidget(AppController.Instance.Config.UnhandledExceptionDialogName)));

            //_thisDialog = ((Dialog)(glade.GetWidget(AppController.Instance.Config.UnhandledExceptionDialogName)));
            _thisDialog.Modal = true;
            _thisDialog.TransientFor = parent;
            _thisDialog.SetPosition (WindowPosition.Center);

            textview1.Buffer.Text = ex.ToString ();
        }
开发者ID:jdpillon,项目名称:ArduinoLadder,代码行数:24,代码来源:UnhandledExceptionDialog.cs

示例10: FacebookTagPopup

		public FacebookTagPopup (Dictionary<long, User> friends)
		{
			Friends = friends;

			Glade.XML xml = new Glade.XML (null, "FacebookExport.glade", "facebook_tag_popup", "f-spot");
			xml.Autoconnect (this);

			Popup = xml.GetWidget ("facebook_tag_popup") as Gtk.Window;
			Popup.Show ();
		}
开发者ID:guadalinex-archive,项目名称:guadalinex-v6,代码行数:10,代码来源:FacebookExport.cs

示例11: Initialize

        void Initialize(Window parent, String text)
        {
            var stream = Assembly
                .GetExecutingAssembly()
                .GetManifestResourceStream(AppController.Instance.Config.SourceDialog);

            var glade = new Glade.XML(stream, "UnhandledExceptionDialog", null);
            if (stream != null)
            {
                stream.Close();
            }

            //Glade.XML glade = Glade.XML.FromAssembly("UnhandledExceptionDialog.glade","UnhandledExceptionDialog", null);
            //stream.Close();
            glade.Autoconnect(this);
            _thisDialog = ((Dialog)(glade.GetWidget("UnhandledExceptionDialog")));
            _thisDialog.Modal = true;
            _thisDialog.TransientFor = parent;
            _thisDialog.SetPosition (WindowPosition.Center);

            textview1.Buffer.Text = text;
            btnContinue.Clicked += (sender, e) => _thisDialog.HideAll();

            btnUpload.Clicked += OnUpload;

            miSave.Activated += OnSave;
            miSaveAs.Activated += OnSaveAs;
            miQuit.Activated += (object sender, EventArgs e) => _thisDialog.HideAll();
            miAbout.Activated += (object sender, EventArgs e) => new AboutDialog (_thisDialog).ShowDialog();
        }
开发者ID:jdpillon,项目名称:ArduinoLadder,代码行数:30,代码来源:SourceDialog.cs

示例12: Run

		public void Run (FSpot.IBrowsableCollection photos)
		{
			if (null == photos) {
				throw new ArgumentNullException ("photos");
			}

			this.photos = photos;

			Glade.XML glade_xml = new Glade.XML (
					null, "TabbloExport.glade", DialogName,
					"f-spot");
			glade_xml.Autoconnect (this);

			dialog = (Gtk.Dialog) glade_xml.GetWidget (DialogName);

			FSpot.Widgets.IconView icon_view =
					new FSpot.Widgets.IconView (photos);
			icon_view.DisplayDates = false;
			icon_view.DisplayTags = false;

			username_entry.Changed += HandleAccountDataChanged;
			password_entry.Changed += HandleAccountDataChanged;
			ReadAccountData ();
			HandleAccountDataChanged (null, null);

			dialog.Modal = false;
			dialog.TransientFor = null;

			dialog.Response += HandleResponse;

			thumb_scrolled_window.Add (icon_view);
			icon_view.Show ();
			dialog.Show ();
		}
开发者ID:guadalinex-archive,项目名称:guadalinex-v6,代码行数:34,代码来源:TabbloExport.cs

示例13: Run

        public void Run(IBrowsableCollection selection)
        {
            Glade.XML xml = new Glade.XML (null, "GalleryExport.glade", "gallery_export_dialog", "f-spot");
            xml.Autoconnect (this);
            export_dialog = (Gtk.Dialog) xml.GetWidget ("gallery_export_dialog");

            this.items = selection.Items;
            Array.Sort<IBrowsableItem> (this.items as Photo[], new Photo.CompareDateName());
            album_button.Sensitive = false;
            IconView view = new IconView (selection);
            view.DisplayDates = false;
            view.DisplayTags = false;

            export_dialog.Modal = false;
            export_dialog.TransientFor = null;

            thumb_scrolledwindow.Add (view);
            view.Show ();
            export_dialog.Show ();

            GalleryAccountManager manager = GalleryAccountManager.GetInstance ();
            manager.AccountListChanged += PopulateGalleryOptionMenu;
            PopulateGalleryOptionMenu (manager, null);

            if (edit_button != null)
                edit_button.Clicked += HandleEditGallery;

            export_dialog.Response += HandleResponse;
            connect = true;
            HandleSizeActive (null, null);
            Connect ();

            LoadPreference (SCALE_KEY);
            LoadPreference (SIZE_KEY);
            LoadPreference (BROWSER_KEY);
            LoadPreference (META_KEY);
            LoadPreference (ROTATE_KEY);
        }
开发者ID:iainlane,项目名称:f-spot,代码行数:38,代码来源:GalleryExport.cs

示例14: GalleryAddAlbum

        public GalleryAddAlbum(GalleryExport export, Gallery gallery)
        {
            Glade.XML xml = new Glade.XML (null, "GalleryExport.glade", "gallery_add_album_dialog", "f-spot");
            xml.Autoconnect (this);
            add_album_dialog = (Gtk.Dialog) xml.GetWidget ("gallery_add_album_dialog");
            add_album_dialog.Modal = true;
            this.export = export;
            this.gallery = gallery;
            PopulateAlbums ();

            add_album_dialog.Response += HandleAddResponse;

            name_entry.Changed += HandleChanged;
            description_entry.Changed += HandleChanged;
            title_entry.Changed += HandleChanged;
            HandleChanged (null, null);
        }
开发者ID:iainlane,项目名称:f-spot,代码行数:17,代码来源:GalleryExport.cs

示例15: ConfigurationWidget

		public override Widget ConfigurationWidget () {
			xml = new Glade.XML (null, "f-spot.glade", "color_editor_prefs", "f-spot");
			xml.Autoconnect (this);
			AttachInterface ();
			return xml.GetWidget ("color_editor_prefs");;
		}
开发者ID:guadalinex-archive,项目名称:guadalinex-v6,代码行数:6,代码来源:ColorEditor.cs


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