Geeks With Blogs
Łukasz Kuryło's blog useful snippets
Updating WinForms progress bar using Tasks from Task Parallel Library
I'm not a desktop application developer. I wrote only one app using the WinForms, but I must tell, it was interesting experience. Now I'm writting second WinForms app and second time, I needed the possibility to updating the progress bar in an app. So I think this is a good opportunity to put on the blog the code snippet for that to have a place where I can have some useful code for future references. Ok, so let's go to the solution details. As every desktop application developer know (or should ......

Posted On Wednesday, August 17, 2011 5:42 PM

Converting XmlDocument to XDocument and vice versa
In my previous posts I have shown how to get xml data from database and deserialize it. But sometimes we want to work with the xml and do some operations on it. To working with xml, in the .net framework there are two tools for it. One is to use the XmlDocument class and second is the linq to xml with the XDocument class. I personally prefer to work with linq to xml, so I must convert the XmlDocument object to XDocument which I have after I took the xml from database. To convert the XmlDocument to ......

Posted On Wednesday, August 17, 2011 2:15 PM

Useful snippet for serializing/deserializing data
In one of my previous posts I have used my custom code to serialize and deserialized data to/from XmlDocument class. Examples of use: XmlDocument extensions=//some xml document taken from db List<FileExtension> result = SerializationUtils.DeSerial... List<FileExtension> extensions=//some new objects to save to database XmlDocument serializedExtensions = SerializationUtils.Serializ... ......

Posted On Wednesday, August 17, 2011 2:01 PM

asp.net /asp.net mvc snippets
Download a remote file using ASP.NET Download a remote file using ASP.NET 1: public bool DownloadFile(string url, string downloadFileName, 2: string directoryToSave, out Exception exception) 3: { 4: string fileName = downloadFileName; 5: bool result = false; 6: exception = null; 7: 8: if(String.IsNullOrEmpty(url)) 9: { 10: throw new ArgumentNullException("url"); 11: } 12: 13: if (!String.IsNullOrEmpty(dire... 14: { 15: if (!Directory.Exists(Server.M... 16: { 17: throw ......

Posted On Monday, October 5, 2009 10:06 PM

VSTO for Excel 2007 snippets
How to hide the tab with sheets in the bottom of the workbook. How to hide the headings. How to use a build-in function. How to send a keybord shortcut to the Excel. How to merge all cells in the sheet. 1. How to hide the tab with sheets in the bottom of the workbook. this.Application.ActiveWind... = false; 2. How to hide the headings. this.Application.ActiveWind... = false; 3. How to use a build-in function. Excel.WorksheetFunction func = this.Application.WorksheetF... ......

Posted On Thursday, September 10, 2009 2:16 PM

Copyright © Łukasz Kuryło | Powered by: GeeksWithBlogs.net | Join free