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


C# TreeStore.GetIterFirst方法代码示例

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


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

示例1: ObjectWindow

 public ObjectWindow(RuntimeThread runtimeThread, object root)
     : base(GetTitle(root))
 {
     SetDefaultSize(250, 300);
     SkipPagerHint = true;
     SkipTaskbarHint = true;
     
     scroller = new ScrolledWindow();
     scroller.BorderWidth = 5;
     scroller.ShadowType = ShadowType.In;
     Add(scroller);
     
     store = new TreeStore(typeof(string), typeof(object), typeof(bool));
     
     //TreeModelSort storeSort = new TreeModelSort(store);
     //storeSort.SetSortColumnId(0, SortType.Ascending);
     
     view = new TreeView(store);
     view.AppendColumn(null, new CellRendererText(), "text", VALUE_TEXT);
     view.HeadersVisible = false;
     view.RowExpanded += OnTreeRowExpanded;
     view.RowCollapsed += OnTreeRowCollapsed;
     scroller.Add(view);
     
     Add(false, new TreeIter(), "", root, false, false);
     
     TreeIter first;
     store.GetIterFirst(out first);
     view.ExpandRow(store.GetPath(first), false);
 }
开发者ID:KevinKelley,项目名称:katahdin,代码行数:30,代码来源:ObjectWindow.cs

示例2: ContentDirectoryInfo

        public ContentDirectoryInfo (RemoteContentDirectory contentDirectory)
        {
            if (contentDirectory == null) {
                throw new ArgumentNullException ("contentDirectory");
            }

            this.content_directry = contentDirectory;
            this.store = new TreeStore (typeof (ObjectRow));
            var objects = new TreeView ();
            var column = new TreeViewColumn ();
            var cell = new CellRendererText ();
            column.PackStart (cell, true);
            column.SetCellDataFunc (cell, RenderObject);
            column.Title = "Objects";
            objects.AppendColumn (column);
            objects.Selection.Changed += HandleObjectsSelectionChanged;
            objects.RowExpanded += HandleObjectsRowExpanded;
            objects.Model = store;

            var root = contentDirectory.GetRootObject ();
            store.AppendValues (new ObjectRow (root));
            TreeIter iter;
            store.GetIterFirst (out iter);
            store.AppendValues (iter, loading);

            Add (objects);
        }
开发者ID:pacificIT,项目名称:mono-upnp,代码行数:27,代码来源:ContentDirectoryInfo.cs

示例3: putRowNumbers

 private void putRowNumbers(TreeStore myStore)
 {
     TreeIter myIter;
     bool iterOk = myStore.GetIterFirst (out myIter);
     if(iterOk) {
         int count = 1;
         do {
             store.SetValue(myIter, 0, (count++).ToString());
         } while (myStore.IterNext (ref myIter));
     }
 }
开发者ID:GNOME,项目名称:chronojump,代码行数:11,代码来源:run.cs

示例4: GenerateTree

        private void GenerateTree()
        {
            store = new TreeStore(typeof(SettingPanel), typeof(string), typeof(string), typeof(bool),  typeof(bool), typeof(int));

            tvCategory.Model = store;
            tvCategory.HeadersVisible = false;

            TreeViewColumn col = new TreeViewColumn();
            CellRendererPixbuf crp = new CellRendererPixbuf();
            crp.StockSize = (uint)IconSize.LargeToolbar;
            col.PackStart(crp, false);
            col.AddAttribute(crp, "stock-id", 1);
            col.AddAttribute(crp, "visible", 3);
            col.AddAttribute(crp, "sensitive", 4);
            CellRendererText crt = new CellRendererText();
            col.PackStart(crt, true);
            col.AddAttribute(crt, "markup", 2);
            col.AddAttribute(crt, "sensitive", 4);

            tvCategory.AppendColumn(col);

            tvCategory.Selection.Changed += OnSelectionChanged;
            FillTree();

            TreeIter it;
            if (store.GetIterFirst(out it))
                tvCategory.Selection.SelectIter(it);
        }
开发者ID:moscrif,项目名称:ide,代码行数:28,代码来源:PreferencesDialog.cs

示例5: TreeviewAddRow

    //startOrEnd is true at start, false at end
    public static void TreeviewAddRow(Gtk.TreeView tv, TreeStore store, string [] row, bool startOrEnd)
    {
        TreeIter iter = new TreeIter();
        store.GetIterFirst(out iter);

        if(startOrEnd)
            iter = store.InsertWithValues(0,row);
        else
            iter = store.AppendValues(row);

        //scroll treeview if needed
        TreePath path = store.GetPath (iter);
        tv.ScrollToCell (path, null, true, 0, 0);
    }
开发者ID:GNOME,项目名称:chronojump,代码行数:15,代码来源:utilGtk.cs

示例6: prepareSelected

    void prepareSelected(TreeView myTreeview, TreeStore myStore)
    {
        TreeIter myIter = new TreeIter ();
        bool iterOk = true;

        arrayOfSelectedSessions = new ArrayList (2);

        for (int count=0 ; iterOk; count ++) {
            if (count == 0) {
                iterOk = myStore.GetIterFirst (out myIter);
            }
            else {
                iterOk = myStore.IterNext (ref myIter);
            }

            if (iterOk) {
                arrayOfSelectedSessions.Add (
                    (string) myTreeview.Model.GetValue (myIter, 0) + ":" +	//id
                    (string) myTreeview.Model.GetValue (myIter, 1) + ":" +	//name
                    (string) myTreeview.Model.GetValue (myIter, 3) 		//date (forget place)
                    );
                LogB.Information(arrayOfSelectedSessions[count].ToString());
            }
        }
    }
开发者ID:GNOME,项目名称:chronojump,代码行数:25,代码来源:session.cs

示例7: findRowForIter

    void findRowForIter(TreeView myTreeview, TreeStore myStore, out TreeIter myIter, int searchedPosition)
    {
        int position;
        bool firstLap = true;

        myStore.GetIterFirst (out myIter);
        position = Convert.ToInt32( (string) myTreeview.Model.GetValue (myIter, 0) );

        do {
            if ( ! firstLap) {
                myStore.IterNext (ref myIter);
            }
            position = Convert.ToInt32( (string) myTreeview.Model.GetValue (myIter, 0) );
            firstLap = false;
        } while (position < searchedPosition );
    }
开发者ID:GNOME,项目名称:chronojump,代码行数:16,代码来源:session.cs


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