Jump to content
SENEQ_o

c# [help] !

Recommended Posts

Deci vreau sa fac un program care sa inlocuiasca diacriticile din romana cu litere normale deoarece m-am plitisit sa tot dau replace la subtitrari :-j

using System;

using System.Collections.Generic;

using System.ComponentModel;

using System.Data;

using System.Drawing;

using System.Linq;

using System.Text;

using System.Windows.Forms;

using System.IO;

namespace WindowsFormsApplication1

{

public partial class Form1 : Form

{

public Form1()

{

InitializeComponent();

}

private void button1_Click(object sender, EventArgs e)

{

String strFile = File.ReadAllText(textBox1.Text);

strFile = strFile.Replace("º", "s");

strFile = strFile.Replace("þ", "t");

strFile = strFile.Replace("ª", "S");

File.WriteAllText(textBox1.Text, strFile);

}

}

}

Deci introduc calea in text box apas pe buton si ar trebui sa mearga . Dar primesc eroare fie ca nu poate salva fisierul fie ca nu-l gaseste. As vrea sa fac ceva mai simplu de exemplu cu openfiledialog ceva sa dau browse selectez fisierul dau ok si sa le schimbe ... sau mai usor cu drag and drop si ok . Daca are cineva vreo idee help;)

Edited by SENEQ_o
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...