public IType FromNative(Type type) { IType cached; if(typeCache.TryGetValue(type, out cached)) return cached; cached = new PencilType(this, type); typeCache.Add(type, cached); return cached; }
public void SetDrawingType(object sender, EventArgs args) { Button btnSender = (Button)sender; drawType = (sender == btnCircle)?PencilType.Circle:PencilType.Rectangle; }
public void SetDrawingType(object sender,EventArgs args) { Button btnSender = (Button)sender; drawType = (sender==btnCircle)?PencilType.Circle:PencilType.Rectangle; }