Quick Search


Tibetan singing bowl music,sound healing, remove negative energy.

528hz solfreggio music -  Attract Wealth and Abundance, Manifest Money and Increase Luck



 
Your forum announcement here!

  Free Advertising Forums | Free Advertising Board | Post Free Ads Forum | Free Advertising Forums Directory | Best Free Advertising Methods | Advertising Forums > Other Methods of FREE Advertising > FFA's and FFA Blasters Directory

FFA's and FFA Blasters Directory FFA's are being used by internet marketers everyday. They are great for adding one or two more sign-ups per week to your free to join programs, and they only take minutes to use.

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old 03-25-2011, 06:41 PM   #1
yongkang4760
Warrant Officer
 
Join Date: Mar 2011
Posts: 307
yongkang4760 is on a distinguished road
Default Microsoft Office 2010 64bit Writing A Quick Applic

With the release on the Windows Dwell ID SDK comes the ability to add the trusted security of Windows Live to your application,Windows 7 Serial, but how much work is needed to actually get this functionality into your program? Turns out, not a lot. In fact, for just getting a working sign in window and a message to show that the user is authenticated, it only requires about 5 lines of code that you need to write. Here I will show you how to add basic functionality to your program to give you a quickstart with using the SDK.
I’ll assume at this point that you have already downloaded and installed the SDK. So we first of all need to add the reference to our project to let Visual Studio know what to use, the reference we need to add is Microsoft.WindowsLive.Id.Client:

We will also need to put the using code in:
using Microsoft.WindowsLive.Id.Client;
Now, I mentioned that you only really need just 5 lines of code for this so I’ll quickly show you those lines of code and then expand upon that and show a small sample program. Now, first off create yourself a Windows Form in Visual Studio, something like the following:

The code for when button1 is pressed is simply as follows:
private void button1_Click(object sender, EventArgs e) IdentityManager idmgr = IdentityManager.CreateInstance("My App ID",Microsoft Office 2010 64bit, "My Own Sample Program"); Identity id = idmgr.CreateIdentity(); id.Authenticate(); if (id.IsAuthenticated) MessageBox.Show("User authenticated");
And that’s it, that will bring up the familiar Windows Stay sign in window, once signed in, it will pop up with a message saying you’re logged in. That is the real basics of using the Windows Reside ID SDK. Now I’ll show you a quick example that will allow the user to sign out, too, and also have part of the form be changed by the fact that you’ve signed in.
Create yourself a Windows Form, and put in a button (btnSignIn) and a label (lblInfo), mine looks like this:

We start off with declaring the two main objects which are the IdentityManager and Identity Objects:
namespace LiveIDApp
{ public partial class frmMain : Form { IdentityManager idmgr; Identity oID; public frmMain() InitializeComponent(); idmgr = IdentityManager.CreateInstance("ScottIsAFool;wlm@s cottisafool.co.uk;Scøtt's Test App",Microsoft Office Pro 2007 Serial, "Scøtt's Windows Live ID Test App"); oID = idmgr.CreateIdentity();
Now, you’ll notice that when we use the CreateInstance method we have a string that is the AppID. This should typically be made up of CompanyName;EmailAddress;ApplicationName, followed by the ApplicationName string in its own field,Windows 7 Pro Keygen, this is what will be shown in the Live ID window when the user signs in.
This time when the button is clicked, we’re going to do just a little bit more than in the quick example above:
private void btnSignIn_Click(object sender, EventArgs e) { // Check if a user is already signed in if (!oID.IsAuthenticated) { // Opens the Sign in window. On successful sign in, oID.Authenticate() // will return true. if (oID.Authenticate()) // Change the label text to show we're signed in and as whom lblInfo.Text = "Signed in as: " + oID.UserName; btnSignIn.Text = "&Sign Out"; else MessageBox.Show("Authentication failed"); } // If a user is signed in,Windows 7 Professional 32 Bit, then we are assuming that they want to sign out else // This closes the active connection to the server oID.CloseIdentityHandle(); // Resets the label and button text lblInfo.Text = "Not signed in"; btnSignIn.Text = "&Sign In"; }
And that’s it, so now when we click on the button, we will get the Windows Live sign in window:

And then once we have successfully signed in, our application will now look like this:

So there we have a basic example of how to use the Windows Live ID SDK. There are more uses of this, and they can be seen in the SDK documentation, and if you really want to utilize this SDK, I would recommend looking through it and seeing what else can be done.
Note: With this example I have put in no error handling.
Download Example Source Code
SL
yongkang4760 is offline   Reply With Quote
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off


All times are GMT. The time now is 12:12 PM.

 

Powered by vBulletin Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Free Advertising Forums | Free Advertising Message Boards | Post Free Ads Forum