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


C# XML.GetWidget方法代码示例

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


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

示例1: MainWindow

        public MainWindow(string[] Args)
        {
            gxml = new Glade.XML(null, "gui.glade", "MainWindow", null);
            gxml.Autoconnect(this);

            events = new Queue<Event>();
            deltas = new Queue<Delta>();

            curr = new BugDisplay(frmCurrent);
            //curr.render(false,"hello world");
            dupl = new BugDisplay(frmDupl);

            ((Window)gxml.GetWidget("MainWindow")).Maximize();
            ((Window)gxml.GetWidget("MainWindow")).ShowAll();
            hrfBrowser.Clicked += OnNoClicked;
            //GlobalProxySelection.Select = new WebProxy("http://taz:8118");

            bugz = new Bugzilla("http://bugzilla.gnome.org/");
            BugDB.bugz = bugz;
            if (Args.Length !=0)
                product = Args[0];

            todo = new Queue<Bug>();
            ready();
            hasprocess = true;
            GLib.Idle.Add(new GLib.IdleHandler(processTask));
            notify = new ThreadNotify (new ReadyEvent (ready));
        }
开发者ID:palfrey,项目名称:pyro,代码行数:28,代码来源:MainWindow.cs

示例2: GUIMain

    public GUIMain()
    {
        Glade.XML gxml = new Glade.XML("../../src/GUI/Glade/ekranglowny.glade", "MainWindow", null);
        gxml.Autoconnect(this);

        TopicTable = (Gtk.Table)gxml.GetWidget("TopicTable");
        prevPage = (Gtk.Button)gxml.GetWidget("prevPage");
        nextPage = (Gtk.Button)gxml.GetWidget("nextPage");
        pageLabel = (Gtk.Label)gxml.GetWidget("pageLabel");

        setEvents();
        loadTopics();
    }
开发者ID:shark555,项目名称:Resources-Reservation-System,代码行数:13,代码来源:GUIMain.cs

示例3: BookEditor

 public BookEditor()
 {
     Glade.XML gxml = new Glade.XML (Util.GladePath("contact-browser.glade"),
      "BookEditor", null);
        gxml.Autoconnect (this);
        beDlg = (Gtk.Dialog) gxml.GetWidget("BookEditor");
 }
开发者ID:RoDaniel,项目名称:featurehouse,代码行数:7,代码来源:BookEditor.cs

示例4: ConnectionMenu

 public ConnectionMenu(TreeView connectionList)
 {
     this.connectionList = connectionList;
     Glade.XML xmlMnuConnections = new Glade.XML(null, "FileFind.Meshwork.GtkClient.meshwork.glade", "mnuConnections", null);
     mnuConnections = (xmlMnuConnections.GetWidget("mnuConnections") as Gtk.Menu);
     xmlMnuConnections.Autoconnect (this);
 }
开发者ID:codebutler,项目名称:meshwork,代码行数:7,代码来源:ConnectionMenu.cs

示例5: SetupUI

		private void SetupUI ()
		{
			gXML = new Glade.XML (null, "demoapp.glade", "FindWindow", null);
			gXML.Autoconnect (this);

			ReparentAdd (gXML.GetWidget ("FindTop"), false);
			ReparentAdd (gXML.GetWidget ("FindBottom"), true);
			members = (TreeView) gXML.GetWidget ("FindMembersTreeView");
			// members.KeyPressEvent += new KeyPressEventHandler (KeyPressed);
			members.RowActivated += new RowActivatedHandler (RowActivated);
			types = (TreeView) gXML.GetWidget ("FindTypesTreeView");
			types.RowActivated += new RowActivatedHandler (RowActivated);
			SetupViews ();

			entry = (Entry) gXML.GetWidget ("FindEntry");
			entry.Changed += new EventHandler (EntryChanged);

			ShowAll ();
		}		
开发者ID:emtees,项目名称:old-code,代码行数:19,代码来源:FindBar.cs

示例6: CInfoWindow

 public CInfoWindow(string Headline,string Description, string StockIcon, bool ShowWindow)
 {
     string infoW="InfoWindow";
     Glade.XML infoXml= new Glade.XML (null, "gui.glade", infoW, null);
     infoXml.Autoconnect (this);
     mainWindow = (Gtk.Window) infoXml.GetWidget (infoW);
     this.Headline = Headline;
     this.Description = Description;
     InfoOkButton.Clicked+=new EventHandler(OnOkButtonClicked);
     InfoCopyToClipboardButton.Clicked+=new EventHandler(OnCopyToClipboardClicked);
     InfoImage.Stock= StockIcon;
     if(ShowWindow)
         Show();
 }
开发者ID:BackupTheBerlios,项目名称:gnomeartng-svn,代码行数:14,代码来源:CInfoWindow.cs

示例7: CPreviewWindow

 public CPreviewWindow(CTheme theme,bool Show)
 {
     string prevW="PreviewWindow";
     this.theme = theme;
     Glade.XML previewXml= new Glade.XML (null, "gui.glade", prevW, null);
     previewXml.Autoconnect (this);
     mainWindow = (Gtk.Window) previewXml.GetWidget (prevW);
     PreviewCloseButton.Clicked+=new EventHandler(OnCloseButtonClicked);
     PreviewInstallButton.Clicked+=new EventHandler(OnInstallButtonClicked);
     MainImagePixbuf = new Gdk.Pixbuf(theme.LocalPreviewFile);
     Headline = Catalog.GetString("Previewing \"")+ theme.Name+"\"";
     if(Show)
         MainWindow.ShowAll();
 }
开发者ID:BackupTheBerlios,项目名称:gnomeartng-svn,代码行数:14,代码来源:CPreviewWindow.cs

示例8: CStatusWindow

 public CStatusWindow(string Headline,int MaxCount,bool CloseByRequest, bool ExpandExpander, bool ShowWindow)
 {
     string statusW="StatusWindow";
     Glade.XML statusXml= new Glade.XML (null, "gui.glade", statusW, null);
     statusXml.Autoconnect (this);
     mainWindow = (Gtk.Window) statusXml.GetWidget (statusW);
     //ToDO: mainWindow.TransientFor=
     this.Headline = Headline;
     if (CloseByRequest)
         StatusCancelButton.Clicked+=new EventHandler(OnCancelRequestButtonClicked);
     else
         StatusCancelButton.Clicked+=new EventHandler(OnCancelButtonClicked);
     ExpanderLabelVisible = ExpandExpander;
     SetProgressStep(MaxCount);
     if(ShowWindow)
         Show();
 }
开发者ID:BackupTheBerlios,项目名称:gnomeartng-svn,代码行数:17,代码来源:CStatusWindow.cs

示例9: SmartPlaylistEditor

        public SmartPlaylistEditor()
        {
            glade = new Glade.XML(null, "smart-playlist.glade", dialog_name, "banshee");
            glade.Autoconnect(this);

            dialog = (Dialog)glade.GetWidget(dialog_name);
            Banshee.Base.IconThemeUtils.SetWindowIcon(dialog);

            // Add the QueryBuilder widget
            model = new TracksQueryModel();
            builder = new QueryBuilder(model);
            builder.Show();
            builder.Spacing = 4;

            builder_box.PackStart(builder, true, true, 0);

            name_entry.Changed += HandleNameChanged;

            Update();
        }
开发者ID:jrmuizel,项目名称:banshee-unofficial-plugins,代码行数:20,代码来源:SmartPlaylistEditor.cs

示例10: DemoApp

    public DemoApp (string[] args, params object[] props) : base ("DemoApp", "0.1", Modules.UI, args, props)
    {
	ParseArgs(args);

        Glade.XML gxml = new Glade.XML ("sourceview.glade", "win", null);
        gxml.Autoconnect (this);

        if (win == null) throw new Exception("GladeWidgetAttribute is broken.");

	Gtk.TextView tw = (Gtk.TextView) gxml.GetWidget ("tw");

	System.IO.StreamReader stream = new StreamReader(this.file);
	string text = stream.ReadToEnd();
	tw.Buffer.Insert (tw.Buffer.EndIter, text);

Console.WriteLine("here we go");
        Config conf   = new Config ();
        Highlights hl = new Highlights (conf.patterns);

	ConnectTextTagTable(tw.Buffer.TagTable, conf.styles);

hl.DebugPrint();
	Token [] tokens = hl.Search(text);
	
	foreach (Token t in tokens)
	{
	    Gtk.TextIter siter, eiter;

	    tw.Buffer.GetIterAtOffset(out siter, t.sindex);
            tw.Buffer.GetIterAtOffset(out eiter, t.eindex);

	    //Console.WriteLine("*** {3} - {4}*** <{0}>{1}</{0}:{2}>", 
	    //t.style.name, tw.Buffer.GetText(siter, eiter, false), t.style.pattern, t.sindex, t.eindex + 1);

            tw.Buffer.ApplyTag ( tw.Buffer.TagTable.Lookup(t.style.path), siter, eiter);
	}
    }
开发者ID:emtees,项目名称:old-code,代码行数:37,代码来源:DemoApp.cs

示例11: Run

        public void Run(object o, EventArgs e)
        {
            Console.WriteLine ("EXECUTING ExiflowEditComment EXTENSION");

            xml = new Glade.XML (null,"ExiflowEditComment.glade", dialog_name, "f-spot");
            xml.Autoconnect (this);
            dialog = (Gtk.Dialog) xml.GetWidget(dialog_name);

            // collect comments of selected photos in current_comments
            ArrayList current_comments = new ArrayList ();
            foreach (Photo p in App.Instance.Organizer.SelectedPhotos ()) {
                if (p.Description.Length > 0 && ! current_comments.Contains(p.Description)) {
                    current_comments.Add(p.Description);
                }
            }

            // fill text buffer with all current comments
            comment.Buffer.Text = String.Join("\n---\n", (String[]) current_comments.ToArray(typeof(string)));

            dialog.Modal = false;
            dialog.TransientFor = null;
            dialog.Response += HandleResponse;
            dialog.ShowAll();
        }
开发者ID:rompe,项目名称:exiflow,代码行数:24,代码来源:ExiflowEditComment.cs

示例12: GladeWindow

 /// Initialize Glade Window with Window Name & Glade XML Struct
 public GladeWindow(string name, Glade.XML glade)
 {
     this.glade = glade;
     this.window = (Gtk.Window) glade.GetWidget(name);
     this.glade.Autoconnect(this);
 }
开发者ID:BackupTheBerlios,项目名称:nyfolder-svn,代码行数:7,代码来源:GladeWindow.cs

示例13: DetailedWindow

		public DetailedWindow (Hashtable contact)
		{
			gxml = new Glade.XML (null, "contactviewer.glade", "DetailedWindow", null);
			gxml.Autoconnect (this);
			
			// Fill all Entry-boxes with information
			foreach (string name in widget_names)
				(gxml.GetWidget (name) as Gtk.Entry).Text = (contact [name] != null ? (contact [name] as string) : "");;
			
			// Also fill the special cases
			Notes.Buffer.Text = (contact ["Notes"] != null ? (contact ["Notes"] as string) : "");
			
			try {
				int tmp = Convert.ToInt32 (contact ["PreferMailFormat"]);
				PreferredType.Active = (tmp >= 0 && tmp <= 2 ? tmp : 0);
			} catch {
				PreferredType.Active = 0;
			}
			
			Close.Clicked += OnClose;
			
			Window.Icon = Beagle.Images.GetPixbuf ("contact-icon.png");
			Window.Show ();
		}
开发者ID:ArsenShnurkov,项目名称:beagle-1,代码行数:24,代码来源:ContactWindow.cs

示例14: GnomeArtNgApp

    public GnomeArtNgApp(string[] args)
    {
        Application.Init();
        //i18n
        Catalog.Init("gnomeartng","./locale");
        config=new CConfiguration();
        //initialize Glade
        string mainW = "MainWindow";
        Glade.XML gxml = new Glade.XML (null, "gui.glade", mainW, null);
        mainWindow = (Gtk.Window) gxml.GetWidget (mainW);
        gxml.Autoconnect (this);

        //Connect all events
        mainWindow.DeleteEvent+=new DeleteEventHandler(OnWindowDeleteEvent);
        ExtInfoPreviewButton.Clicked += new EventHandler(OnPreviewButtonClicked);
        InstallButton.Clicked  += new EventHandler(OnInstallButtonClicked);
        RevertButton.Clicked  += new EventHandler(OnRevertButtonClicked);
        RefreshButton.Clicked += new EventHandler(OnRefreshButtonClicked);
        SaveButton.Clicked  += new EventHandler(OnSaveButtonClicked);
        MainNotebook.SwitchPage += new SwitchPageHandler(OnSwitchPage);
        FilterEntry.Changed += new EventHandler(OnFilterEntriesChanged);
        //		SortKindCb.Changed += new EventHandler(OnSortKindEntryChanged);
        //		SortDirectionCb.Changed += new EventHandler(OnSortDirectionEntryChanged);
        //		SortCloseButton.Clicked += new EventHandler(OnSortCloseClicked);
        FilterEntry.KeyReleaseEvent += new KeyReleaseEventHandler(OnFilterbarKeyReleased);
        FilterCloseButton.Clicked += new EventHandler(OnFilterbarCloseClicked);

        //Menuitems
        QuitMenuItem.Activated += new EventHandler(OnQuitItemSelected);
        UpdateMenuItem.Activated += new EventHandler(OnUpdateItemSelected);
        DonateMenuItem.Activated += new EventHandler(CUpdateWindow.onDonateButtonClicked);
        FilterMenuItem.Activated += new EventHandler(OnFilterItemSelected);
        //		SortMenuItem.Activated += new EventHandler(OnSortItemSelected);
        InfoMenuItem.Activated += new EventHandler(OnInfoItemSelected);
        PreferencesMenuItem.Activated += new EventHandler(OnPreferencesItemSelected);
        FTAItem.Activated += new EventHandler(onFtaItemSelected);

        //First, download all thumbs...but don't bother the user with the update message, even if there is one
        bool RestartApp= false;
        if (config.NeverStartedBefore)
            new CFirstTimeAssistant(config);
        else if (config.DontBotherForUpdates==false) {
            if (config.UpdateAvailable) {
                Console.WriteLine("An update is available, newest version is: "+config.NewestVersionNumberOnServer);
                RestartApp = ShowUpdateWindow();
            }
        }

        if (!RestartApp) {
            //Application placement - doesn't work properly with compiz (is it the window placement plugin?)
            if (config.SettingsLoadOk) {
                mainWindow.Resize(config.Window.Width, config.Window.Height);
                mainWindow.Move(config.Window.X, config.Window.Y);
                //Console.WriteLine(config.Window.X+" "+ config.Window.Y);
            }

            //ArtManager erzeugen
            man = new CArtManager(config);

            //Stores anlegen und IconViews anlegen
            for(int i=0;i<ListStoreCount;i++){
                sWins[i] = (Gtk.ScrolledWindow)(gxml.GetWidget("swin"+i));
                stores[i]= new ListStore (typeof(Pixbuf),typeof (string), typeof (string), typeof(int));
                IconViews[i] = new Gtk.IconView(stores[i]);
                IconViews[i].SelectionChanged += new System.EventHandler(OnSelChanged);
                IconViews[i].ItemActivated += new ItemActivatedHandler(OnItemActivated);
                IconViews[i].PixbufColumn = 0;
                CurrentIconView = IconViews[0];

                sWins[i].Add(IconViews[i]);
                IconViews[i].Show();
            }

            //Create the comboboxes
            imageTypeBox = ComboBox.NewText();
            imageResolutionsBox = ComboBox.NewText();
            imageStyleBox = ComboBox.NewText();

            //Verschiedene Styles hinzufügen
            imageStyleBox.AppendText(Catalog.GetString("Centered"));
            imageStyleBox.AppendText(Catalog.GetString("Filled"));
            imageStyleBox.AppendText(Catalog.GetString("Scaled"));
            imageStyleBox.AppendText(Catalog.GetString("Zoomed"));
            imageStyleBox.AppendText(Catalog.GetString("Tiled"));
            imageStyleBox.Active=0;
            imageStyleBox.Changed += new EventHandler(OnImageStyleBoxChanged);

            LowerTable.Attach(imageTypeBox,1,2,2,3);
            LowerTable.Attach(imageResolutionsBox,1,2,3,4);
            LowerTable.Attach(imageStyleBox,1,2,4,5);

            OnSwitchPage(MainNotebook,new SwitchPageArgs());
            Gtk.Application.Run ();

        }
    }
开发者ID:BackupTheBerlios,项目名称:gnomeartng-svn,代码行数:96,代码来源:Main.cs

示例15: modify_job

        private void modify_job(ArrayList al, string id)
        {
            string jobid = null;
            string number = null;
            string status = null;
            string user = null;
            string pages = null;
            string dials = null;
            object sendat = null;
            string error = null;

            IEnumerator enu = al.GetEnumerator();
            while (	enu.MoveNext() ) {
                enu.MoveNext();
                jobid = (string)enu.Current;
                enu.MoveNext();
                number = (string)enu.Current;
                enu.MoveNext();
                status = (string)enu.Current;
                enu.MoveNext();
                user = (string)enu.Current;
                enu.MoveNext();
                pages = (string)enu.Current;
                enu.MoveNext();
                int idx = ((string)enu.Current).LastIndexOf(':');
                dials = ((string)enu.Current).Substring(idx + 1);
                enu.MoveNext();
                sendat = (object)enu.Current;
                enu.MoveNext();
                error = (string)enu.Current;
            }

            #if DEBUG
                Console.WriteLine("[ModifyJob] Date is {0}", sendat);
            #endif

            Glade.XML xml = new Glade.XML (null, "gfax.glade","vbox74",null);
            Dialog mjd = new Dialog();
            mjd.VBox.Add(xml.GetWidget("vbox74"));
            Gtk.Entry mje = (Gtk.Entry)xml.GetWidget("ModifyJobNumberEntry");
            Gnome.DateEdit mjde = (Gnome.DateEdit)xml.GetWidget("ModifyJobDate");
            Gtk.SpinButton mjmd = (Gtk.SpinButton)xml.GetWidget("MaxDialsSpinbutton");

            mjd.AddButton (Gtk.Stock.Cancel, Gtk.ResponseType.Cancel);
            mjd.AddButton (Gtk.Stock.Ok, Gtk.ResponseType.Ok);

            // this is to re-enable the entry for editing so it won't be selected
            // to begin with???  Maybe something to do with re-parenting or something.
            mje.FocusInEvent +=
                    new FocusInEventHandler (on_ModifyJobNumberEntry_focus_in_event);

            mje.IsEditable = false;
            mje.Text = number.Trim();

            mjde.Time = sendat == null ? new DateTime(): (DateTime)sendat;

            mjmd.Value = Convert.ToDouble(dials.Trim());

            ResponseType result = (ResponseType)mjd.Run ();

            if (result == ResponseType.Ok) {
                DateTime newsend = (mjde.Time).ToUniversalTime();

                // Format time to send - timezone is in UTC format.
                string tts = String.Format("{0}{1:00}{2:00}{3:00}{4:00}",
                    newsend.Year,
                    newsend.Month,
                    newsend.Day,
                    newsend.Hour,
                    newsend.Minute);

                if (id == "sendq" )
                    Fax.modify_job(jobid, mje.Text, tts, (mjmd.ValueAsInt).ToString());
                else // "doneq"
                    Fax.resubmit_job(jobid, mje.Text, tts, (mjmd.ValueAsInt).ToString());

                mjd.Destroy();
            } else {
                mjd.Destroy();
            }

            async_update_queue_status("sendq");
            ModifyJobButton.Sensitive = false;
            DeleteJobButton.Sensitive = false;
        }
开发者ID:horga83,项目名称:gfax,代码行数:85,代码来源:gui.cs


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