Chat LIVE With Programming Experts! There Are 23 Online Right Now...

Welcome to Dream.In.Code
Become an Expert!

Join 244,303 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 778 people online right now. Registration is fast and FREE... Join Now!




System Manager

2 Pages V  1 2 >  
Reply to this topicStart new topic

System Manager, like Task Manager only Better

gbertoli3
5 Oct, 2008 - 05:49 PM
Post #1

DIC at Heart + Code
Group Icon

Joined: 23 Jun, 2008
Posts: 1,079



Thanked: 23 times
Dream Kudos: 950
My Contributions
Project: System Manager!
I started a new project about a week ago. I called it System Manager. System Manager is a Mini Version of Task Manager. So far I have 7 Tabs. Processes, Windows. Services, Users, and Miscellaneous. Hope to post the Source / App Soon!

Processes:
- View Processes
- View Username
- View Memory Usage(Kilobytes)
Windows:
- View Windows
- View Status(Responding / Not Responding)
Services:
- View Services
- ID
- Description
- Status
Users:
- View all Users
- View Status(Active / Inactive)
- Domain to which the user belongs to.
Drives:
- Letter
- Type
- Description
- Free Space
- Used Space
- Total Space
Drivers:
- Name
- Path
- Description
- Status
- Start Mode
Miscellaneous:
- RAM(Byte, Kilo, Mega, Giga)
- Screen(Width, Height, Resolution)
- System Properties(System Directory, Uptime, Machine Name, Username)
- Mouse Position(X, Y, Position)
- Running(Processes, Threads, Handles)
Menu Items
|File|
-New Process
-Kill Process
-Close
|View|
-Refresh
|Options|
-Run on Startup
-Top Most
|Help|
-About

Screenshots
Attached Image
Attached Image
Attached Image
Attached Image
Attached Image
Attached Image
Attached Image

This post has been edited by gbertoli3: 5 Oct, 2008 - 05:50 PM

User is offlineProfile CardPM
+Quote Post


gbertoli3
RE: System Manager
5 Oct, 2008 - 06:15 PM
Post #2

DIC at Heart + Code
Group Icon

Joined: 23 Jun, 2008
Posts: 1,079



Thanked: 23 times
Dream Kudos: 950
My Contributions
OK Here is the Release both Source & App

Source:
Attached File  System_Manager.zip ( 625.92k ) Number of downloads: 13


Application:
Attached File  System_Manager.zip ( 34.94k ) Number of downloads: 21

User is offlineProfile CardPM
+Quote Post

rudeboyco
RE: System Manager
7 Oct, 2008 - 12:37 PM
Post #3

D.I.C Head
**

Joined: 16 Jul, 2008
Posts: 51


My Contributions
ok i would like to adapt this to my os Called fusionet24 bs. Can i and do you want to be in the development team.
User is offlineProfile CardPM
+Quote Post

gbertoli3
RE: System Manager
7 Oct, 2008 - 02:01 PM
Post #4

DIC at Heart + Code
Group Icon

Joined: 23 Jun, 2008
Posts: 1,079



Thanked: 23 times
Dream Kudos: 950
My Contributions
Are you asking to use this in your Operating System?
User is offlineProfile CardPM
+Quote Post

gabehabe
RE: System Manager
7 Oct, 2008 - 02:20 PM
Post #5

i > u
Group Icon

Joined: 6 Feb, 2008
Posts: 7,381



Thanked: 154 times
Dream Kudos: 2850
Expert In: Lots of things.

My Contributions
Yeah, he is. You never actually mentioned that it's in C#.NET and therefore he most likely thinks it would run on a non-Windows OS.

EDIT:
Just downloaded it. This things actually pretty neat~ good job icon_up.gif

You set up an SF for it?

One thing, I'd quite like to see it with an auto-update, instead of having to refresh it manually.
Why not put it in a thread?
User is offlineProfile CardPM
+Quote Post

gbertoli3
RE: System Manager
7 Oct, 2008 - 02:29 PM
Post #6

DIC at Heart + Code
Group Icon

Joined: 23 Jun, 2008
Posts: 1,079



Thanked: 23 times
Dream Kudos: 950
My Contributions
I suck at threads.
Can you give me an example of using a thread instead of a timer.

No I have not set up a sourceforge project

This post has been edited by gbertoli3: 7 Oct, 2008 - 02:32 PM
User is offlineProfile CardPM
+Quote Post

gabehabe
RE: System Manager
7 Oct, 2008 - 02:44 PM
Post #7

i > u
Group Icon

Joined: 6 Feb, 2008
Posts: 7,381



Thanked: 154 times
Dream Kudos: 2850
Expert In: Lots of things.

My Contributions
Since you want to update a component in your UI, you'll have to use a delegate and invoke the method.

I always have to look at my code to get this right, but I'm gonna give it a go off the top of my head.

Something along the lines of:
csharp
public MainForm() {
Thread thr = new Thread(new ThreadStart(Thread_Method));
}

void Thread_Method() {
this.listBox1.Invoke(new updateListBoxCallBack(updateListBox));
}

public delegate void updateListBoxCallback();
public updateListBox() {
// update it in here
}


EDIT: You might also find baavgai's JobQueue class useful~ I use it more than threads. Check the C# snippets. smile.gif
User is offlineProfile CardPM
+Quote Post

gbertoli3
RE: System Manager
7 Oct, 2008 - 02:45 PM
Post #8

DIC at Heart + Code
Group Icon

Joined: 23 Jun, 2008
Posts: 1,079



Thanked: 23 times
Dream Kudos: 950
My Contributions
OK Thanks but how does it know to update the listview?
User is offlineProfile CardPM
+Quote Post

gabehabe
RE: System Manager
7 Oct, 2008 - 02:52 PM
Post #9

i > u
Group Icon

Joined: 6 Feb, 2008
Posts: 7,381



Thanked: 154 times
Dream Kudos: 2850
Expert In: Lots of things.

My Contributions
This is similar to what I do in both my main applications:
csharp
// since you're checking if it already exists, let's store the contents of the listbox in an array.
String [] current; // contains the current contents of your listbox
String [] temp; // stores the NOW contents of what's going on
// (use to determine whether it's different to the current contents)
// it's up to you to populate it, just loop through your listbox. (I'll show you where)

public MainForm() {
Thread thr = new Thread(new ThreadStart(Thread_Method));
// populate current with the contents of your listbox, after it's been filled for the first time
}

void Thread_Method() {
// run a check to get all the NOW events
// pseudocode:
if (current != temp) // if it's changed, then we should update it
this.listBox1.Invoke(new updateListBoxCallBack(updateListBox));
}

public delegate void updateListBoxCallback();
public updateListBox() {
// update it in here
}


EDIT:
Oh yah, BTW, in cays ur wundrin:
X-Twitter uses a thread to check if there's been an update, if there has, it adds it to the friend updates panel
The Snippet Manager uses the same principal to check for updates for the Clipboard Log.

smile.gif
User is offlineProfile CardPM
+Quote Post

gbertoli3
RE: System Manager
7 Oct, 2008 - 02:56 PM
Post #10

DIC at Heart + Code
Group Icon

Joined: 23 Jun, 2008
Posts: 1,079



Thanked: 23 times
Dream Kudos: 950
My Contributions
OK I get it but in the updateListBox() it says it needs to return type. What do I use to return besides the return statement.
User is offlineProfile CardPM
+Quote Post

rudeboyco
RE: System Manager
7 Oct, 2008 - 02:58 PM
Post #11

D.I.C Head
**

Joined: 16 Jul, 2008
Posts: 51


My Contributions
oh bummer is there a chance me and you could make a copy for my os
User is offlineProfile CardPM
+Quote Post

gbertoli3
RE: System Manager
7 Oct, 2008 - 03:00 PM
Post #12

DIC at Heart + Code
Group Icon

Joined: 23 Jun, 2008
Posts: 1,079



Thanked: 23 times
Dream Kudos: 950
My Contributions
@rudeboyco:
What Language would you like it in?

This post has been edited by gbertoli3: 7 Oct, 2008 - 03:00 PM
User is offlineProfile CardPM
+Quote Post

gabehabe
RE: System Manager
7 Oct, 2008 - 03:01 PM
Post #13

i > u
Group Icon

Joined: 6 Feb, 2008
Posts: 7,381



Thanked: 154 times
Dream Kudos: 2850
Expert In: Lots of things.

My Contributions
DAMMIT my connection went while I tried posting and I lost it.

I only missed the void keyword. My bad.

And if that works, I'll be happy. I wrote it in the fast reply box right here. cool.gif

User is offlineProfile CardPM
+Quote Post

gbertoli3
RE: System Manager
7 Oct, 2008 - 03:07 PM
Post #14

DIC at Heart + Code
Group Icon

Joined: 23 Jun, 2008
Posts: 1,079



Thanked: 23 times
Dream Kudos: 950
My Contributions
OK Thanks
User is offlineProfile CardPM
+Quote Post

gabehabe
RE: System Manager
7 Oct, 2008 - 03:11 PM
Post #15

i > u
Group Icon

Joined: 6 Feb, 2008
Posts: 7,381



Thanked: 154 times
Dream Kudos: 2850
Expert In: Lots of things.

My Contributions
Did that help? wink.gif

(Or haven't you used it?)
User is offlineProfile CardPM
+Quote Post

gbertoli3
RE: System Manager
7 Oct, 2008 - 03:13 PM
Post #16

DIC at Heart + Code
Group Icon

Joined: 23 Jun, 2008
Posts: 1,079



Thanked: 23 times
Dream Kudos: 950
My Contributions
I don't know I'm still modifying it. Here is what I have so far
csharp

ListView.ListViewItemCollection current;
String temp;

public void Thread_Method()
{
ListView[] lists = { processListView, windowListView, servicesListView, usersListView, drivesListView, driversListView };
System.Diagnostics.Process[] processes = System.Diagnostics.Process.GetProcesses();
for (int i = 0; i < lists.Length; i++)
{
if (current[i].Text != temp)
{
foreach (ListView list in lists)
{
list.Invoke(new updateListViewCallback(updateListView));
}
}
}
}

public delegate void updateListViewCallback();

public void updateListView()
{
GetProcesses();
GetWindows();
GetServices();
GetUsers();
GetDrives();
GetDrivers();
}


I am trying to make it so it will update all of the listViews
User is offlineProfile CardPM
+Quote Post

gabehabe
RE: System Manager
7 Oct, 2008 - 03:15 PM
Post #17

i > u
Group Icon

Joined: 6 Feb, 2008
Posts: 7,381



Thanked: 154 times
Dream Kudos: 2850
Expert In: Lots of things.

My Contributions
EDIT: Doesn't matter. Ignore me.
User is offlineProfile CardPM
+Quote Post

gbertoli3
RE: System Manager
7 Oct, 2008 - 03:16 PM
Post #18

DIC at Heart + Code
Group Icon

Joined: 23 Jun, 2008
Posts: 1,079



Thanked: 23 times
Dream Kudos: 950
My Contributions
I was thinking that it could be the item text.

What do you think would be the best way?
User is offlineProfile CardPM
+Quote Post

gabehabe
RE: System Manager
7 Oct, 2008 - 03:51 PM
Post #19

i > u
Group Icon

Joined: 6 Feb, 2008
Posts: 7,381



Thanked: 154 times
Dream Kudos: 2850
Expert In: Lots of things.

My Contributions
Just go for what seems right to you.

This is where I struggle with helping people, because a lot of my code is non-standard~ I tend to find my own way to do things, instead of going by the "regular" stuff.

At the end of the day, it's your code. Go for what seems right to you, then start looking into performance stuff afterwards. It's the best way to learn. smile.gif
User is offlineProfile CardPM
+Quote Post

gbertoli3
RE: System Manager
7 Oct, 2008 - 04:06 PM
Post #20

DIC at Heart + Code
Group Icon

Joined: 23 Jun, 2008
Posts: 1,079



Thanked: 23 times
Dream Kudos: 950
My Contributions
Since I no nothing about Threads I used a Timer.

I have it so you can choose either 1, 5, or 10 Minutes to Update.
User is offlineProfile CardPM
+Quote Post

2 Pages V  1 2 >
Fast ReplyReply to this topicStart new topic

Time is now: 7/4/09 06:04PM

Live Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month