Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Forms;
- namespace ClickSite.AAA
- {
- public partial class NameOfDiv : Form
- {
- public string textodatextbox;
- Form2 noway = new Form2();
- public NameOfDiv()
- {
- InitializeComponent();
- Teste scriptlog = new Teste();
- string vsf = textodatextbox = textBox1.Text;
- scriptlog.EscreverLog(vsf);
- }
- private void button1_Click(object sender, EventArgs e)
- {
- atimala();
- }
- private void atimala()
- {
- if (!string.IsNullOrWhiteSpace(textodatextbox))
- {
- MessageBox.Show("Não digitou nada");
- }
- else
- {
- textodatextbox = textBox1.Text;
- int startindex = noway.textorealdarich.IndexOf("<body>");
- int endindex = noway.textorealdarich.IndexOf("</body>");
- if(startindex != -1 && endindex != -1)
- {
- string contentbeforebody = noway.textorealdarich.Substring(0, startindex + 6);
- string contentafterbody = noway.textorealdarich.Substring(endindex);
- string div = @"<div>
- </div>";
- string novoscomands = contentbeforebody + div + contentafterbody;
- noway.textorealdarich = novoscomands;
- }
- this.Close();
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment