events

WPF binding fails with custom add and remove accessors for INotifyPropertyChanged.PropertyChanged

I have a scenario which is causing strange behavior with WPF data binding and INotifyPropertyChanged. I want a private member of the data binding source to handle the INotifyPropertyChanged.PropertyChanged event. Here's the source code: XAML <Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="htt...

Is there a way to know in VB.NET if a handler has been registered for an event?

In C# I can test for this... public event EventHandler Trigger; protected void OnTrigger(EventArgs e) { if (Trigger != null) Trigger(this, e); } Is there a way to do this in VB.NET? Test for null I mean? MORE INFO I forgot to mention. I have classes written in C# but I am writing my unit tests in VB.NET. I am tryin...

Adding a vector of numbers from MATLAB to a list in C#

Hi, Could anyone suggest a straightforward way to take a vector of numbers from MATLAB and add those numbers to a list in C# to be called upon by an event in the C# program? I've found a lot of information on the interface between the two languages, but I'm very new to c# and could use the specificity. Any suggestions welcome! ...

How can I share an OnEnter event for a TcxGrid ?

I want to standardize the behaviour on an Devexpress TcxGrid. So I have a unit ClientData with a event: procedure TClientData.grdOnEnter(Sender: TObject); begin mnuCxGridStandardMenu.Grid := TcxGrid(Sender); end; If I try to use that event from a TcxGrid.OnEnter event in another unit it refuse to work. If I paste in ClientData.grdOn...

Anyone know why I can't access the winevt folder programmatically in C#?

I've been trying to get into the 'C:\Windows\System32\winevt\Logs' folder programmatically using C# so I can copy the event log files to a backup directory and then clear the event logs as a part of a daily backup apparatus, but I don't seem to be able to get access to this directory. I've tried changing the application manifest to run ...

What's keeping this timer in scope? The anonymous method?

Ok, So I have a method which fires when someone clicks on our Icon in a silverlight application, seen below: private void Logo_MouseLeftButtonUp(object sender, MouseButtonEventArgs e) { e.Handled = true; ShowInfo(true); DispatcherTimer autoCloseTimer = new DispatcherTimer(); autoCloseTimer.Inter...

Do function on process close?

Say I have created a process using Process.Start();. How would I tell if it had been closed/terminated, without freezing the application. In CSharp, of course. Thanks! ...

WPF ComboBox - SelectionChanged event has old value, not new

C#, .NET 4.0, VS2010. New to WPF. I have a ComboBox on my MainWindow. I hooked the SelectionChanged event of said combo box. However, if I examine the value of the combo box in the event handler, it has the old value. This sounds more like a "SelectionChanging" event, than a SelectionChanged event. How do I get the new value of t...

How to re-enable the context menu in this case?

document.addEventListener('contextmenu', function (e) { e.preventDefault() e.stopPropagation() e.returnValue = false e.cancleBubble = true }) No way? Edit: document.oncontextmenu = null does not work. P.S. I cannot have the reference of the listener function since I am not the owner of the site preventing the context ...

YUI2.8: How to target element with handler applied only.

Hi, I'm having some probs with event propagation, I understand the concept, but I don't understand how to squash the default YUI behaviour. I have this markup: [divElement id="container"][imageElement ... /][/divElement] I have added a click event to the container element like so: ye.on(yd.get('container'), 'click', function(el){ // d...

iPad Safari's mapping of mouse events to touch events in image-maps

My website makes extensive use of image-maps. The images are of pages from a medieval manuscript. The mouseOver event of the AREA tags has a tooltip attached to it, which displays a modern typographic transcription of the ancient script for the line the mouse is hovering over. I just checked my website out on the iPad at the Apple stor...

Help with c# event listening and usercontrols

OK so I have a page which has a listview on it. Inside the item template of the listview is a usercontrol. This usercontrol is trying to trigger an event so that the hosting page can listen to it. My problem is that the event is not being triggered as the handler is null. (ie. EditDateRateSelected is my handler and its null when debug...

Using getRotationMatrix and getOrientation in Android 2.1

I've been having issues with this for far too long. This code should output dx,dy,dz for the accelerometer, and a running total of the dx. It should also output azimuth, pitch, and roll. I've used info from http://bit.ly/codeUsed, but to no avail. This code does not correctly output pitch, azimuth, or roll. It outputs 0.0, -0.0, -0....

is it necessary to unsubscribe from events?

How serious it might be to NOT unsubscribe from the events in c#? Is it mandatory or advisable action? ...

Event Viewer tool of Windows 2008 and Windows 7

I would like to know if my .Net code can write into Windows log-->Application part of the Event Viewer on Windows 2008 server and Windows 7 if I am a Non-administrator user. ...

Can I remove duplicating events in EventAggregator?

Hi, I have a quite simple scenario that I cannot get to work correctly. I have 2 views, CarView and CarWindowView (childwindow) with corresponding ViewModels. In my CarView I have an EditButton that that opens CarWindowView (childwindow) where I can edit the Car object fields. My problem is that the DisplayModule method in my CarWindow...

How do I bind a click to an anchor without a framework (javascript)

I know this is easily done in jQuery or any other framework, but that's not really the point. How do I go about 'properly' binding a click event in pure javascript? I know how to do it inline (I know this is terrible) <a href="doc.html" onclick="myFunc(); return false">click here</a> and this causes my javascript to execute for a JS e...

How to use Event notification in Solaris 10 when a directory change

I read the following page: Robert Benson's article on ECF developers.sun.com/solaris/articles/event_completion.html I also read the Solaris man pages but they are not very clear of how to use event notifications for directories. For example, If I add a new file into a directory, I would like to get some notification of that event. I f...

Is there an event for customer account registration in Magento?

I would like to be able to run some functionality with a module that I am building whenever a customer registers an account, but I can't seem to find any events that are fired upon a new customer registration. Does anybody know of an event that is dispatched for that? ...

Facebook request permissions javascript?

Trying to do 2 things request offline and user_events permission perminant session key Need a feed from facebook for events and there is no rss for it. Any help would be greatly appreciated!!! Currently have the following <!doctype html> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml"&gt;...