Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us
topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • December 05, 2016, 10:39:23 AM
  • Proudly celebrating 10 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Last post Author Topic: A plugin based information bar in Windows  (Read 33554 times)

fenixproductions

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 1,184
    • View Profile
    • Donate to Member
Re: A plugin based information bar in Windows
« Reply #50 on: October 29, 2008, 03:10:51 AM »
I am waiting for:
- ability to change bar's background colour,
- buttons alignment or static / dynamic spacing,
- simple plugin with source code or some kind of API.

Is it possible / available now?

jake78

  • Supporting Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 48
    • View Profile
    • Donate to Member
Re: A plugin based information bar in Windows
« Reply #51 on: October 29, 2008, 03:29:22 AM »
@mouser:
The default settings in the plugin are 'none' for all options.
I know that some timezones have the weekday baked in to the default value. I can look in to this and see if I can get a fix working.

@fenixproductions:
- I have been thinking of letting users change background. It is on my todo list.
- I was considering custom alignment when building the plugins, but I thought it might be too many settings for the casual user. I might setup an advanced mode of some sort. I'll add it to my list as well. (keep in mind that alignment is limited to what the normal .NET toolstrip can do, which is left or right aligned.) Re-ordering of the plugins is possible in the plugin manager.
- Source code for the plugins will come once all changes to the plugin structure are done.

fenixproductions

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 1,184
    • View Profile
    • Donate to Member
Re: A plugin based information bar in Windows
« Reply #52 on: October 29, 2008, 03:20:55 PM »
2jake78
@fenixproductions:
- I was considering custom alignment when building the plugins, but I thought it might be too many settings for the casual user. I might setup an advanced mode of some sort. I'll add it to my list as well. (keep in mind that alignment is limited to what the normal .NET toolstrip can do, which is left or right aligned.) Re-ordering of the plugins is possible in the plugin manager.

What about skipping toolstrip control for panel instead? Did you consider such possibility?

With panel and good written API it could be even more flexible. Like in some of the messy examples I sent you: developers could code their own controls and your bar would manage them (without toolstrip magic). It would be easier to put there almost everything (starting with some resource monitoring graphs, through pop-up menu buttons, ending with music players, simple DX games or Flash animations embedded inside WebBrowser ;)). Only available RAM could stop imagination.

Bah! There are so many CodeProject tutorials and examples that even I could move my 4 letters and write few plugins...
« Last Edit: October 29, 2008, 03:24:43 PM by fenixproductions »

jake78

  • Supporting Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 48
    • View Profile
    • Donate to Member
Re: A plugin based information bar in Windows
« Reply #53 on: October 29, 2008, 03:32:33 PM »
To be honest, when I first conceived the idea... it wasn't meant to be as big as it has become. And to rewrite it at this point would take a lot of time. I have considered moving over to WPF for the next big version, I have done some tests and it looks promising except the windows API for setting the bar as reserved space doesn't quite work yet. But with WPF, you can basically do whatever you want in the given space.

But I will definitely consider changing it to a panel or something similar.

fenixproductions

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 1,184
    • View Profile
    • Donate to Member
Re: A plugin based information bar in Windows
« Reply #54 on: October 29, 2008, 03:37:05 PM »
2jake78
Thank you for your answer. I hope coding it will be as much enjoyable for you as waiting for final for me :).

jake78

  • Supporting Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 48
    • View Profile
    • Donate to Member
Re: A plugin based information bar in Windows
« Reply #55 on: November 06, 2008, 01:33:45 AM »
I have just ported it and it now works with any .NET control, not just the toolstrip controls.
To be honest I haven't tested all controls, but they SHOULD all work ;-) ...

It's also now possible to change color and set an optional image background. If a color is set, it's also possible to set the transparency of the background.

I now have 3 plugins to complete before I upload a new version.

The creation of plugins have been simplified a lot, minimal code is needed. Once I'm done with the port, I'll upload the code that is necessary to try it out.

jake78

  • Supporting Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 48
    • View Profile
    • Donate to Member
Re: A plugin based information bar in Windows
« Reply #56 on: November 30, 2008, 12:53:19 AM »
Hey guys, I was gonna release this version on Thanksgiving but my hard-drive failed and I had to start a restore and re-create code that was not in the backup. And because of this, the plugin code will be slightly delayed.

I have placed the plugins within their own subdirectory to sort out dependency files.

It is now possible to cycle through display modes in the Event Progress.
To change background of the host, right-click on the bar and go to 'Settings'.


I hope everything will work smoothly, as it is a major re-write there is always the possibility for bugs.


http://www.nordicfx....;id=29&Itemid=23
« Last Edit: November 30, 2008, 01:07:02 AM by jake78 »

jake78

  • Supporting Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 48
    • View Profile
    • Donate to Member
Re: A plugin based information bar in Windows
« Reply #57 on: May 20, 2009, 09:35:58 PM »
I apologize for not updating for a very long time... I just finished my exams so now I have some more time.

I have released a new version of Topbar which includes a new weather plugin. At this moment it only displays current conditions but will soon include forecasts as well. Left click on the temperature display to get a tooltip.

I have also added a visual alert for the event progress when the timer reaches zero.

Head over to http://www.nordicfx.com/topbar/ and download it. Let me know if you have any problems or suggestions.
« Last Edit: May 21, 2009, 07:29:01 PM by jake78 »

fenixproductions

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 1,184
    • View Profile
    • Donate to Member
Re: A plugin based information bar in Windows
« Reply #58 on: May 21, 2009, 05:25:24 AM »
2jake78

1. Right mouse click on topbar -> menu with blurry items,
2. "Plugins manager" -> fonts looks strange but it's hard to describe what is wrong with them :(
3. Maximum size of TextBox in PM is limited to columns width. Wouldn't it be better to give max. width at the beginning? I had thought something went wrong with GUI until I realized it resizes automatically on typing.
4. Launcher plugin -> loading folder sometimes kills explorer.exe process here just after closing its opened window,
5. Launcher plugin -> it would be nice to have folders with "browse" feature (you can add single folder, select proper checkbox and… have all subfolders as submenus),
6. clicking on "Information" icon in top left corner gives nothing,
7. it would be nice to have right "Close" icon as plugin (just to switch it off),
8. "down arrows" (next to Information and Close) do nothing,
9. alignment option would be nice - that way I could have some information shown on right,
10. no plugins SDK :(

jake78

  • Supporting Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 48
    • View Profile
    • Donate to Member
Re: A plugin based information bar in Windows
« Reply #59 on: May 21, 2009, 07:32:15 PM »
1. Are you running Windows XP? The tests I have done on an XP shows that text is slightly darker than on Vista. That's about it, not blurry. Would you mind sending me a screenshot?

2. Most likely the same issue as number 1.

3. Do you mean give the textbox max width of the column? I can look into it.

4. That's not something I have seen in my tests. After the window is open it has no connection to explorer.exe. It sounds to me that there is something else going on in your system.

5. That would be nice, I'll add it to my list.

6. The icon on the left isn't supposed to do anything except give you space to access the bar context menu if the bar is full of plugins, plus when you want to move the bar to another monitor you click and drag the icon.

7. You mean a plugin that would close Topbar? It's on the list.

8. The 'down arrows' gets enabled when the bar is full, the plugins will be located in a dropdown menu.

9. That is on my list.

10. As I mentioned in an earlier post, that code was destroyed because of a hard-drive crash and I haven't had time yet to re-create it.

Thank you for your comments!

fenixproductions

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 1,184
    • View Profile
    • Donate to Member
Re: A plugin based information bar in Windows
« Reply #60 on: May 21, 2009, 08:20:00 PM »
1 & 2.

I have XP SP3 here and it seems like ClearType problem for me.

toptoolbar.PNGA plugin based information bar in Windows

3. Yes. This is what I meant.

4. Strange. It does not happen now but I could reproduce it yesterday (no matter with or without restart).

6 & 8. OK. Now I understand.

7. No. I mean red icon in top right corner which allows to shutdown / hibernate / etc. my system. I have no need for icon which could be used by me only for shutdown once per day. Currently it's not a problem because there are not so many plugins but these 16px of space can be used differently later (especially when alignment will be implemented).

10. Will wait then (or put it through Reflector) :)

jake78

  • Supporting Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 48
    • View Profile
    • Donate to Member
Re: A plugin based information bar in Windows
« Reply #61 on: May 23, 2009, 05:49:17 PM »
I have uploaded a new version (http://www.nordicfx.com/topbar/)
  • New shutdown plugin (the old shutdown icon is gone)
  • Fixed column width in the plugin manager
  • You can choose basic alignment of the plugins, this feature will evolve and get more intuitive ... I just wanted to get it usable for the moment

Here's an empty plugin to play with (both C# and VB): http://www.nordicfx....bar/TopbarPlugin.zip
It needs the plugininterface.dll as a reference.
Keep other 3rd party dependencies together with the plugin.
The plugin file should have the file extension .top
Maximum height of the plugin should not exceed 18 pixels.
There is a property called auxVar which is for future uses.

To show a notification in the host use:
C#: ojbHost.showPopupNotification(string header, string mainMessage, string moduleText)
VB: ojbHost.showPopupNotification(ByVal header As String, ByVal mainMessage As String, ByVal moduleText As String)


I would love to see what you guys can come up with. Keep in mind that the plugin structure might change during version updates, but I will let you know beforehand.

fenixproductions

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 1,184
    • View Profile
    • Donate to Member
Re: A plugin based information bar in Windows
« Reply #62 on: May 23, 2009, 06:44:48 PM »
2jake78
Thanks for an update. I will play with it soon.

Works nicely but I have few more suggestions for showPopupNotification:
- timeout (hide it after that),
- position (bar center, or close to plugin control),
- MouesOut hiding.

As for ideas: I've got too many of these ;)
« Last Edit: May 23, 2009, 07:19:22 PM by fenixproductions »

jake78

  • Supporting Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 48
    • View Profile
    • Donate to Member
Re: A plugin based information bar in Windows
« Reply #63 on: May 25, 2009, 01:14:51 AM »
I have added some new settings to control the popup notification, you can now associate an optional audio alert and also an optional auto-hide.
I'm working on the alert positioning, still not sure how to get the location of the plugin from the host. The showPopupNotification will change ever so slightly because of these changes.

I'm now working on a new plugin, 'Web Services', which is basically a simple web browser in a window. Quick search WolframAlpha, Wikipedia and Nice Translator... without opening a browser.

I will probably upload a new update tomorrow.

jake78

  • Supporting Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 48
    • View Profile
    • Donate to Member
Re: A plugin based information bar in Windows
« Reply #64 on: May 25, 2009, 03:55:27 PM »
I have uploaded the latest version with the changes I mentioned in my previous post.

The new syntax for showPopupNotification is:
C#: ojbHost.showPopupNotification(string header, string mainMessage, string moduleText, PlugInInterface.Declarations.alertType alertType)
VB: ojbHost.showPopupNotification(ByVal header As String, ByVal mainMessage As String, ByVal moduleText As String, Optional ByVal alertType As alertType)

The alertType is an enumeration in PlugInInterface.Declarations.

jake78

  • Supporting Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 48
    • View Profile
    • Donate to Member
Re: A plugin based information bar in Windows
« Reply #65 on: May 31, 2009, 05:42:55 PM »
I uploaded v0.2.0.4 and I'm really happy with the update on this one.
The background color of the event progress bar changes depending on the percentage.
0% = Green
50% = Orange
100% = Red

Topbar.jpg

http://www.nordicfx.com/topbar

fenixproductions

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 1,184
    • View Profile
    • Donate to Member
Re: A plugin based information bar in Windows
« Reply #66 on: May 31, 2009, 05:50:35 PM »
2jake78

I've tried to create something by my own but switching from WinForms to WPF is little painful to me (especially creating own controls with PictureBox). Do you have some links you can recommend?

I know Google might have them but currently my thinking process is too much "WF related" so writing anything looks more like "hunt for bugs" instead of fun :( I have many ideas but I am getting impatient too soon with these problems.
« Last Edit: May 31, 2009, 05:52:10 PM by fenixproductions »

jake78

  • Supporting Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 48
    • View Profile
    • Donate to Member
Re: A plugin based information bar in Windows
« Reply #67 on: May 31, 2009, 05:58:46 PM »
Yeah, I had issues going from WF to WPF at first... but now I don't want to go back.

I can probably help you, let me know what you are trying to do with the picturebox or Image in WPF.

You can use WindowsFormsHost to host WF controls, but I've had display issues with it. It's sort of a wrapper.

fenixproductions

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 1,184
    • View Profile
    • Donate to Member
Re: A plugin based information bar in Windows
« Reply #68 on: May 31, 2009, 06:23:22 PM »
2jake78

I've been trying to create plugin for displaying partitions size information in "battery like style". I had custom control as main one and smaller one for specified disk. Idea was simple: main control reads INI and, according to it, adds as many batteries as needed. It looked nice for fixed number of drives but I had either unknown errors (TopBar was just switching off without any notice) or "Cannot cast UserControl to Control". There were few more problems when I've wanted to add Timer support to have everything refreshed periodically. I gave up for time being but will try again some day for sure.

I know the problem is not in WPF but in my mind. As far as I understand, such coding attitude is not good for WPF. I should rather create something similar to list and use data binding instead but it means starting with WPF from the very beginning and learning the basics again. Currently: it scares me to do it all over again ;)

Maybe I will focus on writing down all ideas first but I am not sure about that*.

*) OT: My graphic card probably died today. There is the risk that it is OK and mother board is going down instead. Second scenario seems more plausible due to USB port issues (died too) from 3 months ago. What does it mean? If I am right, there is a chance to disappear for couple months from here any time :( I am using integrated GeForce 6100 currently but I have no possibility to figure out what is wrong and I fear the worst.
« Last Edit: May 31, 2009, 06:32:20 PM by fenixproductions »

jake78

  • Supporting Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 48
    • View Profile
    • Donate to Member
Re: A plugin based information bar in Windows
« Reply #69 on: May 31, 2009, 06:52:52 PM »
That shouldn't be too difficult...

In the plugin create a new UserControl, not a Control. In the XAML of the new UserControl you can design your layout with any types of controls that you need. In the code-behind create properties for value, minimum, maximum or whatever you need to pass to the control.

In the plugin, place a WrapPanel which will align the new instances automatically from left to right. Make sure you remove width and height for the WrapPanel and width for the UserControl.
Instantiate a new UserControl and add it as a child in the WrapPanel. If the content is cut off, the play around with Margin on the controls.

Topbar
|
UserControl
|
WrapPanel
|
Instance of battery UserControl

fenixproductions

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 1,184
    • View Profile
    • Donate to Member
Re: A plugin based information bar in Windows
« Reply #70 on: May 31, 2009, 07:00:28 PM »
2jake78
Thank you for this info. I will try to play with it little more.

BTW I thought I've never used just Control while dealing with "my stuff".

jake78

  • Supporting Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 48
    • View Profile
    • Donate to Member
Re: A plugin based information bar in Windows
« Reply #71 on: May 31, 2009, 11:20:52 PM »
When you get it up and running I would love to see a S.M.A.R.T status warning if a hard drive is failing.

Are you planning on having each "battery" as it's own spot on the bar or a dropdown list with bars and the favorite/main drive one the bar?

fenixproductions

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 1,184
    • View Profile
    • Donate to Member
Re: A plugin based information bar in Windows
« Reply #72 on: June 01, 2009, 07:37:12 AM »
I was thinking about something like:

drive.png
or:

drive2.png

with additional info shown after clicking on proper icon.

jake78

  • Supporting Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 48
    • View Profile
    • Donate to Member
Re: A plugin based information bar in Windows
« Reply #73 on: June 01, 2009, 11:05:52 PM »
Looks good, have you started putting it together?

I have managed to put in the feature of recursive directories in Launcher. I have a problem with the icons, once I fix that I will release it. And I'm considering making the recursive directories optional.

matt_man22

  • Honorary Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 11
    • View Profile
    • Donate to Member
Re: A plugin based information bar in Windows
« Reply #74 on: June 02, 2009, 03:40:02 PM »
Hi jake78,

I think this is a cool project and would love to learn more.  Have you thought about making the project open source?  There are several programming features I was always interested in learning like multi-monitor support and a plugin API.  Obviously up to you, but since it is a fun side project, I thought you might be willing.  I'm sure several people on this forum would be able to contribute and help the project along.