A wiec tak , kod troche nie ladny ale w czym problem , program ma pobierac z pliku tekstowego odnosniki do zdjec i zapisywac je w formie nowej strony html , wszystko dziala jak nalezy , plik sie tworzy itp jednak zeby zdjecia byly wyswietlane w przegladarce musze otworzyc plik w notatniku i na nowo zapisac jak html
tutaj kod:
private void button1_Click(object sender, EventArgs e)
{
FileStream fs1 ;
StreamReader sw2;
fs1 = new FileStream("e:\\sciezka_zdjec.txt",FileMode.Open);
sw2 = new StreamReader(fs1);
string url_zdj = sw2.ReadToEnd();
string sciezka = null;
string calosc = null;
sw2.Close();
string calosc2 = null;
FileStream start;
start = new FileStream("c:\\www\\" + textBox1.Text + ".html",FileMode.OpenOrCreate);
StreamWriter startsw = new StreamWriter(start);
char cs = Convert.ToChar('"');
for (int i = 0; url_zdj.Length > i; i++)
{
char a = Convert.ToChar(url_zdj[i]);
if (a == 42)
{
calosc2 = calosc2 + Environment.NewLine+ calosc;
sciezka = null;
calosc = null;
}
else
{
sciezka =sciezka + Convert.ToString(a);
}
calosc = "<img src=" + cs + sciezka + cs + " />";
}
calosc2 = "<html>"+Environment.NewLine+"<body>"+Environment.NewLine + calosc2 + Environment.NewLine + "</body>"+Environment.NewLine+"</html>";
startsw.WriteLine(calosc2);
startsw.Close();
this.Close();
}