Jump to content
LaunchBox Community Forums

Grila's Custom BigBox Controls


Recommended Posts

Grila's Custom BigBox Controls

View File
  • Update 7/2/2019: The SlimDX library was replaced with the SharpDX library because SlimDX hasn't been updated since 2012. Hopefully this will alleviate any of the problems with the plugin not working. @Jason Carr@viking, @shro2016 and anyone else I missed. 

A few custom controls to add extra functionality to BigBox themes. Read the documentation included in the download.

1.thumb.png.da0e76b2878056738b46fee7e501f22e.png2.thumb.png.ea3918afaa8e5dd669b063aaebf0e2f3.png

Install:
Place GrilaBBControlsPlugin.dll and SlimDX.dll SharpDX.dll and SharpDX.XInput.dll in either LaunchBox\Plugins or the plugins folder of a specific theme


Initialize:
Open a new or existing BigBox theme in Visual Studio and add a reference to the project. Browse to the directory you copied the files to in the first step and select GrilaBBControlsPlugin.dll.


Define:
In any views you wish to utilize the controls, add the plugin to the namespace.
Ex. xmlns:g="clr-namespace:GrilaBBControlsPlugin;assembly=GrilaBBControlsPlugin"


Use:
Use like any other element by prefixing the namespace defined in the previous step (a quick selection box should appear after typing the namespace prefix) and select the desired control.


Customize:
There are exposed properties for most of the controls that allow the user to customize their appearance as they wish. Below is a list of all available properties that can be changed:


GrilaTime – a more customizable version of the built-in time control:
•    Any normal TextBlock options like foreground, font family, font style, etc.
•    GrilaTimeFormat is a string defining the DateTime format. Default is set to “h:mm tt” for 12 hour time with AM/PM indicators and no date. Set this however you wish to get the info you want. Good examples of DateTime formats can be found here: https://msdn.microsoft.com/en-us/library/8kb3ddd4(v=vs.110).aspx


GrilaPowerStatus – shows device power status, battery charge status, and battery level
•    GrilaBatteryBorderColor – the color of the battery outline (default Black)
•    GrilaBatteryBorderThickness – the width of the battery outline (default 15)
•    GrilaBatteryCornerRadius – the radius of the battery corners (default 5)
•    GrilaBatteryProgressForeground – the color of the battery level progress bar (default Lime)
•    GrilaBatteryProgressBackground – the background color of the battery level progress bar (default #111111)
•    GrilaBatteryProgressMargin – the margin between the battery outline and the battery level progress bar (default 0)
•    GrilaChargeIconForeground – the color of the charging symbol when the battery is charging (default BatteryOutlineBorderColor)
•    GrilaPlugIconForeground – the color of the plug symbol when the device has no battery (desktop system) (default BatteryOutlineBorderColor)


GrilaControllerStatus – shows the connection state and battery level (if wireless) for up to 4 xinput controllers
•    GrilaControllerColor – the color of the controller(s) (default Black)
•    GrilaControllerLightOnColor – the color of the charge level indicator lights when on (default Lime)
•    GrilaControllerLightOffColor – the color of the charge level indicator lights when off (default Black)
 


 

  • Like 9
Link to comment
Share on other sites

  • 1 month later...
  • 4 weeks later...

I can but it's not a quick change. All the elements in my control pack are pure XAML, no png or jpg. The reason I went this route was so they could scale up and down indefinitely, without losing quality. Give me a few days and I'll see if I can get it added.

Sent from my Pixel XL using Tapatalk

Link to comment
Share on other sites

On that note, if you're debugging a control that uses slimdx, the lib probably needs to be 32 bit because VS debugger runs in 32 bit. I ran into this problem when using slimdx within AO Bigbox Customs. I made my library load either the 32 or 64 bit version of slimdx, based on the current runtime environment; that solved the problem and also allows my library to work for 32 and 64 bit.

This is because slimdx is not truly managed and relies on native 32 and 64 bit libs. You can read about this in the slimdx forums, should come up in a quick Google search. It cannot really support the target "Any" option in .NET. I'm pretty certain about this but @Grila please correct me if I'm wrong.

Link to comment
Share on other sites

  • 2 months later...
4 minutes ago, Exequiel3k said:

Hey all,

I hope I won’t cause any issues asking this off topic question, but what is the theme used in the background (can’t find it in the downloads section)? Looks pretty nice..! 

I am not sure if that is actually a released theme or not. It doesn't look familiar to me at least as one of his released themes. He is always tinkering with themes so it might just be a quick mockup to demonstrate the custom controls he made. Only @Grila would be able to answer that for you.

Link to comment
Share on other sites

  • 1 month later...

@Grila  nice job!! you saved me a lot of time developing a battery status class :-)  2 questions for you....  1) Did you take out GrilaPlugIconForeground ? because I cannot for the life of me get it to work, XAML just sees it as a unrecognized argument.   I use my theme on my desktop and GPD Win 10 and its perfect for the GPD but I don't wish to see the battery status on my desktop.            2) Does your battery class utilize the Battery Aggregate function? (takes into consideration more than 1 battery)

Like I said, this is awesome!

 

Link to comment
Share on other sites

19 minutes ago, y2guru said:

@Grila  nice job!! you saved me a lot of time developing a battery status class :-)  2 questions for you....  1) Did you take out GrilaPlugIconForeground ? because I cannot for the life of me get it to work, XAML just sees it as a unrecognized argument.   I use my theme on my desktop and GPD Win 10 and its perfect for the GPD but I don't wish to see the battery status on my desktop.            2) Does your battery class utilize the Battery Aggregate function? (takes into consideration more than 1 battery)

Like I said, this is awesome!

 

1. I just checked and it's there. The plug icon shows when BatteryChargeStatus.NoSystemBattery is returned. If you want I can make you a custom version that hides the plug for systems that don't have a battery. That will have to wait until Monday at least since my dev files are on my work computer and I don't go to the office on Fridays. 

2. The control utilizes the SystemInformation.PowerStatus class (https://msdn.microsoft.com/en-us/library/system.windows.forms.powerstatus(v=vs.110).aspx). I don't think it has aggregate support, but I may be wrong. I think the UWP class has the aggregate support.

Edited by Grila
wrong link
Link to comment
Share on other sites

1.  you are awesome if you could make that change, otherwise I can just clone my view and remove the battery.. either way is cool, I wouldn't go out of the way for me :-)

2. I was just curious as I had an example stored away ready for me to code this weekend, but I stumbled on your post and saw that you had already developed and uploaded a dll :-)

why re-invent the wheel !

 

figured I would attach my work in progress as I am after all using your .dll !  and a modified Critical Zone - Blue Box, @CriticalCid @eatkinola - yes guys I've still been working on my theme! and it has been driving my wife nuts.image1.thumb.jpeg.f765cd386cdce06ff861f4745974b5d3.jpeg

 

 

 

image2.jpeg

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...