How To? C# Application

I am fairly new to coding but know enough if I have clear instructions, the instructions provided about intergrating into my application is not clear and seems to be directed to the individuals that are seasoned. All I want to do is intergrate this into my application. I have looked at the Sample C# but from there I am totally lost, no instructions no where that I can find on how you take the sample and intergrate into my application so it works.

Does anyone know where I can find Step by Step instructions for LimeLM?

Thanks in advance

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:

  1. 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.
  2. isActivated = TurboActivate.IsActivated(); checks if the user is activated. It stores the result into the "bool isActivated".
  3. 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())
  4. 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.

Thanks Wyatt,

But to be honest I am still not following your instructions - I have a program with my own form and then I open the example project C# -

Can you telll me where I can go and get step by step instructions? What do I and How do I?

What am I adding to my Form to call this? How is the TurboActivate for tied to my program? We like you product but it really doesn't help the guy that is not a super coder but has the ability to do some coding as long as the instructions are there.

ThanksGreg

OK, we'll work on the Using TurboActivate with C# tutorial and make it step-by-step. We'll try to get it done by the end of this week.

How is the TurboActivate for tied to my program?

You include the TurboActivate.cs file in your project. This class is a thin wrapper of all the TurboActivate.dll calls. You also include the TurboActivate.dll and TurboActivate.exe in your program's "Debug" and "Release" folders. Lastly, you include the TurboActivate.dat file you downloaded and also include it in your "Debug" and "Release" folders.

This is the "first step".

The next steps involve using the TurboActivate functions.

But, like I said, we'll work on making the instructions much easier to follow.

Greg,

We've just finished the C# walkthrough of LimeLM and TurboActivate. Tell me if this helps.

Hey guys!

Running thru the C# tutorial nowWell written as always.....8)Hitting a few snags. tho.I'm doing a C# WPF App.

small thing 1st:for WPF guys you should mention to make this linemnuActDeact.Header = show ? "Activate..." : "Deactivate";

2nd I was getting errors on this lineFileName = Path.Combine(Path.GetDirectoryName(Application.ExecutablePath), "TurboActivate.exe")

so I changed it to to the below since Path is a WPF graphic thing by default

FileName = System.IO.Path.Combine(System.IO.Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath), "TurboActivate.exe")

Any problems there you can see with that or anyway to do that better for WPF like not using the Win Forms code?

3rd I was getting errors on this one

Invoke(new TAIsActivatedDelegate(TAIsActivated));so I changed it to

Dispatcher.Invoke(new TAIsActivatedDelegate(TAIsActivated));It seems to be working, but just ask to make sure........8)hehehePlus, it might be good to document these things for other WPF beginners.

The OSX version is next!!

thx and keep up the good work!

Steve

Plus, it might be good to document these things for other WPF beginners.

We'll add these notes to the tutorial. Thanks for pointing them out.

Plus, it might be good to document these things for other WPF beginners.

We'll add these notes to the tutorial. Thanks for pointing them out.

Just a reminder, this was either not done or it accidentally got deleted again.

You're right, we'll fix that.

I think a proper guide for WPF is needed.

This is way too complicated without a proper guide and full example for WPF.

I have to move on to another system.

This forum post is ancient. For a full step by step tutorial see our official help documentation: https://wyday.com/limelm/help/using-turboactivate-with-csharp/

Wyatt wrote:> This forum post is ancient. For a full step by step tutorial see our> official help documentation:> https://wyday.com/limelm/help/using-turboactivate-with-csharp/

I've read it and it seems like a great guide but it's for winforms. I'm new to programming and I have never used winforms and having trouble translating the example to something useful for my wpfapp that's finally finished, except for this final step. I would love to use LimeLM but I dont think I will manager to do that without a similar guide/ example for wpf.

We can throw together a WPF example for you for later this week if you'd like.

Wyatt wrote:> We can throw together a WPF example for you for later this week if you'd> like.

Thank you Wyatt!

Thats more than anyone can ask and Im greatful for that! I think other users could benefit from that too.

I will be away this and the whole next week too, so I can wait until week 27.

For me all I need is a simple example with:Hardware locked licensing / Online activationTrial period (1 month)License expires (1 year)

I prefer single window and rather use messagebox or similar if needed instead of popup windows. For example CustomMessageBox.

Shoot us an email at support@wyday.com and we'll send you over the WPF example app (it will be included in TA 4.1 -- but that release is still a little ways off)

Wyatt wrote:> Shoot us an email at support@wyday.com and we'll send you over the WPF> example app (it will be included in TA 4.1 -- but that release is still a> little ways off)

Thank you!

I'll test it within a few days. I have taken a quick look and it has already given me the answer to some questions.