• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Glade.XML类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



Glade.XML类属于命名空间,在下文中一共展示了Glade.XML类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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: ConnectDialog

        public ConnectDialog()
        {
            ui = new Glade.XML (null, "lat.glade", "connectionDialog", null);
            ui.Autoconnect (this);

            Gdk.Pixbuf pb = Gdk.Pixbuf.LoadFromResource ("x-directory-remote-server-48x48.png");
            image5.Pixbuf = pb;

            connectionDialog.Icon = Global.latIcon;
            connectionDialog.Resizable = false;

            portEntry.Text = "389";
            createCombo ();

            //			profileListStore = new ListStore (typeof (string));
            //			profileListview.Model = profileListStore;
            //			profileListStore.SetSortColumnId (0, SortType.Ascending);
            //
            //			TreeViewColumn col;
            //			col = profileListview.AppendColumn ("Name", new CellRendererText (), "text", 0);
            //			col.SortColumnId = 0;
            //
            //			UpdateProfileList ();
            //
            //			if (haveProfiles) {
            //
            //				notebook1.CurrentPage = 1;
            //				connectionDialog.Resizable = true;
            //			}

            noEncryptionRadioButton.Active = true;

            connectionDialog.Run ();
            connectionDialog.Destroy ();
        }
开发者ID:MrJoe,项目名称:lat,代码行数:35,代码来源:ConnectDialog.cs


示例3: InfoWindow

        public InfoWindow(Song song, Window w)
            : base("", w, DialogFlags.DestroyWithParent)
        {
            this.HasSeparator = false;

            Glade.XML glade_xml = new Glade.XML (null, "InfoWindow.glade", "info_contents", null);
            glade_xml.Autoconnect (this);
            this.VBox.Add (info_contents);

            cover_image = new MagicCoverImage ();
            cover_image_container.Add (cover_image);
            cover_image.Visible = true;

            // Gdk.Pixbuf cover = new Gdk.Pixbuf (null, "unknown-cover.png", 66, 66);
            // cover_image.ChangePixbuf (cover);

            user_name_label = new UrlLabel ();
            user_name_label.UrlActivated += new UrlActivatedHandler (OnUrlActivated);
            user_name_container.Add (user_name_label);
            user_name_label.SetAlignment ((float) 0.0, (float) 0.5);
            user_name_label.Visible = true;

            real_name_label = new UrlLabel ();
            real_name_label.UrlActivated += new UrlActivatedHandler (OnUrlActivated);
            real_name_container.Add (real_name_label);
            real_name_label.SetAlignment ((float) 0.0, (float) 0.5);
            real_name_label.Visible = true;

            this.AddButton ("gtk-close", ResponseType.Close);

            SetSong (song);
        }
开发者ID:GNOME,项目名称:last-exit,代码行数:32,代码来源:InfoWindow.cs


示例4: FlagsSelectorDialog

        public FlagsSelectorDialog(Gtk.Window parent, EnumDescriptor enumDesc, uint flags, string title)
        {
            this.flags = flags;
            this.parent = parent;

            Glade.XML xml = new Glade.XML (null, "stetic.glade", "FlagsSelectorDialog", null);
            xml.Autoconnect (this);

            store = new Gtk.ListStore (typeof(bool), typeof(string), typeof(uint));
            treeView.Model = store;

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

            Gtk.CellRendererToggle tog = new Gtk.CellRendererToggle ();
            tog.Toggled += new Gtk.ToggledHandler (OnToggled);
            col.PackStart (tog, false);
            col.AddAttribute (tog, "active", 0);

            Gtk.CellRendererText crt = new Gtk.CellRendererText ();
            col.PackStart (crt, true);
            col.AddAttribute (crt, "text", 1);

            treeView.AppendColumn (col);

            foreach (Enum value in enumDesc.Values) {
                EnumValue eval = enumDesc[value];
                if (eval.Label == "")
                    continue;
                uint val = (uint) (int) eval.Value;
                store.AppendValues (((flags & val) != 0), eval.Label, val);
            }
        }
开发者ID:mono,项目名称:stetic,代码行数:32,代码来源:FlagsSelectorDialog.cs


示例5: SelectGroupsDialog

        public SelectGroupsDialog(string[] allGroups)
        {
            ui = new Glade.XML (null, "lat.glade", "selectGroupsDialog", null);
            ui.Autoconnect (this);

            groups = new List<string> ();

            TreeViewColumn col;

            store = new ListStore (typeof (string));
            allGroupsTreeview.Model = store;
            allGroupsTreeview.Selection.Mode = SelectionMode.Multiple;

            col = allGroupsTreeview.AppendColumn ("Name", new CellRendererText (), "text", 0);
            col.SortColumnId = 0;

            store.SetSortColumnId (0, SortType.Ascending);

            foreach (string s in allGroups)
                store.AppendValues (s);

            selectGroupsDialog.Icon = Global.latIcon;
            selectGroupsDialog.Resize (320, 200);
            selectGroupsDialog.Run ();
            selectGroupsDialog.Destroy ();
        }
开发者ID:MrJoe,项目名称:lat,代码行数:26,代码来源:SelectGroupsDialog.cs


示例6: ExportDialog

    public ExportDialog(Catalog catalog, bool searchOn)
        : base(Mono.Posix.Catalog.GetString ("Export"), null, DialogFlags.NoSeparator | DialogFlags.Modal)
    {
        this.catalog = catalog;
        this.templates = new Hashtable ();
        this.searchOn = searchOn;

        Glade.XML gxml = new Glade.XML (null, "dialogexport.glade", "hbox1", null);
        gxml.Autoconnect(this);

        cancelButton = (Button)this.AddButton (Gtk.Stock.Cancel, 0);
        okButton     = (Button)this.AddButton (Gtk.Stock.Ok, 1);
        cancelButton.Clicked += OnCancelButtonClicked;
        okButton.Clicked     += OnOkButtonClicked;

        VBox vBox = this.VBox;
        vBox.Add ((Box)gxml["hbox1"]);

        PopulateComboBox ();

        if (!searchOn) {
            radioButtonSearch.Sensitive = false;
        }

        radioButtonActive.Label = String.Format (Mono.Posix.Catalog.GetString ("Export the whole {0} catalog"),catalog.ShortDescription);

        this.ShowAll();
    }
开发者ID:MonoBrasil,项目名称:historico,代码行数:28,代码来源:ExportDialog.cs


示例7: EthernetConfigDialog

        public EthernetConfigDialog(VirtualEthernet device, Window parent)
            : base(Catalog.GetString ("Configure Ethernet"),
                                                                                  parent, DialogFlags.NoSeparator,
                                                                                  Stock.Cancel, ResponseType.Cancel,
                                                                                  Stock.Ok, ResponseType.Ok)
        {
            this.device = device;

            IconThemeUtils.SetWindowIcon (this);

            Glade.XML xml = new Glade.XML ("vmx-manager.glade", "ethernetConfigContent");
            xml.Autoconnect (this);

            VBox.Add (ethernetConfigContent);
            ethernetConfigContent.ShowAll ();

            Response += delegate (object o, ResponseArgs args) {
                if (args.ResponseId == ResponseType.Ok) {
                    Save ();
                }

                this.Destroy ();
            };

            ethernetTypeCombo.Changed += OnComboChanged;

            Load ();
        }
开发者ID:snorp,项目名称:vmx-manager,代码行数:28,代码来源:EthernetConfigDialog.cs


示例8: MassEditDialog

        public MassEditDialog()
        {
            _modList = new List<LdapModification> ();

            ui = new Glade.XML (null, "lat.glade", "massEditDialog", null);
            ui.Autoconnect (this);

            createCombos ();

            modListStore = new ListStore (typeof (string), typeof (string), typeof (string));
            modListView.Model = modListStore;

            TreeViewColumn col;
            col = modListView.AppendColumn ("Action", new CellRendererText (), "text", 0);
            col.SortColumnId = 0;

            col = modListView.AppendColumn ("Name", new CellRendererText (), "text", 1);
            col.SortColumnId = 1;

            col = modListView.AppendColumn ("Value", new CellRendererText (), "text", 2);
            col.SortColumnId = 2;

            modListStore.SetSortColumnId (0, SortType.Ascending);

            massEditDialog.Resize (300, 450);
            massEditDialog.Icon = Global.latIcon;
            massEditDialog.Run ();
            massEditDialog.Destroy ();
        }
开发者ID:MrJoe,项目名称:lat,代码行数:29,代码来源:MassEditDialog.cs


示例9: IncludeFilesDialog

        public IncludeFilesDialog(Project project, StringCollection newFiles)
        {
            Runtime.LoggingService.Info ("*** Include files dialog ***");
            // we must do it from *here* otherwise, we get this assembly, not the caller
            Glade.XML glade = new Glade.XML (null, "Base.glade", "IncludeFilesDialogWidget", null);
            glade.Autoconnect (this);

            // set up dialog title
            this.IncludeFilesDialogWidget.Title = String.Format (GettextCatalog.GetString ("Found new files in {0}"), project.Name);

            newFilesOnlyRadioButton.Active = true;
            this.newFiles = newFiles;
            this.project  = project;

            this.InitialiseIncludeFileList();

            // wire in event handlers
            okbutton.Clicked += new EventHandler(AcceptEvent);
            cancelbutton.Clicked += new EventHandler(CancelEvent);
            selectAllButton.Clicked += new EventHandler(SelectAll);
            deselectAllButton.Clicked += new EventHandler(DeselectAll);

            // FIXME: I'm pretty sure that these radio buttons
            // don't actually work in SD 0.98 either, so disabling them
            newFilesOnlyRadioButton.Sensitive = false;
            allFilesRadioButton.Sensitive = false;
        }
开发者ID:slluis,项目名称:monodevelop-prehistoric,代码行数:27,代码来源:IncludeFilesDialog.cs


示例10: init

        public void init()
        {
            /* Make Our Connection!*/
            Glade.XML gxml = new Glade.XML (SupportFileLoader.locateGameFile("gpremacy_gui/gpremacy_gui.glade"), "GameSetup", null);
            gxml.Autoconnect (this);

            GameSetup.Modal = true;
            GameSetup.TransientFor = MainWindow;

            GameSetup.DeleteEvent += on_GameSetup_delete_event;
            GameSetupSingleStart.Clicked += on_GameSetupSingleStart_clicked;
            GameSetupConnectButton.Clicked += on_GameSetupConnectButton_clicked;
            GameSetupMultiStart.Clicked += on_GameSetupMultiStart_clicked;

            GameSetupRadioClient.Toggled += on_MultiRadio_changed;
            GameSetupRadioServer.Toggled += on_MultiRadio_changed;

            GameSetupPortLabel.Text += "(normally " + Game.DefaultPort.ToString();

            GameSetupMultiStart.Sensitive = false;

            populatePlayers(GameSetupSingleCountryTable);
            populatePlayers(GameSetupCountryTable);
            /* Turn off the AI buttons */
            setSensitiveAIButtons(GameSetupCountryTable, false);

            on_MultiRadio_changed(null, null); /* Fake event */

            // Create a timer that waits one second, then invokes every second.
            UpdateStatusTimer = new Timer(new TimerCallback(updateStatus), null, 1000, 1000);
            UpdateStatusTimer.ToString(); // Shut UP, you damn warning!

            GameSetupEntryIP.Text = "192.168.1.150";
        }
开发者ID:jcjones,项目名称:Gpremacy,代码行数:34,代码来源:GameSetupView.cs


示例11: HardDiskConfigDialog

        public HardDiskConfigDialog(VirtualHardDisk disk, bool capacitySensitive, Window parent)
            : base(Catalog.GetString ("Configure Hard Disk"),
                                                                                  parent, DialogFlags.NoSeparator,
                                                                                  Stock.Cancel, ResponseType.Cancel,
                                                                                  Stock.Ok, ResponseType.Ok)
        {
            this.disk = disk;

            IconThemeUtils.SetWindowIcon (this);

            Glade.XML xml = new Glade.XML ("vmx-manager.glade", "diskConfigContent");
            xml.Autoconnect (this);

            busTypeCombo.Changed += delegate {
                PopulateDeviceNumberCombo ();
            };

            VBox.Add (diskConfigContent);
            diskConfigContent.ShowAll ();

            diskSizeSpin.Sensitive = capacitySensitive;

            Response += delegate (object o, ResponseArgs args) {
                if (args.ResponseId == ResponseType.Ok) {
                    Save ();
                }

                this.Destroy ();
            };

            allocateDiskCheck.Sensitive = capacitySensitive;

            Load ();
        }
开发者ID:snorp,项目名称:vmx-manager,代码行数:34,代码来源:HardDiskConfigDialog.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: AddConnection

 public AddConnection(ConnectionCollection collection, Connections cons)
 {
     this.cons = cons;
     this.connections = collection;
     this.gxml = new Glade.XML(null, "irisim.glade", "addConnectionDialog", null);
     this.gxml.Autoconnect(this);
 }
开发者ID:spox,项目名称:irisim,代码行数:7,代码来源:AddConnection.cs


示例14: AddObjectClassDialog

        public AddObjectClassDialog(Connection conn)
        {
            objectClasses = new List<string> ();

            ui = new Glade.XML (null, "lat.glade", "addObjectClassDialog", null);
            ui.Autoconnect (this);

            store = new ListStore (typeof (bool), typeof (string));

            CellRendererToggle crt = new CellRendererToggle();
            crt.Activatable = true;
            crt.Toggled += OnClassToggled;

            objClassTreeView.AppendColumn ("Enabled", crt, "active", 0);
            objClassTreeView.AppendColumn ("Name", new CellRendererText (), "text", 1);

            objClassTreeView.Model = store;

            try {

                foreach (string n in conn.Data.ObjectClasses)
                    store.AppendValues (false, n);

            } catch (Exception e) {

                store.AppendValues (false, "Error getting object classes");
                Log.Debug (e);
            }

            addObjectClassDialog.Icon = Global.latIcon;
            addObjectClassDialog.Resize (300, 400);
            addObjectClassDialog.Run ();
            addObjectClassDialog.Destroy ();
        }
开发者ID:MrJoe,项目名称:lat,代码行数:34,代码来源:AddObjectClassDialog.cs


示例15: DatabaseSaveDialog

		private DatabaseSaveDialog(Window parent)
		{
			Glade.XML xml = new Glade.XML(null,"gui.glade","databaseSaveDialog",null);
			xml.Autoconnect(this);
			
			databaseSaveDialog.Icon = parent.Icon;
			
			// Conectamos las acciones de los botones del diálogo.
			databaseSaveDialog.AddActionWidget(btnSave,ResponseType.Ok);
			databaseSaveDialog.AddActionWidget(btnCancel,ResponseType.Cancel);			
			
			
			// Añadimos los archivos de filtros soportados
			FileFilter filter1=new FileFilter();
			filter1.Name="Archivo XML";
			filter1.AddPattern("*.xml");
			filter1.AddPattern("*.XML");
			
			FileFilter filter2=new FileFilter();
			filter2.Name="Base de datos de reconocimiento";
			filter2.AddPattern("*.jilfml");
			filter2.AddPattern("*.JILFML");
			
			FileFilter filter3=new FileFilter();
			filter3.Name="Todos los archivos";
			filter3.AddPattern("*.*");			
			
			databaseSaveDialog.AddFilter(filter2);		
			databaseSaveDialog.AddFilter(filter1);				
			databaseSaveDialog.AddFilter(filter3);	
		}
开发者ID:coler706,项目名称:mathtextrecognizer,代码行数:31,代码来源:DatabaseSaveDialog.cs


示例16: 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


示例17: LogSaveDialog

		/// <summary>
		/// Constructor de la clase LogSaveDialog. Crea y muestra el diálogo.
		/// </summary>
		public LogSaveDialog()
		{
			Glade.XML gxml = new Glade.XML (null,"gui.glade", "logSaveDialog", null);
            gxml.Autoconnect (this);
            
            FileFilter logFilter = new FileFilter();
            logFilter.Name = "Archivo de registro";
            logFilter.AddPattern("*.log");
            logFilter.AddPattern("*.LOG");
            
            FileFilter txtFilter = new FileFilter();
            txtFilter.Name = "Archivo de texto";
            txtFilter.AddPattern("*.txt");
            txtFilter.AddPattern("*.TXT");
            
            FileFilter allFilter = new FileFilter();
            allFilter.Name = "Todos los archivos";
            allFilter.AddPattern("*.*");          
            
            logSaveDialog.AddFilter(logFilter);
            logSaveDialog.AddFilter(txtFilter);
            logSaveDialog.AddFilter(allFilter);
            
            logSaveDialog.AddActionWidget(btnSave,ResponseType.Ok);
            logSaveDialog.AddActionWidget(btnCancel,ResponseType.Cancel); 
		}
开发者ID:coler706,项目名称:mathtextrecognizer,代码行数:29,代码来源:LogSaveDialog.cs


示例18: Create

        public static Gtk.Window Create()
        {
            string filename = GladeHelper.ProcessGladeFile(FileHelper.FindSupportFile("bygfoot_misc2.glade", true));
            Glade.XML gxml = new Glade.XML(filename, "window_warning", null);
            gxml.Autoconnect(typeof(WarningWindow));

            return window_warning;
        }
开发者ID:kashifsoofi,项目名称:bygfoot,代码行数:8,代码来源:WarningWindow.cs


示例19: EditConnection

 public EditConnection(ConnectionCollection con, string key)
 {
     this._connection_collection = con;
     this._edit_key = key;
     this._gxml = new Glade.XML(null, "irisim.glade", "editConnectionDialog", null);
     this._gxml.Autoconnect(this);
     this.PopulateFields();
 }
开发者ID:spox,项目名称:irisim,代码行数:8,代码来源:EditConnection.cs


示例20: ConnectionStatus

 public ConnectionStatus(Controller controller, string username, string password, string servername, string port)
 {
     Logger.log("Adding UI event processor", Logger.Verbosity.moderate);
     controller.message_pump.ui_event += new UIEvent(this.Processor);
     this._gxml = new Glade.XML(null, "irisim.glade", "connectionStatusDialog", null);
     this._gxml.Autoconnect(this);
     this.connectionProgressBar.Fraction = 0.2;
     this.SendConnectionMessage(controller, username, password, servername, port);
 }
开发者ID:spox,项目名称:irisim,代码行数:9,代码来源:ConnectionStatus.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# GlassHtml类代码示例发布时间:2022-05-24
下一篇:
C# GizmoType类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap