Exemple #1
0
    public void ProcessMessage(CloudMailbox.NewsMessage inMessage)
    {
        if (string.IsNullOrEmpty(inMessage.m_HeadLine) == true)
        {
            return;
        }

        if (inMessage.m_ExpirationTime < CloudDateTime.UtcNow)
        {
            return;
        }

        SetHeadLineText(null, inMessage.m_HeadLine, HeadLine.E_Importence.Medium);
    }
Exemple #2
0
    public static string GetMessage(this Message message)
    {
        string text = message != null ? message.m_Message : "";

        if (message is NewsMessage)
        {
            NewsMessage msg = (NewsMessage)message;
            text = string.IsNullOrEmpty(text) == true ? msg.m_HeadLine : text;
        }
        else if (message is ResetResearch)
        {
            text = TextDatabase.instance[01170010].Replace("\n", " ");
        }
        return(string.IsNullOrEmpty(text) == false ? text : "");
    }
Exemple #3
0
    public static string GetSubject(this Message message)
    {
        string text = message != null ? message.m_Message : "";

        if (message is NewsMessage)
        {
            NewsMessage msg = (NewsMessage)message;
            text = string.IsNullOrEmpty(msg.m_Subject) == false ? msg.m_Subject : msg.m_HeadLine;
        }
        else if (message is ResetResearch)
        {
            text = TextDatabase.instance[01170010];
        }
        return(string.IsNullOrEmpty(text) == false ? text : "");
    }