Skip to content

Commit

Permalink
C# and heavy jar
Browse files Browse the repository at this point in the history
  • Loading branch information
Vinay Venkat committed Mar 13, 2017
1 parent f11c231 commit ebe0594
Show file tree
Hide file tree
Showing 21 changed files with 4,136 additions and 68 deletions.
Binary file modified Clients/C# DB Sender/.vs/CSDB/v14/.suo
Binary file not shown.
59 changes: 47 additions & 12 deletions Clients/C# DB Sender/CSDB/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,38 +9,73 @@ class Program
{
static void Main(string[] args)
{
String username = "";
String password = "";
String username;
String password;
String team;
int score;
int time;
bool quiet;

try
{
username = args[0];
password = args[1];
team = args[2];
score = int.Parse(args[3]);
time = int.Parse(args[4]);
quiet = Convert.ToBoolean(args[5]);
}
catch (Exception e)
{
username = "";
password = "";
team = "";
score = 0;
time = 0;
quiet = false;
}

string connectionString = "Server = tcp:ctsb.database.windows.net,1433; Initial Catalog = CPscores; Persist Security Info = False; User ID = " + username + "; Password =" + password + "; MultipleActiveResultSets = False; Encrypt = True; TrustServerCertificate = False; Connection Timeout = 30;";
string cmd = "INSERT INTO TeamScores (TeamName,Score,Time) VALUES (@val1, @val2, @val3)";
using (QC.SqlConnection conn = new QC.SqlConnection(connectionString))
{
using (QC.SqlCommand command = new QC.SqlCommand(cmd))
{
command.Connection = conn;
//command.CommandString = cmd;

command.Parameters.AddWithValue("@val1", "Matrix");
command.Parameters.AddWithValue("@val2", 9000);
command.Parameters.AddWithValue("@val3", 80);
command.Parameters.AddWithValue("@val1", team);
command.Parameters.AddWithValue("@val2", score);
command.Parameters.AddWithValue("@val3", time);

try
{
Console.WriteLine("Opening connection...");
if (!quiet)
{
Console.WriteLine("Opening connection...");
}
conn.Open();
Console.WriteLine("Transmitting data!");
if (!quiet)
{
Console.WriteLine("Transmitting data!");
}
command.ExecuteNonQuery();
Console.WriteLine("Done!");
if (!quiet)
{
Console.WriteLine("Done!");
}
}
catch(QC.SqlException e)
catch (QC.SqlException e)
{
Console.WriteLine("An error has occured");
Console.WriteLine(e);
}
}
}
Console.Write("Press any key to continue...");
Console.ReadKey(true);
if (!quiet)
{
Console.Write("Press any key to continue...");
Console.ReadKey(true);
}
}
}
}
Binary file modified Clients/C# DB Sender/CSDB/bin/Debug/CSDB.exe
Binary file not shown.
Binary file modified Clients/C# DB Sender/CSDB/bin/Debug/CSDB.pdb
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,9 @@ D:\CPscoreboard\Clients\CSDB\CSDB\obj\Debug\CSDB.pdb
D:\CPscoreboard\Clients\CSDB\CSDB\bin\Debug\CSDB.exe
D:\CPscoreboard\Clients\CSDB\CSDB\bin\Debug\CSDB.pdb
D:\CPscoreboard\Clients\CSDB\CSDB\obj\Debug\CSDB.csprojResolveAssemblyReference.cache
C:\Users\054457\Documents\CPscoreboard\Clients\C# DB Sender\CSDB\bin\Debug\CSDB.exe.config
C:\Users\054457\Documents\CPscoreboard\Clients\C# DB Sender\CSDB\obj\Debug\CSDB.exe
C:\Users\054457\Documents\CPscoreboard\Clients\C# DB Sender\CSDB\obj\Debug\CSDB.pdb
C:\Users\054457\Documents\CPscoreboard\Clients\C# DB Sender\CSDB\bin\Debug\CSDB.exe
C:\Users\054457\Documents\CPscoreboard\Clients\C# DB Sender\CSDB\bin\Debug\CSDB.pdb
C:\Users\054457\Documents\CPscoreboard\Clients\C# DB Sender\CSDB\obj\Debug\CSDB.csprojResolveAssemblyReference.cache
Binary file not shown.
Binary file modified Clients/C# DB Sender/CSDB/obj/Debug/CSDB.exe
Binary file not shown.
Binary file modified Clients/C# DB Sender/CSDB/obj/Debug/CSDB.pdb
Binary file not shown.
Binary file not shown.
Binary file modified Clients/DBMan.jar
Binary file not shown.
21 changes: 21 additions & 0 deletions Clients/Java DB Manager/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,25 @@
nbproject/build-impl.xml file.
-->

<target name="package-for-store" depends="jar">
<property name="store.jar.name" value="CTSBDB"/>
<property name="store.dir" value="store"/>
<property name="store.jar" value="${store.dir}/${store.jar.name}.jar"/>
<echo message="Packaging ${application.title} into a single JAR at ${store.jar}"/>
<delete dir="${store.dir}"/>
<mkdir dir="${store.dir}"/>
<jar destfile="${store.dir}/temp_final.jar" filesetmanifest="skip">
<zipgroupfileset dir="dist" includes="*.jar"/>
<zipgroupfileset dir="dist/lib" includes="*.jar"/>
<manifest>
<attribute name="Main-Class" value="${main.class}"/>
</manifest>
</jar>
<zip destfile="${store.jar}">
<zipfileset src="${store.dir}/temp_final.jar"
excludes="META-INF/*.SF, META-INF/*.DSA, META-INF/*.RSA"/>
</zip>
<delete file="${store.dir}/temp_final.jar"/>
</target>
</project>
4 changes: 2 additions & 2 deletions Clients/Java DB Manager/build/built-jar.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#Sun, 12 Mar 2017 20:36:44 -0800
#Mon, 13 Mar 2017 12:19:37 -0700


D\:\\CPscoreboard\\Clients\\CTSBDB=
C\:\\Users\\054457\\Documents\\CPscoreboard\\Clients\\Java\ DB\ Manager=
Binary file modified Clients/Java DB Manager/dist/CTSBDB.jar
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ do.depend=false
do.jar=true
javac.debug=true
javadoc.preview=true
user.properties.file=C:\\Users\\Vinay\\AppData\\Roaming\\NetBeans\\8.2\\build.properties
user.properties.file=C:\\Users\\054457\\AppData\\Roaming\\NetBeans\\8.1\\build.properties
3 changes: 3 additions & 0 deletions Clients/Java DB Manager/nbproject/private/private.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,8 @@
<group name="NetBeansProjects">
<file>file:/D:/CPscoreboard/Clients/Java%20DB%20Manager/src/ctsbdb/DBman.java</file>
</group>
<group>
<file>file:/C:/Users/054457/Documents/CPscoreboard/Clients/Java%20DB%20Manager/build.xml</file>
</group>
</open-files>
</project-private>
File renamed without changes.
2 changes: 1 addition & 1 deletion nbproject/UPDATED.TXT
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Project CPscoreboard build script updated
Project build script file jfx-impl.xml in nbproject sub-directory has not been recognized
as compliant with this version of NetBeans JavaFX support module. To ensure correct
and complete functionality within this NetBeans installation the script file has been
backed up to jfx-impl_backup_5.xml and then updated to the currently supported state.
backed up to jfx-impl_backup_6.xml and then updated to the currently supported state.

FX Project build script auto-update may be triggered on project open either after
NetBeans installation update or by manual changes in jfx-impl.xml. Please note that
Expand Down
49 changes: 4 additions & 45 deletions nbproject/jfx-impl.xml
Original file line number Diff line number Diff line change
Expand Up @@ -327,48 +327,26 @@
<property name="ant-javafx.jar.location" value="${platform.home}${file.separator}tools${file.separator}ant-javafx.jar"/>
</target>
<target name="-check-ant-javafx-in-probjdk-lib" unless="ant-javafx.jar.location">
<condition property="do.set.ant-javafx.in.probjdk.lib.has_jre">
<available file="${java.home}${file.separator}..${file.separator}lib${file.separator}ant-javafx.jar"/>
</condition>
<condition property="do.set.ant-javafx.in.probjdk.lib.no_jre">
<available file="${java.home}${file.separator}lib${file.separator}ant-javafx.jar"/>
</condition>
<condition property="do.set.ant-javafx.in.probjdk.lib">
<and>
<not><isset property="ant-javafx.jar.location"/></not>
<or>
<isset property="do.set.ant-javafx.in.probjdk.lib.has_jre"/>
<isset property="do.set.ant-javafx.in.probjdk.lib.no_jre"/>
</or>
<available file="${java.home}${file.separator}..${file.separator}lib${file.separator}ant-javafx.jar"/>
</and>
</condition>
</target>
<target name="-set-ant-javafx-in-probjdk-lib" depends="-set-ant-javafx-in-platform-home-tools,-check-ant-javafx-in-probjdk-lib" if="do.set.ant-javafx.in.probjdk.lib">
<condition property="ant-javafx.jar.location" value="${java.home}${file.separator}..${file.separator}lib${file.separator}ant-javafx.jar" else="${java.home}${file.separator}lib${file.separator}ant-javafx.jar">
<isset property="do.set.ant-javafx.in.probjdk.lib.has_jre"/>
</condition>
<property name="ant-javafx.jar.location" value="${java.home}${file.separator}..${file.separator}lib${file.separator}ant-javafx.jar"/>
</target>
<target name="-check-ant-javafx-in-probjdk-tools" unless="ant-javafx.jar.location">
<condition property="do.set.ant-javafx.in.probjdk.tools.has_jre">
<available file="${java.home}${file.separator}..${file.separator}tools${file.separator}ant-javafx.jar"/>
</condition>
<condition property="do.set.ant-javafx.in.probjdk.tools.no_jre">
<available file="${java.home}${file.separator}tools${file.separator}ant-javafx.jar"/>
</condition>
<condition property="do.set.ant-javafx.in.probjdk.tools">
<and>
<not><isset property="ant-javafx.jar.location"/></not>
<or>
<isset property="do.set.ant-javafx.in.probjdk.tools.has_jre"/>
<isset property="do.set.ant-javafx.in.probjdk.tools.no_jre"/>
</or>
<available file="${java.home}${file.separator}..${file.separator}tools${file.separator}ant-javafx.jar"/>
</and>
</condition>
</target>
<target name="-set-ant-javafx-in-probjdk-tools" depends="-set-ant-javafx-in-probjdk-lib,-check-ant-javafx-in-probjdk-tools" if="do.set.ant-javafx.in.probjdk.tools">
<condition property="ant-javafx.jar.location" value="${java.home}${file.separator}..${file.separator}tools${file.separator}ant-javafx.jar" else="${java.home}${file.separator}tools${file.separator}ant-javafx.jar">
<isset property="do.set.ant-javafx.in.probjdk.tools.has_jre"/>
</condition>
<property name="ant-javafx.jar.location" value="${java.home}${file.separator}..${file.separator}tools${file.separator}ant-javafx.jar"/>
</target>
<target name="-check-ant-javafx-in-macjdk-lib" unless="ant-javafx.jar.location">
<condition property="do.set.ant-javafx.in.macjdk.lib">
Expand Down Expand Up @@ -1847,25 +1825,6 @@
// manifest
var man = jar.createManifest();
var userManifestPath = project.getProperty("manifest.file");
if (userManifestPath) {
var userManifestFile = project.resolveFile(userManifestPath);
if (userManifestFile.isFile()) {
var manifestEncoding = project.getProperty("manifest.encoding");
var userManifestReader = manifestEncoding ?
new java.io.InputStreamReader(
new java.io.FileInputStream(userManifestFile),
manifestEncoding) :
new java.io.InputStreamReader(
new java.io.FileInputStream(userManifestFile));
try {
var userManifest = new org.apache.tools.ant.taskdefs.Manifest(userManifestReader);
man.merge(userManifest);
} finally {
userManifestReader.close();
}
}
}
var a1val = new String(project.getProperty("application.vendor"));
var a1 = new org.apache.tools.ant.taskdefs.Manifest.Attribute();
a1.setName("Implementation-Vendor");
Expand Down
Loading

0 comments on commit ebe0594

Please sign in to comment.