Jump to content
Pulseway 9.14 🔥

Featured Replies

Posted

Basically I'm trying to make (for now) just a services viewer app!

I have some success with:

 public override Groups GetAdditionalComputerDetails()

{

Groups container = new Groups(); // Group of "Group" types.

Group mainGroup = new Group("Services"); // Group of "SimpleItem" / "CommandItem" / "PageItem" with the title Simple Plugin.


ServiceController[] services = ServiceController.GetServices();

foreach (ServiceController service in services)

{

SimpleItem thisitem = new SimpleItem(service.DisplayName.ToString() + ":", service.Status.ToString());

mainGroup.Items.Add(thisitem);

}

container.Add(mainGroup); // Adding the mainGroup Group to Groups container.

return container; // Returning our Groups container to Mobile PC Monitor.

}
However, this obviously fills the plugin section when viewing. I really cant work how to get a sub page! I have;

title (Services)

-

[*]service 1

[*]service 2

[*]etc...
I want;

title (Servers)

-

one page (View/change services)

-

[*]service 1

[*]service 2

[*]etc...

If anyone can help me understand, would be brilliant!

Thanks,

Ollie

Hi Ollie,

If you download the .NET client plugin example from http://www.mobilepcm.../netplugins.zip

And see in the ComputerDetails.cs file, you will find a good example on creating mulitple pages and also commands to be executed.

If you still have questions after, just let me know. :)

  • Administrators

Hello,

I've created an example based on your code to see how creating dinamic pages can be done by using a List's index. On more complex plugins you can see that I've used a number to contain multiple ids that fit my needs (check my StoreGrid plugin).

If you have any questions please let me know!

Good Luck :lol: ,

Paul.

ServiceViewPlugin.zip

Create an account or sign in to comment