Hey Greg,
The example code that you'll want to look at is all in the "Form.cs" file. So, in the solution explorer, right click "Form.cs" and click "View Code". The code roughly follows what appears in the Using TurboActivate with C# article. There are a few functions inside the code. I'll explain what's inside them:
public Form1() { ... }
This is the form's constructor. That is, this is the first thing that runs in your app. Notice we're doing a couple of things here:
- TurboActivate.VersionGUID = "..." - paste the version GUID here. You can get this on your version page in LimeLM. We show a screenshot of this in the Using TurboActivate with C# article.
- isActivated = TurboActivate.IsActivated(); checks if the user is activated. It stores the result into the "bool isActivated".
- If the user is activated, the "Activate/Deactivate" menu is set to "Deactivate" (to let the user deactivate your software) and if the user has not yet activated then we check the number of grace period days remaining (using TurboActivate.GracePeriodDaysRemaining())
- If there are no grace period days remaining then we don't let the user use any of the features of the app. We do this in the example app by calling "ShowActivateMessage(true);"
void mnuActDeact_Click(object sender, EventArgs e) { ... }
This is the "Activation" menu item on the form. This menu gives your users a way to activate and deactivate your product. This function is called when the user click the "Activate" or "Deactivate" menu.
What happens inside this function is that if the user is activated the user is deactivated. And if the user is not activated, it launches TurboActivate.exe and waits for it to close before checking to see if the user is now activated.
void p_Exited(object sender, EventArgs e) {...}
This function is called when TurboActivate.exe exits. It simply rechecks to see if user is activated.
We're working to make the documentation and example code easier for new users. Tell me if this helps. If not, tell me which parts are still confusing you.