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


C# TagInfo类代码示例

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


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

示例1: Update

        /// <summary>
        /// 更新数据
        /// </summary>
        /// <param name="mod">TagInfo</param>
        /// <returns>受影响行数</returns>
        public int Update(TagInfo mod)
        {
           using (DbConnection conn = db.CreateConnection())
			{
				conn.Open();
				using (DbTransaction tran = conn.BeginTransaction())
				{ 
					try
					{ 
						using (DbCommand cmd = db.GetStoredProcCommand("SP_Tag_Update"))
						{
							db.AddInParameter(cmd, "@TagID", DbType.Int32, mod.TagID); 
							db.AddInParameter(cmd, "@TagName", DbType.String, mod.TagName); 
							db.AddInParameter(cmd, "@State", DbType.Int32, mod.State); 
							db.AddInParameter(cmd, "@IsDeleted", DbType.Int32, mod.IsDeleted); 
							db.AddInParameter(cmd, "@Sort", DbType.Int32, mod.Sort); 
							tran.Commit();
							return db.ExecuteNonQuery(cmd);
						} 
					}
					catch (Exception e)
					{
						tran.Rollback();
						throw e;
					}
					finally
					{
						conn.Close();
					}
				}
			}
        }  
开发者ID:aNd1coder,项目名称:Wojoz,代码行数:37,代码来源:TagDAL.cs

示例2: AddRange

 /// <summary>
 /// Copies the elements of the specified <see cref="TagInfo">TagInfo</see> array to the end of the collection.
 /// </summary>
 /// <param name="value">An array of type <see cref="TagInfo">TagInfo</see> containing the Components to add to the collection.</param>
 public void AddRange(TagInfo[] value)
 {
     for (int i = 0;	(i < value.Length); i = (i + 1))
     {
         this.Add(value[i]);
     }
 }
开发者ID:sword88,项目名称:ASEWH,代码行数:11,代码来源:TagInfoCollection.cs

示例3: MetadataImporter

		TagInfo li_root_tag; // This is the Last Import root tag

		public MetadataImporter ()
		{
			tag_store = App.Instance.Database.Tags;
			tags_created = new Stack<Tag> ();

			li_root_tag = new TagInfo (Catalog.GetString ("Imported Tags"), LastImportIcon);
		}
开发者ID:cizma,项目名称:f-spot,代码行数:9,代码来源:MetadataImporter.cs

示例4: UpdateTagsCollection

        public void UpdateTagsCollection(string tagDisplayName, string tagValue, Dispatcher dispatcher)
        {
            bool tagFound = false;

            dispatcher.Invoke(DispatcherPriority.Normal, new Action(delegate()
            {
                foreach (TagInfo summarySignal in _summaryStatusTags)
                {
                    if (summarySignal.TagName.Equals(tagDisplayName))
                    {
                        int index = _summaryStatusTags.IndexOf(summarySignal);

                        _summaryStatusTags.RemoveAt(index);

                        summarySignal.TagName = tagDisplayName;
                        summarySignal.TagValue = tagValue;
                        _summaryStatusTags.Insert(index, summarySignal);
                        tagFound = true;
                        break;
                    }
                }

                if (!tagFound)
                {
                    TagInfo summarySignal = new TagInfo();
                    summarySignal.TagValue = tagValue;
                    summarySignal.TagName = tagDisplayName;
                    _summaryStatusTags.Add(summarySignal);
                }
            }));
        }
开发者ID:BdGL3,项目名称:CXPortal,代码行数:31,代码来源:SummaryStatus.xaml.cs

示例5: InsertTag

        public int InsertTag(TagInfo tag)
        {
            CheckSlug(tag);

            string cmdText =string.Format(@"insert into [{0}category]
                            (
                            [Type],[ParentId],[CateName],[Slug],[Description],[SortNum],[PostCount],[CreateTime]
                            )
                            values
                            (
                            @Type,@ParentId,@CateName,@Slug,@Description,@SortNum,@PostCount,@CreateTime
                            )", ConfigHelper.Tableprefix);
            OleDbParameter[] prams = {
                                OleDbHelper.MakeInParam("@Type",OleDbType.Integer,1,(int)CategoryType.Tag),
                                OleDbHelper.MakeInParam("@ParentId",OleDbType.Integer,4,0),
                                OleDbHelper.MakeInParam("@CateName",OleDbType.VarWChar,255,tag.CateName),
                                OleDbHelper.MakeInParam("@Slug",OleDbType.VarWChar,255,tag.Slug),
                                OleDbHelper.MakeInParam("@Description",OleDbType.VarWChar,255,tag.Description),
                                OleDbHelper.MakeInParam("@SortNum",OleDbType.Integer,4,tag.SortNum),
                                OleDbHelper.MakeInParam("@PostCount",OleDbType.Integer,4,tag.PostCount),
                                OleDbHelper.MakeInParam("@CreateTime",OleDbType.Date,8,tag.CreateTime)
                            };
            OleDbHelper.ExecuteScalar(CommandType.Text, cmdText, prams);

            int newId = Convert.ToInt32(OleDbHelper.ExecuteScalar(string.Format("select top 1 [categoryid] from [{0}category] order by [categoryid] desc",ConfigHelper.Tableprefix)));

            return newId;
        }
开发者ID:robotbird,项目名称:jqpress,代码行数:28,代码来源:TagData.cs

示例6: GetTagInfo

        public TagInfo GetTagInfo(string pathToAudioFile)
        {
            var tags = bassServiceProxy.GetTagsFromFile(pathToAudioFile);
            if (tags == null)
            {
                return new TagInfo { IsEmpty = true };
            }

            int year;
            int.TryParse(tags.year, out year);
            TagInfo tagInfo = new TagInfo
            {
                Duration = tags.duration,
                Album = tags.album,
                Artist = tags.artist,
                Title = tags.title,
                AlbumArtist = tags.albumartist,
                Genre = tags.genre,
                Year = year,
                Composer = tags.composer,
                ISRC = tags.isrc
            };

            return tagInfo;
        }
开发者ID:hamishd,项目名称:soundfingerprinting,代码行数:25,代码来源:BassTagService.cs

示例7: UpdateTagsCollection

        public void UpdateTagsCollection(string tagDisplayName, string tagValue, Dispatcher dispatcher)
        {
            bool tagFound = false;

            dispatcher.Invoke(DispatcherPriority.Normal, new Action(delegate()
            {
                foreach (TagInfo estop in _estopTags)
                {
                    if (estop.TagName.Equals(tagDisplayName))
                    {
                        int index = _estopTags.IndexOf(estop);

                        _estopTags.RemoveAt(index);

                        estop.TagName = tagDisplayName;
                        estop.TagValue = tagValue;
                        _estopTags.Insert(index, estop);
                        tagFound = true;
                        break;
                    }
                }

                if (!tagFound)
                {
                    TagInfo estop = new TagInfo();
                    estop.TagValue = tagValue;
                    estop.TagName = tagDisplayName;
                    _estopTags.Add(estop);
                }
            }));
        }
开发者ID:BdGL3,项目名称:CXPortal,代码行数:31,代码来源:EStopStatus.xaml.cs

示例8: InsertTag

        public int InsertTag(TagInfo tag)
        {
            CheckSlug(tag);

            string cmdText = @"insert into [loachs_terms]
                            (
                            [Type],[Name],[Slug],[Description],[Displayorder],[Count],[CreateDate]
                            )
                            values
                            (
                            @Type,@Name,@Slug,@Description,@Displayorder,@Count,@CreateDate
                            )";
            SqliteParameter[] prams = {
                                SqliteDbHelper.MakeInParam("@Type",DbType.Int32,1,(int)TermType.Tag),
                                SqliteDbHelper.MakeInParam("@Name",DbType.String,255,tag.Name),
                                SqliteDbHelper.MakeInParam("@Slug",DbType.String,255,tag.Slug),
                                SqliteDbHelper.MakeInParam("@Description",DbType.String,255,tag.Description),
                                SqliteDbHelper.MakeInParam("@Displayorder",DbType.Int32,4,tag.Displayorder),
                                SqliteDbHelper.MakeInParam("@Count",DbType.Int32,4,tag.Count),
                                SqliteDbHelper.MakeInParam("@CreateDate",DbType.Date,8,tag.CreateDate)
                            };
            SqliteDbHelper.ExecuteScalar(CommandType.Text, cmdText, prams);

            int newId = Convert.ToInt32(SqliteDbHelper.ExecuteScalar("select   [termid] from [loachs_terms] order by [termid] desc limit 1"));

            return newId;
        }
开发者ID:azraelrabbit,项目名称:LoachsMono,代码行数:27,代码来源:Tag.cs

示例9: SerializeInternal

 private void SerializeInternal(TagInfo model, IDictionary<string, object> result)
 { 
     result.Add("tagid", model.TagID);
     result.Add("tagname", model.TagName);
     result.Add("state", model.State);
     result.Add("isdeleted", model.IsDeleted);
     result.Add("sort", model.Sort);
 }
开发者ID:aNd1coder,项目名称:Wojoz,代码行数:8,代码来源:TagJavascriptConverter.cs

示例10: Delete

 public int Delete(TagInfo tag)
 {
     string cmdText = string.Format("delete from [{0}category] where [categoryid] = @categoryid", ConfigHelper.Tableprefix);
     using (var conn = new DapperHelper().OpenConnection())
     {
         return conn.Execute(cmdText, new { categoryid = tag.TagId });
     }
 }
开发者ID:robotbird,项目名称:jqpress,代码行数:8,代码来源:TagRepository.cs

示例11: XmpTagsImporter

        public XmpTagsImporter(PhotoStore photo_store, TagStore tag_store)
        {
            this.tag_store = tag_store;
            tags_created = new Stack<Tag> ();

            li_root_tag = new TagInfo (Catalog.GetString ("Imported Tags"), LastImportIcon);
            taginfo_table [(Entity)Location] = new TagInfo (Catalog.GetString ("Location"), PlacesIcon);
            taginfo_table [(Entity)Country] = new TagInfo (Catalog.GetString ("Country"), PlacesIcon);
            taginfo_table [(Entity)City] = new TagInfo (Catalog.GetString ("City"), PlacesIcon);
            taginfo_table [(Entity)State] = new TagInfo (Catalog.GetString ("State"), PlacesIcon);
        }
开发者ID:iainlane,项目名称:f-spot,代码行数:11,代码来源:XmpTagsImporter.cs

示例12: Init

 public virtual void Init(Requirement r, Dictionary<string, object> meta)
 {
     Tag = new TagInfo { Req = r, Meta = meta };
     Checked =  meta.GetBoolFromMetadata(r.Name) ?? false;
     Anchor = AnchorStyles.Left | AnchorStyles.Right;
     AutoSize = false;
     CheckedChanged += (a, b) =>
     {
         TagInfo m = (TagInfo)Tag;
         m.Meta[m.Req.Name] = Checked;
     };
 }
开发者ID:maxpiva,项目名称:AnimeOfflineDownloader,代码行数:12,代码来源:Boolean.cs

示例13: Init

 public virtual void Init(Requirement r, Dictionary<string, object> meta)
 {
     Tag = new TagInfo {Req = r, Meta = meta};
     Text = meta.GetStringFromMetadata(r.Name) ?? string.Empty;
     Anchor = AnchorStyles.Left | AnchorStyles.Right;
     AutoSize = false;
     TextChanged += (a, b) =>
     {
         TagInfo m = (TagInfo) Tag;
         m.Meta[r.Name] = Text;
     };
 }
开发者ID:maxpiva,项目名称:AnimeOfflineDownloader,代码行数:12,代码来源:String.cs

示例14: Init

 public virtual void Init(Requirement r, Dictionary<string, object> meta)
 {
     Minimum = 0;
     Maximum = int.MaxValue;
     Tag = new TagInfo { Req = r, Meta = meta };
     Value = (meta.GetIntFromMetadata(r.Name) ?? 0);
     Anchor = AnchorStyles.Left | AnchorStyles.Right;
     AutoSize = false;
     ValueChanged += (a, b) =>
     {
         TagInfo m = (TagInfo)Tag;
         m.Meta[r.Name] = (int)Value;
     };
 }
开发者ID:maxpiva,项目名称:AnimeOfflineDownloader,代码行数:14,代码来源:Integer.cs

示例15: SaveData

        /// <summary>
        /// ajax保存
        /// </summary>
        protected void SaveData(string act)
        {
            TagInfo tag = new TagInfo();
            if (act == "update")
            {
                tag = TagService.GetTag(PressRequest.GetFormInt("hidTagId", 0));
            }
            else
            {
                tag.CreateTime = DateTime.Now;
                tag.PostCount = 0;
            }

            tag.CateName = HttpHelper.HtmlEncode(txtName.Text);
            tag.Slug = StringHelper.FilterSlug(tag.CateName, "tag");
            tag.Description = HttpHelper.HtmlEncode(txtDescription.Text);
            tag.SortNum = TypeConverter.StrToInt(txtDisplayOrder.Text, 1000);

            if (tag.CateName == "")
            {
                return;
            }
            Dictionary<string, string> jsondic = new Dictionary<string, string>();

            jsondic.Add("CateName", tag.CateName);
            jsondic.Add("Url", tag.Url);
            jsondic.Add("SortNum", tag.SortNum.ToString());
            jsondic.Add("Description", tag.Description);

            if (act == "update")//更新操作
            {
                jsondic.Add("Slug", tag.Slug);
                jsondic.Add("PostCount", tag.PostCount.ToString());
                jsondic.Add("CreateTime", tag.CreateTime.ToShortDateString());
                jsondic.Add("TagId", tag.TagId.ToString());

                TagService.UpdateTag(tag);
                Response.Write(JsonHelper.DictionaryToJson(jsondic));
            }
            else//添加操作
            {
                int tagid = TagService.InsertTag(tag);
                jsondic.Add("TagId", tagid.ToString());
                jsondic.Add("PostCount", "0");
                jsondic.Add("CreateTime", DateTime.Now.ToShortDateString());
                Response.Write(JsonHelper.DictionaryToJson(jsondic));

            }
            Response.End();
        }
开发者ID:robotbird,项目名称:jqpress-aspx,代码行数:53,代码来源:tag_list.aspx.cs


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