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


C# FSpot.Tag类代码示例

本文整理汇总了C#中FSpot.Tag的典型用法代码示例。如果您正苦于以下问题:C# Tag类的具体用法?C# Tag怎么用?C# Tag使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: RemoveTag

		public void RemoveTag (Tag t)
		{
			if (tags_removed == null)
				tags_removed = new List<Tag> ();
			if (tags_added != null)
				tags_added.Remove (t);
			tags_removed.Add (t);
		}
开发者ID:guadalinex-archive,项目名称:guadalinex-v6,代码行数:8,代码来源:PhotoChanges.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: Create

		public static void Create (Tag [] tags, Gtk.Menu menu)
		{
			Gtk.MenuItem item = new Gtk.MenuItem (String.Format (Catalog.GetPluralString ("Find _With", "Find _With", tags.Length), tags.Length));

			Gtk.Menu submenu = GetSubmenu (tags);
			if (submenu == null)
				item.Sensitive = false;
			else
				item.Submenu = submenu;

			menu.Append (item);
			item.Show ();
		}
开发者ID:guadalinex-archive,项目名称:guadalinex-v6,代码行数:13,代码来源:TagQueryWidget.cs

示例4: GetTagsData

        public static Tag[] GetTagsData(this SelectionData selection_data)
        {
            int size = sizeof (uint);
            int length = selection_data.Length / size;

            TagStore tag_store = MainWindow.Toplevel.Database.Tags;

            Tag [] tags = new Tag [length];

            for (int i = 0; i < length; i ++) {
                uint id = System.BitConverter.ToUInt32 (selection_data.Data, i * size);
                tags[i] = tag_store.Get (id);
            }

            return tags;
        }
开发者ID:iainlane,项目名称:f-spot,代码行数:16,代码来源:SelectionDataExtensions.cs

示例5: Face

        public Face(uint id,uint leftX,uint topY,uint width,Photo photo,
		             Tag tag,bool tagConfirmed, bool autoDetected, bool autoRecognized, Pixbuf icon,long unix_time)
            : base(id)
        {
            this.leftX = leftX;
            this.topY = topY;
            this.width = width;
            this.photo = photo;
            this.tag = tag;
            this.tagConfirmed = tagConfirmed;
            this.autoDetected = autoDetected;
            this.autoRecognized = autoRecognized;
            this.iconPixbuf = icon;
            this.unix_time = unix_time;
            //FIXME Possible Error HERE
            photo_md5 = photo.MD5Sum;
        }
开发者ID:kanitw,项目名称:facespot,代码行数:17,代码来源:Face.cs

示例6: GetSubmenu

        public static Gtk.Menu GetSubmenu(Tag [] tags)
        {
            Tag single_tag = null;
            if (tags != null && tags.Length == 1)
                single_tag = tags[0];

            //Console.WriteLine ("creating find with menu item");
            if (LogicWidget.Root == null || LogicWidget.Root.SubTerms.Count == 0) {
                //Console.WriteLine ("root is null or has no terms");
                return null;
            } else {
                //Console.WriteLine ("root is not null and has terms");
                Gtk.Menu m = new Gtk.Menu ();

                Gtk.MenuItem all_item = GtkUtil.MakeMenuItem (m, Catalog.GetString ("All"), new EventHandler (MainWindow.Toplevel.HandleRequireTag));
                GtkUtil.MakeMenuSeparator (m);

                int sensitive_items = 0;
                foreach (Term term in LogicWidget.Root.SubTerms) {
                    ArrayList term_parts = new ArrayList ();

                    bool contains_tag = AppendTerm (term_parts, term, single_tag);

                    string name = "_" + String.Join (", ", (string []) term_parts.ToArray (typeof(string)));

                    Gtk.MenuItem item = GtkUtil.MakeMenuItem (m, name, new EventHandler (MainWindow.Toplevel.HandleAddTagToTerm));
                    item.Sensitive = !contains_tag;

                    if (!contains_tag)
                        sensitive_items++;
                }

                if (sensitive_items == 0)
                    all_item.Sensitive = false;

                return m;
            }
        }
开发者ID:iainlane,项目名称:f-spot,代码行数:38,代码来源:TagQueryWidget.cs

示例7: HandleAttachTag

 private void HandleAttachTag(Tag tag, Term parent, Literal after)
 {
     InsertTerm (new Tag [] {tag}, parent, after);
 }
开发者ID:iainlane,项目名称:f-spot,代码行数:4,代码来源:TagQueryWidget.cs

示例8: UnInclude

        public void UnInclude(Tag [] tags)
        {
            ArrayList new_tags = new ArrayList(tags.Length);
            foreach (Tag tag in tags) {
                if (rootTerm.TagIncluded (tag))
                    new_tags.Add (tag);
            }

            if (new_tags.Count == 0)
                return;

            tags = (Tag []) new_tags.ToArray (typeof (Tag));

            bool needsUpdate = false;
            preventUpdate = true;
            foreach (Term parent in rootTerm.LiteralParents ()) {
                if (parent.Count == 1) {
                    foreach (Tag tag in tags) {
                        if ((parent.Last as Literal).Tag == tag) {
                            (parent.Last as Literal).RemoveSelf ();
                            needsUpdate = true;
                            break;
                        }
                    }
                }
            }
            preventUpdate = false;

            if (needsUpdate)
                UpdateQuery ();
        }
开发者ID:iainlane,项目名称:f-spot,代码行数:31,代码来源:TagQueryWidget.cs

示例9: TagIncluded

 public bool TagIncluded(Tag tag)
 {
     return rootTerm.TagIncluded (tag);
 }
开发者ID:iainlane,项目名称:f-spot,代码行数:4,代码来源:TagQueryWidget.cs

示例10: PhotoTagsChanged

        /** Helper Functions **/
        public void PhotoTagsChanged(Tag [] tags)
        {
            bool refresh_required = false;

            foreach (Tag tag in tags) {
                if ((rootTerm.FindByTag (tag)).Count > 0) {
                    refresh_required = true;
                    break;
                }
            }

            if (refresh_required)
                UpdateQuery ();
        }
开发者ID:iainlane,项目名称:f-spot,代码行数:15,代码来源:TagQueryWidget.cs

示例11: Include

        // Add a tag or group of tags to the rootTerm, at the end of the Box
        public void Include(Tag [] tags)
        {
            // Filter out any tags that are already included
            ArrayList new_tags = new ArrayList(tags.Length);
            foreach (Tag tag in tags) {
                if (! rootTerm.TagIncluded (tag))
                    new_tags.Add (tag);

            }

            if (new_tags.Count == 0)
                return;

            tags = (Tag []) new_tags.ToArray (typeof (Tag));

            InsertTerm (tags, rootTerm, null);
        }
开发者ID:iainlane,项目名称:f-spot,代码行数:18,代码来源:TagQueryWidget.cs

示例12: UnRequire

 public void UnRequire(Tag [] tags)
 {
     logic_widget.UnRequire (tags);
 }
开发者ID:iainlane,项目名称:f-spot,代码行数:4,代码来源:QueryWidget.cs

示例13: UnInclude

 public void UnInclude(Tag [] tags)
 {
     logic_widget.UnInclude (tags);
 }
开发者ID:iainlane,项目名称:f-spot,代码行数:4,代码来源:QueryWidget.cs

示例14: TagRequired

 public bool TagRequired(Tag tag)
 {
     return logic_widget.TagRequired (tag);
 }
开发者ID:iainlane,项目名称:f-spot,代码行数:4,代码来源:QueryWidget.cs

示例15: TagIncluded

 public bool TagIncluded(Tag tag)
 {
     return logic_widget.TagIncluded (tag);
 }
开发者ID:iainlane,项目名称:f-spot,代码行数:4,代码来源:QueryWidget.cs


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