Ejemplo n.º 1
0
    /// <summary>
    /// Creates a file of the type. Is a .txt with extension .sm
    ///
    /// </summary>
    /// <param name="type"></param>
    public static void CreateFile(string type, string text)
    {
        if (string.IsNullOrEmpty(text))
        {
            return;
        }

        ManagerReport.AddNewText(type, text);

        var nameFile =
            SteamFriends.GetPersonaName() + "." + SteamUser.GetSteamID() +
            "_" + DateTime.Now.ToString("yy.MM.dd") +
            "_" + DateTime.Now.ToString("HH.mm.ss") +
            "_" + type + ".zip";

        var path = Application.dataPath + "/" + nameFile;

        Debug.Log(path);
        File.WriteAllText(path, FileHeader() + text);

        if (SteamUser.GetSteamID().m_SteamID == 76561198245800476 ||
            SteamUser.GetSteamID().m_SteamID == 76561197970401438)
        {
            Debug.Log("CreatFile Stopped");
            return;
        }

        LogUploader.UploadDirectToAWSCarlos(path);
    }
Ejemplo n.º 2
0
Archivo: Dialog.cs Proyecto: Cdrix/SM
    public static string UploadXMLFile(string type, FinalReport report)
    {
        var nameFile =
            SteamFriends.GetPersonaName() + "." + SteamUser.GetSteamID() +
            "_" + DateTime.Now.ToString("yy.MM.dd") +
            "_" + DateTime.Now.ToString("HH.mm.ss") +
            "_" + type + ".zip";

        var path = Application.dataPath + "/" + nameFile;

        Debug.Log(path);

        //write xml file
        DataContainer DataCollection = new DataContainer();

        DataCollection.FinalReport = report;
        DataCollection.Save(path);
        //


        if (SteamUser.GetSteamID().m_SteamID == 76561198245800476 ||
            SteamUser.GetSteamID().m_SteamID == 76561197970401438)
        {
            Debug.Log("Update XML Stopped");
            return(path);
        }

        LogUploader.UploadDirectToAWSCarlos(path);
        return(path);
    }