Click here to Skip to main content
15,033,917 members
Home / Discussions / C#
   

C#

 
GeneralRe: Code style Pin
Lutosław28-Jun-11 1:17
MemberLutosław28-Jun-11 1:17 
GeneralRe: Code style Pin
BobJanova28-Jun-11 2:41
MemberBobJanova28-Jun-11 2:41 
AnswerRe: Code style Pin
BobJanova28-Jun-11 0:05
MemberBobJanova28-Jun-11 0:05 
GeneralRe: Code style Pin
Lutosław28-Jun-11 1:03
MemberLutosław28-Jun-11 1:03 
AnswerRe: Code style Pin
Keith Barrow28-Jun-11 0:23
professionalKeith Barrow28-Jun-11 0:23 
GeneralRe: Code style Pin
Pete O'Hanlon28-Jun-11 0:34
mvePete O'Hanlon28-Jun-11 0:34 
GeneralRe: Code style Pin
Lutosław28-Jun-11 0:45
MemberLutosław28-Jun-11 0:45 
GeneralRe: Code style Pin
Keith Barrow28-Jun-11 1:22
professionalKeith Barrow28-Jun-11 1:22 
Jacek Gajek wrote:
1. First of all, it doesn't compile because neither NoteBeamPen nor Brushes.X are constant.

I didn't copile it as I don't know which namespaces you are using, just describing the princple. Perhaps I should have made this clear.


Jacek Gajek wrote:
2. It is not clear what 'factors' RenderHead(drawingContext) are. I
don't see why factor '1' should be 'more default' than, e.g. 0 or 10 or 1.5 or
whatever.

This defaults to the "empty" version, but that is all they are defaults. You could default to whatever you feel safest, but defaulting to the one that scales at 1 makes the most sense to me.

For both the points above,you can drop the defaults totally and pass these in makes you feel any better, without altering the key point I made.

Jacek Gajek wrote:
Additionally, drawingContext.DrawEllipse is not actually redutant code. It can
change to 'DrawGeometry' or other stuff in future, and then it would require
refactoring if different geometry was used in these methods.


I didn't say that was redundant, just that you have repeated code, as other posters have pointed this out to you too. Further refactoring is unlikely be a huge chore, and you'd only need to do code on one place most probably. In any case I also question the wisdom of future-proofing against "geometry changes" unless they are reasonably certain to change. On this last point, if these are likely to change, how we we be able to tell, answer: we can't wihtout you letting us know your requirements.

GeneralRe: Code style Pin
Lutosław28-Jun-11 1:50
MemberLutosław28-Jun-11 1:50 
GeneralRe: Code style Pin
Keith Barrow28-Jun-11 1:57
professionalKeith Barrow28-Jun-11 1:57 
GeneralRe: Code style Pin
BobJanova28-Jun-11 3:45
MemberBobJanova28-Jun-11 3:45 
GeneralRe: Code style Pin
Keith Barrow28-Jun-11 7:32
professionalKeith Barrow28-Jun-11 7:32 
GeneralRe: Code style Pin
BobJanova28-Jun-11 7:42
MemberBobJanova28-Jun-11 7:42 
GeneralRe: Code style Pin
Pete O'Hanlon28-Jun-11 7:59
mvePete O'Hanlon28-Jun-11 7:59 
GeneralRe: Code style Pin
Lutosław28-Jun-11 8:08
MemberLutosław28-Jun-11 8:08 
NewsNOTE 3 ,4 Pin
Lutosław28-Jun-11 0:48
MemberLutosław28-Jun-11 0:48 
AnswerRe: Code style [modified] Pin
PIEBALDconsult28-Jun-11 3:09
professionalPIEBALDconsult28-Jun-11 3:09 
AnswerRe: Code style Pin
SledgeHammer0128-Jun-11 7:34
MemberSledgeHammer0128-Jun-11 7:34 
GeneralRe: Code style Pin
Lutosław28-Jun-11 8:04
MemberLutosław28-Jun-11 8:04 
GeneralRe: Code style Pin
SledgeHammer0128-Jun-11 8:51
MemberSledgeHammer0128-Jun-11 8:51 
GeneralRe: Code style Pin
Lutosław28-Jun-11 9:47
MemberLutosław28-Jun-11 9:47 
QuestionCreating a multidimensional array from class Pin
lada_vyvojar27-Jun-11 20:34
Memberlada_vyvojar27-Jun-11 20:34 
AnswerRe: Creating a multidimensional array from class Pin
Mario Majčica27-Jun-11 23:29
professionalMario Majčica27-Jun-11 23:29 
QuestionRead from Byte Array Pin
DJ24527-Jun-11 20:04
MemberDJ24527-Jun-11 20:04 
AnswerRe: Read from Byte Array Pin
Pete O'Hanlon27-Jun-11 21:49
mvePete O'Hanlon27-Jun-11 21:49 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.