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


C# Gtk.GetIterFirst方法代码示例

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


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

示例1: GraphFunc

		static void GraphFunc (Gtk.TreeViewColumn tree_column, Gtk.CellRenderer cell, Gtk.TreeModel model, Gtk.TreeIter iter)
		{
			var renderer = (RevisionGraphCellRenderer)cell;
			Gtk.TreeIter node;
			model.GetIterFirst (out node);
			
			renderer.FirstNode = node.Equals (iter);
			model.IterNthChild (out node, model.IterNChildren () - 1);
			renderer.LastNode =  node.Equals (iter);
		}
开发者ID:Tak,项目名称:monodevelop-novell,代码行数:10,代码来源:LogWidget.cs

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

示例3: GetCurrentFilter

		static string GetCurrentFilter (Gtk.TreeModel model)
		{
			TreeIter filterIter;
			string filter = string.Empty;
			if (model.GetIterFirst (out filterIter))
				filter = (string)model.GetValue (filterIter, 1);

			return filter;
		}
开发者ID:zenek-y,项目名称:monodevelop,代码行数:9,代码来源:LogWidget.cs

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

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

示例6: TreeviewScrollToLastRow

    public static void TreeviewScrollToLastRow(Gtk.TreeView tv, Gtk.ListStore store, int nrows)
    {
        TreeIter iter = new TreeIter();
        bool iterOk = store.GetIterFirst(out iter);
        if(! iterOk)
            return;

        for(int i=0; i < (nrows -1); i++)
            iterOk = tv.Model.IterNext (ref iter);

        if(! iterOk)
            return;

        TreePath path = store.GetPath (iter);
        LogB.Debug(path.ToString());
        tv.ScrollToCell (path, tv.Columns[0], true, 0, 0);
    }
开发者ID:GNOME,项目名称:chronojump,代码行数:17,代码来源:utilGtk.cs

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

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

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

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