コード例 #1
0
    //----------------------------------------------------------------------------------------------------------------------------------------------//

    public void SaveFeedback()
    {
        string date          = DateTime.Now.ToString("dd MMMM yyyy");
        string time          = DateTime.Now.ToString("HH:mm:ss");
        string userID        = userData.currentUserID;
        string userEmail     = userData.currentUserEmail;
        string feedbackTitle = (DateTime.Now.ToString("yyyy-MM-dd (HH:mm:ss) ") + userEmail);

        print(feedbackTitle);

        DataRef.Feedback(feedbackTitle).Child("Date").SetValueAsync(date).ContinueWith(async(task) => { await new WaitForUpdate(); });
        DataRef.Feedback(feedbackTitle).Child("Time").SetValueAsync(time).ContinueWith(async(task) => { await new WaitForUpdate(); });
        DataRef.Feedback(feedbackTitle).Child("UserID").SetValueAsync(userID).ContinueWith(async(task) => { await new WaitForUpdate(); });
        DataRef.Feedback(feedbackTitle).Child("UserEmail").SetValueAsync(userEmail).ContinueWith(async(task) => { await new WaitForUpdate(); });
        DataRef.Feedback(feedbackTitle).Child("Feedback").SetValueAsync(displayText.text).ContinueWith(async(task) => { await new WaitForUpdate(); });

        inputField.text = "";
        AdjustText();
    }