ToMSecondsString() public method

String representation including the milisenconds information
public ToMSecondsString ( bool includeHour = false ) : string
includeHour bool
return string
Example #1
0
 public void TestStrings()
 {
     Time t = new Time (2323456);
     Assert.AreEqual (t.ToMSecondsString (false), "38:43,456");
     Assert.AreEqual (t.ToMSecondsString (true), "0:38:43,456");
     Assert.AreEqual (t.ToSecondsString (false), "38:43");
     Assert.AreEqual (t.ToSecondsString (true), "0:38:43");
 }
Example #2
0
 void HandleTimeChangedEvent(Time currentTime, Time duration, bool seekable)
 {
     timelabel.Text = currentTime.ToMSecondsString (true) + "/" + duration.ToMSecondsString ();
     if (duration.MSeconds == 0) {
         timescale.Value = 0;
     } else {
         timescale.Value = (double)currentTime.MSeconds / duration.MSeconds;
     }
     timescale.Sensitive = seekable;
 }
Example #3
0
        public void StopPeriod()
        {
            if (currentPeriod == null) {
                string msg = Catalog.GetString ("Period recording not started");
                Config.GUIToolkit.WarningMessage (msg, this);
                return;
            }

            GLib.Source.Remove (timeoutID);
            currentPeriod.Stop (CurrentCaptureTime);
            accumTime = CurrentCaptureTime;
            Log.Debug ("Stop period stop=", accumTime.ToMSecondsString ());
            currentTimeNode = null;
            currentPeriod = null;
            recbutton.Visible = true;
            pausebutton.Visible = resumebutton.Visible = stopbutton.Visible = false;
            if (Capturer != null && Capturing) {
                Capturer.TogglePause ();
            }
            Capturing = false;
        }
Example #4
0
        public void OnNewTag(EventType evType, List<Player> players, TeamType team, List<Tag> tags,
		                      Time start, Time stop, Time eventTime, Score score, PenaltyCard card, DashboardButton btn)
        {
            if (player == null || openedProject == null)
                return;

            if (projectType == ProjectType.CaptureProject ||
                projectType == ProjectType.URICaptureProject) {
                if (!capturer.Capturing) {
                    guiToolkit.WarningMessage (Catalog.GetString ("Video capture is stopped"));
                    return;
                }
            }
            Log.Debug (String.Format ("New play created start:{0} stop:{1} category:{2}",
                start.ToMSecondsString (), stop.ToMSecondsString (),
                evType.Name));
            /* Add the new created play to the project and update the GUI*/
            var play = openedProject.AddEvent (evType, start, stop, eventTime, null, score, card);
            play.Team = team;
            if (players != null) {
                play.Players = players;
            }
            if (tags != null) {
                play.Tags = tags;
            }
            AddNewPlay (play);
        }