RiA
RiA
CC#
Created by eid on 6/20/2024 in #help
✅ what is the name of the pattern that used in types that end with *source?
getting tokens from a source and then getting notified is called observer pattern.
27 replies
CC#
Created by eid on 6/20/2024 in #help
✅ what is the name of the pattern that used in types that end with *source?
Observer Pattern perhaps.
27 replies
CC#
Created by eid on 6/20/2024 in #help
✅ what is the name of the pattern that used in types that end with *source?
are you talking about factory pattern?
27 replies
CC#
Created by Milenov on 4/29/2023 in #help
❔ Creating a multiplayer Snake game WPF, Blazor, SignalR
same for the recieve side
80 replies
CC#
Created by Milenov on 4/29/2023 in #help
❔ Creating a multiplayer Snake game WPF, Blazor, SignalR
i suppose you can set up a temporary system that delays all requests sent by (n + random) ms, to simulate network latency and jitter
80 replies
CC#
Created by Milenov on 4/29/2023 in #help
❔ Creating a multiplayer Snake game WPF, Blazor, SignalR
it's too big a question to ask. i can summarize your possible approach to a few points. 1. set up a server that can correlate all the player's positions and actions 2. set up a communication system (SignalR or something, maybe even code your own) 3. change any method that makes updates to the players in the game to one that can receive input from the server.
80 replies
CC#
Created by sibber on 4/1/2023 in #help
✅ Help
seems like we're at a discord with discord
29 replies
CC#
Created by sibber on 4/1/2023 in #help
✅ Help
29 replies
CC#
Created by wfsec on 1/23/2023 in #help
❔ please hwlp whats the python equilevant >:(
It's not that hard to look up or ask what the syntax means, from the source language's server, infer the usage, and then ask the target language's server for what the equivalent of such a function is. You shouldn't encourage full code-block conversions for people unwilling to put in the minimum effort to understand.
20 replies
CC#
Created by stigzler on 12/18/2022 in #help
❔ Winforms Property from BaseClass Form not getting transferred to derived Form
The Community toolkit for mvvm works in a similar way. Take a look at [ObservableObject] or [ObservableProperty] source code for inspiration
47 replies
CC#
Created by stigzler on 12/18/2022 in #help
❔ Winforms Property from BaseClass Form not getting transferred to derived Form
Also, use incremental source generators (v2). the v1 are legacy
47 replies
CC#
Created by stigzler on 12/18/2022 in #help
❔ Winforms Property from BaseClass Form not getting transferred to derived Form
I'm not great at that stuff. you could add an attribute like [AutoGuid] to your class and then have a source generator generate that GUID property for you in a generated partial class fragment.
47 replies
CC#
Created by stigzler on 12/18/2022 in #help
❔ Winforms Property from BaseClass Form not getting transferred to derived Form
You may have to look at source generators then.
47 replies
CC#
Created by stigzler on 12/18/2022 in #help
❔ Winforms Property from BaseClass Form not getting transferred to derived Form
Wait so this guid assignment is during development or during runtime?
47 replies
CC#
Created by stigzler on 12/18/2022 in #help
❔ Winforms Property from BaseClass Form not getting transferred to derived Form
you can have the guid assignment as a method in your base class but you'd still have to call that method after creating the form
47 replies
CC#
Created by stigzler on 12/18/2022 in #help
❔ Winforms Property from BaseClass Form not getting transferred to derived Form
seems like the most relevant in your case. I dont want to be hacky with designer generated stuff either.
47 replies
CC#
Created by stigzler on 12/18/2022 in #help
❔ Winforms Property from BaseClass Form not getting transferred to derived Form
You can do this:
BaseForm myform = new();
myform.GUID = Guid.NewGuid();
myform.Show();
BaseForm myform = new();
myform.GUID = Guid.NewGuid();
myform.Show();
47 replies
CC#
Created by stigzler on 12/18/2022 in #help
❔ Winforms Property from BaseClass Form not getting transferred to derived Form
I mean to say are the forms being created by binding or you have a method to create them
47 replies
CC#
Created by stigzler on 12/18/2022 in #help
❔ Winforms Property from BaseClass Form not getting transferred to derived Form
yes
47 replies
CC#
Created by stigzler on 12/18/2022 in #help
❔ Winforms Property from BaseClass Form not getting transferred to derived Form
How are you creating these forms?
47 replies