public static Timecode GetUserTime(String Caption = "Time entry", String Prompt = "Enter time", String DataLabel = "Time") { var myForm = new FormTimeEntry(Caption, Prompt, DataLabel); DialogResult rslt = myForm.ShowDialog(); if (rslt != DialogResult.OK) return null; Timecode parsedTC = Timecode.FromPositionString(myForm.tbUserData.Text, RulerFormat.Unknown); if (parsedTC == null) return null; return parsedTC; }
public static Timecode GetUserTime(String Caption = "Time entry", String Prompt = "Enter time", String DataLabel = "Time") { var myForm = new FormTimeEntry(Caption, Prompt, DataLabel); DialogResult rslt = myForm.ShowDialog(); if (rslt != DialogResult.OK) { return(null); } Timecode parsedTC = Timecode.FromPositionString(myForm.tbUserData.Text, RulerFormat.Unknown); if (parsedTC == null) { return(null); } return(parsedTC); }