Code quality changes, and added the possibility to set the amount of colors for the Quantizer.

This commit is contained in:
RKrom 2014-05-11 11:23:56 +02:00
commit 77a92d98c3
92 changed files with 690 additions and 653 deletions

View file

@ -31,15 +31,16 @@ namespace Greenshot.Drawing.Fields.Binding {
public object convert(object o) {
if(o == null) {
return null;
} else if(o is T1) {
return convert((T1)o);
} else if(o is T2) {
return convert((T2)o);
} else {
throw new ArgumentException("Cannot handle argument of type "+o.GetType());
}
if(o is T1) {
return convert((T1)o);
}
if(o is T2) {
return convert((T2)o);
}
throw new ArgumentException("Cannot handle argument of type "+o.GetType());
}
protected abstract T2 convert(T1 o);
protected abstract T1 convert(T2 o);