Click here to Skip to main content
15,896,314 members

Comments by Hermann Jung (Top 11 by date)

Hermann Jung 10-Feb-18 3:43am View    
It looks like the old client ignores some fields of new service response. You have already checked the mapping. So the only reason I can see is datamember order - the datacontractserializer depends on it. Try as follows:
Edit your sample service datacontract:
Add DataMember-Attribute if not already present.
Set DataMember(Order = 1) on members of original version.
Set DataMember(Order = 2) on members of new version.

If you already specified DataMember-Order - do not update order of original members; instead make sure new members have a higher order than highest original member order.

I hope this will solve your issue - good luck.
PS: Soap service versioning is a common scenario, the are many articles on web.


Another idea:
Diff generated service client code before vs after update. Pay attention on member names, namespaces and order.
Hermann Jung 21-Jan-18 4:20am View    
Why don't use "view.Table" or "view.Cast<DataRowView>().Select(drv => drv.Row).ToArray()" for update?
Hermann Jung 9-Jan-18 2:37am View    
Do you ever remove the old control before adding a new one to panel1.Controls?
Hermann Jung 31-Dec-17 1:59am View    
Creating ScreenDrawing transparent (CreateParam: WS_EX_TRANSPARENT) harms internal visibility-order logic. You can fix it calling:
foreach (var drawControl in Controls.OfType<DrawControl>()) drawControl.Invalidate();
or similar in Form.Resize or:

1.) Use an image specific region (Control.Region property) instead of transparency. See https://www.codeproject.com/articles/6048/creating-bitmap-regions-for-forms-and-buttons

or 2.)
Handle paint event of your PictureBox to draw the sprites. This approach will require some additional code to invalidate drawing area when moving sprites.
Hermann Jung 30-Dec-17 3:05am View    
I assume Form1.GameWindow is a DrawControl instance. You are updating its size in Form1.Resize and in DrawControl.Paint with different values. You should never update control properties in Paint-event.
Have a look at Form.SetStyle, ControlStyles.AllPaintingInWmPaint and Form.OnPaintBackground documentation. It looks like you want to paint the image as background.