Total members 11872 |It is currently Sat Jan 28, 2023 1:36 pm Login / Join Codemiles

Java

C/C++

PHP

C#

HTML

CSS

ASP

Javascript

JQuery

AJAX

XSD

Python

Matlab

R Scripts

Weka






 Project Name:   Skype Smiley Sender
 Programmer:   Giorgi Dalakishvili
 Type:   Network
 Technology: 
 IDE:   NONE
 Description:   With this code, you can send as many as smileys you wish in Skype with only one click. There are 999 smileys in the picture below and they were all sent with just one click. Cool, isn't it?
java code
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.IO;
using System.Threading;
using System.Collections.Specialized;

namespace smiley_sender
{
public partial class Form1 : Form
{
About.AboutBox box = new About.AboutBox("Skype smiley sender");

string[] sm ={ ":)", ":(", ":D", "8)", ":O", ";)", ";

(", "(sweat)", ":|", ":*", ":P", "(blush)", ":^)", "|-)", "|-(", "(inlove)", "]:)", "(talk)", "(yawn)", "(puke)",

"(doh)", ":@", "(wasntme)", "(party)",

":s", "(mm)", "8-|", ":x", "(hi)", "(call)",
"(devil)", "(angel)", "(envy)", "(wait)", "(hug)",

"(makeup)", "(chuckle)", "(clap)", "(think)",

"(bow)","(rofl)","(whew)","(happy)","(smirk)",
"(nod)","(shake)","(punch)","(emo)","(y)", "(n)", "(handshake)",

"(skype)", "(h)", "(u)", "(e)", "(F)", "(rain)", "(sun)", "(o)",
"(music)", "(~)", "(mp)", "(coffee)", "(pi)", "(cash)", "(flex)",

"(^)", "(beer)", "(d)", "(dance)", "(ninja)", "(*)",

"(mooning)", "(finger)", "(bandit)", "(drunk)", "(smoke)",

"(toivo)", "(rock)", "(headbang)","(poolparty)","(swear)","(bug)","(fubar)","(tmi)" };

public Form1()
{
InitializeComponent();
this.comboBox1.SelectedIndex = 0;

box.programname = "Skype smiley sender";
box.Paint += new PaintEventHandler(box_Paint);
}

void box_Paint(object sender, PaintEventArgs e)
{
System.Drawing.Drawing2D.LinearGradientBrush br = new System.Drawing.Drawing2D.LinearGradientBrush

(e.ClipRectangle, Color.FromArgb(135, 206, 235), Color.FromArgb(0, 191, 255),

System.Drawing.Drawing2D.LinearGradientMode.ForwardDiagonal);
e.Graphics.FillRectangle(br, e.ClipRectangle);
br.Dispose();
}

private void axSkypeContactList1_CustomEvent(object sender, AxSKYPECONTACTSLib._DSkypeContactListEvents_CustomEventEvent e)
{
send();
}

private void comboBox1_SelectedValueChanged(object sender, EventArgs e)
{
System.Resources.ResourceManager rm = new

System.Resources.ResourceManager("smiley_sender.Properties.Resources",

System.Reflection.Assembly.GetExecutingAssembly());
pictureBox1.Image = (Bitmap)rm.GetObject("_"+

(this.comboBox1.SelectedIndex+100).ToString(),System.Globalization.CultureInfo.CurrentCulture);
}

private void button1_Click(object sender, EventArgs e)
{
send();
}

private string duplicate(string smileycode, int smileynumber)
{
StringCollection codes = new StringCollection();
StringBuilder duplicatedcode = new StringBuilder(smileycode.Length * smileynumber,smileycode.Length*smileynumber+1);
StringBuilder smiley = new StringBuilder(smileycode);
while (smileynumber > 0)
{
if (smileynumber % 2 == 1)
{
codes.Add(smiley.ToString());
}
smileynumber = smileynumber / 2;
smiley.Append(smiley);
}
for (int i = 0; i < codes.Count; i++)
{
duplicatedcode.Append(codes[i]);
}
return duplicatedcode.ToString();
}

private void send()
{
string kl = duplicate(sm[this.comboBox1.SelectedIndex], int.Parse(this.textBox1.Text));
SKYPE4COMLib.Chat ch = axSkypeContactList1.OpenChat(kl);
this.button1.Enabled = false;
Thread.Sleep(1000);
this.button1.Enabled = true;
}

private void textBox1_KeyPress(object sender, KeyPressEventArgs e)
{
if ((e.KeyChar < 48 || e.KeyChar > 57) && e.KeyChar != 8) e.Handled = true;
}

private void axSkypeContactList1_SelectionChange(object sender, AxSKYPECONTACTSLib._DSkypeContactListEvents_SelectionChangeEvent e)
{
if (e.users.Count == 0) this.button1.Enabled = false;
else this.button1.Enabled = this.textBox1.Text != "";
}

private void textBox1_TextChanged(object sender, EventArgs e)
{
if (this.textBox1.Text == "") this.button1.Enabled = false;
else this.button1.Enabled = this.axSkypeContactList1.Selection.Count != 0;
}

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

private void notifyIcon1_Click(object sender, EventArgs e)
{
if (this.WindowState==FormWindowState.Minimized)
{
this.Show();
this.WindowState = FormWindowState.Normal;
this.Focus();
return;
}
if (this.WindowState==FormWindowState.Normal)
{
this.WindowState = FormWindowState.Minimized;
}
}

private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
box.ShowDialog();
}
}
}

Attachment:
smileysender1.gif
smileysender1.gif [ 43.38 KiB | Viewed 4984 times ]





Attachments:
smileysender_src.zip [854.92 KiB]
Downloaded 1548 times
smileysender_demo.zip [787.77 KiB]
Downloaded 1007 times

_________________
Please recommend my post if you found it helpful. ,
java,j2ee,ccna ,ccnp certified .
Author:
Expert
User avatar Posts: 838
Have thanks: 2 time

updated.


_________________
M. S. Rakha, Ph.D.
Queen's University
Canada


Author:
Mastermind
User avatar Posts: 2715
Have thanks: 74 time
Post new topic Reply to topic  [ 2 posts ] 

  Related Posts  to : Skype Smiley Sender
 [Java][C#][Skype][WinAPI] simple plugin for Skype, sound red     -  



Topic Tags

C# Projects
cron






Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com