Click here to Skip to main content
15,896,453 members
Home / Discussions / C#
   

C#

 
QuestionHow can i know what is the bitmap color size of each pixel ? Pin
Yanshof10-Nov-10 20:17
Yanshof10-Nov-10 20:17 
AnswerRe: How can i know what is the bitmap color size of each pixel ? Pin
David Ewen10-Nov-10 21:31
professionalDavid Ewen10-Nov-10 21:31 
AnswerRe: How can i know what is the bitmap color size of each pixel ? Pin
_Erik_11-Nov-10 1:46
_Erik_11-Nov-10 1:46 
Questionhow to generate toolstrip like glossy sky blue color for my forms back color? Pin
Tridip Bhattacharjee10-Nov-10 18:58
professionalTridip Bhattacharjee10-Nov-10 18:58 
QuestionDetecting display setting change like dual display ,resolution change etc. Pin
HalliHaida10-Nov-10 18:26
HalliHaida10-Nov-10 18:26 
AnswerRe: Detecting display setting change like dual display ,resolution change etc. Pin
Luc Pattyn10-Nov-10 23:37
sitebuilderLuc Pattyn10-Nov-10 23:37 
AnswerRe: Detecting display setting change like dual display ,resolution change etc. Pin
_Erik_11-Nov-10 0:05
_Erik_11-Nov-10 0:05 
QuestionNo problem.. just more of "What would you do" question.. Pin
Jacob D Dixon10-Nov-10 11:14
Jacob D Dixon10-Nov-10 11:14 
I'm working on one of my first client/server applications. Now my idea is the clients will checkin to the server every 30-60 seconds. When the agent first contacts the server, the server will query the database for "pending actions" (that are placed in there by a control center application), and return those to the client.

So:
Client connects to server (every 60 seconds or so)
Server queries database for actions
Server returns action
Client performs action
Client returns data to server
Server stores updated data in database

Now what I'm doing is passing a serialized object:
[Serializable]
    public class Operations
    {
        [Flags]
        public enum Tasks
        {
            NULL = 0,
            CHECKIN = 1,
            UPDATE_SERVICES = 2,
            UPDATE_PROCESSES = 3,
            UPDATE_SOFTWARE = 4,
            UPDATE_PRINTERS = 5,
            UPDATE_DEVICES = 6,
            UPDATE_DRIVES = 7,
            UPDATE_SYSTEMBOARD = 8,
            UPDATE_COMPUTERINFO = 9,

            GET_SERVICES = 10,
            GET_PROCESSES = 11,
            GET_SOFTWARE = 12,
            GET_PRINTERS = 13,
            GET_DEVICES = 14,
            GET_DRIVES = 15,
            GET_SYSTEMBOARD = 16,
            GET_COMPUTERINFO = 17,
            GET_ALL_DATA = 18,

            REGISTER_AGENT = 19
        }

        public int AgentId { get; set; }
        public int AgentLocation { get; set; }
        public string Netbios { get; set; }

        public Tasks Task { get; set; }
        public ComputerInfo ComputerInfo { get; set; }
        public SystemBoard SystemBoard { get; set; }
        public Processes[] Processes { get; set; }
        public IPAddress[] IpAddresses { get; set; }
        public Services[] Services { get; set; }
        public DiskDrive[] DiskDrives { get; set; }
    }


So the client has access to this info as well. So what it does it populate that information. (If the client sets the TASK to UPDATE_SERVICES the client only populates the Services[] array.. not all of the information is populated each time fyi)

Now before I sent or receive I Serialize and Deserialize each side:
IFormatter formatter = new BinaryFormatter();
Operations[] ops (Operations[])formatter.Deserialize(state.ms);


BTW this works fine.. just wondering if its the CORRECT or a GOOD way of doing it.
AnswerRe: No problem.. just more of "What would you do" question.. Pin
_Erik_11-Nov-10 0:44
_Erik_11-Nov-10 0:44 
GeneralRe: No problem.. just more of "What would you do" question.. Pin
Jacob D Dixon11-Nov-10 3:58
Jacob D Dixon11-Nov-10 3:58 
GeneralRe: No problem.. just more of "What would you do" question.. Pin
_Erik_12-Nov-10 3:14
_Erik_12-Nov-10 3:14 
GeneralRe: No problem.. just more of "What would you do" question.. Pin
Jacob D Dixon12-Nov-10 5:30
Jacob D Dixon12-Nov-10 5:30 
GeneralRe: No problem.. just more of "What would you do" question.. Pin
_Erik_12-Nov-10 6:01
_Erik_12-Nov-10 6:01 
GeneralRe: No problem.. just more of "What would you do" question.. Pin
Jacob D Dixon12-Nov-10 11:30
Jacob D Dixon12-Nov-10 11:30 
GeneralRe: No problem.. just more of "What would you do" question.. Pin
Jacob D Dixon14-Nov-10 14:23
Jacob D Dixon14-Nov-10 14:23 
GeneralRe: No problem.. just more of "What would you do" question.. Pin
_Erik_15-Nov-10 3:33
_Erik_15-Nov-10 3:33 
QuestionMonitor the phone state Pin
hoi110-Nov-10 10:39
hoi110-Nov-10 10:39 
Questionsending arguments to "Save As" Dialog box Pin
igalep13210-Nov-10 4:31
igalep13210-Nov-10 4:31 
AnswerRe: sending arguments to "Save As" Dialog box Pin
musefan10-Nov-10 5:56
musefan10-Nov-10 5:56 
AnswerRe: sending arguments to "Save As" Dialog box Pin
Richard MacCutchan10-Nov-10 6:19
mveRichard MacCutchan10-Nov-10 6:19 
GeneralRe: sending arguments to "Save As" Dialog box Pin
igalep13210-Nov-10 10:09
igalep13210-Nov-10 10:09 
GeneralRe: sending arguments to "Save As" Dialog box Pin
Richard MacCutchan10-Nov-10 22:36
mveRichard MacCutchan10-Nov-10 22:36 
GeneralRe: sending arguments to "Save As" Dialog box Pin
igalep13210-Nov-10 22:49
igalep13210-Nov-10 22:49 
GeneralRe: sending arguments to "Save As" Dialog box Pin
Richard MacCutchan11-Nov-10 1:19
mveRichard MacCutchan11-Nov-10 1:19 
GeneralRe: sending arguments to "Save As" Dialog box Pin
igalep13211-Nov-10 4:31
igalep13211-Nov-10 4:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.