« first day (2342 days earlier)      last day (2832 days later) » 

01:14
How to make ComboBox in winforms readonly?
40
Q: How to make Combobox in winforms readonly

Kishore AI do not want the user to be able to change the value displayed in the combobox. I have been using Enabled = false but it grays out the text, so it is not very readable. I want it to behave like a textbox with ReadOnly = true, where the text is displayed normally, but the user can't edit it. Is ...

this question have only answer that focused on edit Text
I want to be able to drag text but don't to select another items.
 
5 hours later…
06:05
I ll using EditText behind ComboBox.
Hello everyone
07:09
hihio
how you doin'?
07:27
Fine fine
@Work by any chance ? :D
ohayou
morning :)
07:47
/t3 solo
@nyconing Thanks for your answer.
Any other suggestions?
08:07
@AdiMohan of course :D
08:27
is .NET's GDI+ open source?
because I want to see how it manipulates pixels of images
@AlexSavAlexandrov have you searched the source?
yeah
I am either missing it, or it is not yer released to the public
and this is the furthest I was able to go: referencesource.microsoft.com/#System.Drawing/commonui/System/…
and from there I learned that I need to find the code for the DLL that draws on images
@AlexSavAlexandrov as this Issue states (github.com/dotnet/standard/issues/222) it's not in the source yet. But you could check out System.Drawing on mono if that helps
09:09
Morn all
its afternoon now
OMG its evenning
usually you just say morning when you come
a lot of us are in different time zones
I'm not sure your girlfriend would appreciate you saying that at that time
"luckily ", gf throws null exception error
Oh, right. Should've checked for null ref
09:18
@Proxy mine holds a reference to my right hand ;)
:)
War
War
09:52
morning
If I want to create a method like this:
public static void SetId(ViewModel model, string name){
if (model != null){
var id = context.Models.SingleOrDefault(x => x.Name = name);
}
else
throw new Exception("Not found")
}
and I want to use it in my project, what are the ways that enable me to use the id in the calling method?
I.e. in a BrandsRepository that receive a view model of BrandViewModel (inherits from ViewModel): I want to use the SetId method: SetId(brandViewModel, "Brand")`
How -in BrandsRepository I can use the id from SetId?
@MohamedAhmed where do you want to set the id?
In SetId method
and get its value in other repositories
Hi everyone
@MohamedAhmed i simply don't understand what you are trying to achieve.
id is type ViewModel, but what do you want to do with it?
since it is a local variable you can't access it from the "outside"
10:11
I may search for the difference between ref and out I didn't use it before
They are both pointers, but out must be assigned before leaving the func and doesn't need to be initialized before use, whereas ref CAN be assigned and MUST be initialized before use
working to automate thousands of pdf files download process with c# and webbrowser control, my question is how to get response of form being submitted with HtmlElement invoke method ??
@NumanHanif try the events from the webbrowser like DocumentLoaded and such
 
2 hours later…
G K
G K
12:23
Hello all,
I got stucked up with a small logic breaking and need some help in breaking it. It was not much complex to resolve it but might be I am debugging multiple times, I could not able to come up with a proper logic.

Its basically finding a folder whether it can be moved into destination location, if source and destination are same and etc.. I have written all possible conditions in this method (https://gist.github.com/Ganeshcse/ee88204bbccba9779960c45a4e1c51d9), but some times when destination is under source folder the last condition (condition 3) is getting into if block.
I just wanted to check other possible conditions that are to be taken care when we do folder move.
The problem comes when source folder is C:\Temp\Test1 and destination is C:\Temp\Test2 (assume these are paths). Now condition 3 always be true as IsBaseOf is common for both of them even though the source and destination paths are different.
If a path is invalid, for gods sake, stop processing
Now only 'condition 3' works
G K
G K
Assume that invalid path does not exists as I am pre-validating it before I call this method itself.
I just re-written one more condition under if block of Condition 3 as below,
if (parentUri.IsBaseOf(childUri))
{
//isValidPath = false;
// Condition 4
if (sourcePath == destinationPath)
{
isValidPath = false;
}
else
{
isValidPath = true;
}
}
else
{
isValidPath = true;
}
Are you like, new, to programming?
G K
G K
But in some conditions it breaks the logic even though it is invalid, but god sake the condition 1 returns as false. So I was thinking if I can return there itself when ever isValidPath = false.

But I wanted to recheck if that does not create any problem in all possible test cases
Noah, I am good at them.
Why did u asked like that?
12:38
Because you're making a newbie mistake.
You don't ever return until the end.
Meaning all your checks before 'condition 3' are just, you know, useless.
G K
G K
This is a test method to check all conditions.
if a path is for whatever reason invalid return there
or make a property for each condition
G K
G K
Hmm
G K
G K
But the order of the conditions do you think it will be valid for all scenarios?
Fuck if I know, I'd just try to move and catch failures ¯\_(ツ)_/¯
this string destinationPath
why is there a this here?
Because there's a ton your checks won't catch, anyway.
@Proxy lol i just copied his code without realizing this this
G K
G K
12:57
Condition 3 is failed in this case,
C:\Desktop\Test1 (Source) - C:\Desktop\Test2\Test1 (Destinaton).
but what does that do?
i mean first time i see it
@Proxy me too
@GK then change the condition if it fails on a valid path
Hi all. In MVC, is there a way to automatically add all the props of a model to a RouteValueDictionary?
13:54
i fucked up my technical question on my interview
it was such a god damn dumb "algorithm" to make
determine if a string is a rotation of a reference string
wat
example: reference string: "stackoverflow" a reference string would be "ckflowsta"
oh
a rotation string*
oh like anagramm?
13:56
no
flowsackt would not be a rotation
another example of a rotation would be flowstack
basically order is preserved
elegant solution? (reference + reference).contains(testString)
LOL
i fucked it up during interview and was trying to do some nested for loop nonsense so they asked me to send code by end of day via email
so i brute forced it instead of making it clear that i just searched on stackoverflow for the answer
well you do need a loop
no you dont
only need loop if you brute force it
how would you find it without a loop?
stackoverflowstackoverflow
any variation of a rotated string would be in that
so you do bool Result = (reference + reference).contains(testString)
done
that is still using a loop

« first day (2342 days earlier)      last day (2832 days later) »