Results 1 to 2 of 2

Thread: Customs Labels as RR sliders

  1. #1
    Raw Wave pierrotm777's Avatar
    Join Date
    May 2008
    Location
    Bordeaux, France
    Posts
    2,839

    Customs Labels as RR sliders

    Hello,
    I try to create a custom slider that return me a time slot between 2 hours :
    Name:  x10.jpg
Views: 464
Size:  183.5 KB

    My settings are defined into the skin.ini file:
    [X10TIMERS]
    Timer1=1|00:00|12:00|WeekDays
    Timer2=1|01:00|12:00|WeekEnds
    Timer3=1|03:00|16:00|Daily
    Timer4=0|10:59|18:00|Daily
    Timer5=0|12:00|19:00|Daily
    Timer6=0|03:00|21:00|Daily
    Timer7=0|02:00|22:00|Daily
    Timer8=0|00:00|23:00|Daily

    The first timer start at 00:00 (24h) and finish at 12:00 (24h)

    As you can see on the picture , i have gap between this picture and my settings !

    My code:
    Code:
        Public Function BuilsTimerSlider(ByVal timernb As String) As String
            BuilsTimerSlider = ""
            dt = SKININI.ReadString("X10TIMERS", "Timer" & timernb, "").Split("|") 'Timer1=1|00:00|12:00|WeekDays
            Dim dFrom9 As DateTime
            Dim dTo9 As DateTime
            Dim Date9From As String = dt(1)
            Dim Date9To As String = dt(2)
            If DateTime.TryParse(Date9From, dFrom9) AndAlso DateTime.TryParse(Date9To, dTo9) Then
                Dim TS1 As TimeSpan = dFrom9 - CType("00:00", DateTime)
                Dim TS2 As TimeSpan = dTo9 - dFrom9
                Dim hour1 As Integer = TS1.Hours
                Dim mins1 As Integer = TS1.Minutes
                Dim hour2 As Integer = TS2.Hours
                Dim mins2 As Integer = TS2.Minutes
                Dim timeDiff As String = ""
                For i = 1 To ((hour1) * 60) + mins1 Step 5 'with font Arial
                    timeDiff &= Space(1)
                Next
                For i = 1 To ((hour2) * 60) + mins2 Step 5 'with font Arial
                    timeDiff &= "|"
                Next
                Return timeDiff
            End If
        End Function
    I use this code into 8 labels:
    Code:
                    'timer's sliders
                Case "x10_timer1_slider"
                    ReturnLabel = BuilsTimerSlider(1)
                Case "x10_timer2_slider"
                    ReturnLabel = BuilsTimerSlider(2)
                Case "x10_timer3_slider"
                    ReturnLabel = BuilsTimerSlider(3)
                Case "x10_timer4_slider"
                    ReturnLabel = BuilsTimerSlider(4)
                Case "x10_timer5_slider"
                    ReturnLabel = BuilsTimerSlider(5)
                Case "x10_timer6_slider"
                    ReturnLabel = BuilsTimerSlider(6)
                Case "x10_timer7_slider"
                    ReturnLabel = BuilsTimerSlider(7)
                Case "x10_timer8_slider"
                    ReturnLabel = BuilsTimerSlider(8)
    Can i symply it ? Do i have an error ?

    Does exist another method with real RR sliders ?

    Thanks for all help !

  2. #2
    Variable Bitrate
    Join Date
    Sep 2012
    Location
    Germany - Munich
    Posts
    359
    oh cool idea to use labels as slider.

    an other way could be to set a var and use in indicator. but you need a lot of graphics.

Similar Threads

  1. How to re-map the label/indicator/slider code
    By efun in forum Road Runner
    Replies: 4
    Last Post: 06-18-2010, 09:27 PM
  2. create label from existing label with math opertions...
    By sgtpepperaut in forum Road Runner
    Replies: 3
    Last Post: 11-18-2009, 12:33 AM
  3. Add custom label on main screen
    By tired in forum CF SDK
    Replies: 3
    Last Post: 11-09-2009, 09:48 PM
  4. Using a Slider behind a Scrolling Label?
    By toxic000 in forum Road Runner
    Replies: 17
    Last Post: 08-01-2009, 09:47 AM
  5. Retreiving Custom SLider value help needed
    By JohnWPB in forum Road Runner
    Replies: 6
    Last Post: 02-21-2008, 04:24 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •