Skip to content

Instantly share code, notes, and snippets.

@CipherLab
CipherLab / HttpClient
Created July 11, 2014 13:07
Upload / Download via HTTPS
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
public class HTTPClient
@CipherLab
CipherLab / HtmlVbMarkupExample
Created July 11, 2014 13:08
Using the html syntax in vb.net
Public Function BuildLabelMarkup(Context As IDataSource, Process As IDataSource, Label As IDataSource) As String Implements ILabelBuilder.BuildLabelMarkup
Dim listNo As String = Process.GetValue("List No.", "")
Dim lotnum As String
If listNo = "07064" Then
lotnum = Process.GetValue("Lot No.", "")
Else
lotnum = Process.GetValue("Lot No.", "") + "-" + Process.GetValue("SublotNumber", "")
@CipherLab
CipherLab / Emailer
Created July 11, 2014 13:09
Emailer Client
using System;
using System.Data;
using System.Configuration;
using System.Collections;
//using System.Linq;
using System.Net.Mail;
using System.Net.Mime;
using System.Text.RegularExpressions;
using System.Web;
using System.IO;
@CipherLab
CipherLab / Encryption
Created July 11, 2014 13:10
Simple encryption/decryption
using System;
using System.Collections.Generic;
using System.Runtime.Serialization;
using System.IO;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
using System.Threading.Tasks;
@CipherLab
CipherLab / General
Created July 11, 2014 13:11
General useful functions
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
@CipherLab
CipherLab / SocketListener
Created July 11, 2014 13:12
Threaded socket listener
using System;
using System.Threading;
using System.Windows.Forms;
using System.Collections.Generic;
using System.Text;
using System.Net;
using System.Net.Sockets;
using System.Data.SqlClient;
using Timer = System.Windows.Forms.Timer;
using System.Diagnostics;
@CipherLab
CipherLab / SocketConnector
Created July 11, 2014 13:13
Socket connector class
using System;
using System.Threading;
using System.Windows.Forms;
using System.Collections.Generic;
using System.Text;
using System.Net;
using System.Net.Sockets;
using System.Data.SqlClient;
using Timer = System.Windows.Forms.Timer;
using System.Diagnostics;
@CipherLab
CipherLab / FtpClient
Created July 11, 2014 13:13
Ftp client helper
using System;
using System.IO;
using System.Net;
public class FTPClient
{
private string host = null;
private string user = null;
private string pass = null;
private FtpWebRequest ftpRequest = null;
private FtpWebResponse ftpResponse = null;
@CipherLab
CipherLab / EventLogger
Created July 11, 2014 13:14
Event logger
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text;
public static class EventLogger
{
private static EventLog log;
@CipherLab
CipherLab / Serialize
Last active August 29, 2015 14:03
Serialize/deserialize objects
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Xml;
using System.Xml.Serialization;
using System.IO.IsolatedStorage;
using System.Data;
using System.ComponentModel;