More license system tweaks

master
skylarmt 9 years ago
parent 5b12f44f56
commit c67f3c2221

@ -11,14 +11,15 @@
<Image iconType="3" name="/net/apocalypselabs/symat/icon16.png"/>
</Property>
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[435, 350]"/>
<Dimension value="[435, 367]"/>
</Property>
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[435, 350]"/>
<Dimension value="[435, 367]"/>
</Property>
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[435, 350]"/>
<Dimension value="[435, 367]"/>
</Property>
<Property name="selected" type="boolean" value="true"/>
</Properties>
<SyntheticProperties>
<SyntheticProperty name="formSizePolicy" type="int" value="1"/>
@ -78,7 +79,7 @@
<Component id="emailBox" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="contBtn" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace min="-2" pref="20" max="-2" attributes="0"/>
<EmptySpace min="-2" pref="40" max="-2" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
@ -86,7 +87,7 @@
<SubComponents>
<Component class="javax.swing.JLabel" name="jLabel1">
<Properties>
<Property name="text" type="java.lang.String" value="&lt;html&gt;&#xa;&lt;h1&gt;Welcome to SyMAT!&lt;/h1&gt;&#xa;&lt;p&gt;It would be a good idea to get this copy fully activated&#xa;&lt;br /&gt;before you go any further.&lt;/p&gt;&#xa;&lt;br /&gt;&#xa;&lt;p&gt;Do you have a license?&lt;/p&gt;"/>
<Property name="text" type="java.lang.String" value="&lt;html&gt;&#xa;&lt;h1&gt;Welcome to SyMAT!&lt;/h1&gt;&#xa;&lt;p&gt;Please activate the software. &#xa;&lt;br /&gt;Until you do, features will be limited.&#xa;&lt;br /&gt;You may be eligible for a free 15-day trial.&lt;/p&gt;&#xa;&lt;br /&gt;&#xa;&lt;p&gt;Do you have a license?&lt;/p&gt;"/>
</Properties>
</Component>
<Component class="javax.swing.JRadioButton" name="singLicSel">

@ -74,11 +74,16 @@ public class FirstRun extends javax.swing.JInternalFrame {
setTitle("Welcome");
setFrameIcon(new javax.swing.ImageIcon(getClass().getResource("/net/apocalypselabs/symat/icon16.png"))); // NOI18N
setMaximumSize(new java.awt.Dimension(435, 350));
setMinimumSize(new java.awt.Dimension(435, 350));
setPreferredSize(new java.awt.Dimension(435, 350));
setMaximumSize(new java.awt.Dimension(435, 367));
setMinimumSize(new java.awt.Dimension(435, 367));
setPreferredSize(new java.awt.Dimension(435, 367));
try {
setSelected(true);
} catch (java.beans.PropertyVetoException e1) {
e1.printStackTrace();
}
jLabel1.setText("<html>\n<h1>Welcome to SyMAT!</h1>\n<p>It would be a good idea to get this copy fully activated\n<br />before you go any further.</p>\n<br />\n<p>Do you have a license?</p>");
jLabel1.setText("<html>\n<h1>Welcome to SyMAT!</h1>\n<p>Please activate the software. \n<br />Until you do, features will be limited.\n<br />You may be eligible for a free 15-day trial.</p>\n<br />\n<p>Do you have a license?</p>");
grp1.add(singLicSel);
singLicSel.setText("Yes, I have a single-user license");
@ -171,7 +176,7 @@ public class FirstRun extends javax.swing.JInternalFrame {
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(emailBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(contBtn))
.addGap(20, 20, 20))
.addGap(40, 40, 40))
);
emailBox.setVisible(false);
@ -337,6 +342,7 @@ public class FirstRun extends javax.swing.JInternalFrame {
"Thank you for activating SyMAT!",
"Success",
JOptionPane.INFORMATION_MESSAGE);
MainGUI.licenseRestrict(false);
exit();
}

@ -122,6 +122,7 @@ public class MainGUI extends javax.swing.JFrame {
}
}
if (!licValid) {
licenseRestrict(true);
loadFrame(new FirstRun());
loaded = true;
}
@ -137,6 +138,12 @@ public class MainGUI extends javax.swing.JFrame {
updateDisplay();
}
public static void licenseRestrict(boolean restricted) {
editorBtn.setEnabled(!restricted);
graphBtn.setEnabled(!restricted);
helpBtn.setEnabled(!restricted);
}
/**
* Set keyboard shortcuts for buttons.
*/
@ -176,6 +183,9 @@ public class MainGUI extends javax.swing.JFrame {
if (PrefStorage.getSetting("licensetype").equals("demo")) {
demo = " Trial";
}
if (PrefStorage.getSetting("license").equals("")) {
demo = " Unregistered";
}
return "<html>"
+ nbsp
+ "<span style=\"color: gray; font-size: 130%;\"><i>"

Loading…
Cancel
Save