Beispiel #1
0
    public async void AddToOperationLog(OperationEvent EventType, string newText)
    {
        if (!isInited)
        {
            return;
        }
        string textLog = string.Empty;

        var timeNow = System.DateTime.Now;

        textLog = "\n[" + timeNow.Day + "/" + timeNow.Month + "/" + timeNow.Year + " " + timeNow.Hour.ToString("d2") + ":" + timeNow.Minute.ToString("d2") + ":" + timeNow.Second.ToString("d2") + "] " + EventType.ToString() + ": " + newText + "\n";
        Debug.Log(textLog);
#if WINDOWS_UWP
        await FileIO.AppendTextAsync(OperationFile, textLog, Windows.Storage.Streams.UnicodeEncoding.Utf8);
#endif
    }