Marius Posted December 29, 2011 Posted December 29, 2011 PC Monitor 2.8 adds support for plugins and you will be able to: - display additional custom information in computer details page - run additional custom commands - send notifications The support for plugins is fully implemented in PC Monitor Agent 2.8 and a plugin example is also available for download here: http://www.mobilepcm...oad/netplugins.zip Cptrico and Paul 2
catalin Posted December 31, 2011 Posted December 31, 2011 Great stuff! Attached is screenshot of weather plugin. Marius, Calin and Paul 3
Cptrico Posted January 7, 2012 Posted January 7, 2012 Hi There Is there a list of supported API commands?(have I missed it ). The plugin examples shows that running GetAdditionalComputerDetails() you can show some more information or add buttons to run additional custom commands. Just one question do you have to create the commandItem And SimpleItem first at plugin start-up or can you create/update groups/values dynamiclly. Thinking about creating a plugin the would have a button to retrive som client information, but I will not be sure if it will include 1 result or 5 for that matter and for that it could be great to create SimpelItem dynamiclly for each result returned. If this is not possible, can i just declare all the expected SimpelItem properties and then update the values dynamiclly everytime I run another function by presseing the commandItem. I noticed in the example of the computerDetails that you can update the revocation count automaticlly, by I want it only when i press the button created it for it. Hope my question is clear enough Best Regards //CptRico
Administrators Paul Posted January 8, 2012 Administrators Posted January 8, 2012 Hello, Here is how I would do it. Create a bool variable to represent the current state. Inside the GetComputerDetails have an If statement to separate the two states (false for only one button, true for no button but simpleItems containing your data). Now when the plugin receives the command you only change the state to true and when GetComputerDetails gets called again you will see your computed fields. You can create all items dynamically inside the GetComputerDetails method that gets called every 5 seconds if a client requests it. This means that you can always provide fresh data and you can add / remove items at will based on your code logic. For a list of supported API features just add the client dll in your visual studio project. Extend any class with ClientPlugin interface, fix your usings in order to recognize the interface and right click ClientPlugin and click 'Go To Declaration' or click the text and press F12. You will see a list of all fields and methods you can call / implement. Paul.
Marius Posted January 8, 2012 Author Posted January 8, 2012 @CptRico - You can use both - keep an array of SimpleItems and update their Title/Subtitle or recreate them every time GetAdditionalComputerDetails() is called. If it takes some time to gather the information you want to display in these items I would create a separate thread for data collection in the plugin that updates the array. Then when the GetAdditionalComputerDetails() is called you simply return the items in the array. GetAdditionalComputerDetails is called when the computer details page is opened on a mobile device for that computer - and it's called every 5 seconds. Another method, PluginDataCheck is called every 15 seconds even if no one is looking at the computer details - you can use this method to collect data for your items and even send notifications when a certain condition is met.
Cptrico Posted January 8, 2012 Posted January 8, 2012 Hi Marius & Paul, Thanks for your good ideas and fast replies So now I can continue with the plug-in since I now know what the best practice would be.. Thanks again. Best Regards //CptRico (Johnni)
Marius Posted January 8, 2012 Author Posted January 8, 2012 You're very welcome, please let us know if we can help, will be glad to.
marinhd Posted January 9, 2012 Posted January 9, 2012 Interesting. So I have no idea how to write plugins for this. What type of programmer would I look for to build plugins for me? My interest is in the Backup solution I use for my customers called Vembu. I would love a plugin that alerted me when Customers backups failed... http://www.vembu.com/ Product is Storegrid. API fro my product is: http://www.storegrid.net/docs/storegrid/StoreGrid-WebServices-DG.pdf
Administrators Paul Posted January 9, 2012 Administrators Posted January 9, 2012 (edited) Hello, For building plugins you will require a .NET Based compiler (You can download a free one here). As for the custom plugin I think I can help you with an example (but I don't promise you anything) if you can provide more details, do you want to receive a notification if there is any backup that failed? I will take a look over it and let you know. Also please post questions like this on the forum not on this thread, it makes it look like a Mega Support Thread. Paul. Edited February 6, 2012 by Paul
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now