Code Snippet Manager
welcome to Game-Tuts.com - Register
Results 1 to 6 of 6
  1. #1
    ಠ_ಠ


    Join Date
    Nov 2009
    Location
    East Coast USA
    Posts
    1,660
    Thanks
    352
    Gamertag
    th3 d1rty hippe

    Default Code Snippet Manager

    Well this is pretty useful for me. Uses XML to save code snippets locally. Good for remembering stuff you are just learning. Anyways here are some pictures and then the download.

    Main Form:
    Spoiler:



    Showing Code:
    Spoiler:



    Also if you are wondering what that nonsense in the background in the 2nd picture is, it is my desktop. :)
    My Desktop:
    Spoiler:




    And finally here is the download which includes C# source code.
    Download From My Server

    Hope you like! Also I have used XML a lot before but this was my first time with XML writing so feel free to critique me on that. I am sure I could have shortened up that code.
    I see you read my signature.

  2. The Following User Says Thank You to Matt For This Useful Post:

    Brandon (02-07-2011)

  3. #2
    VIP
    Join Date
    Aug 2010
    Posts
    1,874
    Thanks
    175

    Default Re: Code Snippet Manager

    Seems pretty useful. Downloading now, Thanks Matt:)

  4. #3
    Lurking around Nowadays

    Join Date
    Oct 2010
    Location
    Kicking Incredibly Dope S****
    Age
    18
    Posts
    1,931
    Thanks
    388
    Gamertag
    YOUxARExADOPTED

    Default Re: Code Snippet Manager

    Thanks downloading now :D

  5. #4
    ಠ_ಠ


    Join Date
    Nov 2009
    Location
    East Coast USA
    Posts
    1,660
    Thanks
    352
    Gamertag
    th3 d1rty hippe

    Default Re: Code Snippet Manager

    Welcome guys! Glad you like.
    I see you read my signature.

  6. #5
    Modio Tool Developer

    Join Date
    Mar 2010
    Location
    UK
    Age
    20
    Posts
    1,800
    Thanks
    418
    Gamertag
    MrJoshuaT

    Default Re: Code Snippet Manager

    You could make the UI a bit more cleaner I think, and maybe a search feature?

    But otherwise this could be useful
    Server / Desktop / Mobile Device developer. I use a Mac . Typos are my speciality.

    Taylor Gang or die.

    Prison Break is the best TV show ever.

  7. #6
    ಠ_ಠ


    Join Date
    Nov 2009
    Location
    East Coast USA
    Posts
    1,660
    Thanks
    352
    Gamertag
    th3 d1rty hippe

    Default Re: Code Snippet Manager

    I will do search later but the UI is fine. Doesn't have to use any of those UI libraries. I actually like the normal one a lot. It is mainly for learning and stuff. But yea I will do that right now. I think I can do it in under 5 lines with Linq :) Might take more to print it out though.

    EDIT:

    Redownload. I made the search function 1 line without using the built in one. Here it is:
    Code:
    var results = snips.Where(x => (x.Title.ToLower().Contains(textBox1.Text)));
    That is only the search function but the whole function was this:
    Code:
    listView1.Items.Clear();
                var results = snips.Where(x => (x.Title.ToLower().Contains(textBox1.Text)));
                foreach (var x in results)
                {
                    ListViewItem item = new ListViewItem(new string[] { x.Title, x.Language, x.Description });
                    item.Tag = x;
                    listView1.Items.Add(item);
                }
    8 lines but could be six if I moved the braces like this:
    Code:
    listView1.Items.Clear();
                var results = snips.Where(x => (x.Title.ToLower().Contains(textBox1.Text)));
                foreach (var x in results)
                { ListViewItem item = new ListViewItem(new string[] { x.Title, x.Language, x.Description });
                    item.Tag = x;
                    listView1.Items.Add(item); }
    Last edited by Matt; 02-07-2011 at 06:43 PM.
    I see you read my signature.


 

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
visit GameTuts on these social networking sites