Beispiel #1
0
        public void Start()
        {
            Skype = new SKYPE4COMLib.Skype();
            Skype.Attach();

            LoopTimer.Start();
        }
Beispiel #2
0
 public Skype(IMessageProcessor messageProcessor )
 {
     _messageProcessor = messageProcessor;
     _skype = new SKYPE4COMLib.Skype();
     UseSkypeProtocolSeven();
     AttachMessageProcessorHandler();
 }
 // SUMMARY: Construct
 public SkypeAPI()
 {
     this._skype = new SKYPE4COMLib.Skype();
     this._skype.Attach(7, false);
     this._timeReference = DateTime.Now;
     this._currentUser   = this._skype.CurrentUser.Handle;
 }
Beispiel #4
0
 public Form1()
 {
     InitializeComponent();
     skype = new SKYPE4COMLib.Skype();
     skype.Attach(7, false);
     skype.MessageStatus += new _ISkypeEvents_MessageStatusEventHandler(skype_MessageStatus);
 }
Beispiel #5
0
        public Skype()
        {
            InitializeComponent();

            //Skypeオブジェクト生成
            _skype = new SKYPE4COMLib.Skype();
            _skype.Attach();
        }
 public override void OnLoad(MainWindow window)
 {
     _wHolder = new WindowHolder(window);
     _skype = new SKYPE4COMLib.Skype();
     if (!_skype.Client.IsRunning)
         _skype.Client.Start(true);
     _skype.Attach(8, false);
     _skype.MessageStatus += SkypeOnMessageStatus;
 }
Beispiel #7
0
        public SkypePlugin()
        {
            SKYPE4COMLib.Skype skype = new SKYPE4COMLib.Skype();

            if (!skype.Client.IsRunning)
                return;

            initialMood = skype.CurrentUserProfile.RichMoodText;
        }
Beispiel #8
0
        private void RemoveSong()
        {
            SKYPE4COMLib.Skype skype = new SKYPE4COMLib.Skype();

            if (!skype.Client.IsRunning)
                return;

            skype.CurrentUserProfile.RichMoodText = initialMood;
        }
Beispiel #9
0
        private void SetSong(string p1, string p2)
        {
            SKYPE4COMLib.Skype skype = new SKYPE4COMLib.Skype();

            if (!skype.Client.IsRunning)
                return;

            skype.CurrentUserProfile.RichMoodText = "<SS type=\"music\">(music)</SS> " + p1 + " - " + p2;
        }
Beispiel #10
0
        public void Auth()
        {
            // Connecting.BeginInvoke((Action)(() => OnConnecting()));
            OnConnecting();
            _skype = new SKYPE4COMLib.Skype();
            _skype.Attach(5, true);

            if (GetLoginStatus()) OnConnected(_skype.CurrentUser.DisplayName);
        }
Beispiel #11
0
 public override void OnLoad(MainWindow window)
 {
     _wHolder = new WindowHolder(window);
     _skype   = new SKYPE4COMLib.Skype();
     if (!_skype.Client.IsRunning)
     {
         _skype.Client.Start(true);
     }
     _skype.Attach(8, false);
     _skype.MessageStatus += SkypeOnMessageStatus;
 }
Beispiel #12
0
        private void RemoveSong()
        {
            SKYPE4COMLib.Skype skype = new SKYPE4COMLib.Skype();

            if (!skype.Client.IsRunning)
            {
                return;
            }

            skype.CurrentUserProfile.RichMoodText = initialMood;
        }
Beispiel #13
0
        private void SetSong(string p1, string p2)
        {
            SKYPE4COMLib.Skype skype = new SKYPE4COMLib.Skype();

            if (!skype.Client.IsRunning)
            {
                return;
            }

            skype.CurrentUserProfile.RichMoodText = "<SS type=\"music\">(music)</SS> " + p1 + " - " + p2;
        }
Beispiel #14
0
        public SkypePlugin()
        {
            initialMood = "";
            SKYPE4COMLib.Skype skype = new SKYPE4COMLib.Skype();

            if (!skype.Client.IsRunning)
            {
                return;
            }

            initialMood = skype.CurrentUserProfile.RichMoodText ?? String.Empty;
        }
Beispiel #15
0
 private void CallSkype()
 {
     try
     {
         Skype skype;
         skype = new SKYPE4COMLib.Skype();
         string SkypeID = "tiengioiit";
         Call   call    = skype.PlaceCall(SkypeID);
     }
     catch
     {
         MessageBox.Show("Không thể mở Skype, hoặc không được cho phép!, nếu thử lại không được\n" +
                         "Hãy tắt ứng dụng, chạy lại ứng dụng và xin phép Skype", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Beispiel #16
0
        public main()
        {
            InitializeComponent();
            //Skypeオブジェクト生成
            _skype = new SKYPE4COMLib.Skype();
            try
            {
                _skype.Attach();
            }
            catch (Exception)
            {

                throw;
            }
        }
Beispiel #17
0
        /// <summary>
        /// Disconnect from Skype API
        /// </summary>
        /// <returns>true is success</returns>
        private bool FreeSkypeCOM()
        {
            bool result = false;

            try
            {
                Marshal.ReleaseComObject(skype);
                GC.SuppressFinalize(skype);
                skype  = null;
                result = true;
            }
            catch (Exception ex)
            {
                ErrorCode = ex.Message;
            }
            return(result);
        }
Beispiel #18
0
        private SkypeViewModel()
        {
            Skype = new SKYPE4COMLib.Skype();
            Skype.Attach(7, false);
            this.ChatCommand = new RelayCommand(StartChat);
            this.SyncCommand = new RelayCommand(Sync);

            if (Skype.Client.IsRunning)
            {
                this.Friends = GetFriends();
            }
            else
            {
                System.Windows.MessageBox.Show("Since Skype Client is not running the application will start the Skype Client. Please use SYNC Button to get all the contact once you logged in into skype client", "Application Requirement", System.Windows.MessageBoxButton.OK, System.Windows.MessageBoxImage.Information);
                Skype.Client.Start();
            }
        }
Beispiel #19
0
        public void Listen(Func<IncomingMessage, ReplyMessage> callback)
        {
            if (callback == null) throw new ArgumentNullException("callback");

            _skype = new SkypeCom.Skype();
            _skype.Attach(7, false);
            _skype.MessageStatus += (message, status) =>
            {
                if (message.Body.IndexOf(_trigger, StringComparison.Ordinal) == 0 && status == SkypeCom.TChatMessageStatus.cmsReceived)
                {
                    _logger.Info(string.Format("Incoming message received from: {0}", message.FromDisplayName));
                    SkypeCom.IChat ichat = _skype.Chat[message.Chat.Name];
                    _logger.Info(string.Format("Incoming message is: {0}", message.Body));
                    var msg = new IncomingMessage { Message = message.Body.ToLowerInvariant() };
                    var results = callback(msg);
                    _logger.Info(string.Format("Message received back from callback is: {0}", results.Message));
                    ichat.SendMessage(string.Format("Bot says:{0} {1}", Environment.NewLine, results.Message));
                }
            };
        }
Beispiel #20
0
 private void button1_Click(object sender, EventArgs e)
 {
     Skype skype;
     skype = new SKYPE4COMLib.Skype();
     Call call = skype.PlaceCall(txtPhonenNo.Text);
 }
Beispiel #21
0
 protected virtual void Dispose(bool disposing)
 {
     if (_disposed) return;
     if (disposing)
     {
         _skype = null;
     }
     _disposed = true;
 }
Beispiel #22
0
 /// <summary>
 /// Disconnect from Skype API
 /// </summary>
 /// <returns>true is success</returns>
 private bool FreeSkypeCOM()
 {
     bool result = false;
     try
     {
         Marshal.ReleaseComObject(skype);
         GC.SuppressFinalize(skype);
         skype = null;
         result = true;
     }
     catch (Exception ex)
     {
         ErrorCode = ex.Message;
     }
     return result;
 }
Beispiel #23
0
        public static bool HookSkype(SKYPE4COMLib.Skype skype)
        {
            try
            {
                Console.WriteLine(Utils.XOR("帬帠幼帤布帚帽帹帔帧帛帼帯帚帄幼帯广帡帤布帙帡帽帔帧帘帺帬帚帄幼帯帚帡帤布帚帛帽帔帧帛幽帯帚帄幼帬帚帡帤布帙帛帽帔帧帛帼帬帚帄幼帬广帡帤布帕帟帹帔帧帛帹帬帚帄幼帬帚帡帤布帚帡帽帔帧帛帊帬帚帄幼帩帊幼帤布帚帡帽帔帧帘幼帬帚帄幼帩帊幼帤布帕帋帽帔帧帛帼帬帚帄幼帬广帡帤布帙帛帽帔帧帘幸帬帚帄幼帗广帡帤布帚年帽帔帧帘幼帬帚帄幼布帚帡帤布帘幼帽帔帧帘幰", 300179021));
                if (!skypestatus())
                {
                    return(false);
                }
                skype.Attach(7, false);
                int click = 0;
ClickAttach:
                if (((ISkype)skype).AttachmentStatus != TAttachmentStatus.apiAttachSuccess)
                {
                    foreach (var process in Process.GetProcesses())
                    {
                        if (process.ProcessName == Utils.XOR("㋺㋦㋻㊞㋠㋩㋸㊟㋠㋪㋼㋷㋊㋺㋿㊞㋼㋀㋻㊞㋠㋪㋂㊟㋠㋪㋿㊓", 181875374))
                        {
                            RECT SkypeRect;
                            GetWindowRect(process.MainWindowHandle, out SkypeRect);
                            MoveWindow(process.MainWindowHandle, SkypeRect.Left, SkypeRect.Top, 940, 590, true);
                            IntPtr zappem = FindWindowEx(process.MainWindowHandle, IntPtr.Zero, Utils.XOR("", 571406404), null);
                            if (zappem != IntPtr.Zero)
                            {
                                ClickOnPoint(zappem, new Point(285, 60));
                                click++;
                                //Log.WriteConsole("Clicked point!", lvl.info);
                            }
                        }
                    }
                }
                //already attached.
                if (((ISkype)skype).AttachmentStatus != TAttachmentStatus.apiAttachSuccess)
                {
                    skype.Attach(5, false);
                }
                if (((ISkype)skype).AttachmentStatus == TAttachmentStatus.apiAttachSuccess)
                {
                    //log
                    Console.WriteLine(Utils.XOR("벒볮볦볭벐벴벺벒벐벤버볯벍벤벽볬벼벵벭볭벐벴벘벒벐벤버벑벍벤벽볬법볮볦볭벐벰벶벒벐벤버벦벍벤벽볬법볮볦볭벐벴버벒벐벤벇볭벍벤벽볬벓벵벭볭벐벴벲벒벐벤벇벨벍벤벽볬벽벋벭볭벐벰벘벒벐벤버벳벍벤벽볬법볮볦볭벐벳볫벒벐벤버볫벍벤벽볬벻벋벭볭벐벰범벒벐벤벇볮벍벤벽볬벺벛벭볭벐벰벌벒벐벤벇볭벍벤벽볬벑벋벭볭벐벴벲벒벐벤버벧벍벤벽볬벊벵벭볭벐벹볣볣", 132365534));
                    foreach (Process process in Process.GetProcesses())
                    {
                        if (process.ProcessName == Utils.XOR("橢樅樆橏橹橢機橃橔橣橡橧橕橯橲樆橮樅樆橏橹橠橃橃橔橣橢樊", 1104964151))
                        {
                            Console.WriteLine(Utils.XOR("", 1309665824));
                            SetForegroundWindow(Process.GetCurrentProcess().MainWindowHandle);
                        }
                    }
                }
                else
                {
                    if (click < 20)
                    {
                        Thread.Sleep(2000);
                        goto ClickAttach;
                    }
                    else
                    {
                    }
                }
                return(true);
            }
            catch
            {
                return(false);
            }
            return(true);
        }
Beispiel #24
0
        private void button1_Click(object sender, EventArgs e)
        {
            if (buttonStart.Text == "Start")
            {
                if (textBoxoutputFIleName.Text.Length == 0)
                {
                    LogError("Output File Name  Is Empty ");

                    return;
                }

                if (textBoxinput.Text.Length == 0)
                {
                    LogError("Input File Name  Is Empty ");
                    return;
                }
                if (File.Exists(textBoxoutputFIleName.Text))
                {
                    LogError("File Already Present ");
                    //return;
                }
                if (IsFileInUse(textBoxinput.Text))
                {
                    LogError("Input File is Not Acessible");
                    return;
                }
                skypeMain = new Skype();
                if (skypeMain.Client.IsRunning)
                {
                    LogError("Skype is running",false);
                    //skype.Client.Start(true, true);
                }
                else
                {
                    LogError("Skype is not running. Please login to Skype");
                    return;
                }
                //skype.Attach(6, true);
                skypeMain.Attach(skypeMain.Protocol, false);
                ////skype.SilentMode.
                ////
                LogError("Skype Version" + skypeMain.Version, false);
                totalemailids = 0;
                string line;
                System.IO.StreamReader file = new System.IO.StreamReader(textBoxinput.Text);
                while ((line = file.ReadLine()) != null)
                {
                    emailids.Add(line);
                    totalemailids++;
                }
                file.Close();

                toolStripProgressBar1.Value = 0;
                toolStripProgressBar1.Maximum = totalemailids;
                if (backgroundWorker1.IsBusy != true)
                {
                    // Start the asynchronous operation.
                    backgroundWorker1.RunWorkerAsync();
                }
                // buttonStart.Text = "Stop";

            }
            else
            {
                if (backgroundWorker1.WorkerSupportsCancellation == true)
                {
                    // Cancel the asynchronous operation.
                    backgroundWorker1.CancelAsync();
                    backgroundWorker1.Dispose();
                    LogError("Operation Cancelled");

                    buttonStart.Text = "Start";
                }

            }
        }