« first day (1139 days earlier)      last day (3010 days later) » 

7:10 AM
morning!
 
 
1 hour later…
8:14 AM
morning
 
8:29 AM
Morning!
 
morning
 
 
2 hours later…
10:53 AM
wow, power-out for about half an hour, and then no network for the next half-hour
 
 
2 hours later…
12:30 PM
hey hey hey
for logging (error logging) do you use a framework, or have you all implemented you own stuff?
 
12:51 PM
are we all sleeping today? @Mav, @Franssu, @Johan @Rudi
 
hey hey
I was training my ears
coffee time :)
 
Just ridic busy
 
@Markus we use log4net
 
is it any good?
 
does the job
 
1:07 PM
what's it's best feature according to you?
do you have different logfiles for different logitems?
 
I rarely use it
 
our logging strategy is havoc
we not only have several places that we log to, we also have different systems to do the logs
 
1:21 PM
sorry can't really help here
 
Anybody know how to prevent binding from occuring?
Im wrapping somthing around a hidden grid, but its not working
 
1:52 PM
Mav introduced me to Serilog the other week, haven't used it yet but quite like the look of it
@Markus Serilog and Seq as the remote logging backend so you can filter through where the logs come from etc
 
2:11 PM
m'kay
 
3:08 PM
anyone here familiar with ModernUI
 
@JohanLarsson has derived works
He's intimately familiar with it those derived works... I have very light experience.
What's up?
 
i have a main page with TitleLinks and MenuLinkGroups
i am trying to navigate to a Page in a MenuLinkGroup from a Page in a TitleLink
it changes the page, but doesn't set the MenuLinkGroup tabs properly
 
Do you have any interest in trying Johan's code?
It's all up on git.
 
sure
 
Should be a drop-in replacement.
Lemme find the git repo
 
3:13 PM
but...does it help me somehow?
 
i can show my issue using their sample demo
 
He maintains it religiously.
I'm not sure of the maintenance state of the other project.
 
you are saying that regardless of what my issue is, i should be using his version instead
 
Also - if you have trouble with something - we'll be able to tell you exactly how to do it.
So - yes (1) maintained (2) supported.
 
3:14 PM
ok
 
He's already fixed multiple issues with their code.
It's entirely possible that was one of them.
 
same issue
on the demo app, open navigation.xaml
        <mui:BBCodeBlock xml:space="preserve">
            » navigate to the [url=/Pages/Introduction.xaml]introduction page[/url]
        </mui:BBCodeBlock>
drop that block of code into Content/SettingsAppearance.xaml anywhere
then try to click it from the settings pane
you get the same behavior using a button with Command="NavigationCommand.GoToPage" CommandParameter="/Pages/your.xaml"
 
I've pinged Johan on here, and shot him a message in skype; he's currently away, but odds are good that he'll get back to us sometime in the next two hours. Can you tread water for a bit?
I'm sure he'll be able to help at that point.
 
definitely not in a hurry
 
Wow. The mess in the c++ chat room yesterday...
 
3:39 PM
Hi, the is the first time I'm using the chat. I was wondering if its purpose is to anwser short questions, which are not worth a big thread? If yes, then I want to ask a simple question: When dragging: where do I get the mouse-position from, while dragging over parts that are AllowDrop = false? Because I don't seem to get the DragOver -Event which is the only one to give me DragEventArgs, which in turn are the only things to give me GetPosition
 
Hi @Rico-E
Short questions, sure.
And just to be sure - this chat room targets wpf, as opposed to winforms.
 
yeah, my question totaly WPF
 
Cool. One thing you may want to do is to create a gist which allows others to easily replicate the issue.
(The same thing you'd do for a question.)
Make it really easy for people to help you ;)
 
yeah... sure. Sorry
 
eh, no problem.
be back in a few.
 
3:45 PM
Well... while I'm trying to produce a minimal not working example, I see that this might be a bigger question, than I initially thought. I'm probably going to write a question ;)
 
@LynnCrumbling here now
 
4:03 PM
I've written my question. It's gotten a bit long. But I tried to make it easy for people to help me ;)
maybe you can have a look at: stackoverflow.com/questions/34047289/…
 
well i think part of the issue is that you are fixating on the drag operation
but what you are asking for (mouse position at all points) has nothing to do with dragging
You can call Mouse.GetPosition(this) on any WPF element. This function returns the relative offset of the mouse to the upper left corner of your control. To get the absolute screen cordinates, call the PointToScreen() function
 
It is at the end of the question: I have tried Mouse.GetPosition() to no avail.
 
if you put that code in a function that was triggered by a button press, it would work
you could, for eg, wrap it in a timer and fire it every second and get a history of your mouses position
but i doubt that will be good enough. you need to go lower with something like this
3
Q: How to track mouse X/Y position and print it to a label?

HelpNeederI know how to modify cursor position from examples on MSDN. My question is how to check position of mouse while mouse moves and then print X and Y position to representing labels? EDIT: Lets say I want to track my mouse position from my entire screen. EDIT 2: My app will be in the back ground/...

 
but I only want to get the mouse position while dragging
 
so set a bool and while that bool is on track position
 
4:09 PM
(but then at all times)
 
or start a monitoring task on drag start and kill it on drag end
 
and while dragging Mouse.GetPosition() doesn't work
 
then you gotta use mouse hook
i think the best question here is why do you want to do this
maybe there is an easier way
 
I want to move a adorner which shows the dragged item
 
so like a custom visual representation of the item being dragged
 
4:13 PM
correct
 
pretty sure you have better options then mouse tracking
 
which?
 
still looks like you need positional coordinates, not sure
 
this skips the most important part: where do I get the parameters of UpdatePosition from?
 
here is a better one
looks like that is a working example, you can steal his code or read through it
actually looks pretty nice, might use it myself lol
 
4:20 PM
well, I already found this myself, but I just saw, that I can download the code... Will work through it
 
its from 2008 though lol i would have thought this is a common design issue
 
well, this code only works, because there is no Control between these listboxes whose AllowDrop is false. If you put any Control (e.g a Border) between these listboxes, it doesn't work anymore...
 
4:36 PM
brutal
i find it hard to believe this problem hasnt been solved already
 
me tee. But I'm starting to think, that this problem has no WPF-like solution
 
did you see this one?
If we want drag & drop across apps, we are going to have to call Win32's GetCursorPos () ... This is trivial to write but requires full-trust ... (which you likely had if you needed to drag & drop with other apps anyway )...
If we want to drag & drop inside our app only or inside a specific 'scope' with in the app, there is a hucky workaround that I often use to avoid the interop code..
 
telerik has it.
not sure of all the requirements in question though
 
I also have a solution, but it requires a reference to WinForms. And I have the requirement NOT to use WinForms
 
@Rico-E Why are you setting allowdrop to false?
ahh, its the default value
 
4:49 PM
@JohanLarsson Still around?
@NETscape 'morning sir.
 
@LynnCrumbling ish, pretty busy
 
@Rico-E I think what I meant to say was, set allowdrop = true on everything
 
i have a ModernUI issue if have a few minutes @JohanLarsson
 
and just don't do anything on dropping on invalid targets
 
Did you see the issue that @Julien is working on?
 
4:51 PM
and constantly use DragEventArgs to place adorner
 
@Julien Is it the original or my fork?
 
both
 
ouch :)
what is the problem?
 
navigating to a page from a page within a title link
 
@JohanLarsson I intro'd him to Gu.ModernUI to see if it resolved the issue
It didn't :-(
 
4:53 PM
if that page is in a MenuLinkGroup, it doesn't select the proper Tab
 
Did you see his earlier repro case?
 
or even show the proper tabs, i should say
 
@LynnCrumbling nope, missed it
 
on the demo app, open navigation.xaml
<mui:BBCodeBlock xml:space="preserve">
» navigate to the [url=/Pages/Introduction.xaml]introduction page[/url]
</mui:BBCodeBlock>
drop that block of code into Content/SettingsAppearance.xaml anywhere
 
@Julien can you post a screenie?
 
4:55 PM
@JohanLarsson It's right here
 
I have not touched the codeblock things as I have never used them
 
^ or there
doh!
 
same behavior with NavigationCommand.GoToPage
 
Sorry @Julien :(
 
@Julien I would appreciate if you write an issue for it. Maybe on both.
 
4:56 PM
i have navigated to the intro page, but i am still in settings/software
 
ew, I have dumbed something
sry about that
 
dont think its your fault seeing as stock does it too
 
I rewrote most of the navigation
 
it works great if you aren't in a title link page hehe
 
Got pretty hairy due to quirks in wpf
@Julien navigated to intro meaning clicked the home smiley?
 
5:00 PM
<mui:BBCodeBlock xml:space="preserve">
» navigate to the [url=/Pages/Introduction.xaml]introduction page[/url]
</mui:BBCodeBlock>
 
oh, I'm slow
 
or
 
hey, does it make sense to have a BaseViewModel that implements INPC hastebin.com/uladovonut.vala , and have my subsequent VM's extend
rather than having PropertyChangedEventHandler in every VM
 
does it work if you click the smiley or the title link?
@BrianJ do you have Resharper?
With R# i'd let it autogenerate inpc
without maybe a baseclass
 
@JohanLarsson smiley yes, which one is the title link, i dont see anything clickable
 
5:02 PM
the welcome should be clickable
 
oh, yeah, that works fine
<Button Command="{x:Static NavigationCommands.GoToPage}" CommandParameter="/Pages/Introduction.xaml" />
behaves same as BBCodeBlock
so if the smiley works i can just steal that code?
 
@JohanLarsson nope I think you have to pay for ReSharper?
 
what if you do: <Link Source="/Pages/Introduction.xaml" /> where you have the button?
Link inherits button
@BrianJ yeah, pretty expensive, pretty nice
 
Does Resharper do things differently?
I'm starting my first job next month, maybe I should invest, any open source alts?
 
it autogenerates a lot of boilerplate
 
5:04 PM
ok
 
resharper is great and i'm a pirate
 
@BrianJ your employer should buy it for you
 
those two things may or may not be related
 
Lol so I could in theory get it for free
 
@JohanLarsson link works :D :D
 
5:05 PM
I'll stick to extending the BaseClass for the moment
 
@Julien there is still a dumb
 
@BrianJ i know johan disagrees, but im going to recommend fody again :D
 
until I get Resharper
 
yeah navigatecommands.gotopage should work
 
oh yeah you did mention that yesterday
 
5:06 PM
no piracy required and it cleans up your INPC
 
must pin that tab and have a look this eve
 
@Julien I don't disagree very much but i'm a bit afraid of advanced solutions.
No fun when they break down, new VS version or something.
 
yeah i get it. definitely depends on the scope of the project you are creating
 
what version should I look for on Nuget?
 
Install-Package PropertyChanged.Fody
@JohanLarsson how can i call that link command from code behind?
 
5:08 PM
just the property changed or complete tool?
 
@Rico-E set Windows.AllowDrop = true and all children will inherit
 
fody has a ton of stuff. ive only ever used prop change
 
ok will start there
 
@Julien I've done that. One sec.
 
^saved, was not sure enough to write anything :)
 
5:09 PM
(I use Link, btw. Not sure why I didn't suggest that before.)
@JohanLarsson laugh
 
It is really hard and painful to tests the navigation
Should find a way
 
(waiting for sln to open)
 
installed Fody
:)
 
@Julien This is how I navigate. This is a callback on the codebehind of the ModernWindow-derived MainWindow:
public void NavigationCallback(string szPageUrl)
{
    this.LinkNavigator.Navigate(this.NavigationTarget, new Uri(szPageUrl, UriKind.Relative));
}
 
so how should I begin refactoring my INPC code then with Fody? At the moment my INPC is implemented like so:

https://gist.github.com/BrianJVarley/9839faf25800461c25c3
@Julien
 
5:15 PM
you adorn your class with [ImplementPropertyChanged]
and then you completely forget everything you learned about INPC. lol
you dont need private backing fields anymore
just public properties
 
ok
so I delete my private property fields, then just have,

RaisePropertyChanged("SelectedCustomer");

in each public property setter?
 
you don't need any inpc related code
public string MyVar {get;set;}
 
do I delete RaisePropertyChanged also?
 
yes
@LynnCrumbling what is this.NavigationTarget
oh just a prop on every ModernWindow?
 
I'll refactor and show you after
 
5:19 PM
@Julien yep
 
so if i have a one window application, this could just be a ref to my window
and i can call that from VM's
project is at home, i will have to play with it later. thanks a lot guys
 
I pass a interface as a param for the vm ctor. And yep, just pass this.
(this should implement that callback interface)
public partial class MainWindow : ModernWindow, IMainWindowCallbacks
 
sweet :D
 
good luck, man
 
I must clean up the mess some time
 
5:26 PM
i am going to swap out the stock for your fork, so you better get to work :D
 
Write issues when you find dumbs
have you used stock much?
 
first time really, pet project
 
@Julien so I refactored for Fody, not sure how to refactor the SelectedCustomer and IsEnabled properties though. As SelectedCustomer needs to send a message in it's setter and IsEnabled needs to be set to true as default
 
ok, I think we have some significant improvements over stock but you will not notice then :)
 
ive tried to use it before but if your app isn't heavily tab navigation focused its pretty hard to make it work
 
5:27 PM
yeah
 
@BrianJ set IsEnabled in your constructor
make method: public void OnSelectedCustomerChanged() { }
 
ok understand the first
not sure how to code: public void OnSelectedCustomerChanged() { }
So I change that property to:

public CustomerModel SelectedCustomer { get; set; }
then where do I set:
Messenger.Default.Send<CustomerModel>(selectedCustomer);
 
public void OnSelectedCustomerChanged() { Messenger.Default.Send<CustomerModel>(SelectedCustomer); }
might want to add a null check depending on your app
 
I understand the method, not sure where it should be called?
 
it gets called automatically
OnYourVariableChanged is a fody method that gets triggered on sets
 
5:36 PM
ok I'll implement and show you
You said OnYourVariableChanged is a Fody method, does this make sense then?

https://gist.github.com/BrianJVarley/9839faf25800461c25c3
oh forgot, anywhere I was passing the private selectedCustomer I need to change to public property SelectedCustomer
 
looks good to me
 
yeah seems to run ok
I did notice that deletion of the SeletedCustomer still doesn't update on the data grid
thought Fody would have resolved that issue
or maybe every time I do a CRUD operation on the DB I should have duplicate code in the same method to modify the local list of objects also..
 
bingo
if (dbOperationSuccessful) updateViewModels
 
okay I wasn't too sure as hadn't worked with db's much before
I'll implement something this eve/ tomorrow and show you the implementation, thanks for advice as per usual :)
on a side note, Should I be modifying the list in my repository where the db CRUD operations take place, rather than in the VM where Observable collection exists and the calls are delegated the repo
?
If it's in the repo class should I have two separate methods for remote db persistence and local data persistence. Or should that code be combined in the same method
 
5:51 PM
your VM should imo be calling a model method that does the database work
VM shouldn't know anything about the db other then calling update methods passing themselves
 
^ this
That code that creates instances should have no knowledge of what internal mechanisms are persisting them.
Just that they can be persisted with Save();
Does Save() commit to a db, or contact a web service? Don't know, don't care.
 
 
1 hour later…
7:10 PM
ok good advice, will take that into account guys
 
7:45 PM
Quick question, should I have a separate DataService and DataRepository for different db tables?
So for example I have a CustomerDataService and CustomerRepository class, should I create two new classes for the Orders table?
 
i would probably have a BaseDataService and BaseRepositoryClass
and then make a new class for each type
 
 
1 hour later…
9:02 PM
Hi. I've created a simple WCF RESTful service. I can use it in browser providing the link as such: localhost:8157/RestServiceImpl.svc/json{id} which generates JSON data with simple string, containing {id}. How can I programmatically retrieve the same info using .Net?
 
9:46 PM
@Denver hrmm?
 
Already found some info. Guess HttpClient shall do the work.
 
I'd use WebClient
Much simpler than HttpClient IIRC
 
Will take a look, thanks.
 
10:09 PM
np
 

« first day (1139 days earlier)      last day (3010 days later) »