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


C# XML.Autoconnect方法代码示例

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


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

示例1: TrackballExample

    public TrackballExample(string[] args)
    {
        Application.Init ();

        // Create a new GL widget
        glw = new TrackballWidget();

        // Create a new Teapot object
        GtkGL.Teapot teapot = new Teapot();

        // Add our Teapot object to the GLWidget's list of associated GLObjects
        glw.AddGLObject( teapot );

        // Read in the glade file that describes the widget layout
        Glade.XML gxml = new Glade.XML (null, "glwidget.glade", "glwidget", null);

        // Connect the Signals defined in Glade
        gxml.Autoconnect (this);

        // Pack the gl window into the vbox
        Gtk.VBox vbox1 = (Gtk.VBox)gxml["vbox1"];
        vbox1.PackStart ( glw );

        // Show the GL widget
        Gtk.Window window = (Gtk.Window)gxml["glwidget"];
        window.Show();

        glw.Show();

        // Go dog.  Go!
        Application.Run ();
    }
开发者ID:mono,项目名称:gtkglarea-sharp,代码行数:32,代码来源:TrackballExample.cs

示例2: LegendView

        /// <summary>
        /// Construtor
        /// </summary>
        public LegendView(ViewBase owner)
            : base(owner)
        {
            Glade.XML gxml = new Glade.XML("ApsimNG.Resources.Glade.LegendView.glade", "hbox1");
            gxml.Autoconnect(this);
            _mainWidget = hbox1;
            combobox1.Model = comboModel;
            combobox1.PackStart(comboRender, false);
            combobox1.AddAttribute(comboRender, "text", 0);
            combobox1.Changed += OnPositionComboChanged;
            combobox1.Focused += OnTitleTextBoxEnter;

            listview.Model = listModel;
            TreeViewColumn column = new TreeViewColumn();
            column.Title = "Series name";
            column.PackStart(listToggle, false);
            listRender.Editable = false;
            column.PackStart(listRender, true);
            column.SetAttributes(listToggle, "active", 0);
            column.SetAttributes(listRender, "text", 1);
            listview.AppendColumn(column);
            listToggle.Activatable = true;
            listToggle.Toggled += OnItemChecked;
            _mainWidget.Destroyed += _mainWidget_Destroyed;
        }
开发者ID:hol353,项目名称:ApsimX,代码行数:28,代码来源:LegendView.cs

示例3: BrunetChatLogin

  public BrunetChatLogin(ChatConfigSerialization config)
  {
    _chat_config = config;
    
    string fname = "BrunetChat.glade";
    string root = "dialogBrunetChatLogin";
    Glade.XML gxml = new Glade.XML (fname, root, null);
    //Glade.XML gxml = new Glade.XML (null,fname, root, null);
    gxml.Autoconnect(this);

    int init_users = _chat_config.UserList.Users.Length;
    if (0 < init_users){
      userStrings = new ArrayList();
      userHashtable = new Hashtable();
      foreach(User user in _chat_config.UserList.Users ){
        userHashtable.Add(user.Email,user); 
        userStrings.Add(user.Email);
      }
      
      int count =  userStrings.Count;
      Console.WriteLine("User count: {0}",count);
      string[] popstring = new string[count];
      for (int loop = 0;loop<count;loop++){
        popstring[loop] = (string)userStrings[loop];
        Console.WriteLine(popstring[loop]);
      }
      comboEmail.PopdownStrings = popstring;
    }
    
  }
开发者ID:xujyan,项目名称:brunet,代码行数:30,代码来源:BrunetChatLogin.cs

示例4: AlbumEditorUI

    private AlbumEditorUI(Album album, bool isnew)
    {
        Glade.XML gxml = new Glade.XML (null, "organizer.glade", "window3", null);
          gxml.Autoconnect (this);

          this._isnew = isnew;
          this._album = album;
          window3.Title = String.Format("Editing information for {0}", album.Title);
          window3.SetIconFromFile(DeskFlickrUI.ICON_PATH);

          label8.Text = "Edit";
          label9.Text = "Title: ";
          label10.Text = "Description: ";

          entry3.Text = album.Title;
          textview6.Buffer.Text = album.Desc;

          entry3.Changed += new EventHandler(OnTitleChanged);
          textview6.Buffer.Changed += new EventHandler(OnDescriptionChanged);

          button7.Clicked += new EventHandler(OnCancelButtonClicked);
          button8.Clicked += new EventHandler(OnSaveButtonClicked);

          image4.Pixbuf = PersistentInformation.GetInstance()
                            .GetSmallImage(album.PrimaryPhotoid);
          window3.ShowAll();
    }
开发者ID:joshuacox,项目名称:dfo,代码行数:27,代码来源:AlbumEditorUI.cs

示例5: ExceptionWindow

		public ExceptionWindow(DebuggerService debuggerService, Thread thread, TargetEventArgs args)
		{
			this.debuggerService = debuggerService;
			
			Glade.XML gxml = new Glade.XML("gui.glade", "exceptionWindow", null);
			gxml.Autoconnect(this);
			
			image.Pixbuf = Pixmaps.Exception.GetPixbuf();
			
			if (args.Type == TargetEventType.UnhandledException) {
				buttonContinue.Visible = false;
			}
			
			labelExceptionCaught.Text = (args.Type == TargetEventType.Exception ? "Exception" : "Unandled exception") + " has been caugth:";
			
			StringBuilder sb = new StringBuilder();
			StackFrame[] callstack;
			try {
				callstack = thread.GetBacktrace().Frames;
			} catch {
				return;
			}
			
			foreach(StackFrame frame in callstack) {
				sb.Append(frame.ToString() + Environment.NewLine);
			}
			
			textviewCallstack.Buffer.Text = sb.ToString();
		}
开发者ID:JianwenSun,项目名称:mono-soc-2007,代码行数:29,代码来源:ExceptionWindow.cs

示例6: MphotoToplevel

	public unsafe MphotoToplevel (IImageRepository _repo, string[] args, params object[] props)
		: base ("Mphoto", "0.0", Modules.UI, args, props)
	{
		cwh = new Glade.XMLCustomWidgetHandler (GladeCustomWidgetHandler);
		Glade.XML.SetCustomHandler (cwh);
		gxml = new Glade.XML (null, "mphoto.glade", null, null);

		Console.WriteLine ("Autoconnect");
		gxml.Autoconnect (this);

//        CreateCustomWidget ("browser_icon_list");
//        CreateCustomWidget ("collections_tree_view");
//        CreateCustomWidget ("imageinfo_tree_view");
//        CreateCustomWidget ("eog_image_view");
//        CreateCustomWidget ("keywords_widget");

		this.leftside_notebook = (Gtk.Notebook) gxml["browser_left_notebook"];
		this.top_level_notebook = (Gtk.Notebook) gxml["top_level_notebook"];

		this.toplevel = gxml["mphoto_browser"];
		this.label_zoom_value = (Gtk.Label) gxml["label_zoom_value"];
		this.search_dialog = (Gtk.Window) gxml["search_dialog"];

		this.Repository = _repo;

		// initialize the tree views to the side
		imageinfo_tree_view.IconList = icon_list;
		keywords_widget.IconList = icon_list;

		collections_tree_view.RowActivated += new RowActivatedHandler (CollectionsTreeViewActivateHandler);
		icon_list.Activated += new EventHandler (IconlistActivated);

		GlobalMphotoToplevel = this;
	}
开发者ID:emtees,项目名称:old-code,代码行数:34,代码来源:MphotoToplevel.cs

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

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

示例9: WorkbenchView

        public WorkbenchView(WorkbenchController controller)
        {
            SplashWindow.Update ("Creating GUI");
            XML gxml = new Glade.XML (null,
                          WorkbenchSingleton.GLADEFILE,
                          "Workbench",
                          null);

            window = (Gtk.Window) gxml["Workbench"];
            Gtk.VPaned splitter = (Gtk.VPaned) gxml["mainPane"];

            editorNotebook = new EditorNotebook ();
            splitter.Pack1 (editorNotebook, true, false);

            ScrolledWindow sw = new ScrolledWindow ();
            console = new TextView ();
            console.Editable = false;
            console.WrapMode = WrapMode.Word;
            sw.Add (console);

            Notebook bottomNotebook = new Notebook ();
            bottomNotebook.AppendPage (sw, new Label ("Console"));
            splitter.Pack2 (bottomNotebook, true, false);

                        window.Icon = icon;
            this.WindowTitle = "";
            gxml.Autoconnect (controller);
            bottomNotebook.ShowAll ();
            editorNotebook.ShowAll ();
            SplashWindow.Update ("Simetron is ready!");
        }
开发者ID:BackupTheBerlios,项目名称:simetron,代码行数:31,代码来源:WorkbenchView.cs

示例10: AboutUI

    private AboutUI()
    {
        Glade.XML gxml = new Glade.XML (null, "organizer.glade", "window4", null);
          gxml.Autoconnect (this);

          Gdk.Pixbuf pixbuf = new Gdk.Pixbuf(DeskFlickrUI.ICON_PATH);
          logoimage.Pixbuf = pixbuf;
          dfolabel.Markup = "<span font_desc='Sans Bold 16'>Desktop Flickr Organizer v0.8</span>";

          notebook2.SetTabLabelText(notebook2.CurrentPageWidget, "About");
          notebook2.NextPage();
          notebook2.SetTabLabelText(notebook2.CurrentPageWidget, "Attribution");
          notebook2.NextPage();
          notebook2.SetTabLabelText(notebook2.CurrentPageWidget, "License");
          notebook2.Page = 0;

          closebutton.Label = "Close";
          closebutton.Clicked += new EventHandler(OnCloseButtonClicked);

          SetAboutInfo();
          SetAttributionInfo();

          window4.SetIconFromFile(DeskFlickrUI.ICON_PATH);
          window4.ShowAll();
    }
开发者ID:joshuacox,项目名称:dfo,代码行数:25,代码来源:AboutUI.cs

示例11: FindResultsWidget

		public FindResultsWidget (IEnumerable results) 
		{
			xmlFindResultsWidget = new Glade.XML (null,"measures.glade", "table4", null);
			xmlFindResultsWidget.Autoconnect (this);
			countTypes.Text = CountTypes (results).ToString ();
			countMethods.Text = CountMethods (results).ToString ();
		}
开发者ID:JianwenSun,项目名称:mono-soc-2007,代码行数:7,代码来源:FindResultsWidget.cs

示例12: AddEvent

        // Constructor for subclasses of this class
        public AddEvent(Window parent, ListStore eventsModel)
        {
            Glade.XML gxml = new Glade.XML ("add_event.glade", "dlgAddEvent", null);
            gxml.Autoconnect(this);

            this.dlgAddEvent.TransientFor = parent;

            // Set actual day and month
            this.spbtnDay.Value = DateTime.Now.Day;
            this.cmbMonth.Active = DateTime.Now.Month - 1;

            this.spbtnYear.Adjustment.Lower = DateTime.Now.Year;
            this.spbtnYear.Adjustment.Upper = 9999;
            this.spbtnYear.Value = DateTime.Now.Year;

            // Load event types
            EventTypesManager etm = EventTypesManager.Instance;

            this.cmbEventTypes.RemoveText(0);

            foreach (EventType anEventType in etm.RetrieveAll()) {
                this.cmbEventTypes.AppendText(anEventType.Name);
            }

            this.eventsModel = eventsModel;
        }
开发者ID:TheProjecter,项目名称:zaspe-sharp,代码行数:27,代码来源:AddEvent.cs

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

示例14: MessageBox

        /// <summary>
        /// 
        /// </summary>
        /// <param name="messagetype"></param>
        /// <param name="message"></param>
        /// <param name="callback">Can be null</param>
        public MessageBox( MessageType messagetype, string title, string message, Callback callback )
        {
            this.callback = callback;

            Glade.XML app = new Glade.XML( EnvironmentHelper.GetExeDirectory() + "/metaverse.client.glade", "messagebox", "" );
            app.Autoconnect( this );
            messagebox.SetIconFromFile(EnvironmentHelper.GetOsmpIconFilepath());

            messagebox.Title = title;
            messagelabel.Text = message;

            switch (messagetype)
            {
                case MessageType.Info:
                    imageicon.SetFromStock( "gtk-dialog-info", IconSize.Dialog );
                    break;
                case MessageType.Warning:
                    imageicon.SetFromStock( "gtk-dialog-warning", IconSize.Dialog );
                    break;
                case MessageType.Error:
                    imageicon.SetFromStock( "gtk-dialog-error", IconSize.Dialog );
                    break;
            }

            btnok.Clicked += new EventHandler( btnok_Activated );
        }
开发者ID:hughperkins,项目名称:osmp-cs,代码行数:32,代码来源:MessageBox.cs

示例15: GladeExample

        public GladeExample()
        {
            // Load the file glwidget.glade and collect all the objects starting from
            // the specified "glwidget" root. This is the name of the Window in the
            // glade file.
            Glade.XML gxml = new Glade.XML(null, "glwidget.glade", "glwidget", null);

            // Connect the Signals defined in Glade. Also connect any matching names
            // of objects to properties of the object specified ('this') that are marked
            // with the [Widget] attribute. In turn this makes this.glwidget get assigned
            // to the glwidget Gtk.Window object.
            gxml.Autoconnect(this);

            // Create a new glw widget and request a size.
            glw = new GLWidget();

            // Create a new Vertical Box that the glw can live in.
            VBox vb = (Gtk.VBox)gxml["vbox1"];

            // Pack the glw widget into the VBox.
            vb.PackStart (glw);

            // Create a new clickable button.
            Button butModal = new Button();
            butModal.Label = "Press For Modal!";
            butModal.Clicked += new EventHandler(butModal_Clicked);

            // Stick the button into the vbox.
            vb.PackStart(butModal);
        }
开发者ID:mono,项目名称:gtkglarea-sharp,代码行数:30,代码来源:GladeExample.cs


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