private async Task StatusChanged(bool connectedStatus, CustomStatus customStatus)
 {
     var user = GetCurrentUser();
     await Clients.AllExcept(_chatContext.Connections.Where(z => z.UserId == user.Id).Select(z => z.ConnectionId).ToList()).SendAsync("statusChanged", new UserStatus {
         UserId = user.Id, ConnectedStatus = connectedStatus, CustomStatus = customStatus
     });
 }
        public async Task NotifyStatusChange(CustomStatus customStatus)
        {
            var user = GetCurrentUser();

            user.CustomStatus = customStatus;
            await _chatContext.SaveChangesAsync();

            await Clients.All.SendAsync("statusChanged", new UserStatus { UserId = user.Id, ConnectedStatus = true, CustomStatus = customStatus });
        }
        public CustomStatus convertToCustomStatus()
        {
            CustomStatus customStatus = new CustomStatus();

            customStatus.code      = this.code;
            customStatus.message   = this.message;
            customStatus.more_info = this.more_info;
            customStatus.process   = this.process;
            return(customStatus);
        }
Example #4
0
        public IProgress CreateProgress(string operationName)
        {
            ExTraceGlobals.ProgramFlowTracer.TraceFunction <string, string>(0L, "-->ScopeNodeProgressProvider.CreateProgress: {0}, {1}", this.scopeNode.LanguageIndependentName, operationName);
            CustomStatus customStatus = new CustomStatus();
            IProgress    result       = new StatusProgress(customStatus, this.scopeNode.SnapIn);

            customStatus.Title = ExchangeUserControl.RemoveAccelerator(operationName);
            customStatus.Start(this.scopeNode);
            ExTraceGlobals.ProgramFlowTracer.TraceFunction <string, string>(0L, "<--ScopeNodeProgressProvider.CreateProgress: {0}, {1}", this.scopeNode.LanguageIndependentName, operationName);
            return(result);
        }
Example #5
0
 //protected override void ExecuteCore()
 //{
 //    ExecuteUserMenuCommand(MyMenuItemId);
 //    base.ExecuteCore();
 //}
 //protected internal virtual void ExecuteUserMenuCommand(string menuItemId)
 //{
 //    CreateAppointment("Name", "Contact info:", CustomStatus.Cancelled, CustomLabel.Default);
 //}
 protected void CreateAppointment(string subject, string description, CustomStatus statusKey, CustomLabel labelKey)
 {
     //Appointment apt = Control.Storage.CreateAppointment(AppointmentType.Normal);
     //apt.Subject = subject;
     //apt.Description = description;
     //apt.Start = Control.SelectedInterval.Start;
     //apt.End = Control.SelectedInterval.End;
     //apt.ResourceId = Control.SelectedResource.Id;
     //apt.StatusKey = (int)statusKey;
     //apt.LabelKey = (int)labelKey;
     //Control.Storage.Appointments.Remove(apt);
 }
Example #6
0
 protected void UpdateAppointment(Appointment apt, string subject, CustomStatus statusKey, CustomLabel labelKey)
 {
     //if (labelKey.Equals(CustomLabel.Default) || labelKey.Equals(CustomLabel.Default))
     //{
     //    apt.Subject = subject;
     //    apt.Description = string.Empty;
     //}
     //else if ((apt.LabelKey.Equals((int)CustomLabel.Default) || apt.LabelKey.Equals((int)CustomLabel.Default)) && !labelKey.Equals(CustomLabel.Default) && !labelKey.Equals(CustomLabel.Default))
     //{
     //    apt.Subject = "Name";
     //    apt.Description = "Contact info:";
     //}
     //apt.StatusKey = (int)statusKey;
     //apt.LabelKey = (int)labelKey;
 }
Example #7
0
 private CustomStatus getExecuteStatus(string JsonResult, string urlData)
 {
     try {
         CustomStatus bindException = JsonConvert.DeserializeObject <CustomStatus>(JsonResult);
         if (bindException.code == null)
         {
             return(new CustomStatus());
         }
         else
         {
             return(new CustomStatus(ExceptionsCodes.ApiException, bindException.message, bindException.code, urlData));
         }
     } catch (Exception) {
         return(new CustomStatus());
     }
 }