« first day (830 days earlier)      last day (3319 days later) » 
00:00 - 21:0021:00 - 00:00

12:20 AM
right. which is what i am trying to do, however they leave out the whole interop stuff. I'm guessing I should read up on marshalling?
 
12:39 AM
This looks right up your guy's alley:
0
Q: How to override casting from a managed object to a COM interface?

Ivan ShcherbakovThere is a 3rd-party .Net assembly that defines an imported COM interface, gets an object from another COM object and casts it to the imported interface: [ComImport, Guid(...), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] private interface IMyInterface { //... } void SomeMethod(obje...

I am so glad I don't have to deal with COM
 
COM is awesome, and super annoying, at the same time
 
 
10 hours later…
11:13 AM
morning :)
anybody has ever used a limited progressbar?
I've implemented an unlimited one and it works correctly
but if I would have a limited one, passing the maximum value and updating Value when needed...how could I do it?
my unlimited progress bar is as follows
<ProgressBar x:Name="Solvers_ProgressBar" HorizontalAlignment="Left" Height="30" Margin="36,53,0,0" VerticalAlignment="Top" Width="220" Minimum="0" Maximum="100" IsIndeterminate="True"/>
and this is the handler of the progress bar window
public class SolverProgressBarWindowHandler
    {

        private Thread StatusThread = null;

        public SolversProgressBarWindow Popup = null;

        public void Start()
        {
            //create the thread with its ThreadStart method
            this.StatusThread = new Thread(() =>
            {
                try
                {
                    this.Popup = new SolversProgressBarWindow();
                    this.Popup.ShowDialog();
                    this.Popup.Closed += (lsender, le) =>
I've tried to modify it, adding methods that allows to set value and maximum value but it seems not working
 
11:31 AM
IsIndeterminate="True" ?
It should be false if you want it to be limited
 
 
1 hour later…
12:34 PM
I am here.
 
No, you're there.
 
Sonovafemaledog
my internet is still being routed through taiwan.
 
Mind removing the bad word ?
 
Sorry, I didn't realize that was a word we were sensitive to.
 
I don't really mind
But I got instructed to distribute pain if a bad word is written in this chat.
I'll have to spank you ;/
 
12:39 PM
By whom? And where are Mav and Sean?
You wish.
 
You discovered my plans D:
Sean is online in Skype
So is Mav
 
He bailed on SO Social Club. Mav never looks there. Neither are here. I feel so abandoned.
 
I think Mav is trapping Sean in his basement
 
Is he opening a petting zoo?
 
No, he tortures people in his basement from time to time
Don't you remember how Sean and I started pinging you and Mav and starring #FreeBill
Or were we trying to free someone else ?
We were trying to free someone from Mavs basement, that I'm sure
 
12:42 PM
It was for Stephan.
 
Yeah
Stephan..
Where is Stephan btw ?
 
Yes! I have ordered a polishing machine!
 
For your nails ?
 
for the car!
 
12:47 PM
good stuff
or at least I hope it's good stuff...
 
You said good stuff like you bought it to sniff it
 
hehe
naeh..
anyways... so now I long for either a garage, or a warm nice day
 
It's not known where Stephan is.
The company I worked for when I first got going on SO no longer has any developers working for them, per LinkedIn. That's odd, since they sell software as a service.
 
So they are full of consultants ?
 
maybe they have started in the car detailing business?
 
12:54 PM
Yeah, not sure. I should call my old boss and hear about how her lack of vision drove all her developers away.
 
hehe
 
Hey Bill, are you going to work with your bike ?
 
The senior developer they had just left last month. He was on the way out since I got there. He was a database guy working as a web developer.
Not any more, my office is like... 300 meters from my house.
 
Hm, 2C does not help I guess
 
going to fix this a bit.
 
12:57 PM
Microsoft is on the other side of the street from your house ?
 
Yeah, they have a field office over there.
The guys who make blend work on the other side of town.
 
Nice
 
It's a pretty good set up I've got going here.
 
Do you work at MS?
 
I do not.
I have been on the clock and inside the Microsoft office, but Microsoft did not pay me.
Actually, the place that no longer has developers paid me.
 
1:01 PM
@AndréSilva yes, I've set with false
 
@FrancescoDS Now you need to increment the value
 
the problem is that, when I call methods that updates the Value, it does not change
public void updateValueOfProgressBar(double val)
        {
            if (this.Popup != null)
            {
                this.Popup.Dispatcher.BeginInvoke(new Action(() =>
                {
                    this.Popup.ProgressBar.Value = val;
                    this.Popup.viewModel.currBeamText = val.ToString();
                }));
            }
        }
 
Do you trigger INPC ?
Hm..
 
It enters into the update value row, but it does not change
if I do not use BeginInvoke, it does not work because it raises wxception about threading
 
how come they didn't pay you?
 
1:04 PM
I was there for a hackathon. It was for Windows 8 dev preview.
 
Hm, I think you need to trigger about the property being invoked and changed
 
they wanted us to make windows store apps in two hours. Then they refused to answer my simple ass questions about wpf.
 
@AndréSilva how?
 
so if you did get payed for working there, would you like it?
 
As far as I know it's a sales office. I'm not sure what I could do here.
 
1:11 PM
Not quite sure, I never did that ;/
 
no, ok. but on MS in general as developer
 
great :P
 
But I'd be out of my depth working on C# and .NET directly.
 
i've found this but it uses BackroundWorker
 
What about you?
 
1:15 PM
me? working on MS?
 
yeah
 
maybe... I don't know what I would do...
 
Try really hard to get at least two of your coworkers fired every three months?
Oh, they stopped doing stacked ranking. businessweek.com/articles/2013-11-13/…
 
maybe a new flight simulator... I haven't heard so much about fs since 2001...
 
The last one wasn't bad, they did a detailed recreation of Hawaii. But they didn't include much for planes.
It's free, so.. go get it, I guess.
 
1:18 PM
free??
I don't have any windows at home...
last time I played it, it was really slow
 
@AndréSilva I've added a Property for Value of ProgressBar and now Value changes correctly, but the ProgressBar starts as it has 100%
 
much slower than a ordinary game
 
Yeah, it's free. You do need windows... for a billion reasons.
Yeah, it's a flight simulator. They're not really games.
 
I don't mean slow in a gameplay way, really laggy
 
@FrancescoDS What is the value that you set for the attribute Maximum ?
 
1:23 PM
I've a binding in XAML for Maximum
 
When you first use the progressbar value, check the Maximum and Value
tell me what you see for both
 
also... my joystick is the joystick port (not usb). which isn't supported in any windows since XP
 
What I'm hearing is you bought a computer twenty years ago.
 
:)
I don't think that I still have it
 
I have one of those
 
1:27 PM
Nice.
 
It is amazingly old
 
hold on, I had one of these also nodevice.ru/images/catalog/wmattack.gif
that was better. but I still think it wasn't USB
 
That's my setup.
 
@AndréSilva Maximum and Value have a binding. I set that properties into Start() of thread. They are correctly called but values does not change
they are always 0.0
 
Both?
 
1:30 PM
really?
 
Maximum and Value ?
 
yes
 
Well there it is
You should set Maximum to a value superior to Value
 
i've tried to set Maximum with 100
 
Value divided by Maximum = Percentage shown
 
1:31 PM
@Markus Yeah. I got it to get more practice on flying. Then college gave me a heavy course load and I had to drop out of flight school.
 
public void Start()
        {
            //create the thread with its ThreadStart method
            this.StatusThread = new Thread(() =>
            {
                try
                {
                    this.Popup = new LimitedProgressBarWindow(maxValue);
                    this.updateValueOfProgressBar(0);
                    this.setMaxValue(100);
                    this.Popup.ShowDialog();
                    this.Popup.Closed += (lsender, le) =>
                    {
                        //when the window closes, close the thread invoking the shutdown of the dispatcher
 
excuse my profanity.
 
what does it cost to get a private flying license?
 
It's not too bad for tests and whatnot. What screws you is fuel cost while you get your practice hours in.
I think a commercial license is like $10k. To get a private license where you can fly in day light and clear skies it's like $3k.
 
I think that the private in sweden is about $10-13K
 
1:36 PM
My goal is to get instrument rated. I can get 4 passengers and fly at night. That's about $5k.
That's gotta be tricky. Does it give you clearance to fly anywhere in the EU?
 
is that including fuel?
 
I don't think I can fly in Canada, for example, without passing a test there.
 
I think so, PPL is the correct name
 
I'm pretty sure fuel's included. It's been a few years since I was looking at it though, so I could be mistaken.
 
5K... that would be cool
 
1:39 PM
Yey I feel stupid now
30 minutes searching for an error
key[this.Rows] :(
I inverted
 
$150 for the test....
checking what my school's charging for fuel and instructor.
$300 for instrament rating for the US and Canada
$6-8k for flight school, instructor, plane rental, and fuel for 40-55 hours.
and the tests.
ooh, and that gets me 4 months of flight club.
 
2:28 PM
how many flight hours do you have to have per year to maintain the licence?
 
Not sure.
16
A: What does it take to maintain a private pilot certificate?

abelenkyA license, once granted, is good forever (barring some enforcement action). But, you need more than just a license to fly. To use your license, while flying solo, you also need a Medical Certificate and a Current BFR (Biennial Flight Review). Medical Certificates are good for 5 years until you...

 
Anybody know how to check for clicks on GeometryGroup?
Or the "right" way to go about seeing if geometry is clicked on
 
 
2 hours later…
4:39 PM
ahhhhh
@JohanLarsson you have an answer for Asheh?
 
5:10 PM
hurrayyyy.. I'm alive again :D
 
Holy hell, it's Mav!
 
haiii
my machine broke down so i had downtime while they were getting me a new one
and i wuv my new machine :)
from dell.com/us/dfb/p/vostro-420/pd (with some after market upgrades)
 
420blzitXXX
 
oooh, a desktop. Fancy.
 
5:13 PM
:D
nah thats my 5 year old desktop that gave in after running 100% load for 24/7x5years
 
so you're going to play some vidyagames?
 
oh yea
but on my official machine!
thats what makes this so cool of an upgrade :D
 
Are we steam buddies?
 
yea
though i don't really use steam
 
ah
 
5:15 PM
but ya this shit has builtin steam & shadowplay integration!
 
Nice!
I have programmable buttons. I wonder how I make it pull up my steam library.
 
yea its got those too.. and instead of numlock key.. its has a ROG control panel key!
the only slight inconvenience.. its about 7kg >.<
 
How many tacos is that?
more or less than the number of tacos I want for dinner?
 
but at 32gb ram 970 gtx nvidia powering this 1080p beautiful screen
hard to complain.. with 2 ssds powering it in raid 0 :D
i'm not sure, you'll need to convert 980 pounds to tacos (since company won't get VAT on top)
but 1200ish otherwise to you and me
(thats for 16gb ram and 1ssd.. i'm then upgrading it by myself)
but still for the specs its pretty nice price
 
Word.
you will LoL like a gentleman.
 
5:20 PM
xD
i already do that on my desktop.. but this one lets me do dragon age inquisition and stuff
 
Far Cry 4 is the game du jor.
 
i dont like that one >.<
 
Evolve is coming... I want to like it a lot.
 
evolve sounds fun
 
The demo wasn't great.
 
5:27 PM
haven't seen demo, just saw the trailer
the idea of a player controlled boss monster sounds cool
 
well, it's sort of the only monster.
I never encountered the other stuff when I was a hunter, but I didn't get to play a lot.
 
i'm assuming it'll get better
 
I'm going to buy it... I figure I owe them at least one more try. (L4D is one of my top 5 all time games)
 
i've never played that
but i've certainly heard its name
 
Man, I am ready for it to be not today.
 
5:49 PM
Its not even monday
 
rough day yesterday lead to poor sleep and now I'm tired and not overly interested in reading more code samples.
 
@Markus just saw your example project and i have a question: why have a stackpanel wrapping dockpanel? you could just do everything you're doing direct on dockpanel itself?
 
That does sound odd
 
i think he started from stackpanel and then at some point switched to dockpanel and forgot to take stackpanel out
 
6:22 PM
hola
I need to get all the available COM ports
should that be in VM or M?
@BradleyDotNET :)
 
M
 
so that would call SerialPort.GetPortNames?
 
N
 
what do you even call that model?
 
M
:)
COMPortDiscoverer
First thing that came to mind
and yes, it would invoke the function you mentioned.
 
6:44 PM
Jan 20 at 21:54, by BradleyDotNET
A command is usually its own class, but you could put them all in a class together
What did you mean by that @BradleyDotNET ?
 
Your view model can aggregate a bunch of DelegateCommand objects, instead of breaking out each command into its own class
My quoted statement was... poorly worded :(
 
In a Root / Child context... do you mean Root could have DelegateCommands which would fire Child ICommands?
 
Ummm... no, I don't think so
 
what do you mean aggregate
and that looks awfully similar to relaycommand
 
I've never used RelayCommand but my understanding is that they are very similar
And by aggregate I mean "hold instances of"
the actual relation would likely be composition, as the VM would control the lifetime of the commands
 
6:53 PM
so if you have FileExplorerViewModel and you have a Computer object in there, bound to the datacontext of a treeview
and ItemsSource would then be bound to Computer.Containers (List<IContainer>) right?
 
Sounds reasonable, sure
 
then when you right click a child item, and click something on the contextmenu...
the DelegateCommand in what class should be called?
 
Probably the computer class
Though as we discussed before, which greatly depends on what actions you intend to take
 
okay, and that agrees with Computer would then be a hybrid VM-M
?
 
Well, if Computer was just data then it would stand on its own, and you would bind against FileExplorerViewModel
missed that class name in there somehow, sorry
 
6:59 PM
wouldn't computer just be data?
 
probably
 
(keep in mind I need to show a context menu for different types of items)
 
it's data + behavior, since it has a command, if the logic is in that scope
 
I think I just read "Computer" as the VM somehow
 
in which case, you'd want a vm for it
 
7:00 PM
@ReedCopsey so then ComputerViewModel would have instance of Computer?
 
normally, yes, and the command(s) to work against it
 
okay
so lets say I have a "Computer Manager" which is a UI. I can open it up and edit the items of a Computer (using ComputerViewModel I believe). When I'm done with changes and want to save the changes, would serializing my data (Computer and its items) logic be called in ComputerViewModel or Computer?
I'm guessing I would do something like [Serializable]public class Computer : ISerializable?
 
The logic would be in ComputerViewModel
And your serializable is correct, though I don't think you have to implement ISerializable
 
If I have a collection of Parents, and each parent can have only Children (and not other parents) is there is way to pull all Parents Children and return a single list?
-P0
---1
---2
-P1
---3
---4
how to get 1, 2, 3, 4
 
Parents.SelectMany(c => c.Children)
nope, thats not it
No I think that is it actually
 
7:12 PM
i think i ran across a Jon Skeet SelectMany / Flatten SO answer at some point
 
You need a SelectMany for sure
I think I have it in the right place
the LINQ side of by brain is a bit off this morning apparently
 
COMPortDiscoverer would that be a static class, since its only job is to get com ports at any given time?
 
I would think it could be
 
@ReedCopsey ahh, back tracking now. So now FileExplorerViewModel would have a ComputerViewModel--that holds a Computer. Computer has a List<IExplorerItem> Items collection which would represent files and folders. These also have context menus. So now we create something like FolderViewModel to handle context menu operations. So how can you have a structure like that?
 
Though I'm not sure making it static buys you anything
 
7:17 PM
Computer would have a List<FolderViewModel> Items collection
I'm saying, Models shouldn't have VM's, right?
@BradleyDotNET just static function then, eh
 
yes
in general, if you need VMs, you'll end up having VM containers "all the way up"
so any time you need to introduce a command, it typically means anything using that type, and types using those, etc, end up with VMs
which is why so many people just say "always bind to a VM and not the model" (you don't need to when the model is "pure data", but it's rare that's the case other than the "leaf types")
 
A static function, or even an instanced class
But it sounds like its just one method
so if it fits in another class (like COMPortManager) go for it
 
@BradleyDotNET might have some other static data (available parity options)
 
I'm a big believer in instanced over static unless you have a good reason for making it static
From what I've heard, sounds like a very small class to me
 
parity options seems like it should just be an enum
in which case a static method is fine
 
7:31 PM
Or just parameters to the method, as reed indicated
 
@ReedCopsey right, so Folder would end up needing a ViewModel, but how does Folder get a ViewModel when folder is a part of Computer.Items
 
@NETscape ComputerVM would need to build it out
collections are always a pain
 
So ComputerVM would need to expose a Items collection... how do you prevent someone from adding/removing using simple .Remove(obj) .Add(obj)
or can't you?
 
ReadOnlyCollection
 
and/or just expose via IEnumerable<T>
no need to have a list unless you need list semantics
 
7:37 PM
So the process of adding a folder to Computer...
Have ComputerVM with Computer field.
Right-click treeview item (ComputerVM), and select add new folder
AddNewFolderCommand is called in ComputerVM, executes AddFolder().
AddFolder creates a folder = new Folder, a FolderViewModel(Folder folder), and adds the FolderViewModel to the collection bound to treeview; also it adds Folder to `Computer.Items` collection.
so then, I could right click FolderViewModel in the treeview, click rename, and it calls the RenameCommand in FolderViewModel
 
yeah, that's the basic idea
 
collections are a pain.
 
:D yep
 
how do you implement notification when you add an item to a collection which is exposes as IEnumerable<T>
 
It doesn't matter what you expose it as
At least as far as the framework is concerned
If its an OC, notifications will still work
 
7:43 PM
the framework just tries to do a cast to INotifyCollectionChanged
 
ahh so it would be ObservableCollection<IComputerVm> ComputerVM.Items
when creating a new folder...
 
something like that
 
AddNewFolderCommand would create a Folder, and FolderViewModel
Computer.Items would be IEnumerable<T>
 
well, it'll be whatever your model dictates
 
well I wouldn't want someone to be able to call ComputerVM.Items.Add(whateverTheyWant) right?
I'm getting the COM port name and device description. whats better to return you think? KVP, Dictionary, HashSet, Tuple, ?
I would probably display something like "Some Device That Communications [COM1]"
or something
however, I want it easily accessible so I can do SerialPort.Name = "COM1"
and should I use Task to retrieve COM ports?
 
7:58 PM
Sounds like either a Dictionary or just a custom class
By 'use Task" you mean, do this asynchronously?
Do you anticipate any problems with that? It seems like it would be fine.
 
@BradleyDotNET yes
not any problems really
probably executes fast enough that'd it be more expensive to start a task and what not
 
It seems like a good candidate actually, Hardware and Disk I/O is always "slow"
but you know how fast it actually runs
 
maybe 0_o
actually does take quite a bit of time (using WMI query)
"DEVICENAMEWHATEVER (COM___)"
should I use Regex or Substring to find "COMX" string, aka portname
find/select
 
8:17 PM
Regular expressions = problems
but thats just me
 
should i get ugly with it, muwhaha.
comName.Reverse().Skip(1).Take(comName.IndexOf("(") - 2).Reverse();
or would that make a dailywtf article? lol
 
lol, I don't think that beats the one Kendall described today
 
stackoverflow.com/questions/378415/… regex seems simple enough, if of course you add the end of string anchor to the answer ^
 
00:00 - 21:0021:00 - 00:00

« first day (830 days earlier)      last day (3319 days later) »