[C#] Pastebin Application

A place to discuss development on the Microsoft .NET framework platform utilizing languages such as C#, Visual Basic, J# and Managed C++

Moderators: IRC Operators, Support Team

Sparkie
User
User
Posts: 25
Joined: Fri Jul 25, 2008 9:36 am

[C#] Pastebin Application

Postby Sparkie » Thu Jul 15, 2010 7:11 am

Inspired by JR's mIRC Version. In this you can minimize it to tray and some other nifty features.
Many thanks to Kylar and the guys on ##csharp @ freenode

Image

Image

Image
Download here: https://dl.dropbox.com/u/8023208/PasteBin.exe


Form1.cs:

Code: Select all

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO;
using System.Net;
using System.Net.Sockets;
using System.Web;


namespace PasteBin
{
    public partial class backDrop : Form
    {
        public backDrop()
        {
            InitializeComponent();
            this.Resize += new EventHandler(Form1_Resize);
        }


        public Dictionary<string, string> syntaxHighlightDict = new Dictionary<string, string>();
        public Dictionary<string, string> privacyDict = new Dictionary<string, string>();
        public Dictionary<string, string> expireDict = new Dictionary<string, string>();

        private void Form1_Load(object sender, EventArgs e)
        {
            System.Net.ServicePointManager.Expect100Continue = false;
            notifyIcon.ContextMenuStrip = contextMenuStrip;
            string[] syntaxArray = { "ABAP=abap", "ActionScript=actionscript", "ActionScript 3=actionscript3", "Ada=ada", "Apache Log=apache", "AppleScript=applescript", "APT Sources=apt_sources", "ASM (NASM)=asm", "ASP=asp", "AutoIt=autoit", "Avisynth=avisynth", "Bash=bash", "Basic4GL=basic4gl", "BibTeX=bibtex", "Blitz Basic=blitzbasic", "BNF=bnf", "BOO=boo", "****=bf", "C=c", "C for Macs=c_mac", "C Intermediate Language=cill", "C#=csharp", "C++=cpp", "CAD DCL=caddcl", "CAD Lisp=cadlisp", "CFDG=cfdg", "Clone C=klonec", "Clone C++=klonecpp", "CMake=cmake", "COBOL=cobol", "ColdFusion=cfm", "CSS=css", "D=d", "DCS=dcs", "Delphi=delphi", "Diff=dff", "DIV=div", "DOS=dos", "DOT=dot", "Eiffel=eiffel", "Email=email", "Erlang=erlang", "FO Language=fo", "Fortran=fortran", "FreeBasic=freebasic", "Game Maker=gml", "Genero=genero", "GetText=gettext", "Groovy=groovy", "Haskell=haskell", "HQ9 Plus=hq9plus", "HTML=html4strict", "IDL=idl", "INI file=ini", "Inno Script=inno", "INTERCAL=intercal", "IO=io", "Java=java", "Java 5=java5", "JavaScript=javascript", "KiXtart=kixtart", "Latex=latex", "Linden Scripting=lsl2", "Lisp=lisp", "Loco Basic=locobasic", "LOL Code=lolcode", "Lotus Formulas=lotusformulas", "Lotus Script=lotusscript", "LScript=lscript", "Lua=lua", "M68000 Assembler=m68k", "Make=make", "MatLab=matlab", "mIRC=mirc", "Modula 3=modula3", "MPASM=mpasm", "MXML=mxml", "MySQL=mysql", "None=text", "NullSoft Installer=nsis", "Oberon 2=oberon2", "Objective C=objc", "OCalm Brief=ocaml-brief", "OCaml=ocaml", "OpenGL Shading=glsl", "Openoffice BASIC=oobas", "Oracle 11=oracle11", "Oracle 8=oracle8", "Pascal=pascal", "PAWN=pawn", "Per=per", "Perl=perl", "PHP=php", "PHP Brief=php-brief", "Pic 16=pic16", "Pixel Bender=pixelbender", "PL/SQL=plsql", "POV-Ray=povray", "Power Shell=powershell", "Progress=progress", "Prolog=prolog", "Properties=properties", "ProvideX=providex", "Python=python", "QBasic=qbasic", "Rails=rails", "REBOL=rebol", "REG=reg", "Robots=robots", "Ruby=ruby", "Ruby Gnuplot=gnuplot", "SAS=sas", "Scala=scala", "Scheme=scheme", "Scilab=scilab", "SdlBasic=sdlbasic", "Smalltalk=smalltalk", "Smarty=smarty", "SQL=sql", "T-SQL=tsql", "TCL=tcl", "Tera Term=teraterm", "thinBasic=thinbasic", "TypoScript=typoscript", "unrealScript=unreal", "VB.NET=vbnet", "VeriLog=verilog", "VHDL=vhdl", "VIM=vim", "Visual Pro Log=visualprolog", "VisualBasic=vb", "VisualFoxPro=visualfoxpro", "WhiteSpace=whitespace", "WHOIS=whois", "Win Batch=winbatch", "XML=xml", "Xorg Config=xorg_conf", "XPP=xpp", "Z80 Assembler=z80"};
            foreach (string temp in syntaxArray) {
                string[] param = temp.Split('=');
                syntaxHighlight.Items.Add(param[0]);
                syntaxHighlightDict.Add(param[0],param[1]);
            }
            syntaxHighlight.DropDownStyle = ComboBoxStyle.DropDownList;

            string[] expireOptions = { "Never=N", "10 Minutes=10M", "1 Hour=1H", "1 Day=1D", "1 Month=1M"};
            foreach (string temp in expireOptions)
            {
                string[] param = temp.Split('=');
                postExpire.Items.Add(param[0]);
                expireDict.Add(param[0], param[1]);
            }
            postExpire.DropDownStyle = ComboBoxStyle.DropDownList;

            string[] privacyOptions = { "Public=0", "Private=1" };           
            foreach (string temp in privacyOptions)
            {
                string[] param = temp.Split('=');
                postPrivacy.Items.Add(param[0]);
                privacyDict.Add(param[0], param[1]);
            }
            postPrivacy.DropDownStyle = ComboBoxStyle.DropDownList;


            submitButton.Click += (s, arg) => {
                pastebinSend();
            };

        }



        private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
        }

        private void label1_Click(object sender, EventArgs e)
        {

        }

        private void fileToolStripMenuItem_Click(object sender, EventArgs e)
        {

        }
        private void copyButton_Click(object sender, EventArgs e)
        {
            Clipboard.SetDataObject(urlBox.Text, true);
        }

        private void newToolStripMenuItem_Click(object sender, EventArgs e)
        {
            textArea.Text = "";
        }

        private void openToolStripMenuItem_Click(object sender, EventArgs e)
        {
            OpenFileDialog oDialog = new OpenFileDialog();
            oDialog.Title = "Open";
            oDialog.Filter = "All Files|*.*";
            oDialog.InitialDirectory = @"C:\";
            if (oDialog.ShowDialog() == DialogResult.OK)
            {
                textArea.Text = File.ReadAllText(oDialog.FileName.ToString());
            }
        }


        private void notifyIcon_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            this.Show();
            this.WindowState = FormWindowState.Normal;
            this.notifyIcon.Visible = false;
        }

        private void Form1_Resize(object sender, EventArgs e)
        {
            if (this.WindowState == FormWindowState.Minimized)
            {
                this.Hide();
                this.notifyIcon.Visible = true;
            }
        }


        private void menuStrip1_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
        {

        }

        void pastebinSend()
        {

            if (textArea.Text.Equals(String.Empty))
            {
                MessageBox.Show("Error: You need to specify code");
                urlBox.Text = "";
            }
            else
            {
                urlBox.Text = "Uploading";
                string code = textArea.Text.ToString();
                string name = nameBox.Text != null ? nameBox.Text.ToString() : String.Empty;
                string email = emailBox.Text != null ? emailBox.Text.ToString() : String.Empty;
                string hl = syntaxHighlight.SelectedItem != null ? syntaxHighlightDict[syntaxHighlight.SelectedItem.ToString()] : String.Empty;
                string expire = postExpire.SelectedItem != null ? expireDict[postExpire.SelectedItem.ToString()] : String.Empty;
                string subdomain = subdomainBox.Text != null ? subdomainBox.Text : String.Empty;
                string privacy = postPrivacy.SelectedItem != null ? privacyDict[postPrivacy.SelectedItem.ToString()] : String.Empty;
                string data = String.Format("&paste_name={0}&paste_email={1}&paste_format={2}&paste_expire_date={3}&paste_subdomain={4}&paste_private={5}&paste_code={6}", HttpUtility.UrlEncode(name), HttpUtility.UrlEncode(email), HttpUtility.UrlEncode(hl), HttpUtility.UrlEncode(expire), HttpUtility.UrlEncode(subdomain), HttpUtility.UrlEncode(privacy), HttpUtility.UrlEncode(code));
                WebClient pasteClient = new WebClient();
                Uri uri = new Uri("http://www.pastebin.com/api_public.php");

                pasteClient.Headers.Add("Content-Type", "application/x-www-form-urlencoded");
                pasteClient.UploadStringCompleted += new UploadStringCompletedEventHandler(pasteClientCallBack);
                pasteClient.UploadStringAsync (uri, data);

            }
        }
        public void pasteClientCallBack(object sender, UploadStringCompletedEventArgs e)
        {
            string result;
            try
            {
                result = e.Result;

            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
                return;
            }
            urlBox.Text = result;
        }

        private void contextRestore_Click(object sender, EventArgs e)
        {
            this.Show();
            this.WindowState = FormWindowState.Normal;
            this.notifyIcon.Visible = false;
        }

        private void contextExit_Click(object sender, EventArgs e)
        {
            this.notifyIcon.Visible = false;
            this.Close();

        }

     }
}

Form1.Designer.cs

Code: Select all

namespace PasteBin
{
    partial class backDrop
    {
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;

        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        #region Windows Form Designer generated code

        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.components = new System.ComponentModel.Container();
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(backDrop));
            this.textArea = new System.Windows.Forms.RichTextBox();
            this.syntaxHighlight = new System.Windows.Forms.ComboBox();
            this.postPrivacy = new System.Windows.Forms.ComboBox();
            this.postExpire = new System.Windows.Forms.ComboBox();
            this.syntaxLabel = new System.Windows.Forms.Label();
            this.expireLabel = new System.Windows.Forms.Label();
            this.privacyLabel = new System.Windows.Forms.Label();
            this.nameLabel = new System.Windows.Forms.Label();
            this.emailLabel = new System.Windows.Forms.Label();
            this.nameBox = new System.Windows.Forms.TextBox();
            this.emailBox = new System.Windows.Forms.TextBox();
            this.submitButton = new System.Windows.Forms.Button();
            this.subdomainLabel = new System.Windows.Forms.Label();
            this.subdomainBox = new System.Windows.Forms.TextBox();
            this.urlBox = new System.Windows.Forms.TextBox();
            this.highlightLabel = new System.Windows.Forms.Label();
            this.notifyIcon = new System.Windows.Forms.NotifyIcon(this.components);
            this.copyButton = new System.Windows.Forms.Button();
            this.menuStrip = new System.Windows.Forms.MenuStrip();
            this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.newToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.openToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.contextMenuStrip = new System.Windows.Forms.ContextMenuStrip(this.components);
            this.contextRestore = new System.Windows.Forms.ToolStripMenuItem();
            this.contextExit = new System.Windows.Forms.ToolStripMenuItem();
            this.menuStrip.SuspendLayout();
            this.contextMenuStrip.SuspendLayout();
            this.SuspendLayout();
            //
            // textArea
            //
            this.textArea.Font = new System.Drawing.Font("Trebuchet MS", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.textArea.Location = new System.Drawing.Point(11, 29);
            this.textArea.Name = "textArea";
            this.textArea.Size = new System.Drawing.Size(470, 350);
            this.textArea.TabIndex = 0;
            this.textArea.Text = "";
            this.textArea.WordWrap = false;
            //
            // syntaxHighlight
            //
            this.syntaxHighlight.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            this.syntaxHighlight.FormattingEnabled = true;
            this.syntaxHighlight.Location = new System.Drawing.Point(347, 465);
            this.syntaxHighlight.Name = "syntaxHighlight";
            this.syntaxHighlight.Size = new System.Drawing.Size(121, 21);
            this.syntaxHighlight.TabIndex = 1;
            this.syntaxHighlight.SelectedIndexChanged += new System.EventHandler(this.comboBox1_SelectedIndexChanged);
            //
            // postPrivacy
            //
            this.postPrivacy.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            this.postPrivacy.FormattingEnabled = true;
            this.postPrivacy.Location = new System.Drawing.Point(347, 406);
            this.postPrivacy.Name = "postPrivacy";
            this.postPrivacy.Size = new System.Drawing.Size(121, 21);
            this.postPrivacy.TabIndex = 2;
            //
            // postExpire
            //
            this.postExpire.FormattingEnabled = true;
            this.postExpire.Location = new System.Drawing.Point(347, 436);
            this.postExpire.Name = "postExpire";
            this.postExpire.Size = new System.Drawing.Size(121, 21);
            this.postExpire.TabIndex = 3;
            //
            // syntaxLabel
            //
            this.syntaxLabel.AutoSize = true;
            this.syntaxLabel.Location = new System.Drawing.Point(252, 469);
            this.syntaxLabel.Name = "syntaxLabel";
            this.syntaxLabel.Size = new System.Drawing.Size(95, 13);
            this.syntaxLabel.TabIndex = 4;
            this.syntaxLabel.Text = "Syntax Highlighter:";
            //
            // expireLabel
            //
            this.expireLabel.AutoSize = true;
            this.expireLabel.Location = new System.Drawing.Point(252, 440);
            this.expireLabel.Name = "expireLabel";
            this.expireLabel.Size = new System.Drawing.Size(80, 13);
            this.expireLabel.TabIndex = 5;
            this.expireLabel.Text = "Post Expiration:";
            //
            // privacyLabel
            //
            this.privacyLabel.AutoSize = true;
            this.privacyLabel.Location = new System.Drawing.Point(252, 411);
            this.privacyLabel.Name = "privacyLabel";
            this.privacyLabel.Size = new System.Drawing.Size(78, 13);
            this.privacyLabel.TabIndex = 6;
            this.privacyLabel.Text = "Post Exposure:";
            //
            // nameLabel
            //
            this.nameLabel.AutoSize = true;
            this.nameLabel.Location = new System.Drawing.Point(8, 414);
            this.nameLabel.Name = "nameLabel";
            this.nameLabel.Size = new System.Drawing.Size(69, 13);
            this.nameLabel.TabIndex = 7;
            this.nameLabel.Text = "Name / Title:";
            this.nameLabel.Click += new System.EventHandler(this.label1_Click);
            //
            // emailLabel
            //
            this.emailLabel.AutoSize = true;
            this.emailLabel.Location = new System.Drawing.Point(8, 440);
            this.emailLabel.Name = "emailLabel";
            this.emailLabel.Size = new System.Drawing.Size(35, 13);
            this.emailLabel.TabIndex = 8;
            this.emailLabel.Text = "Email:";
            //
            // nameBox
            //
            this.nameBox.Location = new System.Drawing.Point(100, 408);
            this.nameBox.Name = "nameBox";
            this.nameBox.Size = new System.Drawing.Size(121, 20);
            this.nameBox.TabIndex = 9;
            //
            // emailBox
            //
            this.emailBox.Location = new System.Drawing.Point(100, 437);
            this.emailBox.Name = "emailBox";
            this.emailBox.Size = new System.Drawing.Size(121, 20);
            this.emailBox.TabIndex = 10;
            //
            // submitButton
            //
            this.submitButton.Location = new System.Drawing.Point(6, 491);
            this.submitButton.Name = "submitButton";
            this.submitButton.Size = new System.Drawing.Size(65, 21);
            this.submitButton.TabIndex = 11;
            this.submitButton.Text = "Submit";
            this.submitButton.UseVisualStyleBackColor = true;
            //
            // subdomainLabel
            //
            this.subdomainLabel.AutoSize = true;
            this.subdomainLabel.Location = new System.Drawing.Point(8, 466);
            this.subdomainLabel.Name = "subdomainLabel";
            this.subdomainLabel.Size = new System.Drawing.Size(63, 13);
            this.subdomainLabel.TabIndex = 12;
            this.subdomainLabel.Text = "Subdomain:";
            //
            // subdomainBox
            //
            this.subdomainBox.Location = new System.Drawing.Point(100, 466);
            this.subdomainBox.Name = "subdomainBox";
            this.subdomainBox.Size = new System.Drawing.Size(121, 20);
            this.subdomainBox.TabIndex = 13;
            //
            // urlBox
            //
            this.urlBox.Location = new System.Drawing.Point(100, 492);
            this.urlBox.Name = "urlBox";
            this.urlBox.ReadOnly = true;
            this.urlBox.Size = new System.Drawing.Size(315, 20);
            this.urlBox.TabIndex = 14;
            this.urlBox.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
            //
            // highlightLabel
            //
            this.highlightLabel.AutoSize = true;
            this.highlightLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.highlightLabel.Location = new System.Drawing.Point(97, 382);
            this.highlightLabel.Name = "highlightLabel";
            this.highlightLabel.Size = new System.Drawing.Size(262, 13);
            this.highlightLabel.TabIndex = 16;
            this.highlightLabel.Text = "To highlight particular lines, prefix each line with @h@";
            //
            // notifyIcon
            //
            this.notifyIcon.Icon = ((System.Drawing.Icon)(resources.GetObject("notifyIcon.Icon")));
            this.notifyIcon.Text = "PasteBin Application (Minimized)";
            this.notifyIcon.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.notifyIcon_MouseDoubleClick);
            //
            // copyButton
            //
            this.copyButton.Location = new System.Drawing.Point(421, 491);
            this.copyButton.Name = "copyButton";
            this.copyButton.Size = new System.Drawing.Size(47, 20);
            this.copyButton.TabIndex = 17;
            this.copyButton.Text = "Copy";
            this.copyButton.UseVisualStyleBackColor = true;
            this.copyButton.Click += new System.EventHandler(this.copyButton_Click);
            //
            // menuStrip
            //
            this.menuStrip.GripStyle = System.Windows.Forms.ToolStripGripStyle.Visible;
            this.menuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.fileToolStripMenuItem});
            this.menuStrip.Location = new System.Drawing.Point(0, 0);
            this.menuStrip.Name = "menuStrip";
            this.menuStrip.RenderMode = System.Windows.Forms.ToolStripRenderMode.System;
            this.menuStrip.Size = new System.Drawing.Size(490, 24);
            this.menuStrip.TabIndex = 15;
            this.menuStrip.Text = "menuStrip1";
            this.menuStrip.ItemClicked += new System.Windows.Forms.ToolStripItemClickedEventHandler(this.menuStrip1_ItemClicked);
            //
            // fileToolStripMenuItem
            //
            this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.newToolStripMenuItem,
            this.openToolStripMenuItem});
            this.fileToolStripMenuItem.Name = "fileToolStripMenuItem";
            this.fileToolStripMenuItem.Size = new System.Drawing.Size(35, 20);
            this.fileToolStripMenuItem.Text = "File";
            this.fileToolStripMenuItem.Click += new System.EventHandler(this.fileToolStripMenuItem_Click);
            //
            // newToolStripMenuItem
            //
            this.newToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("newToolStripMenuItem.Image")));
            this.newToolStripMenuItem.Name = "newToolStripMenuItem";
            this.newToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.N)));
            this.newToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
            this.newToolStripMenuItem.Text = "New";
            this.newToolStripMenuItem.Click += new System.EventHandler(this.newToolStripMenuItem_Click);
            //
            // openToolStripMenuItem
            //
            this.openToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("openToolStripMenuItem.Image")));
            this.openToolStripMenuItem.Name = "openToolStripMenuItem";
            this.openToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.O)));
            this.openToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
            this.openToolStripMenuItem.Text = "Open";
            this.openToolStripMenuItem.Click += new System.EventHandler(this.openToolStripMenuItem_Click);
            //
            // contextMenuStrip
            //
            this.contextMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.contextRestore,
            this.contextExit});
            this.contextMenuStrip.Name = "contextMenuStrip";
            this.contextMenuStrip.Size = new System.Drawing.Size(124, 48);
            //
            // contextRestore
            //
            this.contextRestore.Image = ((System.Drawing.Image)(resources.GetObject("contextRestore.Image")));
            this.contextRestore.Name = "contextRestore";
            this.contextRestore.Size = new System.Drawing.Size(123, 22);
            this.contextRestore.Text = "Restore";
            this.contextRestore.Click += new System.EventHandler(this.contextRestore_Click);
            //
            // contextExit
            //
            this.contextExit.Image = ((System.Drawing.Image)(resources.GetObject("contextExit.Image")));
            this.contextExit.Name = "contextExit";
            this.contextExit.Size = new System.Drawing.Size(123, 22);
            this.contextExit.Text = "Exit";
            this.contextExit.Click += new System.EventHandler(this.contextExit_Click);
            //
            // backDrop
            //
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(490, 519);
            this.Controls.Add(this.copyButton);
            this.Controls.Add(this.highlightLabel);
            this.Controls.Add(this.urlBox);
            this.Controls.Add(this.subdomainBox);
            this.Controls.Add(this.subdomainLabel);
            this.Controls.Add(this.submitButton);
            this.Controls.Add(this.emailBox);
            this.Controls.Add(this.nameBox);
            this.Controls.Add(this.emailLabel);
            this.Controls.Add(this.nameLabel);
            this.Controls.Add(this.privacyLabel);
            this.Controls.Add(this.expireLabel);
            this.Controls.Add(this.syntaxLabel);
            this.Controls.Add(this.postExpire);
            this.Controls.Add(this.postPrivacy);
            this.Controls.Add(this.syntaxHighlight);
            this.Controls.Add(this.textArea);
            this.Controls.Add(this.menuStrip);
            this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
            this.MaximizeBox = false;
            this.MaximumSize = new System.Drawing.Size(498, 553);
            this.Name = "backDrop";
            this.Text = "PasteBin Dialog";
            this.Load += new System.EventHandler(this.Form1_Load);
            this.menuStrip.ResumeLayout(false);
            this.menuStrip.PerformLayout();
            this.contextMenuStrip.ResumeLayout(false);
            this.ResumeLayout(false);
            this.PerformLayout();

        }

        #endregion

        private System.Windows.Forms.RichTextBox textArea;
        private System.Windows.Forms.ComboBox syntaxHighlight;
        private System.Windows.Forms.ComboBox postPrivacy;
        private System.Windows.Forms.ComboBox postExpire;
        private System.Windows.Forms.Label syntaxLabel;
        private System.Windows.Forms.Label expireLabel;
        private System.Windows.Forms.Label privacyLabel;
        private System.Windows.Forms.Label nameLabel;
        private System.Windows.Forms.Label emailLabel;
        private System.Windows.Forms.TextBox nameBox;
        private System.Windows.Forms.TextBox emailBox;
        private System.Windows.Forms.Button submitButton;
        private System.Windows.Forms.Label subdomainLabel;
        private System.Windows.Forms.TextBox subdomainBox;
        private System.Windows.Forms.TextBox urlBox;
        private System.Windows.Forms.Label highlightLabel;
        public System.Windows.Forms.NotifyIcon notifyIcon;
        private System.Windows.Forms.Button copyButton;
        private System.Windows.Forms.MenuStrip menuStrip;
        private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem;
        private System.Windows.Forms.ToolStripMenuItem openToolStripMenuItem;
        private System.Windows.Forms.ToolStripMenuItem newToolStripMenuItem;
        private System.Windows.Forms.ContextMenuStrip contextMenuStrip;
        private System.Windows.Forms.ToolStripMenuItem contextRestore;
        private System.Windows.Forms.ToolStripMenuItem contextExit;
    }
}
Last edited by Sparkie on Thu Jul 15, 2010 8:07 am, edited 1 time in total.
[12:50] * Champagne sets mode: +o-o Sparkie Sparkie

Former Operator of #mSL
Scott`
User
User
Posts: 979
Joined: Fri Apr 20, 2007 9:36 am
Location: NZ

Re: [C#] Pastebin Application

Postby Scott` » Thu Jul 15, 2010 7:13 am

Delete those empty methods such as

Code: Select all

        private void label1_Click(object sender, EventArgs e)
        {

        }

They are unneeded and useless. If you get an error when you do it it's because you need to double click on the error and delete the code that activates the event in your designer file.
It's pretty good and functional, nice :mrgreen:
Image
User avatar
Riffpilgrim
User
User
Posts: 163
Joined: Fri Aug 08, 2008 3:42 pm
Location: Somebody find me!

Re: [C#] Pastebin Application

Postby Riffpilgrim » Thu Jul 15, 2010 11:42 pm

I think i'll actually find this quite useful, because firefox seems to freeze when a large amount of text is pasted (don't like any other browsers). So nice work on this, i shall give it a try.
Image Dance magic...
Arconiaprime
User
User
Posts: 1458
Joined: Fri May 18, 2007 12:29 am
Contact:

Re: [C#] Pastebin Application

Postby Arconiaprime » Tue Jul 20, 2010 6:58 pm

Nice 2 week bump, however this looks pretty cool, nice job Sparkie :P
(Tim) Awong, the helpops are scaring me.
--------------------------------------------------------
SwiftIRC Services Administrator - 2010 - 2012
Owner: intrepid.il.us.SwiftIRC.net

Return to “.NET”

Who is online

Users browsing this forum: No registered users and 1 guest