Ejemplo n.º 1
0
        //renameFavorit method
        private void renameFavorit()
        {
            OnBrowserBeforeShowDialog();

            RenameLink rl = new RenameLink(name);

            if (rl.ShowDialog() == DialogResult.OK)
            {
                XmlDocument myXml = new XmlDocument();
                myXml.Load(favXml);
                foreach (XmlElement x in myXml.DocumentElement.ChildNodes)
                {
                    if (x.InnerText.Equals(name))
                    {
                        x.InnerText = rl.newName.Text;
                        break;
                    }
                }
                favTreeView.Nodes[adress].Text = rl.newName.Text;
                myXml.Save(favXml);
            }
            rl.Close();

            OnBrowserAfterShowDialog();
        }
Ejemplo n.º 2
0
        //renameLink method
        private void renameLink()
        {
            OnBrowserBeforeShowDialog();

            RenameLink rl = new RenameLink(name);

            if (rl.ShowDialog() == DialogResult.OK)
            {
                XmlDocument myXml = new XmlDocument();
                myXml.Load(linksXml);
                foreach (XmlElement x in myXml.DocumentElement.ChildNodes)
                {
                    if (x.InnerText.Equals(name))
                    {
                        x.InnerText = rl.newName.Text;
                        break;
                    }
                }
                if (linkBar.Visible == true)
                {
                    linkBar.Items[adress].Text = rl.newName.Text;
                }
                if (favoritesPanel.Visible == true)
                {
                    favTreeView.Nodes[0].Nodes[adress].Text = rl.newName.Text;
                }
                myXml.Save(linksXml);
            }
            rl.Close();

            OnBrowserAfterShowDialog();
        }
//rename method
        private void rename()
        {
            if (organizeFavTreeView.SelectedNode.Index >= 0)
            {
                String     file = "";
                RenameLink rl   = new RenameLink(organizeFavTreeView.SelectedNode.Text);
                TreeNode   node = organizeFavTreeView.SelectedNode;

                if (rl.ShowDialog() == DialogResult.OK)
                {
                    node.Text = rl.newName.Text;

                    if (organizeFavTreeView.Nodes[0].Nodes.Contains(node))
                    {
                        if (tree.Visible == true)
                        {
                            tree.Nodes[0].Nodes[node.Name].Text = rl.newName.Text;
                        }
                        file = linksXml;
                        if (linkbar.Visible == true)
                        {
                            linkbar.Items[node.Name].Text = rl.newName.Text;
                        }
                    }
                    else
                    {
                        if (tree.Visible == true)
                        {
                            tree.Nodes[node.Name].Text = rl.newName.Text;
                        }
                        file = favXml;
                    }
                }

                XmlDocument myXml = new XmlDocument();
                myXml.Load(file);
                foreach (XmlElement x in myXml.DocumentElement.ChildNodes)
                {
                    if (x.GetAttribute("url").Equals(node.Name))
                    {
                        x.InnerText = rl.newName.Text;
                        break;
                    }
                }

                myXml.Save(file);

                rl.Close();
            }
        }
Ejemplo n.º 4
0
//rename method
        private void rename()
        {
            if (organizeFavTreeView.SelectedNode.Index >= 0)
            {
                String file = "";
                RenameLink rl = new RenameLink(organizeFavTreeView.SelectedNode.Text);
                TreeNode node = organizeFavTreeView.SelectedNode;

                if (rl.ShowDialog() == DialogResult.OK)
                {
                    node.Text = rl.newName.Text;

                    if (organizeFavTreeView.Nodes[0].Nodes.Contains(node))
                    { if(tree.Visible==true)
                        tree.Nodes[0].Nodes[node.Name].Text = rl.newName.Text;
                        file = linksXml;
                        if (linkbar.Visible==true)
                        linkbar.Items[node.Name].Text = rl.newName.Text;
                    }
                    else
                    {   if(tree.Visible==true)
                        tree.Nodes[node.Name].Text = rl.newName.Text;
                        file = favXml;
                    }
                }

                XmlDocument myXml = new XmlDocument();
                myXml.Load(file);
                foreach (XmlElement x in myXml.DocumentElement.ChildNodes)
                {
                    if (x.GetAttribute("url").Equals(node.Name))
                    {
                        x.InnerText = rl.newName.Text;
                        break;
                    }
                }

                myXml.Save(file);

                rl.Close();
            } 
        }
Ejemplo n.º 5
0
//rename link
      private void renameToolStripMenuItem_Click(object sender, EventArgs e)
      {
          RenameLink rl = new RenameLink(name);

          if (rl.ShowDialog() == DialogResult.OK)
          {
              XmlDocument myXml = new XmlDocument();
              myXml.Load(linksXml);
              foreach (XmlElement x in myXml.DocumentElement.ChildNodes)
              {
                  if (x.InnerText.Equals(name))
                  {
                      x.InnerText = rl.newName.Text;
                      break;
                  }
              }
              linkBar.Items[name].Text = rl.newName.Text;
              myXml.Save("links.xml");
          }
          rl.Close();
      }
Ejemplo n.º 6
0
 //renameFavorit method
 private void renameFavorit()
 {
     RenameLink rl = new RenameLink(name);
     if (rl.ShowDialog() == DialogResult.OK)
     {
         XmlDocument myXml = new XmlDocument();
         myXml.Load(favXml);
         foreach (XmlElement x in myXml.DocumentElement.ChildNodes)
         {
             if (x.InnerText.Equals(name))
             {
                 x.InnerText = rl.newName.Text;
                 break;
             }
         }
         favTreeView.Nodes[adress].Text = rl.newName.Text;
         myXml.Save(favXml);
     }
     rl.Close();
 }
Ejemplo n.º 7
0
 //renameLink method
 private void renameLink()
 {
     RenameLink rl = new RenameLink(name);
     if (rl.ShowDialog() == DialogResult.OK)
     {
         XmlDocument myXml = new XmlDocument();
         myXml.Load(linksXml);
         foreach (XmlElement x in myXml.DocumentElement.ChildNodes)
         {
             if (x.InnerText.Equals(name))
             {
                 x.InnerText = rl.newName.Text;
                 break;
             }
         }
         if(linkBar.Visible==true)
           linkBar.Items[adress].Text = rl.newName.Text;
         if(favoritesPanel.Visible==true)
         favTreeView.Nodes[0].Nodes[adress].Text = rl.newName.Text;
         myXml.Save(linksXml);
     }
     rl.Close();
 }
Ejemplo n.º 8
0
//rename link
        private void renameToolStripMenuItem_Click(object sender, EventArgs e)
        {
            RenameLink rl = new RenameLink(name);
            if (rl.ShowDialog() == DialogResult.OK)
            {   
                XmlDocument myXml = new XmlDocument();
                myXml.Load(linksXml);
                foreach (XmlElement x in myXml.DocumentElement.ChildNodes)
                {
                    if (x.InnerText.Equals(name))
                    {
                        x.InnerText = rl.newName.Text;
                        break;
                    }
                }
                linkBar.Items[name].Text = rl.newName.Text;
                myXml.Save("links.xml");
            }
            rl.Close();

        }