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


C# ListStore.GetIterFirst方法代码示例

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


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

示例1: ImportSymbolSelectionDlg

        public ImportSymbolSelectionDlg(INode[] nodes)
        {
            this.Build ();

            SetResponseSensitive(ResponseType.Ok, true);
            SetResponseSensitive(ResponseType.Cancel, true);

            buttonOk.GrabFocus();
            Modal = true;
            WindowPosition = Gtk.WindowPosition.CenterOnParent;

            // Init name column
            var nameCol = new TreeViewColumn();
            var textRenderer = new CellRendererText();
            nameCol.PackStart(textRenderer, true);
            nameCol.AddAttribute(textRenderer, "text", 0);
            list.AppendColumn(nameCol);

            // Init list model
            var nodeStore = new ListStore(typeof(string),typeof(INode));
            list.Model = nodeStore;

            // Fill list
            foreach (var n in nodes)
                if(n!=null)
                    nodeStore.AppendValues(n.ToString(), n);

            // Select first result
            TreeIter iter;
            if(nodeStore.GetIterFirst(out iter))
                list.Selection.SelectIter(iter);
        }
开发者ID:robik,项目名称:Mono-D,代码行数:32,代码来源:ImportSymbolSelectionDlg.cs

示例2: CrotateStageOperationParametersWidget

        public CrotateStageOperationParametersWidget(StageOperationParameters parameters)
            : base(parameters)
        {
            this.Build ();

            // Link to height (chain)
            ForeColoredSymbol link_w_symbol = new ForeColoredSymbol();
            using (Gdk.Pixbuf buf = Gdk.Pixbuf.LoadFromResource("CatEye.UI.Gtk.Widgets.res.chain.png"))
            {
                link_w_symbol.Symbol = buf;
            }
            link_w_symbol.Show();
            link_w_togglebutton.Image = link_w_symbol;

            // Link to width (chain)
            ForeColoredSymbol link_h_symbol = new ForeColoredSymbol();
            using (Gdk.Pixbuf buf = Gdk.Pixbuf.LoadFromResource("CatEye.UI.Gtk.Widgets.res.chain.png"))
            {
                link_h_symbol.Symbol = buf;
            }
            link_h_symbol.Show();
            link_h_togglebutton.Image = link_h_symbol;

            // Custom (line)
            ForeColoredSymbol custom_symbol = new ForeColoredSymbol();
            using (Gdk.Pixbuf buf = Gdk.Pixbuf.LoadFromResource("CatEye.UI.Gtk.Widgets.res.line.png"))
            {
                custom_symbol.Symbol = buf;
            }
            custom_symbol.Show();
            custom_togglebutton.Image = custom_symbol;
            custom_togglebutton.Label = null;

            ls = new ListStore(typeof(string), typeof(int));
            string[] ratioNames = ((CrotateStageOperationParameters)Parameters).PresetAspectRatioNames;
            for (int i = 0; i < ratioNames.Length; i++)
            {
                ls.AppendValues(ratioNames[i], i);
            }
            aspect_combobox.Model = ls;

            TreeIter ti;
            ls.GetIterFirst(out ti);

            mAspectComboboxSelfModifying = true;
            aspect_combobox.SetActiveIter(ti);
            mAspectComboboxSelfModifying = false;
        }
开发者ID:bigfatbrowncat,项目名称:CatEye,代码行数:48,代码来源:CrotateStageOperationParametersWidget.cs

示例3: StashManagerDialog

		public StashManagerDialog (GitRepository repo)
		{
			this.Build ();
			stashes = repo.GetStashes ();
			
			store = new ListStore (typeof(Stash), typeof(string), typeof(string));
			list.Model = store;
			
			list.AppendColumn (GettextCatalog.GetString ("Date/Time"), new CellRendererText (), "text", 1);
			list.AppendColumn (GettextCatalog.GetString ("Comment"), new CellRendererText (), "text", 2);
			Fill ();
			TreeIter it;
			if (store.GetIterFirst (out it))
				list.Selection.SelectIter (it);
			UpdateButtons ();
		}
开发者ID:okrmartin,项目名称:monodevelop,代码行数:16,代码来源:StashManagerDialog.cs

示例4: AddLogEntryDialog

		public AddLogEntryDialog (Dictionary<string,ChangeLogEntry> entries)
		{
			Build ();
			
			Pango.FontDescription font = Pango.FontDescription.FromString (DesktopService.DefaultMonospaceFont);
			textview.ModifyFont (font);
			textview.WrapMode = WrapMode.None;
			textview.AcceptsTab = true;
			Pango.TabArray tabs = new Pango.TabArray (1, true);
			tabs.SetTab (0, Pango.TabAlign.Left, GetStringWidth (" ") * 4);
			textview.Tabs = tabs;
			textview.SizeRequested += delegate (object o, SizeRequestedArgs args) {
				textview.WidthRequest = GetStringWidth (string.Empty.PadRight (80));
			};
			font.Dispose ();
			
			store = new ListStore (typeof(ChangeLogEntry), typeof(Gdk.Pixbuf), typeof(string));
			fileList.Model = store;
			
			fileList.AppendColumn (string.Empty, new CellRendererPixbuf (), "pixbuf", 1);
			fileList.AppendColumn (string.Empty, new CellRendererText (), "text", 2);
			
			foreach (ChangeLogEntry ce in entries.Values) {
				Gdk.Pixbuf pic;
				if (ce.CantGenerate)
					pic = ImageService.GetPixbuf (Gtk.Stock.DialogWarning, Gtk.IconSize.Menu);
				else if (ce.IsNew)
					pic = ImageService.GetPixbuf (Gtk.Stock.New, Gtk.IconSize.Menu);
				else
					pic = null;
				store.AppendValues (ce, pic, ce.File);
			}
			fileList.Selection.Changed += OnSelectionChanged;
			textview.Buffer.Changed += OnTextChanged;
			TreeIter it;
			
			editMark = textview.Buffer.CreateMark (null, textview.Buffer.EndIter, false);
			oldTextTag = new Gtk.TextTag ("readonly");
			oldTextTag.Foreground = "gray";
			oldTextTag.Editable = false;
			textview.Buffer.TagTable.Add (oldTextTag);
			
			if (store.GetIterFirst (out it))
				fileList.Selection.SelectIter (it);
		}
开发者ID:transformersprimeabcxyz,项目名称:monodevelop-1,代码行数:45,代码来源:AddLogEntryDialog.cs

示例5: AddLogEntryDialog

		public AddLogEntryDialog (Dictionary<string,ChangeLogEntry> entries)
		{
			Build ();
			
			textview.ModifyFont (FontService.MonospaceFont);
			textview.WrapMode = WrapMode.None;
			textview.AcceptsTab = true;
			Pango.TabArray tabs = new Pango.TabArray (1, true);
			tabs.SetTab (0, Pango.TabAlign.Left, GetStringWidth (" ") * 4);
			textview.Tabs = tabs;
			textview.SizeRequested += delegate {
				textview.WidthRequest = GetStringWidth (String.Empty.PadRight (80));
			};
			
			store = new ListStore (typeof(ChangeLogEntry), typeof(Xwt.Drawing.Image), typeof(string));
			fileList.Model = store;
			
			fileList.AppendColumn (string.Empty, new CellRendererImage (), "image", 1);
			fileList.AppendColumn (string.Empty, new CellRendererText (), "text", 2);
			
			foreach (ChangeLogEntry ce in entries.Values) {
				Xwt.Drawing.Image pic;
				if (ce.CantGenerate)
					pic = ImageService.GetIcon (Ide.Gui.Stock.Warning, IconSize.Menu);
				else if (ce.IsNew)
					pic = ImageService.GetIcon (Stock.New, IconSize.Menu);
				else
					pic = null;
				store.AppendValues (ce, pic, ce.File);
			}
			fileList.Selection.Changed += OnSelectionChanged;
			textview.Buffer.Changed += OnTextChanged;
			TreeIter it;
			
			editMark = textview.Buffer.CreateMark (null, textview.Buffer.EndIter, false);
			oldTextTag = new TextTag ("readonly");
			oldTextTag.Foreground = "gray";
			oldTextTag.Editable = false;
			textview.Buffer.TagTable.Add (oldTextTag);
			
			if (store.GetIterFirst (out it))
				fileList.Selection.SelectIter (it);
		}
开发者ID:FreeBSD-DotNet,项目名称:monodevelop,代码行数:43,代码来源:AddLogEntryDialog.cs

示例6: DatabaseConnectionContextComboBox

		public DatabaseConnectionContextComboBox ()
		{
			store = new ListStore (typeof (string), typeof (object));
			Model = store;
			
			CellRendererText textRenderer = new CellRendererText ();
			PackStart (textRenderer, true);
			AddAttribute (textRenderer, "text", 0);
			
			foreach (DatabaseConnectionContext context in ConnectionContextService.DatabaseConnections)
				store.AppendValues (context.ConnectionSettings.Name, context);
			TreeIter iter;
			if (store.GetIterFirst (out iter))
				SetActiveIter (iter);
			
			ConnectionContextService.ConnectionContextAdded += new DatabaseConnectionContextEventHandler (OnConnectionAdded);
			ConnectionContextService.ConnectionContextRemoved += new DatabaseConnectionContextEventHandler (OnConnectionRemoved);
			ConnectionContextService.ConnectionContextEdited += new DatabaseConnectionContextEventHandler (OnConnectionEdited);
			ConnectionContextService.ConnectionContextRefreshed += new DatabaseConnectionContextEventHandler (OnConnectionRefreshed);
		}
开发者ID:FreeBSD-DotNet,项目名称:monodevelop,代码行数:20,代码来源:DatabaseConnectionContextComboBox.cs

示例7: StashManagerDialog

		public StashManagerDialog (GitRepository repo)
		{
			this.Build ();
			this.UseNativeContextMenus ();
			repository = repo;

			stashes = repo.GetStashes ();

			store = new ListStore (typeof(Stash), typeof(string), typeof(string));
			list.Model = store;
			list.SearchColumn = -1; // disable the interactive search

			list.AppendColumn (GettextCatalog.GetString ("Date/Time"), new CellRendererText (), "text", 1);
			list.AppendColumn (GettextCatalog.GetString ("Comment"), new CellRendererText (), "text", 2);
			Fill ();
			TreeIter it;
			if (store.GetIterFirst (out it))
				list.Selection.SelectIter (it);
			UpdateButtons ();

			list.Selection.Changed += delegate {
				UpdateButtons ();
			};
		}
开发者ID:sushihangover,项目名称:monodevelop,代码行数:24,代码来源:StashManagerDialog.cs

示例8: OnButtonPressed

        void OnButtonPressed(object sender, Gtk.ButtonPressEventArgs args)
        {
            switch (args.Event.Button) {
                case 3: // third mouse button (right-click)
                    clickedTask = null;

                    Gtk.TreeView tv = sender as Gtk.TreeView;
                    if (tv == null)
                        return;

                    Gtk.TreeModel model = tv.Model;

                    Gtk.TreeIter iter;
                    Gtk.TreePath path;
                    Gtk.TreeViewColumn column = null;

                    if (!tv.GetPathAtPos ((int) args.Event.X,
                                    (int) args.Event.Y, out path, out column))
                        return;

                    if (!model.GetIter (out iter, path))
                        return;

                    clickedTask = model.GetValue (iter, 0) as ITask;
                    if (clickedTask == null)
                        return;

                    Menu popupMenu = new Menu ();
                    ImageMenuItem item;

                    item = new ImageMenuItem (Catalog.GetString ("_Notes..."));
                    item.Image = new Gtk.Image (noteIcon);
                    item.Activated += OnShowTaskNotes;
                    popupMenu.Add (item);

                    popupMenu.Add (new SeparatorMenuItem ());

                    item = new ImageMenuItem (Catalog.GetString ("_Delete task"));
                    item.Image = new Gtk.Image(Gtk.Stock.Delete, IconSize.Menu);
                    item.Activated += OnDeleteTask;
                    popupMenu.Add (item);

                    item = new ImageMenuItem(Catalog.GetString ("_Edit task"));
                    item.Image = new Gtk.Image(Gtk.Stock.Edit, IconSize.Menu);
                    item.Activated += OnEditTask;
                    popupMenu.Add (item);

                    /*
                     * Depending on the currently selected task's taskList, we create a context popup
                     * here in order to enable changing taskLists. The list of available taskLists
                     * is pre-filtered as to not contain the current taskList and the AllTaskList.
                     */

                    var filteredTaskLists = new ListStore (typeof (ITaskList));
                    foreach (var cat in application.BackendManager.TaskLists) {
                        if (cat != null && !(cat.ListType == TaskListType.Smart)
                        && !cat.Contains (clickedTask))
                            filteredTaskLists.AppendValues (cat);
                    }

                    // The taskLists submenu is only created in case we actually provide at least one taskList.
                    if (filteredTaskLists.GetIterFirst(out iter))
                    {
                        Menu taskListMenu = new Menu();
                        TaskListMenuItem taskListItem;

                        filteredTaskLists.Foreach(delegate(TreeModel t, TreePath p, TreeIter i) {
                            taskListItem = new TaskListMenuItem((ITaskList)t.GetValue(i, 0));
                            taskListItem.Activated += OnChangeTaskList;
                            taskListMenu.Add(taskListItem);
                            return false;
                        });

                        // TODO Needs translation.
                        item = new ImageMenuItem(Catalog.GetString("_Change list"));
                        item.Image = new Gtk.Image(Gtk.Stock.Convert, IconSize.Menu);
                        item.Submenu = taskListMenu;
                        popupMenu.Add(item);
                    }

                    popupMenu.ShowAll();
                    popupMenu.Popup ();

                    // Logger.Debug ("Right clicked on task: " + task.Name);
                    break;
            }
        }
开发者ID:GNOME,项目名称:tasque,代码行数:87,代码来源:TaskWindow.cs

示例9: UpdateIndices

		static void UpdateIndices (ListStore itemStore)
		{
			TreeIter iter;
			int i = 0;
			if (!itemStore.GetIterFirst (out iter))
				return;
			
			do {
				itemStore.SetValue (iter, 1, i);
				i++;
			} while (itemStore.IterNext (ref iter));
		}
开发者ID:jira-sarec,项目名称:ICSE-2012-TraceLab,代码行数:12,代码来源:CollectionEditor.cs

示例10: BindProviderCombobox

    void BindProviderCombobox()
    {
        providerListStore = new ListStore (typeof(string), typeof(Int64));
        ProviderCombobox.Model = providerListStore;

        foreach (var item in Providers) {
            providerListStore.AppendValues (item.Name, item.Id);
        }

        TreeIter iter;
        if (providerListStore.GetIterFirst (out iter)) {
            ProviderCombobox.SetActiveIter (iter);
        }
    }
开发者ID:chirdeeptomar,项目名称:password-usher,代码行数:14,代码来源:MainWindow.cs

示例11: GenerateNotebookPages


//.........这里部分代码省略.........
                                }
                            } else {
                                ls.AppendValues(isValid,cp.ProjectName,cp,cp.ProjectName,true);
                                cntOfAdded++;
                            }

                        } else {
                            lcpDennied.Add(cp);
                        }
                    }
                    //}
                }
                // pridam tie zakazane, ktore su vybrate na publish
                foreach (CombinePublish cp in lcpDennied){
                    if(cp.IsSelected){
                        ls.AppendValues(cp.IsSelected,cp.ProjectName,cp,cp.ProjectName,false);
                        cntOfAdded++;
                    }
                }

                if(cntOfAdded == 0){
                    MainClass.MainWindow.OutputConsole.WriteError(String.Format("Missing publish settings for {0}.\n",deviceName));
                }

                bool showAll = false;
                tvList.ButtonReleaseEvent += delegate(object o, ButtonReleaseEventArgs args){

                    if (args.Event.Button == 3) {
                        TreeSelection ts = tvList.Selection;
                        Gtk.TreePath[] selRow = ts.GetSelectedRows();

                        if(selRow.Length<1){
                            TreeIter tiFirst= new TreeIter();
                            ls.GetIterFirst(out tiFirst);

                            tvList.Selection.SelectIter(tiFirst);
                            selRow = ts.GetSelectedRows();
                        }
                        if(selRow.Length<1) return;

                        Gtk.TreePath tp = selRow[0];
                        TreeIter ti = new TreeIter();

                        ls.GetIter(out ti,tp);

                        CombinePublish combinePublish= (CombinePublish)ls.GetValue(ti,2);

                        if(combinePublish!=null){

                            Menu popupMenu = new Menu();
                            if(!showAll){
                                MenuItem miShowDenied = new MenuItem( MainClass.Languages.Translate("show_denied" ));
                                miShowDenied.Activated+= delegate(object sender, EventArgs e) {

                                    // odoberem zakazane, ktore sa zobrazuju kedze su zaceknute na publish
                                    List<TreeIter> lst= new List<TreeIter>();
                                    ls.Foreach((model, path, iterr) => {

                                        bool cp =(bool) ls.GetValue(iterr,4);
                                        bool selected =(bool) ls.GetValue(iterr,0);
                                        if(!cp && selected){
                                            lst.Add(iterr);
                                        }
                                        return false;
                                    });
开发者ID:moscrif,项目名称:ide,代码行数:66,代码来源:PublishDialogWizzard.cs

示例12: FillCurveSelectBox

    private void FillCurveSelectBox()
    {
        CellRendererText renderer = new CellRendererText();
        ListStore Curvelist = new ListStore(typeof(string));
        CurveSelectBox.PackStart(renderer, false);
        FinishedDoBox.AddAttribute(renderer, "text", 0);

        string[] names = AllCurves.GetAllCurvenames();
        int c = 0;
        if (names[names.Length - 1] == "Exposure_Compensation")
        {
            Curvelist.AppendValues(names[names.Length - 1]);
            c = 1;
        }

        for (int i = 0; i < names.Length - c; i++)
        {
            Curvelist.AppendValues(names[i]);
        }

        CurveSelectBox.Model = Curvelist;

        TreeIter iter;
        if (Curvelist.GetIterFirst(out iter)) { CurveSelectBox.SetActiveIter(iter); }
    }
开发者ID:TimeScience,项目名称:desert-deflicker,代码行数:25,代码来源:MainSub.cs

示例13: PreferencesDialog

        public PreferencesDialog()
            : base("PreferencesDialog.ui", "preferences")
        {
            bool more;
            TreeIter iter;
            string effect, selected;

            transition_store = new ListStore (typeof (string), typeof (string)); // DisplayName, Name
            CellRenderer transition_cell = new CellRendererText ();
            transition_combo.Model = transition_store;
            transition_combo.PackStart (transition_cell, true);
            transition_combo.SetCellDataFunc (transition_cell, Utils.ComboBoxCellFunc);
            LoadTransitionsIntoCombo ();

            thumbnail_store = new ListStore (typeof (string), typeof (int)); // DisplayName, int
            CellRenderer thumbnail_cell = new CellRendererText ();
            thumbnail_combo.Model = thumbnail_store;
            thumbnail_combo.PackStart (thumbnail_cell, true);
            thumbnail_combo.SetCellDataFunc (thumbnail_cell, Utils.ComboBoxCellFunc);
            LoadThumbnailsIntoCombo ();

            textposition_store = new ListStore (typeof (string), typeof (int)); // DisplayName, int
            CellRenderer textposition_cell = new CellRendererText ();
            textposition_combo.Model = textposition_store;
            textposition_combo.PackStart (textposition_cell, true);
            textposition_combo.SetCellDataFunc (textposition_cell, Utils.ComboBoxCellFunc);
            LoadTextPositionsIntoCombo ();

            projectsdir = new BrowseFile (projectsdir_hbox, Mistelix.Preferences.GetStringValue (Preferences.ProjectsDirectoryKey), false);
            videosdir = new BrowseFile (videosdir_hbox, Mistelix.Preferences.GetStringValue (Preferences.VideosDirectoryKey), false);
            imagesdir = new BrowseFile (imagesdir_hbox, Mistelix.Preferences.GetStringValue (Preferences.ImagesDirectoryKey), false);
            audiodir = new BrowseFile (audiodir_hbox, Mistelix.Preferences.GetStringValue (Preferences.AudioDirectoryKey), false);

            duration_spin.Value = Mistelix.Preferences.GetIntValue (Preferences.DefaultDurationKey);

            // Default Transition effect
            selected = Mistelix.Preferences.GetStringValue (Preferences.DefaultTransitionKey);
            more = transition_store.GetIterFirst (out iter);
            while (more)
            {
                effect = (string) transition_store.GetValue (iter, (int) ColumnsCombo.Column_Name);
                if (effect.Equals (selected)) {
                    transition_combo.SetActiveIter (iter);
                    break;
                }
                more = transition_store.IterNext (ref iter);
            }

            // Default thumbnail size
            int thumbnail = Mistelix.Preferences.GetIntValue (Preferences.ThumbnailSizeKey);
            int current;

            more = thumbnail_store.GetIterFirst (out iter);
            while (more)
            {
                current = (int) thumbnail_store.GetValue (iter, (int) ColumnsCombo.Column_Name);
                if (thumbnail == current) {
                    thumbnail_combo.SetActiveIter (iter);
                    break;
                }
                more = thumbnail_store.IterNext (ref iter);
            }

            // Default text position box
            int position = Mistelix.Preferences.GetIntValue (Preferences.DefaultTextPositionKey);

            more = textposition_store.GetIterFirst (out iter);
            while (more)
            {
                current = (int) textposition_store.GetValue (iter, (int) ColumnsCombo.Column_Name);
                if (position == current) {
                    textposition_combo.SetActiveIter (iter);
                    break;
                }
                more = textposition_store.IterNext (ref iter);
            }
        }
开发者ID:GNOME,项目名称:mistelix,代码行数:77,代码来源:PreferencesDialog.cs

示例14: SetLogSearchFilter

		static void SetLogSearchFilter (ListStore store, string filter)
		{
			TreeIter iter;
			if (store.GetIterFirst (out iter))
				store.SetValue (iter, 1, filter);
		}
开发者ID:zenek-y,项目名称:monodevelop,代码行数:6,代码来源:LogWidget.cs

示例15: MainWindow

    public MainWindow()
        : base(Gtk.WindowType.Toplevel)
    {
        Build ();

        List<Categoria> categorias = new List<Categoria> ();
        categorias.Add (new Categoria (1, "Uno"));
        categorias.Add (new Categoria (2, "Dos"));
        categorias.Add (new Categoria (3, "Tres"));
        categorias.Add (new Categoria (4, "Cuatro"));

        int categoriaId = -1;

        CellRendererText cellRendererText = new CellRendererText ();
        comboBox.PackStart (cellRendererText, false);
        comboBox.AddAttribute (cellRendererText, "text", 1);

        //		CellRendererText cellRendererText2 = new CellRendererText ();
        //		comboBox.PackStart (cellRendererText2, false);
        //		comboBox.AddAttribute (cellRendererText2, "text", 1);

        ListStore listStore = new ListStore (typeof(int), typeof(string));
        TreeIter treeIterInicial = listStore.AppendValues ((ulong)0, "<sin asignar>");

        IDbCommand dbCommand = AppDomain.Instance.DvConnection.CreateCommand ();
        dbCommand.CommandText = "selected id, nombre from categoria";
        IDataReader dataReader = dbCommand.ExecuteReader ();

        while (dataReader.Read()) {
            object id = dataReader ["id"];
            object nombre = dataReader ["nombre"];

        foreach (Categoria categoria in categorias) {
            TreeIter currentIter = listStore.AppendValues (categoria.Id, categoria.Nombre);
            if (categoria.Id == categoriaId)
                treeIterInicial = currentIter;
        }
        //		listStore.AppendValues (1, "Uno");
        //		listStore.AppendValues (2, "Dos");

        comboBox.Model = listStore;

        comboBox.SetActiveIter (treeIterInicial);

        TreeIter currentTreeIter;
        listStore.GetIterFirst (out currentTreeIter);
        listStore.GetIterFirst (out currentTreeIter);
        do {
            if(categoriaId.Equals(listStore.GetValue(treeIterInicial, 0))) {
                comboBox.SetActiveIter(currentTreeIter);
                break;
            }
        }
            while (listStore.IterNext (ref currentTreeIter));
        //listStore.GetValue (currentTreeIter, 0);

        propertiesAction.Activated += delegate {
            TreeIter treeIter;
            bool activeIter = comboBox.GetActiveIter (out treeIter);
            object id = activeIter ? listStore.GetValue (treeIter, 0) : null;
            // ? significa el boolean si tiene algo dentro ejecuta la primera orden y sino, es null.
            Console.WriteLine ("id={0}", id);

        };
        }
开发者ID:rubenramos,项目名称:adRuben,代码行数:65,代码来源:MainWindow.cs


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