Nevron Open Vision Documentation
Schedule / Schedule / Schedule Time Indicators
In This Topic
    Schedule Time Indicators
    In This Topic

    The NOV Schedule included support for time indicators. Time indicators are lines that are displayed in the Day, Week and Timeline view modes of the schedule and show a specific point in time. NOV Schedule supports two types of time indicators all of which inherit the base time indicator class - NTimeIndicator:

     Current Time Indicator

    The current time indicator is implemented by the NCurrentTimeIndicator class and shows the current time and updated every 60 seconds - see the red line in the following screenshot:

     

    The current time indicator is hidden by default. To make it visible and control its appearance use the following properties of the CurrentTimeIndicator of the schedule (they are inherited from the base class NTimeIndicator):

    • Visible - determines whether the time indicator is visible or not. Set this property to true to show the time indicator.
    • Fill - determines the fill style of the time indicator. For best results use a semi-transparent color fill, for example any of the following:
      new NColorFill(new NColor(192, 0, 0, 160))
      new NColorFill(new NColor(NColor.Red, 160))
      
    • Thickness - the time indicator thickness in DIPs (device independent pixels). By default set to 2.

    The following code demonstrates how to enable the current time indicator of a schedule:

    Show the current time indicator of a schedule
    Copy Code
    NSchedule schedule = scheduleView.Content;
    schedule.CurrentTimeIndicator.Visible = true;
    
     Fixed Time Indicators

    Fixed time indicators are implemented by the NFixedTimeIndicator class and show a specific point in time and unlike the current time indicator their time value is fixed and never updated. In addition to the properties Visible, Fill and Thickness inherited from the base class NTimeIndicator and described in the "Current Time Indicator" section above, fixed time indicators also have a Time property. It specifies the point in time at which to render the fixed time indicator.

    To display one or more fixed time indicators, add them to the TimeIndicators collection of the schedule.

    The following piece of code demonstrates how to add 2 fixed time indicators - one an hour before the current time and the other one an hour after the current time:

    Creating fixed time indicators
    Copy Code
    schedule.TimeIndicators.Add(new NFixedTimeIndicator(DateTime.Now.AddHours(-1), new NColor(NColor.MediumBlue, 160)));
    schedule.TimeIndicators.Add(new NFixedTimeIndicator(DateTime.Now.AddHours(1), new NColor(NColor.DarkGreen, 160)));
    

    The code example above uses the constructor of the NFixedTimeIndicator class that accepts a time value and a color to use for the time indicator fill. For best results use a semi-transparent color fill, for example any of the following:

    new NColor(192, 0, 0, 160)
    new NColor(NColor.Red, 160)
    

     

    See Also