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 override void ExecuteCommand(string userId, string command)
        {
            ClientApplicationCmd clientAppData = deserialize.Deserialize <ClientApplicationCmd>(command);

            if (clientAppData == null)
            {
                return;
            }

            ApplicationData appData = Server.ServerDbHelper.GetInstance().GetAllApplications().First(AppData
                                                                                                     => AppData.id == clientAppData.ApplicationEntry.Identifier);

            if (appData == null)
            {
                Trace.WriteLine("unable to find matched application id: " + clientAppData.ApplicationEntry.Identifier);
                return;
            }

            int result = LaunchApplication(appData);
            //Server.ConnectedClientHelper.GetInstance().AddLaunchedApp(userId, result, appData.id);
            int userDBid = ConnectedClientHelper.GetInstance().GetClientInfo(userId).DbUserId;

            Server.LaunchedWndHelper.GetInstance().AddLaunchedApp(userDBid, result, appData.id);
        }