Page 4 of 8 FirstFirst 12345678 LastLast
Results 31 to 40 of 71

Thread: Fuel Prices and Traffic cams

  1. #31
    Confusion Master
    Auto Apps:loading...
    Enforcer's Avatar
    Join Date
    Sep 2003
    Location
    If you go down to the woods today, You're sure of
    Posts
    14,622
    Current status



    While not looking much different to the previous image posted the main difference is that the data is pulled from a previously saved file done from one of the other frontends and then displayed by Driveline.

    With the previous picture the text and images were just hardcoded into the skin file.

    Now onto actually connecting my plugin so we can update info.

  2. #32
    FLAC SNOtwistR's Avatar
    Join Date
    Nov 2009
    Location
    Keswick,On Canada
    Posts
    1,581
    Looks very clean and sharp! I could have used it today on my journey. Keep up the great work! SNO

  3. #33
    Mod - Driveline forum
    Auto Apps:loading...
    ClockWorK's Avatar
    Join Date
    Oct 2003
    Location
    Michigan
    Posts
    706
    Agreed. Looks very good.

    Might want to modify the required skin files to display the street address information with two visible rows of text instead of one, and decrease the size of the State/ZIP label. But when the plugin is working with DriveLine enough to get the fuel prices data, I'm more than happy to handle the visuals and aesthetics.

    Can't wait to get all of this integrated.

  4. #34
    FLAC SNOtwistR's Avatar
    Join Date
    Nov 2009
    Location
    Keswick,On Canada
    Posts
    1,581
    Looks like we are getting real close
    Name:  settings_sm.jpg
Views: 74
Size:  46.5 KB
    credit where credit is due, nice touch!
    Name:  fueltease_sm.jpg
Views: 75
Size:  34.2 KB

  5. #35
    Confusion Master
    Auto Apps:loading...
    Enforcer's Avatar
    Join Date
    Sep 2003
    Location
    If you go down to the woods today, You're sure of
    Posts
    14,622
    Not really.

    Not pulling info from the Plugin DLL yet.

    Also plenty of screens to be added.

    Plus Data entry

  6. #36
    FLAC SNOtwistR's Avatar
    Join Date
    Nov 2009
    Location
    Keswick,On Canada
    Posts
    1,581
    No worries Enforcer, my post was more of a comment towards Clockwork for adding the icon and setting page. At least you know he is ready when you are SNO

  7. #37
    Confusion Master
    Auto Apps:loading...
    Enforcer's Avatar
    Join Date
    Sep 2003
    Location
    If you go down to the woods today, You're sure of
    Posts
    14,622
    They've been in there for a while. ;-)

    It's what I have bee using to test. Still a lot more to add though.

    It will speed up when I finally decode how Clock has all this connected.

  8. #38
    Mod - Driveline forum
    Auto Apps:loading...
    ClockWorK's Avatar
    Join Date
    Oct 2003
    Location
    Michigan
    Posts
    706
    Enforcer,
    You really don't have to deal with all of that if you don't want to. As long as the data acquisition is working, I can handle tying it into the UI. Feel free to ask anything you need to know.

  9. #39

  10. #40
    Mod - Driveline forum
    Auto Apps:loading...
    ClockWorK's Avatar
    Join Date
    Oct 2003
    Location
    Michigan
    Posts
    706

    How DriveLine Works

    How DriveLine Works...

    The basic idea is that the skin files control as much as possible (both appearance and functionality) while the heavy lifting (hardware, communication, internet) is handled by the program and exposed to the skin through variables and events. Every skin starts with a Skin.XML file, which references additional skin XML files. The skin XML files define objects. There are only 8 or 9 basic object types in DriveLine.
    FORM
    LABEL
    TEXTBOX
    LISTVIEW
    TREEVIEW
    IMAGE
    TIMER
    WEBBROWSER

    There are also a couple of special object types:
    VARIABLE
    HOTKEYCOMMAND

    Objects have properties and events. For example, here's the XML for the button the user presses to add items to the playlist.
    Code:
        <OBJECT>
          <TYPE>IMAGE</TYPE>
          <NAME>ImagePlaylist_Add</NAME>
          <WIDTH>10%</WIDTH>
          <HEIGHT>17%</HEIGHT>
          <POSX>89%</POSX>
          <POSY>41%</POSY>
          <BACKCOLOR>%skin_clrBtnBak%</BACKCOLOR>
          <IMGFILENAME>..\DefaultSkin\Nav_Plus.PNG</IMGFILENAME>
          <BORDERSTYLE>%skin_BtnBorderStyle%</BORDERSTYLE>
          <SHADINGSTYLE>%skin_BtnShadingStyle%</SHADINGSTYLE>
          <BORDERCOLOR>%skin_clrBrdr%</BORDERCOLOR>
          <IMGFORCECOLOR>%skin_clrBtnForce%</IMGFORCECOLOR>
          <EVENTCOMMAND>
            <EVENTNAME>MOUSEUP</EVENTNAME>
            <EVENTACTION>
              showobject FrameAudioOrVideo
    
            </EVENTACTION>
          </EVENTCOMMAND>
        </OBJECT>

    And here's an example of a VARIABLE type.
    Code:
        <OBJECT>
          <TYPE>Variable</TYPE>
          <NAME>skin_clrBrdr</NAME>
          <VarValue>255,0,210,210</VarValue>
        </OBJECT >

    Object postion and size can be specified as absolute pixel values, or as percentages of their parent object's size.

    Colors can be specified as R,G,B or A,R,G,B or ColorName or as a hex-code when preceded by a # sign.

    Paths can be specified as absolute paths, or paths relative to the current skin folder.

    Variables are enclosed in % signs. Such as %skin_clrBrdr%.

    Objects respond to user input through events. The list of possible object events is listed below.
    Code:
    DOUBLECLICK
    FORMCLOSING
    FORMSHOWN
    MOUSEDOWN
    MOUSEDOWN_LONG
    MOUSEUP
    PAINT
    TIMERTICK
    WBDOCCOMPLETED


    As mentioned, the program communicates with the skin through events and variables. The following events are fired when appropiate, and the skin can hook/trap/handle these events.
    Code:
    APPEVENT_AppsChanged
    APPEVENT_BackgroundChanged
    APPEVENT_BTphoneBookChanged
    APPEVENT_BTphoneRing
    APPEVENT_BTphoneSMSreceived
    APPEVENT_BTphoneStatusChanged
    APPEVENT_CameraChanged
    APPEVENT_DABradioChanged
    APPEVENT_DevicesChanged
    APPEVENT_DimmerChanged
    APPEVENT_DirectionsChanged
    APPEVENT_DriveAdded
    APPEVENT_ExternalEditClicked_1
    APPEVENT_ExternalEditClicked_2
    APPEVENT_GeoLocationCityChanged
    APPEVENT_GPSfixChanged
    APPEVENT_HDradioChanged
    APPEVENT_ImportCompleted
    APPEVENT_LogoChanged
    APPEVENT_LyricsChanged
    APPEVENT_MixerChanged
    APPEVENT_OBDcodesChanged
    APPEVENT_OBDconnectedChanged
    APPEVENT_OnlineChanged
    APPEVENT_ParkDistChanged
    APPEVENT_PhidgetInputChanged
    APPEVENT_PlaylistChanged
    APPEVENT_PlaylistItemChanged
    APPEVENT_PlaylistPaused
    APPEVENT_PlaylistUnpaused
    APPEVENT_PowerStateChanged
    APPEVENT_QuotesChanged
    APPEVENT_Resumed
    APPEVENT_RSSchanged
    APPEVENT_SearchCompleted
    APPEVENT_SkinConfigChanged
    APPEVENT_SkinLoaded
    APPEVENT_SlideshowItemsChanged
    APPEVENT_SpeedChanged
    APPEVENT_Terminating
    APPEVENT_TimeHourChanged
    APPEVENT_TimeMinuteChanged
    APPEVENT_TPMSchanged
    APPEVENT_WeatherChanged
    APPEVENT_XMradioChanged

    There is a long list of application-level variables in modDriveLine_Commands. Look at the function called "DLcmd_ExpandStringVariables".

    There is also a long list of application-defined commands which the skin uses to manipulate the program and the UI in modDriveLine_Handlers. Look at the function called "DriveLine_Skin_Handlers_RunCmdString".

    Here's an example of an APPEVENT from the file Skin_SkinEvents.XML. It shows the skin handling the application-level event "APPEVENT_DEVICESCHANGED". It also shows an application-level variable (%devices_NumEjectable%), and a multi-line EVENTACTION with an IF/ELSE statement included.

    Code:
      <EVENTCOMMAND>
        <EVENTNAME>APPEVENT_DEVICESCHANGED</EVENTNAME>
        <EVENTACTION>
          IF %devices_numejectable% > 0 {
            SetNotGrayed_ByTrueFalse ImageMediaEject True
            SetNotGrayed_ByTrueFalse ImageScreen2MediaEject True
          } ELSE {
            SetNotGrayed_ByTrueFalse ImageMediaEject False
            SetNotGrayed_ByTrueFalse ImageScreen2MediaEject False
          }
        </EVENTACTION>
      </EVENTCOMMAND>

    My guess is that I will add a new application-level event called "APPEVENT_FUELPRICESCHANGED", and the Skin_SkinEvents.XML will have a handler added to it for that event. That will be responsible for updating the UI. We may also add some application-level commands like FuelPrices_Refresh, which could be triggered on a timer, or through a MOUSEUP event on a button (image), or even triggered through the skin in the APPEVENT_GeoLocationCityChanged handler. Then, the only thing required is for DriveLine to expose application-level variables such as FuelPrices_Icon01, FuelPrices_Icon02, FuelPrices_Icon03, etc. And a few others, like FuelPrices_StationName01, FuelPrices_StationName02, etc.

    Updating the UI is mostly done through just a few commands listed below, though there are actually a whole lot more.
    Code:
    SetTextAutoFit
    SetImageScale
    SetNotGrayed_ByTrueFalse
    SetGrayed_ByTrueFalse
    ShowObject
    ShowObject_WithTransition
    HideObject
    SetBackColor
    SetForeColor

    Also, here's an example of an object with child objects and multiple events (mouseup and mousedown). This is the "Playlist" tile on the main home screen.

    Code:
         <OBJECT>
           <TYPE>IMAGE</TYPE>
           <NAME>TileMainPlaylist</NAME>
           <WIDTH>18%</WIDTH>
           <HEIGHT>30%</HEIGHT>
           <POSX>21%</POSX>
           <POSY>1%</POSY>
           <BACKCOLOR>%skin_clrTileBak%</BACKCOLOR>
           <BORDERSTYLE>None</BORDERSTYLE>
           <BORDERCOLOR>0,0,0,0</BORDERCOLOR>
           <FRAMESTYLE>False</FRAMESTYLE>
    
           <EVENTCOMMAND>
             <EVENTNAME>MOUSEDOWN</EVENTNAME>
             <EVENTACTION>
               ShowObjectHilite TileMainPlaylist %skin_BtnHiliteColor%
             </EVENTACTION>
           </EVENTCOMMAND>
           
           <EVENTCOMMAND>
             <EVENTNAME>MOUSEUP</EVENTNAME>
             <EVENTACTION>
               ExitIfCursorOutside
               showobject_withtransition FramePlaylist slidefromtop
               FILLLISTWITHMEDIAPLAYLISTFILES PlaylistListview1
               SETSELECTEDLISTITEMNUM PlaylistListview1 %currpl_curritemnum%
               refreshscrollarrows PlaylistListview1 ImagePlaylist_Up ImagePlaylist_Down
             </EVENTACTION>
           </EVENTCOMMAND>
    
           <OBJECTS>
    
    
             <OBJECT>
               <TYPE>IMAGE</TYPE>
               <NAME>ImageMainPlaylist</NAME>
               <WIDTH>70%</WIDTH>
               <HEIGHT>70%</HEIGHT>
               <POSX>15%</POSX>
               <POSY>5%</POSY>
               <IMGFILENAME>%skin_ImagePath%\Media_PlayList.PNG</IMGFILENAME>
               <BACKCOLOR>0,0,0,0</BACKCOLOR>
               <BORDERSTYLE>None</BORDERSTYLE>
               <BORDERCOLOR>0,0,0,0</BORDERCOLOR>
               <FRAMESTYLE>False</FRAMESTYLE>
    
               <EVENTCOMMAND>
                 <EVENTNAME>MOUSEDOWN</EVENTNAME>
                 <EVENTACTION>
                   RaiseObjectEvent TileMainPlaylist MOUSEDOWN
                 </EVENTACTION>
               </EVENTCOMMAND>
    
               <EVENTCOMMAND>
                 <EVENTNAME>MOUSEUP</EVENTNAME>
                 <EVENTACTION>
                   RaiseObjectEvent TileMainPlaylist MOUSEUP
                 </EVENTACTION>
               </EVENTCOMMAND>
    
             </OBJECT>
    
             <OBJECT>
               <TYPE>LABEL</TYPE>
               <NAME>LabelMainPlaylist</NAME>
               <WIDTH>90%</WIDTH>
               <HEIGHT>20%</HEIGHT>
               <POSX>5%</POSX>
               <POSY>80%</POSY>
    
               <BACKCOLOR>0,0,0,0</BACKCOLOR>
               <FONTNAME>%skin_FntTxt%</FONTNAME>
               <FONTBOLD>True</FONTBOLD>
               <FORECOLOR>%skin_clrWordyFore%</FORECOLOR>
               <TEXTALIGN>BOTTOMCENTER</TEXTALIGN>
               <TEXT>Playlist</TEXT>
    
               <EVENTCOMMAND>
                 <EVENTNAME>MOUSEDOWN</EVENTNAME>
                 <EVENTACTION>
                   RaiseObjectEvent TileMainPlaylist MOUSEDOWN
                 </EVENTACTION>
               </EVENTCOMMAND>
               
               <EVENTCOMMAND>
                 <EVENTNAME>MOUSEUP</EVENTNAME>
                 <EVENTACTION>
                   RaiseObjectEvent TileMainPlaylist MOUSEUP
                 </EVENTACTION>
               </EVENTCOMMAND>
    
             </OBJECT>
    
             
    
    
           </OBJECTS>
           
         </OBJECT>
    Last edited by ClockWorK; 06-08-2013 at 05:30 PM.

Page 4 of 8 FirstFirst 12345678 LastLast

Similar Threads

  1. Traffic Cams International v1.3.0 (1.4 Beta available)
    By Enforcer in forum Other Cool Stuff
    Replies: 681
    Last Post: 02-13-2011, 10:48 AM
  2. Traffic Cams
    By astrapc in forum CF Plugins
    Replies: 1
    Last Post: 01-21-2008, 09:42 PM
  3. have RR??? Want Traffic cams??? Check here
    By Sonicxtacy02 in forum RR Plugins No Longer Supported
    Replies: 104
    Last Post: 07-10-2007, 03:29 PM
  4. US Traffic Cams 1.0 Beta
    By Enforcer in forum Other Cool Stuff
    Replies: 23
    Last Post: 04-22-2007, 11:10 PM
  5. Live traffic/traffic cams
    By thanatos106 in forum FrodoPlayer
    Replies: 9
    Last Post: 10-15-2006, 10:42 AM

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
  •