Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Wrote a cool little tool that saved me ALOT of work

Wrote a cool little tool that saved me ALOT of work

Scheduled Pinned Locked Moved The Lounge
csharpdatabasecomsysadmin
10 Posts 9 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    Harvey Saayman
    wrote on last edited by
    #1

    I'm busy working on an IM client for MXit[^] in my spare time. Now when receiving responses from the server I interpret them and shove the values into the respective classes which are then passed to the front end via an event. There are classes and events for each type of response and I must say its working rather nicely, but its so damn tedious the write these simple classes which are basically just a constructor with get and set blocks. So I quickly threw together an app to do it for me that lets me copy and paste the class into my code :cool: Screen Shot[^] Simple yet effective :)

    Harvey Saayman - South Africa Software Developer .Net, C#, SQL you.suck = (you.Passion != Programming & you.Occupation == jobTitles.Programmer) 1000100 1101111 1100101 1110011 100000 1110100 1101000 1101001 1110011 100000 1101101 1100101 1100001 1101110 100000 1101001 1101101 100000 1100001 100000 1100111 1100101 1100101 1101011 111111

    P B R C A 5 Replies Last reply
    0
    • H Harvey Saayman

      I'm busy working on an IM client for MXit[^] in my spare time. Now when receiving responses from the server I interpret them and shove the values into the respective classes which are then passed to the front end via an event. There are classes and events for each type of response and I must say its working rather nicely, but its so damn tedious the write these simple classes which are basically just a constructor with get and set blocks. So I quickly threw together an app to do it for me that lets me copy and paste the class into my code :cool: Screen Shot[^] Simple yet effective :)

      Harvey Saayman - South Africa Software Developer .Net, C#, SQL you.suck = (you.Passion != Programming & you.Occupation == jobTitles.Programmer) 1000100 1101111 1100101 1110011 100000 1110100 1101000 1101001 1110011 100000 1101101 1100101 1100001 1101110 100000 1101001 1101101 100000 1100001 100000 1100111 1100101 1100101 1101011 111111

      P Offline
      P Offline
      Phil J Pearson
      wrote on last edited by
      #2

      Pretty much, in fact, like a code snippet you could do in VS.

      Phil


      The opinions expressed in this post are not necessarily those of the author, especially if you find them impolite, inaccurate or inflammatory.

      1 Reply Last reply
      0
      • H Harvey Saayman

        I'm busy working on an IM client for MXit[^] in my spare time. Now when receiving responses from the server I interpret them and shove the values into the respective classes which are then passed to the front end via an event. There are classes and events for each type of response and I must say its working rather nicely, but its so damn tedious the write these simple classes which are basically just a constructor with get and set blocks. So I quickly threw together an app to do it for me that lets me copy and paste the class into my code :cool: Screen Shot[^] Simple yet effective :)

        Harvey Saayman - South Africa Software Developer .Net, C#, SQL you.suck = (you.Passion != Programming & you.Occupation == jobTitles.Programmer) 1000100 1101111 1100101 1110011 100000 1110100 1101000 1101001 1110011 100000 1101101 1100101 1100001 1101110 100000 1101001 1101101 100000 1100001 100000 1100111 1100101 1100101 1101011 111111

        B Offline
        B Offline
        blackjack2150
        wrote on last edited by
        #3

        Or you could have just used the code snippets 'class', 'ctor' and 'prop'. That way you only type in the identifier names, just like you do in your custom app. Same time & effort I reckon. I doubt you saved anything at all.

        P 1 Reply Last reply
        0
        • H Harvey Saayman

          I'm busy working on an IM client for MXit[^] in my spare time. Now when receiving responses from the server I interpret them and shove the values into the respective classes which are then passed to the front end via an event. There are classes and events for each type of response and I must say its working rather nicely, but its so damn tedious the write these simple classes which are basically just a constructor with get and set blocks. So I quickly threw together an app to do it for me that lets me copy and paste the class into my code :cool: Screen Shot[^] Simple yet effective :)

          Harvey Saayman - South Africa Software Developer .Net, C#, SQL you.suck = (you.Passion != Programming & you.Occupation == jobTitles.Programmer) 1000100 1101111 1100101 1110011 100000 1110100 1101000 1101001 1110011 100000 1101101 1100101 1100001 1101110 100000 1101001 1101101 100000 1100001 100000 1100111 1100101 1100101 1101011 111111

          R Offline
          R Offline
          ravtos
          wrote on last edited by
          #4

          Or you could use auto implemented properties and object initializers.. saved me a lot of typing recently. Declare your class as: public class Test { public int A { get; set; } public string B { get; set; } } And then initialize your object as: Test t = new Test() { A = 1, B = "test" }; Reference

          A man has got to know his limitations. Harry Callahan

          1 Reply Last reply
          0
          • H Harvey Saayman

            I'm busy working on an IM client for MXit[^] in my spare time. Now when receiving responses from the server I interpret them and shove the values into the respective classes which are then passed to the front end via an event. There are classes and events for each type of response and I must say its working rather nicely, but its so damn tedious the write these simple classes which are basically just a constructor with get and set blocks. So I quickly threw together an app to do it for me that lets me copy and paste the class into my code :cool: Screen Shot[^] Simple yet effective :)

            Harvey Saayman - South Africa Software Developer .Net, C#, SQL you.suck = (you.Passion != Programming & you.Occupation == jobTitles.Programmer) 1000100 1101111 1100101 1110011 100000 1110100 1101000 1101001 1110011 100000 1101101 1100101 1100001 1101110 100000 1101001 1101101 100000 1100001 100000 1100111 1100101 1100101 1101011 111111

            C Offline
            C Offline
            Chris Losinger
            wrote on last edited by
            #5

            i wrote one yesterday that takes one argument on the command line, finds the first top-level window where the window class matches the argument and Posts WM_CLOSE to that window. why? sometimes i accidentally leave Eudora running at home during the day, and it sits there, pulling email messages of EarthLink's server. that means i can't check my mail via Earthlink's webmail - it gets pulled off the server by Eudora at home before I ever see it on webmail. so, i wrote a Eudora filter to look for a specific subject line and body text. if it sees that message, it calls my little app (called "Killa") with "EudoraMainWindow" as the parameter. voila! Eudora kills itself and i can use webmail again. would've been much easier if Eudora had a "close Eudora" filter action....

            image processing toolkits | batch image processing

            P D 2 Replies Last reply
            0
            • C Chris Losinger

              i wrote one yesterday that takes one argument on the command line, finds the first top-level window where the window class matches the argument and Posts WM_CLOSE to that window. why? sometimes i accidentally leave Eudora running at home during the day, and it sits there, pulling email messages of EarthLink's server. that means i can't check my mail via Earthlink's webmail - it gets pulled off the server by Eudora at home before I ever see it on webmail. so, i wrote a Eudora filter to look for a specific subject line and body text. if it sees that message, it calls my little app (called "Killa") with "EudoraMainWindow" as the parameter. voila! Eudora kills itself and i can use webmail again. would've been much easier if Eudora had a "close Eudora" filter action....

              image processing toolkits | batch image processing

              P Offline
              P Offline
              PIEBALDconsult
              wrote on last edited by
              #6

              Here's something similar I have, that was written by a former co-worker:

              C:\JBUTIL>type killwin.c

              #include #include void
              main
              (
              void
              )
              {
              HWND hTemp ;
              HWND hok ;

              while ( 1 )
              {
                  if ( ( hTemp = FindWindow ( NULL , "Messenger Service " ) ) != NULL )
                  {
                      SetActiveWindow ( hTemp ) ;
                      hok = FindWindowEx ( hTemp , NULL , NULL , "OK" ) ;
              
                      SendMessage ( hok , WM\_LBUTTONDOWN , 0 , 0 ) ;
                      SendMessage ( hok , WM\_LBUTTONUP   , 0 , 0 ) ;
              
                      printf ( "." ) ;
                  }
                  else
                  {
                      Sleep ( 100 ) ;
                  }
              }
              

              }

              1 Reply Last reply
              0
              • B blackjack2150

                Or you could have just used the code snippets 'class', 'ctor' and 'prop'. That way you only type in the identifier names, just like you do in your custom app. Same time & effort I reckon. I doubt you saved anything at all.

                P Offline
                P Offline
                peterchen
                wrote on last edited by
                #7

                They say "success is the feeling you have between achieving something and telling a woman about it." By that measure, you are a great woman! ;P

                Don't attribute to stupidity what can be equally well explained by buerocracy.
                My latest article | Linkify!| FoldWithUs! | sighist

                1 Reply Last reply
                0
                • C Chris Losinger

                  i wrote one yesterday that takes one argument on the command line, finds the first top-level window where the window class matches the argument and Posts WM_CLOSE to that window. why? sometimes i accidentally leave Eudora running at home during the day, and it sits there, pulling email messages of EarthLink's server. that means i can't check my mail via Earthlink's webmail - it gets pulled off the server by Eudora at home before I ever see it on webmail. so, i wrote a Eudora filter to look for a specific subject line and body text. if it sees that message, it calls my little app (called "Killa") with "EudoraMainWindow" as the parameter. voila! Eudora kills itself and i can use webmail again. would've been much easier if Eudora had a "close Eudora" filter action....

                  image processing toolkits | batch image processing

                  D Offline
                  D Offline
                  Daniel Grunwald
                  wrote on last edited by
                  #8

                  Chris Losinger wrote:

                  would've been much easier if Eudora had a "close Eudora" filter action....

                  Or if Windows had something like taskkill.exe[^]... ;P

                  C 1 Reply Last reply
                  0
                  • D Daniel Grunwald

                    Chris Losinger wrote:

                    would've been much easier if Eudora had a "close Eudora" filter action....

                    Or if Windows had something like taskkill.exe[^]... ;P

                    C Offline
                    C Offline
                    Chris Losinger
                    wrote on last edited by
                    #9

                    oh well. it was quicker for me to write that app than it would've been to find taskkill.

                    image processing toolkits | batch image processing

                    1 Reply Last reply
                    0
                    • H Harvey Saayman

                      I'm busy working on an IM client for MXit[^] in my spare time. Now when receiving responses from the server I interpret them and shove the values into the respective classes which are then passed to the front end via an event. There are classes and events for each type of response and I must say its working rather nicely, but its so damn tedious the write these simple classes which are basically just a constructor with get and set blocks. So I quickly threw together an app to do it for me that lets me copy and paste the class into my code :cool: Screen Shot[^] Simple yet effective :)

                      Harvey Saayman - South Africa Software Developer .Net, C#, SQL you.suck = (you.Passion != Programming & you.Occupation == jobTitles.Programmer) 1000100 1101111 1100101 1110011 100000 1110100 1101000 1101001 1110011 100000 1101101 1100101 1100001 1101110 100000 1101001 1101101 100000 1100001 100000 1100111 1100101 1100101 1101011 111111

                      A Offline
                      A Offline
                      Amar Chaudhary
                      wrote on last edited by
                      #10

                      You may use class diagram. ;P

                      It is Good to be Important but! it is more Important to be Good

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • World
                      • Users
                      • Groups