Skip to content

Commit 5a46909

Browse files
committed
remove licensee and key from connect window
1 parent 00e2ef2 commit 5a46909

File tree

5 files changed

+38
-131
lines changed

5 files changed

+38
-131
lines changed

.NET/Examples/WindowsDesktop/Components/ConnectControl.Designer.cs

Lines changed: 23 additions & 97 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.NET/Examples/WindowsDesktop/Components/ConnectControl.cs

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
using System;
2-
using System.Diagnostics;
32
using System.Drawing;
43
using System.Linq;
54
using System.Windows.Forms;
@@ -43,9 +42,6 @@ public ConnectControl(UR ur)
4342
_rtdeInputSetup = parameters.Rtde.InputSetup;
4443

4544
UpdateRtdeIndicators();
46-
47-
txtLicensee.Text = Config.Current.Licensee;
48-
txtKey.Text = Config.Current.Key;
4945
}
5046

5147
#region IUserControl
@@ -92,12 +88,8 @@ private void btnConnect_Click(object sender, EventArgs e)
9288

9389
// Store information
9490
Config.Current.ConnectParameters = parameters;
95-
Config.Current.Licensee = txtLicensee.Text;
96-
Config.Current.Key = txtKey.Text;
9791
Config.Save();
9892

99-
UR.RegisterLicense(txtLicensee.Text, txtKey.Text);
100-
10193
// Connect to the robot
10294
_ur.Connect(parameters);
10395

@@ -160,14 +152,4 @@ private void radioV1_CheckedChanged(object sender, EventArgs e)
160152
lblHz.Enabled = enabled;
161153
lblFrequency.Enabled = enabled;
162154
}
163-
164-
private void btnConnect_Click(object sender, KeyEventArgs e)
165-
{
166-
167-
}
168-
169-
private void linkLicense_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
170-
{
171-
Process.Start("https://underautomation.com/license");
172-
}
173155
}

.NET/Examples/WindowsDesktop/Components/LicenseControl.Designer.cs

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.NET/Examples/WindowsDesktop/Components/LicenseControl.cs

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using System.Windows.Forms;
1+
using System.Diagnostics;
2+
using System.Windows.Forms;
23
using UnderAutomation.UniversalRobots;
34
using UnderAutomation.UniversalRobots.License;
45

@@ -26,15 +27,7 @@ public LicenseControl()
2627

2728
public bool FeatureEnabled => _licenseValid;
2829

29-
public void PeriodicUpdate()
30-
{
31-
if (txtLicensee.Text != Config.Current.Licensee || txtKey.Text != Config.Current.Key)
32-
{
33-
txtLicensee.Text = Config.Current.Licensee;
34-
txtKey.Text = Config.Current.Key;
35-
UpdateLicenseControls();
36-
}
37-
}
30+
public void PeriodicUpdate() { }
3831

3932
public void OnClose() { }
4033

@@ -62,4 +55,9 @@ private void btnSetLicense_Click(object sender, System.EventArgs e)
6255
Config.Current.Key = txtKey.Text;
6356
Config.Save();
6457
}
58+
59+
private void txtLicenseInfo_LinkClicked(object sender, LinkClickedEventArgs e)
60+
{
61+
Process.Start(e.LinkText);
62+
}
6563
}

.NET/Examples/WindowsDesktop/MainForm.Designer.cs

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)