Quantcast
Channel: Henriks bits n pieces » C#
Browsing latest articles
Browse All 10 View Live

MySQL transaction class using MySQL Connector (.NET and C#)

I strongly recommend that you check out my new and improved library here: http://code.google.com/p/mysql-helper-library as it contains many fixes and functions not found in the code below.namespace...

View Article


A simple method to make a user control draggable programmatically (C#, WPF)

public void MakeDraggable(System.Windows.UIElement moveThisElement, System.Windows.UIElement movedByElement) { bool isMousePressed = false; System.Windows.Media.TranslateTransform transform = new...

View Article


New Mysql Helper Library for Mysql Connector .NET (C#, Library)

Been working on a new MySql helper library for simpler transaction and non-transaction Can be found here: http://code.google.com/p/mysql-helper-library/

View Article

XAML StringFormat Binding IValueConverter Solution

Code behind:public class StringFormat : IValueConverter{ public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { return string.Format(parameter.ToString(), value);...

View Article

Mysql Helper wiki page

Been adding MysqlHelper examples to the wikipage: https://code.google.com/p/mysql-helper-library/w/list More to come

View Article


Microchip XC32 interrupt triggering on port level change

Finally got interrupt triggering to work on pin level change. In this example I use two tactile switches to pull portB10 or portB11 to ground on a PIX32MX250F128B micro-controller. (Keep in mind that...

View Article

WPF TextBox Auto-Complete functionality

Here’s a TextBox extension for WPF auto-complete functionality (Revision 3). When AllowComma is true, it will lookup and try to auto-complete words after comma character independently as well hello...

View Article

Object cloning/copying

Here is a method that copy field or property values from object to object: public void Clone(object source, object destination, bool copyFields = true, bool copyProperties = true) { if (copyFields)...

View Article


WPF TextBlock with clickable hyperlinks and folders

Found this googling for a clickable uri solution for some textblocks (see Bojan Resniks response): http://stackoverflow.com/questions/861409/wpf-making-hyperlinks-clickable Since it’s missing support...

View Article


Finding discrepancies and generating regular expression pattern based on...

A working prototype created to generate regex templates and find bad serial numbers by analyzing strings of equal length Running console application:Random rnd = new Random(); List serials = new...

View Article
Browsing latest articles
Browse All 10 View Live