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


C# Gtk.IterNext方法代码示例

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


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

示例1: IsPackageInStore

		private bool IsPackageInStore (Gtk.ListStore store, string pname, string pversion, int pname_col, int pversion_col)
		{
			Gtk.TreeIter search_iter;
			bool has_elem = store.GetIterFirst (out search_iter);
				
			if (has_elem) {
				while (true) {
					string name = (string)store.GetValue (search_iter, pname_col);
					string version = (string)store.GetValue (search_iter, pversion_col);
					
					if (name == pname && version == pversion)
						return true;
						
					if (!store.IterNext (ref search_iter))
						break;
				}
			}
			
			return false;
		}
开发者ID:pabloescribanoloza,项目名称:monodevelop,代码行数:20,代码来源:EditPackagesDialog.cs

示例2: TreeviewSelectRowWithID

    //selects a row that has an uniqueID (usually at col 0)
    public static bool TreeviewSelectRowWithID(Gtk.TreeView tv, Gtk.TreeStore store, int colNum, int id, bool scrollToRow)
    {
        if(id <= 0)
            return false;

        int rowNum = getRowNumOfThisID(store, colNum, id);
        if(rowNum == -1)
            return false;

        //set the selected
        int count = 0;
        TreeIter iter;
        bool iterOk = store.GetIterFirst(out iter);
        while(iterOk) {
            if(count == rowNum) {
                //1 select row
                tv.Selection.SelectIter(iter);

                //2 scroll to that row
                if(scrollToRow) {
                    TreePath path = store.GetPath (iter);
                    LogB.Debug(path.ToString());
                    tv.ScrollToCell (path, tv.Columns[0], true, 0, 0);
                }

                return true;
            }

            count ++;
            store.IterNext(ref iter);
        }
        return false;
    }
开发者ID:GNOME,项目名称:chronojump,代码行数:34,代码来源:utilGtk.cs

示例3: getRowNumOfThisID

    //finds the row number (starting at 0) of a cell (usually an uniqueID in col 0)
    private static int getRowNumOfThisID(Gtk.TreeStore store, int colNum, int searchedID)
    {
        TreeIter iter;
        int count = 0;
        bool iterOk = store.GetIterFirst(out iter);
        while(iterOk) {
            int thisID = Convert.ToInt32((string) store.GetValue (iter, colNum));
            if(thisID == searchedID)
                return count;

            count ++;
            iterOk = store.IterNext(ref iter);
        }
        return -1;
    }
开发者ID:GNOME,项目名称:chronojump,代码行数:16,代码来源:utilGtk.cs

示例4: getTreeViewNeuromuscular

 ArrayList getTreeViewNeuromuscular(Gtk.ListStore ls)
 {
     TreeIter iter = new TreeIter();
     ls.GetIterFirst ( out iter ) ;
     ArrayList array = new ArrayList();
     do {
         EncoderNeuromuscularData nm = (EncoderNeuromuscularData) ls.GetValue (iter, 0);
         array.Add(nm);
     } while (ls.IterNext (ref iter));
     return array;
 }
开发者ID:GNOME,项目名称:chronojump,代码行数:11,代码来源:encoderTreeviews.cs

示例5: getTreeViewCurves

 // ---------helpful methods -----------
 ArrayList getTreeViewCurves(Gtk.ListStore ls)
 {
     TreeIter iter = new TreeIter();
     ls.GetIterFirst ( out iter ) ;
     ArrayList array = new ArrayList();
     do {
         EncoderCurve ec = (EncoderCurve) ls.GetValue (iter, 0);
         array.Add(ec);
     } while (ls.IterNext (ref iter));
     return array;
 }
开发者ID:GNOME,项目名称:chronojump,代码行数:12,代码来源:encoderTreeviews.cs

示例6: getEntryListForModel

        private List<String> getEntryListForModel(Gtk.ListStore model)
        {
            List<String> outList = new List<string>();

            Gtk.TreeIter iter;
            model.GetIterFirst(out iter);

            if(iter.Equals(null))
                return null;

            do
            {
                outList.Add(model.GetValue (iter, 0).ToString());

            }while(model.IterNext(ref iter));

            return outList;
        }
开发者ID:jira-sarec,项目名称:ICSE-2012-TraceLab,代码行数:18,代码来源:SettingsDialog.cs

示例7: TreeMapItem

            public TreeMapItem(Gtk.TreeModel m,
			                    ref Gtk.TreeIter iter,
			                    bool horiz,
			                    int textColumn,
			                    int weightColumn)
            {
                if (m == null)
                    throw new ArgumentNullException ("m");

                if (iter.Equals (Gtk.TreeIter.Zero))
                    throw new ArgumentException ("iter");

                if (textColumn < 0)
                    throw new ArgumentException ("textColumn");

                if (weightColumn < 0)
                    throw new ArgumentException ("weightColumn");

                Path = m.GetPath (iter);
                Title = (string)m.GetValue (iter, textColumn);
                Weight = (double)m.GetValue (iter, weightColumn);
                X = 0;
                Y = 0;
                Width = 0;
                Height = 0;
                Children = null;
                Horiz = horiz;

                Gtk.TreeIter citer;
                double c_total = 0.0;

                if (m.IterChildren (out citer, iter)) {
                    do {
                        AddChild (new TreeMapItem (m, ref citer, !horiz, textColumn, weightColumn));
                    } while (m.IterNext (ref citer));

                    // Get total weight
                    Children.ForEach (delegate (TreeMapItem i) {
                        c_total += Math.Abs (i.Weight);
                    });

                    this.ChildrenWeight = c_total;
                }
            }
开发者ID:chergert,项目名称:custom-gtk-widgets,代码行数:44,代码来源:TreeMap.cs

示例8: RebuildAddTaskMenu

        private void RebuildAddTaskMenu(Gtk.TreeModel categoriesModel)
        {
            Gtk.Menu menu = new Menu ();

            Gtk.TreeIter iter;
            if (categoriesModel.GetIterFirst (out iter)) {
                do {
                    ICategory category =
                        categoriesModel.GetValue (iter, 0) as ICategory;

                    if (category is AllCategory)
                        continue; // Skip this one

                    CategoryMenuItem item = new CategoryMenuItem (category);
                    item.Activated += OnNewTaskByCategory;
                    item.ShowAll ();
                    menu.Add (item);
                } while (categoriesModel.IterNext (ref iter));
            }

            addTaskButton.Menu = menu;
        }
开发者ID:YasuhikoFukuda,项目名称:Tasque,代码行数:22,代码来源:TaskWindow.cs


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