Ejemplo n.º 1
0
        public IDictionary <string, List <string> > GetTagIndex(ModificationStatus status)
        {
            if (tagsDoc == null)
            {
                tagsDoc = LoadDocument(TagsFileName);
            }

            Dictionary <string, List <string> > tagLinks = new Dictionary <string, List <string> >();
            List <string> links;

            XmlNodeList tagNodes = tagsDoc.SelectSingleNode("tags").SelectNodes("tag");

            foreach (XmlElement tag in tagNodes)
            {
                if (tag.GetAttribute("status") == status.ToString())
                {
                    links = new List <string>();

                    foreach (XmlElement link in tag.SelectNodes("url"))
                    {
                        links.Add(link.InnerText);
                    }

                    tagLinks.Add(tag.GetAttribute("name"), links);
                }
            }

            return(tagLinks);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Constructor for creation a new instance of the Activity. 
 /// </summary>
 /// <param name="Entry">A data taken from the server</param>
 public ActivityPresentation(ActivityReportStruct Entry)
 {
     _claim = new ClaimStruct();
     _entry = Entry;
     _claim.Activity = Entry;
     _modified = ModificationStatus.None;
 }
Ejemplo n.º 3
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="modification">Тип модификации.</param>
 /// <param name="successful">Удачность модификации.</param>
 /// <param name="vertex">Вершина, над которой выполняется модификация.</param>
 public VerticesModifiedEventArgs(ModificationStatus status, IVertex vertex, object vertexValue)
 {
     this.Vertex = vertex;
     this.VertexValue = vertexValue;
     Status = status;
 }
Ejemplo n.º 4
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="modification">Тип модификации.</param>
 /// <param name="successful">Удачность модификации.</param>
 /// <param name="edge">Ребро, над которым выполняется модификация.</param>
 public EdgesModifiedEventArgs(ModificationStatus status, IEdge edge, object u,object v)
 {
     this.Edge = edge;
     this.u = u;
     this.v = v;
     Status = status;
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Constructor for creation a new instance of the activity presentation by claim
 /// </summary>
 /// <param name="Claim">A claim data taken from the server</param>
 public ActivityPresentation(ClaimStruct Claim)
 {
     _claim = Claim;
     _entry = _claim.Activity;
     _modified = ModificationStatus.None;
 }