public void ExcuteAnalyzeFile()
        {
            if (FilePath == "")
            {
                State = "请输入文件路径";
                return;
            }

            State = "解析中...";
            Task.Factory.StartNew(() =>
            {
                try
                {
                    HeapFileAnalyzer x = new HeapFileAnalyzer(FilePath);

                    x.DoWork();
                    Msgs  = SkypeHelper.GetMessages(x);
                    State = "解析完成!";
                }
                catch
                {
                    State = "解析出现异常";
                }
            });
        }
Exemplo n.º 2
0
        private void btnServicePhone_Click(object sender, EventArgs e)
        {
            string phone = System.Configuration.ConfigurationSettings.AppSettings["servicePhone"];

            SkypeHelper.Call(phone);
            this.BringToFront();
        }
Exemplo n.º 3
0
        private void YuanTuoForm_FormClosing(object sender, FormClosingEventArgs e)
        {
            GlobalTools.yuantuoForm = null;

            SystemDefine.ShowTaskTools();
            SkypeHelper.CloseSkype();
        }
Exemplo n.º 4
0
 private void SkypeStopped()
 {
     _skypeHelper       = null;
     CurrentSkypeStatus = SKYPE_NOT_STARTED;
     _onlineStatus?.ChangeOnlineStatus(UserStatus.LoggedOut);
     _onlineStatus  = null;
     IsSkypeRunning = false;
 }
Exemplo n.º 5
0
        public static void Main(string[] args)
        {
            //Initialize parse

            var appId  = ConfigurationManager.AppSettings["ParseApplicationId"];
            var winKey = ConfigurationManager.AppSettings["ParseWindowsKey"];

            ParseClient.Initialize(appId, winKey);
            ParseAnalytics.TrackAppOpenedAsync();

            var builder = new ContainerBuilder();

            builder.RegisterType <ConsoleWriter>().As <IOutputWriter>().SingleInstance();
            builder.RegisterType <HttpHelper>().As <IHttpHelper>().SingleInstance();
            builder.RegisterType <UrlStrategyFactory>().As <IUrlStrategyFactory>().SingleInstance();

            builder.RegisterType <ZoltanListener>().As <IListener>();
            builder.RegisterType <TorrentListener>().As <IListener>().PreserveExistingDefaults();
            builder.RegisterType <QuoteListener>().As <IListener>().PreserveExistingDefaults();
            builder.RegisterType <GameOnListener>().As <IListener>().PreserveExistingDefaults();
            builder.RegisterType <SportListener>().As <IListener>().PreserveExistingDefaults();
            builder.RegisterType <NordiskFilmListener>().As <IListener>().PreserveExistingDefaults();
            builder.RegisterType <WebListener>().As <IListener>().PreserveExistingDefaults();
            builder.RegisterType <RandomListener>().As <IListener>().PreserveExistingDefaults();
            builder.RegisterType <LaEmpanadaListener>().As <IListener>().PreserveExistingDefaults();
            builder.RegisterType <StringListener>().As <IListener>().PreserveExistingDefaults();
            builder.RegisterType <MffListener>().As <IListener>().PreserveExistingDefaults();
            builder.RegisterType <KolliListener>().As <IListener>().PreserveExistingDefaults();

            var container = builder.Build();

            var skypeHelper = new SkypeHelper(
                container.Resolve <IOutputWriter>(),
                container.Resolve <IEnumerable <IListener> >());

            skypeHelper.Initialize();

            try
            {
                var input = string.Empty;
                while (!input.ToUpper().Equals("QUIT"))
                {
                    input = Console.ReadLine() ?? string.Empty;
                }
            }
            catch (Exception e)
            {
                Console.Error.WriteLine(e);
            }
        }
Exemplo n.º 6
0
        private void ApplicationStartup(object sender, StartupEventArgs e)
        {
            ShutdownMode = ShutdownMode.OnExplicitShutdown;

            if (!SkypeHelper.IsSkypeInstalled())
            {
                MessageBox.Show("Skype not installed on computer! App will close.", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
                Shutdown();
                return;
            }

            ShutdownMode = ShutdownMode.OnMainWindowClose;
            MainWindow   = new MainWindow();
            MainWindow.Show();
        }
Exemplo n.º 7
0
 private void StopListeners()
 {
     try
     {
         LocationHelper.StopTracking();
         SensorHelper.StopTracking();
         BatteryHelper.StopTracking();
         GTalkHelper.StopTracking();
         SkypeHelper.StopTracking();
         OutlookHelper.StopTracking();
         DropboxHelper.StopTracking();
     }
     catch (Exception exception)
     {
         Log.Error(exception);
     }
 }
Exemplo n.º 8
0
        private void btnDial_Click(object sender, EventArgs e)
        {
            SkypeHelper.CallTimeLimit("+86" + this.txtMobile.Text.Trim(), 180, GlobalTools.ShowCallingHint, GlobalTools.ShowProcessingHint, GlobalTools.HandOffHint);
            //this.TopLevel = true;
            // this.BringToFront();
            this.Close();

            /*
             * SkypeClass skype = new SkypeClass();
             * CommandClass cmd = new CommandClass();
             * skype._ISkypeEvents_Event_Command += new _ISkypeEvents_CommandEventHandler(skype__ISkypeEvents_Event_Command);
             * cmd.Command = "OPEN IM " + "拨号";//打開Skype視窗;
             * skype.SendCommand(cmd);
             *
             * cmd.Command = "CALL " + this.txtMobile.Text.Trim();//撥號
             * skype.SendCommand(cmd);
             * */
            // oSkype.
            //oSkype.SendMessage(this.txtMobile.Text.Trim(), "this is a test message!");
        }
Exemplo n.º 9
0
        private void YuanTuoForm_Load(object sender, EventArgs e)
        {
            string width  = System.Configuration.ConfigurationSettings.AppSettings["width"];
            string height = System.Configuration.ConfigurationSettings.AppSettings["height"];

            this.Size     = new Size(Int32.Parse(width), Int32.Parse(height));
            this.Location = new Point(0, 0);
            urlHome       = System.Configuration.ConfigurationSettings.AppSettings["configUrl"];
            domainPrefix  = urlHome;
            // nowUrl.in
            domainPrefix   = domainPrefix.Substring(domainPrefix.IndexOf(":") + 3);//http://之后的
            domainPrefix   = domainPrefix.Substring(0, domainPrefix.IndexOf('/'));
            domainPrefix   = "http://" + domainPrefix;
            locationPrefix = System.Configuration.ConfigurationSettings.AppSettings["locationPrefix"];
            this.webBrowser1.ScriptErrorsSuppressed = true;
            this.AutoScroll = false;
            int unoperationTime = Convert.ToInt32(System.Configuration.ConfigurationSettings.AppSettings["unoperationTime"]) * 1000;

            this.timer1.Interval = unoperationTime;
            this.timer1.Start();
            this.NavigateHome();
            SystemDefine.HideTaskTools();
            try
            {
                SkypeHelper.StartSkype();
            }
            catch
            {
                MessageBox.Show("Skype未能正常启动!!");
            }
            GlobalTools.yuantuoForm = this;
            HideHint();
            string topfirstTimer = System.Configuration.ConfigurationSettings.AppSettings["TopFirstTimer"];

            if (topfirstTimer == "true")
            {
                this.timerTopFirst.Start();
            }
            // this.webBrowser1.n
        }
Exemplo n.º 10
0
        public MainWindowViewModel()
        {
            if (SkypeHelper.IsSkypeRunning())
            {
                InitSkypeHelper();
                IsSkypeRunning = true;
            }

            SkypeStatuses = new List <string>
            {
                UserStatus.Online.ToString(),
                    UserStatus.Away.ToString(),
                    UserStatus.DoNotDisturb.ToString(),
                    UserStatus.Invisible.ToString(),
                    UserStatus.Offline.ToString()
            };

            LockSkypeStatus   = UserStatus.Away.ToString();
            UnlockSkypeStatus = UserStatus.Online.ToString();

            InitSystemEvents();
        }
Exemplo n.º 11
0
 private void InitSkypeHelper()
 {
     _skypeHelper = new SkypeHelper();
     _skypeHelper.SkypeUserStatusChanged += SkypeUserStatusChanged;
     CurrentSkypeStatus = _skypeHelper.IsAttached ? _skypeHelper.GetUserStatus().ToString() : UserStatus.LoggedOut.ToString();
 }
Exemplo n.º 12
0
 private void btnHint_Click(object sender, EventArgs e)
 {
     SkypeHelper.HandOff();
 }
Exemplo n.º 13
0
 private void btnHandOff_Click(object sender, EventArgs e)
 {
     SkypeHelper.HandOff();
     GlobalTools.ShowProcessingHint();
     this.Close();
 }
Exemplo n.º 14
0
 private void SkypeButton_Click(object sender, RoutedEventArgs e)
 {
     SkypeHelper.StartTracking();
 }