- Upvotes Received
- 0
- Posts with Upvotes
- 0
- Upvoting Members
- 0
- Downvotes Received
- 3
- Posts with Downvotes
- 2
- Downvoting Members
- 2
I have a function which initiates commands for a command class. Since there are many commands to initiate, writing code for each one would be tedious. The function definition is as follows- [code=C#] private static void InitCommand(KeyGesture input, String text, String name) { InputGestureCollection inputs = new InputGestureCollection(); inputs.Add(input); Type … |
|
I have been hunting all over the net for a custom richtextbox control for C# which would have the buttons and every functionality built-in. I found some but they were for ASP.NET not for Win32 applications. So, I decided to code my own. So far, mostly everything that I required … |
|
Okay, so, I've got this code- [CODE=C#] List<Post> list = new List<Post>(); foreach(XElement post in posts) { var postType = post.Descendants(); var type = (string)post.Attribute("type"); Post item; if (type == "regular") { item = new RegularPost(); item.title = (string)postType.ElementAt(0); item.body = (string)postType.ElementAt(1); } if (type == "quote") { item = … |