Example #1
0
        /// <summary>
        /// Updates the node's title when the form's state changes.
        /// </summary>
        public void UpdateTitle()
        {
            string speakerName;

            if (string.IsNullOrWhiteSpace(SpeakerName))
            {
                speakerName = "NO-SPK";
            }
            else
            {
                speakerName = SpeakerName.Length <= 10
                    ? SpeakerName
                    : SpeakerName.Substring(0, 10) + "...";
            }

            string dialogueText;

            if (string.IsNullOrWhiteSpace(DialogueText))
            {
                dialogueText = "NO-DLG";
            }
            else
            {
                dialogueText = DialogueText.Length <= 12
                    ? DialogueText
                    : DialogueText.Substring(0, 12) + "...";
            }

            title = $"{speakerName} : {dialogueText}";
        }
Example #2
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            SessionTitle.Text = _session.Title;
            SpeakerName.SetTitle(_session.Speaker.Name, UIControlState.Normal);
            SessionTime.Text = string.Format("{0} - {1}",
                                             _session.Starts.ToLocalTime().ToShortTimeString(),
                                             _session.Ends.ToLocalTime().ToShortTimeString());
            SessionRoom.SetTitle("Room: " + _session.Room, UIControlState.Normal);
            SessionAbstract.Text = _session.Abstract;

            if (!string.IsNullOrEmpty(_session.Speaker.Name))
            {
                SpeakerName.TouchUpInside += delegate
                {
                    NavigationController.PushViewController(
                        new SpeakerViewController(_session.Speaker), true);
                };
            }

            SessionRoom.TouchUpInside += delegate
            {
                NavigationController.PushViewController(
                    new RoomViewController(_session.RoomKey), true);
            };
        }
 public SpeakerDocument(Id id, Version version, SpeakerBio bio, PhoneNumber phoneNumber, EmailAddress emailAddress, SpeakerName name)
 {
     Bio = bio;
     Email = emailAddress;
     Id = id;
     PhoneNumber = phoneNumber;
     Name = name;
     Version = version;
 }
Example #4
0
 public SpeakerDocument(Id id, Version version, SpeakerBio bio, PhoneNumber phoneNumber, EmailAddress emailAddress, SpeakerName name)
 {
     Bio = (string) bio;
     Email = (string) emailAddress;
     Id = (Guid) id;
     PhoneNumber = (string) phoneNumber;
     Name = (string) name;
     Version = (int)version;
 }
Example #5
0
    private IEnumerator DisplayEachLine(string[] lines, float initialWaitTime, float inbetweenWaitTime, Color col, string name, SpeakerName speaker, string stageDir, Color stageColor)
    {
        yield return(new WaitForSeconds(initialWaitTime));

        string dirHex = ColorUtility.ToHtmlStringRGBA(stageColor);

        //Line break
        CreateLine("", col, _blankLinePrefab);

        //Put Name
        if (stageDir == "")
        {
            CreateLine("<b>" + name.ToString().ToUpper() + "</b>", col, _nameLinePrefab);
        }
        else
        {
            CreateLine("<b>" + name.ToString().ToUpper() + "</b> <color=#" + dirHex + ">[<i>" + stageDir + "</i> ]</color>", col, _nameLinePrefab);
        }

        for (int i = 0; i < lines.Length; i++)
        {
            CreateLine(lines[i].Trim(), col, _linePrefab);
            yield return(new WaitForSeconds(inbetweenWaitTime));
        }
        if (speaker == SpeakerName.Romeo)
        {
            _inputField.EnableTexting();
        }
    }