Add widget event handler from Designer in MonoDevelop Gtk# - monodevelop

I created a new GTK# project in MonoDevelop. I added a button from Designer, and now I want to handle its clicked event. Can I do it from Designer, or do I have to do it from code using
button1.Clicked += ClickHandler();

Found the answer from http://www.monodevelop.com/documentation/building-a-simple-application-using-the-stetic-gui-designer/. You have to go open Properties->Signals, and then double click the event to create a default handler that throws a NotImplementedException.

Related

Cannot add icon to project resources mono develop

I made a new GTK# project added a toolbar and tried to add button to it. I tried to add a custom icon. I clicked on New Button, the on the newly created button -> select icon -> more -> project icons, and added my icon to the project. The icon appears normal in the editor, as shown on the screen shot below:
But when I try to run it, the following error occurs:
Error MSB5016: The name "DeployService.UseProjectRelativePath" contains an invalid character ".". (MSB5016)
Googling didn't help :( Anyone else had the similar problem? Thanks!
Edit1: Cleaning or rebuilding project also doesn't work, even after the icon is removed, but the application compiled successfully before the icon was added.
You need to go to the resource in you project (the icon), right-click it, select "build action" and set it to "embbeded resource".
Then you need to access it. If you are using the designer, then don't need anything else, but if you want to access it programmatically in Windows Forms (and your project is called "my-project" and your icon is under folder "Res")
this.bmpAppIcon = new Bitmap(
System.Reflection.Assembly.GetEntryAssembly( ).
GetManifestResourceStream(
"my-project.Res.appIcon.png" ) );
If you are working with Gtk# (you'll have to specify the size here):
this.Icon = new Gdk.Pixbuf(
System.Reflection.Assembly.GetEntryAssembly(),
"my-project.Res.appIcon.png", 32, 32 );

How to find the event handler code location in Chrome

All:
I am pretty new to Chrome debug tool, I am wondering how can I find where is the event handler code located? For example, when I click something on the page, but I do not know where the click event handler function in the script( say it is a very long script and possibly minified), how can I set breakpoint to catch that so that I know where those code is?
Thanks

start application on alarm fires in windows phone 8

I am new to Windows Phone 8 application development and I am creating an application for setting alarm. I have created it and scheduled some alarms . It shows default alarm window with "Dismiss" and "Snooze" buttons. Can I have the provision to override the dismiss and snooze button events from my application. Or can I start my application which set the alarm when the alarm fires? Is anybody knows the answer please help me.
I guess there is no such way to override these buttons for an alarm. But if you are going to use a reminder then you will be able specify a relative navigation URI, and when an user taps on the reminder pop up you could redirect the user to your app.
For more refer here
http://www.geekchamp.com/articles/getting-started-with-windows-phone-alarms
Hope it helps!
You can not Override that butttons but you can have events that are fired when alarm popup opens or dismissed.
Inside your App.Xaml.cs, you can subscribe to the Obscured and Unobscured events of your RootFrame.
RootFrame.Obscured += new EventHandler<ObscuredEventArgs>(RootFrame_Obscured);
RootFrame.Unobscured += new EventHandler(RootFrame_Unobscured);
When the alarm pops up, RootFrame_Unobscured will be fired; after you dismiss it, RootFrame_Obscured will be fired.

Trigger.io active tab for tabbar

I have a tabbar in my trigger.io app and currently have the setactive parameter set on the function element for each tab, so when selecting a tab it highlights the tab. While this works as expected I noticed if I go back using the back button on android or a built in soft button in app
( history.back() )
The highlight is lost. Now I understand why it would get lost as its only explicitly told to highlight when tapped but I was wondering if there is a way to programmatically trigger the highlight or active state so when I navigate between tabs and use the back button it will keep the highlighted state properly for each tab section?
Easiest would probably to add an event listener to update the button state with:
forge.event.backPressed.addListener(callback, error)
Also see: https://trigger.io/docs/current/api/core/event.html

JavaFX How to set Tab on click action when tab is disabled?

Is it possible to set on click action when Tab is disabled? I would like to inform user to do some action before accessing this Tab
I just found the answer, and it is pretty simple.
Create Label and add to it onClick event handler
Set use label as tab graphic
tab.setGraphic(label);
Easy, and it's working just fine.