Click here to Skip to main content
       

C#

 
AnswerRe: Force Beep...! PinmvpEddy Vluggen25-Feb-13 8:04 
AnswerRe: Force Beep...! PinprofessionalAmir Mohammad Nasrollahi29-Jul-13 21:38 
QuestionASP.NET UserControl In UserControl Pinmemberthekoko8924-Feb-13 16:30 
AnswerCrosspost PinmemberSoMad24-Feb-13 16:47 
QuestionThe .exe application file isn't obfuscated after installing setup ? Pinmembertaibc24-Feb-13 4:21 
AnswerRe: The .exe application file isn't obfuscated after installing setup ? PinprotectorPete O'Hanlon25-Feb-13 1:58 
GeneralRe: The .exe application file isn't obfuscated after installing setup ? Pinmembertaibc25-Feb-13 3:12 
GeneralRe: The .exe application file isn't obfuscated after installing setup ? PinprotectorPete O'Hanlon25-Feb-13 4:43 
GeneralRe: The .exe application file isn't obfuscated after installing setup ? Pinmembertaibc25-Feb-13 4:53 
AnswerRe: The .exe application file isn't obfuscated after installing setup ? PinmemberSamer AlRawi26-Feb-13 17:41 
GeneralRe: The .exe application file isn't obfuscated after installing setup ? Pinmembertaibc28-Feb-13 14:36 
QuestionC# PinmemberMohanKrishna.Kota24-Feb-13 4:06 
AnswerASP.NET PinmemberJegan Thiyagesan25-Feb-13 12:14 
General[TUTORIAL] Native Cocoa Apps with C# and MonoMac PinmemberJake Rieger23-Feb-13 14:36 
I thought I would show you guys a quick tutorial on how to build native cocoa apps using C# and MonoMac. I will be showing you how to make the famous "Hello World" app.
 
Lets Begin!
 
You will need the following:
MonoDevelop IDE
MonoDevelop Framework SDK
XCode 4.x
 
One you have those, open up MonoDevelop. Click on "new solution" Drop down the C# category and select "Mac (open source)" and create a MonoMac project.
 
Now once that is done you should have some files and folders. Double click the MainWindow.xib file and XCode should open. Add a button and a label. Now click the middle button above Editor in the top right of XCode. Find "Automatic" and click on it and go to "MainWindowController.h" Now right click and drag the button to the code and add an outlet called "guiButton" or whatever you want. Do the same with the label. Now right click and drag from the button again but this time select action and name it "buttonClicked."
 
Ok, that's done. Save and close XCode. Now go back to MonoDevelop and open MainWindow.designer. A bunch of new code should have been added. Verify that the outlets and action have been added before continuing.
Your file should look like this:
 
// WARNING
//
// This file has been generated automatically by MonoDevelop to store outlets and
// actions made in the Xcode designer. If it is removed, they will be lost.
// Manual changes to this file may not be handled correctly.
//
using MonoMac.Foundation;
 
namespace dontgivemeerrors
{
	[Register ("MainWindowController")]
	partial class MainWindowController
	{
		[Outlet]
		MonoMac.AppKit.NSTextField guiTextField { get; set; }
 
		[Outlet]
		MonoMac.AppKit.NSButton guiButton { get; set; }
 
		[Action ("buttonClicked:")]
		partial void buttonClicked (MonoMac.Foundation.NSObject sender);
		
		void ReleaseDesignerOutlets ()
		{
			if (guiTextField != null) {
				guiTextField.Dispose ();
				guiTextField = null;
			}
 
			if (guiButton != null) {
				guiButton.Dispose ();
				guiButton = null;
			}
		}
	}
 
	[Register ("MainWindow")]
	partial class MainWindow
	{
		
		void ReleaseDesignerOutlets ()
		{
		}
	}
}
 
Ok, now open MainWindowController.cs and find "#endregion" Go under it and add the following line of code:
 
partial void buttonClicked (MonoMac.Foundation.NSObject sender)
{
 
}
 
Replace "buttonClicked" with name of your action. Now for the final step. Add this to that line of code:
 
partial void buttonClicked (MonoMac.Foundation.NSObject sender)
{
     this.guiLabel.StringValue = "Hello World";
}
 
Now run the app by pressing the icon with 2 gears and a green gear on the top right of MonoDevelop. Press the button and the label text should change to "Hello World."
 
Thats it. Most of your code will be under the action void. To find your .app file, go to YourUserName -> Projects -> NameOfProject -> NameOfProject -> bin -> Debug
 
Happy Coding! Smile | :)
 
- Team HsM
HSM

GeneralRe: [TUTORIAL] Native Cocoa Apps with C# and MonoMac PinmvpDave Kreskowiak23-Feb-13 14:39 
GeneralRe: [TUTORIAL] Native Cocoa Apps with C# and MonoMac PinmemberMycroft Holmes24-Feb-13 18:17 
Questionprograme Pinmemberongwere23-Feb-13 9:35 
AnswerRe: programe PinmemberSoMad23-Feb-13 10:37 
GeneralRe: programe PinmemberManfred R. Bihy23-Feb-13 11:37 
GeneralRe: programe PinmemberSoMad23-Feb-13 11:46 
AnswerRe: programe PinprofessionalAmir Mohammad Nasrollahi29-Jul-13 21:45 
QuestionCustomize windows scroll bar in combobox PinmemberKaizen20223-Feb-13 7:45 
AnswerRe: Customize windows scroll bar in combobox PinmemberSledgeHammer0123-Feb-13 9:20 
GeneralRe: Customize windows scroll bar in combobox PinmemberKaizen20224-Feb-13 6:01 
GeneralRe: Customize windows scroll bar in combobox PinmemberSledgeHammer0124-Feb-13 8:20 
Questionunable to start program, unrecognized error in windows web services framework Pinmemberbonosa23-Feb-13 5:06 
Questionwhy System.NullReferenceException occurred? PinmemberJassim Rahma23-Feb-13 1:54 
AnswerRe: why System.NullReferenceException occurred? PinmemberAlan N23-Feb-13 2:04 
GeneralRe: why System.NullReferenceException occurred? PinmemberJassim Rahma23-Feb-13 2:10 
GeneralRe: why System.NullReferenceException occurred? PinmemberAlan N23-Feb-13 2:33 
GeneralRe: why System.NullReferenceException occurred? PinmemberJassim Rahma23-Feb-13 2:44 
GeneralRe: why System.NullReferenceException occurred? PinmemberAlan N23-Feb-13 2:54 
AnswerRe: why System.NullReferenceException occurred? Pinmemberjschell24-Feb-13 7:05 
QuestionHow to read gmail mails using C# (only Unread Email ) [modified] PingroupAeroIT22-Feb-13 18:13 
AnswerRe: How to read gmail mails using C# (only Unread Email ) PinmvpDave Kreskowiak22-Feb-13 18:22 
AnswerRe: How to read gmail mails using C# (only Unread Email ) PinmvpOriginalGriff22-Feb-13 21:42 
AnswerRe: How to read gmail mails using C# (only Unread Email ) PinmemberMarco Bertschi23-Feb-13 8:02 
AnswerRe: How to read gmail mails using C# (only Unread Email ) [modified] PinprofessionalAmir Mohammad Nasrollahi29-Jul-13 21:51 
Questionsimplest hacking software in C# PinmemberMember 985741522-Feb-13 16:44 
AnswerRe: simplest hacking software in C# PinmvpDave Kreskowiak22-Feb-13 18:21 
AnswerRe: simplest hacking software in C# PinmemberSoMad22-Feb-13 19:13 
AnswerRe: simplest hacking software in C# PinmvpOriginalGriff22-Feb-13 21:44 
GeneralRe: simplest hacking software in C# PinmemberJibesh22-Feb-13 22:46 
GeneralRe: simplest hacking software in C# PinmemberShubh Agrahari23-Feb-13 2:03 
AnswerRe: simplest hacking software in C# PinmemberMarco Bertschi23-Feb-13 8:04 
AnswerRe: simplest hacking software in C# PinmemberV.25-Feb-13 0:25 
Questionsourceafis probleme Pinmemberarissem22-Feb-13 8:02 
AnswerRe: sourceafis probleme PinmvpDave Kreskowiak22-Feb-13 8:47 
GeneralRe: sourceafis probleme Pinmemberarissem22-Feb-13 8:55 
GeneralRe: sourceafis probleme PinmvpDave Kreskowiak22-Feb-13 9:26 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web03 | 2.8.140814.1 | Last Updated 21 Aug 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid