25 Mart 2013 Pazartesi

AXAPTA Read text file

...
    Filename                Filename;
    System.IO.StreamReader  readFile;
    System.String           line;

    int hwnd; 
    ; 
    hwnd = infolog.hwnd(); 
    Filename = WinApi::getOpenFileName(hwnd,['TXT files','*.txt'],"","Text Files");
//    Filename = WinApi::getOpenFileName(element.hWnd(),['TXT files','*.txt'],"","Text Files");
    if (!Filename)
        return;

    readFile = new System.IO.StreamReader(filename,System.Text.Encoding::get_UTF8());
    while (true)
    {
        line = readFile.ReadLine();

        if(System.String::IsNullOrEmpty(line))
           break;
        warning(line);
    }
       
    readFile.Close();
    readFile.Dispose();
...        



There are other ways, one of them is at Fatih Demirci's blog.