public SkypeCallClass(string Cmd, int Timeout) { this.sp = (Skype)Activator.CreateInstance(System.Type.GetTypeFromCLSID(new Guid("830690FC-BF2F-47A6-AC2D-330BCB402664"))); this.sp_Command = (SKYPE4COMLib.Command)Activator.CreateInstance(System.Type.GetTypeFromCLSID(new Guid("2DBCDA9F-1248-400B-A382-A56D71BF7B15"))); this.cmd = Cmd; this.timeout = Timeout; }
void SaveSkypeAvatarToDisk(string userHandle, string rootedPathFileName) { if (!System.IO.Path.IsPathRooted(rootedPathFileName)) { throw new ArgumentException("Filename does not contain full path!", "rootedPathFileName"); } if (!".jpg".Equals(System.IO.Path.GetExtension(rootedPathFileName))) { throw new ArgumentException("Filename does not represent jpg file!", "rootedPathFileName"); } SKYPE4COMLib.Command command0 = new SKYPE4COMLib.Command(); command0.Command = string.Format("GET USER {0} Avatar 1 {1}", userHandle, rootedPathFileName); Skype.SendCommand(command0); }
public Notification(Point location, NotificationManager notificationManager, IChatMessage message) { this.rand = new Random().Next(); this.notificationManager = notificationManager; string title = ""; if (message.Chat.Topic != "") { title = message.Chat.Topic; } else { title = message.Sender.FullName; } this.Title = "Message from <strong>" + title + "</strong>"; if (message.Chat.Type == TChatType.chatTypeDialog) { this.HtmlDescription = HttpUtility.HtmlEncode(ParseQuotes(message.Body)); } else { this.HtmlDescription = "<strong>" + HttpUtility.HtmlEncode(message.Sender.FullName) + "</strong>: " + HttpUtility.HtmlEncode(ParseQuotes(message.Body)); } this.message = message; InitializeComponent(); this.Location = location; ease.EasingMode = EasingMode.EaseIn; ease2.EasingMode = EasingMode.EaseInOut; this.Resize += Notification_Resize; webControl1.ConsoleMessage += webControl1_ConsoleMessage; if (message.Chat.Type == TChatType.chatTypeDialog) { this.owner = GetForegroundWindow(); SKYPE4COMLib.Command command0 = new SKYPE4COMLib.Command(); command0.Command = string.Format("GET USER {0} AVATAR 1 {1}", message.Sender.Handle, (new FileInfo(Path.GetTempFileName()).Directory).FullName.Replace("\\", "/") + "/" + message.Sender.Handle + rand + ".jpg"); notificationManager.parent.skype.SendCommand(command0); } this.Show(); }
public static void OnError(SKYPE4COMLib.Command pCommand, int Number, string Description) { log.Error(String.Format("#{0}: {1}", Number, Description)); }