Beispiel #1
0
        public void AddIconDetail(string IconImagePath,bool isFile,string path,int PanalIndex)
        {
            IconDetails ico = new IconDetails();
            ico.Image =TOXML(IconImagePath);
            ico.Path =TOXML(path);

            ico.isFile = isFile;
            xmlh.AddIconDetail(ico, PanalIndex);
        }
Beispiel #2
0
        public List<IconDetails> GetAllIconDetailByPanal(int panalindex)
        {
            List<IconDetails> allicon = new List<IconDetails>();
               System.Xml.XPath.XPathNodeIterator nodes= xmlh.GetIconsForPnal(panalindex);
            while (nodes.MoveNext())
            {

                IconDetails icon = new IconDetails();

                icon.isFile = bool.Parse(nodes.Current.GetAttribute("isFile",""));
                icon.Path = TOPATH(nodes.Current.GetAttribute("Path", ""));
                icon.Image = TOPATH(nodes.Current.GetAttribute("Image", ""));
                icon.runCount = int.Parse(nodes.Current.GetAttribute("Count", ""));
                allicon.Add(icon);
            }
            return allicon;
        }
Beispiel #3
0
 public void AddIconDetail(IconDetails details, int PanalIndex)
 {
     xDocument.Load(pathname);
     XmlNode newfile = xDocument.CreateNode(XmlNodeType.Element, "file", null);
     XmlAttribute xIsFile = xDocument.CreateAttribute("isFile");
     xIsFile.Value = details.isFile.ToString();
     XmlAttribute xpath = xDocument.CreateAttribute("Path");
     xpath.Value = details.Path;
     XmlAttribute ximage = xDocument.CreateAttribute("Image");
     ximage.Value = details.Image;
     XmlAttribute Count = xDocument.CreateAttribute("Count");
     Count.Value = "1";
     newfile.Attributes.Append(xIsFile);
     newfile.Attributes.Append(xpath);
     newfile.Attributes.Append(ximage);
     newfile.Attributes.Append(Count);
     xDocument.SelectSingleNode("ConceptDB").SelectSingleNode("holder[@ID='" + PanalIndex.ToString() + "']").AppendChild(newfile);
     SaveDB();
     IsOld = false;
 }
Beispiel #4
0
 public void UpdateIconImage(IconDetails details, int PanalIndex)
 {
     XmlNode rootnode = xDocument.SelectSingleNode("ConceptDB").SelectSingleNode("holder[@ID='"+PanalIndex.ToString()+"']");
     XmlNode updatenode = rootnode.SelectSingleNode("file[@Path='" + details.Path + "']");
     updatenode.Attributes["Image"].Value = details.Image;
     SaveDB();
 }
Beispiel #5
0
 public void RemoveIconDetail(IconDetails details, int PanalIndex)
 {
     XmlNode Prentnode = xDocument.SelectSingleNode("//holder[@ID='" + PanalIndex.ToString() + "']");
      //   xDocument.DocumentElement.SetAttribute("pathto",details.Path);
     XmlNode deletenode = xDocument.SelectSingleNode("//descendant::file[@Path='"+details.Path+"']");
     if (deletenode != null)
         deletenode.ParentNode.RemoveChild(deletenode);
     SaveDB();
 }
Beispiel #6
0
 public void UpdateIconImage(string path,string image,int panalindex)
 {
     IconDetails icons = new IconDetails();
     icons.Image=TOXML(image);
     icons.Path=TOXML( path);
     xmlh.UpdateIconImage(icons, panalindex);
 }
Beispiel #7
0
 public void RemoveIconDetail(string path,int panalindex)
 {
     IconDetails icon = new IconDetails();
     icon.Path =TOXML(path);
     xmlh.RemoveIconDetail(icon, panalindex);
 }