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


C# TreeIter.Equals方法代码示例

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


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

示例1: AppendCategory

		void AppendCategory (TreeIter it, CounterCategory cat)
		{
			TreeIter catIt;
			if (it.Equals (TreeIter.Zero))
				catIt = store.AppendValues (false, cat.Name, cat, null, false);
			else
				catIt = store.AppendValues (it, false, cat.Name, cat, null, false);
			
			foreach (Counter c in cat.Counters)
				store.AppendValues (catIt, false, c.Name, null, c, true);
		}
开发者ID:FreeBSD-DotNet,项目名称:monodevelop,代码行数:11,代码来源:CounterSelectorDialog.cs

示例2: PopulatePeopleCategories

 void PopulatePeopleCategories(TreeStore treeStore ,Tag parent,TreeIter parentIter,int level)
 {
     foreach (Tag tag in (parent as Category).Children) {
         if (tag is Category) {
             //Log.Debug("Append  : "+tag.Name + " to "+parent.Name);
             TreeIter iter =
                 (parentIter.Equals(TreeIter.Zero) ?
                 treeStore.AppendValues(tag.Name,/*parent,*/tag):
                     treeStore.AppendValues(parentIter,tag.Name,/*parent,*/tag)) ;
             PopulatePeopleCategories (treeStore,tag,iter,level+1);
         }
     }
 }
开发者ID:kanitw,项目名称:facespot,代码行数:13,代码来源:PeopleTreeStore.cs

示例3: AddPropertyFilePathBox

 TreeIter AddPropertyFilePathBox(TreeIter iter, string id, string name, string text)
 {
     return !iter.Equals(nulliter) ? 
         listStore.AppendValues(iter, "", false, name, true, "", false, false, null, "", false, false, id, "", false, "", "", false, text, true): 
         listStore.AppendValues("", false, name, true, "", false, false, null, "", false, false, id, "", false, "", "", false, text, true);
 }
开发者ID:KennethYap,项目名称:MonoGame,代码行数:6,代码来源:PropertyGridTable.cs

示例4: AddPropertyColorBox

 TreeIter AddPropertyColorBox(TreeIter iter, string id, string name, string color)
 {
     return !iter.Equals(nulliter) ? 
         listStore.AppendValues(iter, "", false, name, true, "", false, false, null, "", false, false, id, "", false, "", color, true, "", false): 
         listStore.AppendValues("", false, name, true, "", false, false, null, "", false, false, id, "", false, "", color, true, "", false);
 }
开发者ID:KennethYap,项目名称:MonoGame,代码行数:6,代码来源:PropertyGridTable.cs

示例5: AddPropertyTextBox

 TreeIter AddPropertyTextBox(TreeIter iter, string id, string name, string text, bool editable)
 {
     return !iter.Equals(nulliter) ? 
         listStore.AppendValues(iter, "", false, name, true, text, true, editable, null, "", false, false, id, "", false, "", "", false, "", false): 
         listStore.AppendValues("", false, name, true, text, true, editable, null, "", false, false, id, "", false, "", "", false, "", false);
 }
开发者ID:KennethYap,项目名称:MonoGame,代码行数:6,代码来源:PropertyGridTable.cs

示例6: BuildTreeChildren

		static void BuildTreeChildren (TreeStore store, TreeIter parent, XContainer p)
		{
			foreach (XNode n in p.Nodes) {
				TreeIter childIter;
				if (!parent.Equals (TreeIter.Zero))
					childIter = store.AppendValues (parent, n);
				else
					childIter = store.AppendValues (n);
				
				var c = n as XContainer;
				if (c != null && c.FirstChild != null)
					BuildTreeChildren (store, childIter, c);
			}
		}
开发者ID:gAdrev,项目名称:monodevelop,代码行数:14,代码来源:BaseXmlEditorExtension.cs

示例7: UpdateTextColumn

		void UpdateTextColumn (TreeIter iter, string value)
		{
			if (!iter.Equals (TreeIter.Zero)) {
				folderTreeStore.SetValue (iter, TextColumn, GLib.Markup.EscapeText (value));
			}
		}
开发者ID:Protobuild,项目名称:Protobuild.IDE.MonoDevelop,代码行数:6,代码来源:GtkProtobuildModuleFolderPreviewWidget.cs

示例8: InsertRow

 public TreeIter InsertRow(TreeIter parent, ArrayList row)
 {
     TreeIter iter;
     if (!parent.Equals(TreeIter.Zero))
         iter = store.AppendNode(parent);
     else
         iter = store.AppendNode();
     for (int i = 0; i < row.Count; i++)
     {
         store.SetValue (iter, i, row[i]);
         Console.WriteLine("Inserting oclumn=" + row[i].GetType().ToString());
     }
     return iter;
 }
开发者ID:BackupTheBerlios,项目名称:boxerp-svn,代码行数:14,代码来源:SimpleTreeView.cs

示例9: FillInnerExceptionsStore

		void FillInnerExceptionsStore (TreeStore store, ExceptionInfo exception, TreeIter parentIter = default (TreeIter))
		{
			TreeIter iter;
			if (parentIter.Equals (TreeIter.Zero)) {
				iter = store.AppendValues (exception);
				ReverseInnerExceptions [exception] = null;
			} else {
				ReverseInnerExceptions [exception] = (ExceptionInfo)store.GetValue (parentIter, 0);
				iter = store.AppendValues (parentIter, exception);
			}
			var updateInnerExceptions = new System.Action (() => {
				if (!InnerExceptionsStore.IterHasChild (iter)) {
					var innerExceptions = exception.InnerExceptions;
					if (innerExceptions != null && innerExceptions.Count > 0) {
						foreach (var inner in innerExceptions) {
							FillInnerExceptionsStore (store, inner, iter);
						}
					} else {
						var inner = exception.InnerException;
						if (inner != null)
							FillInnerExceptionsStore (store, inner, iter);
					}
				}
			});
			exception.Changed += delegate {
				Application.Invoke (delegate {
					InnerExceptionsStore.EmitRowChanged (InnerExceptionsStore.GetPath (iter), iter);
					updateInnerExceptions ();
					InnerExceptionsTreeView.ExpandRow (InnerExceptionsStore.GetPath (iter), true);
				});
			};
			updateInnerExceptions ();
		}
开发者ID:kdubau,项目名称:monodevelop,代码行数:33,代码来源:ExceptionCaughtDialog.cs

示例10: NewProjectWizzard_New

        public NewProjectWizzard_New(Window parent)
        {
            if (parent != null)
                this.TransientFor =parent;
            else
                this.TransientFor = MainClass.MainWindow;

            this.Build();

            atrApplication = new FileTemplate.Attribute();
            atrApplication.Name = "application";
            atrApplication.Type = "text";

            this.DefaultHeight = 390 ;
            this.Title = MainClass.Languages.Translate("moscrif_ide_title_f1");
            ntbWizzard.ShowTabs = false;

            Pango.FontDescription customFont = lblNewProject.Style.FontDescription.Copy();//  Pango.FontDescription.FromString(MainClass.Settings.ConsoleTaskFont);
            customFont.Size = customFont.Size+(int)(customFont.Size/2);
            customFont.Weight = Pango.Weight.Bold;
            lblNewProject.ModifyFont(customFont);

            storeTyp = new ListStore (typeof (string), typeof (string), typeof (Gdk.Pixbuf), typeof (string),typeof(ProjectTemplate),typeof (bool));
            storeOrientation = new ListStore (typeof (string), typeof (string), typeof (Gdk.Pixbuf), typeof (string));

            storeOutput = new ListStore (typeof (string), typeof (string), typeof (Gdk.Pixbuf));

            nvOutput.Model = storeOutput;
            nvOutput.AppendColumn ("", new Gtk.CellRendererText (), "text", 0);
            nvOutput.AppendColumn ("", new Gtk.CellRendererText (), "text", 1);
            nvOutput.AppendColumn ("", new Gtk.CellRendererPixbuf (), "pixbuf", 2);
            nvOutput.Columns[1].Expand = true;

            ivSelectTyp.Model = storeTyp;
            ivSelectTyp.SelectionMode = SelectionMode.Single;
            ivSelectTyp.Orientation = Orientation.Horizontal;

            CellRendererText rendererSelectTyp = new CellRendererText();
            rendererSelectTyp.Ypad =0;
            ivSelectTyp.PackEnd(rendererSelectTyp,false);
            ivSelectTyp.SetCellDataFunc(rendererSelectTyp, new Gtk.CellLayoutDataFunc(RenderTypProject));
            ivSelectTyp.PixbufColumn = COL_PIXBUF;
            ivSelectTyp.TooltipColumn = COL_DISPLAY_TEXT;
            ivSelectTyp.AddAttribute(rendererSelectTyp, "sensitive", 5);

            Gdk.Pixbuf icon0 = MainClass.Tools.GetIconFromStock("project.png",IconSize.LargeToolbar);
            storeTyp.AppendValues ("New Empty Project", "Create empty application", icon0, "", null,true);

            DirectoryInfo[] diTemplates = GetDirectory(MainClass.Paths.FileTemplateDir);
            foreach (DirectoryInfo di in diTemplates) {

                string name = di.Name;

                string iconFile = System.IO.Path.Combine(di.FullName,"icon.png");
                string descFile = System.IO.Path.Combine(di.FullName,"description.xml");
                if(!File.Exists(iconFile) || !File.Exists(descFile))
                    continue;

                string descr = name;
                ProjectTemplate pt = null;

                if(File.Exists(descFile)){
                    pt = ProjectTemplate.OpenProjectTemplate(descFile);
                    if((pt!= null))
                        descr = pt.Description;
                }
                Gdk.Pixbuf icon = new Gdk.Pixbuf(iconFile);
                DirectoryInfo[] templates = di.GetDirectories();
                bool sensitive = true;

                if(templates.Length<1)
                    sensitive = false;
                else
                    sensitive = true;

                storeTyp.AppendValues (name, descr, icon, di.FullName,pt,sensitive);
            }

            ivSelectTyp.SelectionChanged+= delegate(object sender, EventArgs e)
            {
                Gtk.TreePath[] selRow = ivSelectTyp.SelectedItems;
                if(selRow.Length<1){
                    lblHint.Text = " ";
                    btnNext.Sensitive = false;
                    return;
                }

                Gtk.TreePath tp = selRow[0];
                TreeIter ti = new TreeIter();
                storeTyp.GetIter(out ti,tp);

                if(tp.Equals(TreeIter.Zero))return;

                //string typ = storeTyp.GetValue (ti, 3).ToString();
                string text1 = (string) storeTyp.GetValue (ti, 0);
                string text2 = (string) storeTyp.GetValue (ti, 1);
                bool sensitive = Convert.ToBoolean(storeTyp.GetValue (ti, 5));
                if(!sensitive){
                    ivSelectTyp.SelectPath(selectedTypPrj);
                    return;
//.........这里部分代码省略.........
开发者ID:moscrif,项目名称:ide,代码行数:101,代码来源:NewProjectWizzard_New.cs

示例11: BuildTreeChildren

		void BuildTreeChildren (TreeStore store, TreeIter parent, ParsedDocument parsedDocument)
		{
			if (parsedDocument == null)
				return;
			
			foreach (var unresolvedCls in parsedDocument.TopLevelTypeDefinitions) {
				var cls = document.Compilation.MainAssembly.GetTypeDefinition (unresolvedCls.FullTypeName);
				if (cls == null)
					continue;
				TreeIter childIter;
				if (!parent.Equals (TreeIter.Zero))
					childIter = store.AppendValues (parent, cls);
				else
					childIter = store.AppendValues (cls);

				AddTreeClassContents (store, childIter, parsedDocument, cls, unresolvedCls);
			}
		}
开发者ID:telebovich,项目名称:monodevelop,代码行数:18,代码来源:ClassOutlineTextEditorExtension.cs

示例12: UpdateName

		static void UpdateName (ListStore itemStore, TreeIter iter)
		{
			if (iter.Equals (TreeIter.Zero))
				return;

			object item = itemStore.GetValue (iter, 0);
			string name = item.ToString ();
			if (string.IsNullOrEmpty (name))
				name = Mono.Unix.Catalog.GetString ("(Empty)");;

			itemStore.SetValue(iter, 2, name);
		}
开发者ID:jira-sarec,项目名称:ICSE-2012-TraceLab,代码行数:12,代码来源:CollectionEditor.cs

示例13: AddEntry

        void AddEntry(TreeIter iter, IBuildTarget item)
        {
            if (!IsVisible (item))
                return;

            string icon;
            if (item is Solution)
                icon = MonoDevelop.Ide.Gui.Stock.Solution;
            else if (item is SolutionFolder)
                icon = MonoDevelop.Ide.Gui.Stock.SolutionFolderClosed;
            else if (item is WorkspaceItem)
                icon = MonoDevelop.Ide.Gui.Stock.Workspace;
            else if (item is Project)
                icon = ((Project)item).StockIcon;
            else
                icon = MonoDevelop.Ide.Gui.Stock.Project;

            bool checkVisible = IsCheckboxVisible (item);
            bool selected = activeItems.Contains (item);

            if (!iter.Equals (TreeIter.Zero))
                iter = store.AppendValues (iter, icon, item.Name, item, selected && checkVisible, checkVisible);
            else
                iter = store.AppendValues (icon, item.Name, item, selected && checkVisible, checkVisible);

            if (selected)
                tree.ExpandToPath (store.GetPath (iter));

            foreach (IBuildTarget ce in GetChildren (item))
                AddEntry (iter, ce);
        }
开发者ID:Kalnor,项目名称:monodevelop,代码行数:31,代码来源:ProjectSelectorWidget.cs

示例14: AppendProperty

 void AppendProperty(TreeIter piter, PropertyDescriptor prop, InstanceData idata)
 {
     TreeIter iter;
     if (piter.Equals (TreeIter.Zero))
         iter = store.AppendValues (prop.Label, prop, false, idata);
     else
         iter = store.AppendValues (piter, prop.Label, prop, false, idata);
     if (prop.HasDependencies)
         sensitives[prop] = prop;
     if (prop.HasVisibility)
         invisibles[prop] = prop;
     propertyRows [prop] = store.GetStringFromIter (iter);
 }
开发者ID:mono,项目名称:stetic,代码行数:13,代码来源:PropertyTree.cs

示例15: TraverseSubtree

		void TraverseSubtree (TreeIter iter, Action<TreeIter> action)
		{
			TreeIter newIter;
			if (!iter.Equals (TreeIter.Zero)) {
				if (!store.IterChildren (out newIter, iter))
					return;
			} else {
				if (!store.GetIterFirst (out newIter))
					return;
			}
			do {
				action (newIter);
				if (store.IterHasChild (newIter))
					TraverseSubtree (newIter, action);
			} while (store.IterNext (ref newIter));
		}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:16,代码来源:IncludeNewFilesDialog.cs


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