Example #1
0
        public void TriggerApplication(Client.Model.ApplicationModel model)
        {
            ClientApplicationCmd appCommand = new ClientApplicationCmd()
            {
                ApplicationEntry = new ApplicationEntry()
                {
                    Identifier = model.AppliationId,
                    Name       = model.ApplicationName,
                }
            };

            connectionMgr.BroadcastMessage(
                (int)CommandConst.MainCommandClient.Functionality,
                (int)CommandConst.SubCommandClient.Application,
                appCommand);
        }
Example #2
0
        public void AddTriggeredApplication(Client.Model.ApplicationModel appModel)
        {
            pendingAppList.Add(appModel);

            ThreadPool.QueueUserWorkItem(s =>
            {
                Thread.Sleep(1500);
                // not a safe way if user trigger 2 similar application within 1.5 second
                if (pendingAppList.Remove(appModel))
                {
                    ControlAttributes attr = mimicWndHolder.GetTopMostControl();
                    Trace.WriteLine(String.Format("Add triggered app in queue: {0}, pos: {1},{2},{3},{4}",
                                                  attr.WindowName,
                                                  attr.Xpos,
                                                  attr.Ypos,
                                                  attr.Width,
                                                  attr.Height));
                    triggeredAppList.Add(attr, appModel);
                }
            });
        }