public async Task UpdateStatus(long presentationId, PresentationStatus status) { await ConnectAndSetSchema(); await connection.ExecuteAsync("UPDATE presentations SET status = @status where presentations.id = @presentationId", new { presentationId, status = (int)status }); connection.Close(); }
public void Shutdown() { Status = PresentationStatus.Hide; if (CurrentPresentation != null) { CurrentPresentation.Close(); CurrentPresentation = null; } Blackscreen.Close(); }
public static string GetPresentationStatusDescr(string Name, PresentationStatus status, UserIdentity id) { StringBuilder sb = new StringBuilder(); string userName = string.Empty; if ((id != null) && (id.User != null)) userName = string.IsNullOrEmpty(id.User.FullName) ? id.User.Name : id.User.FullName; switch (status) { case PresentationStatus.Deleted: sb.Append("Сценарий уже удален"); break; case PresentationStatus.LockedForEdit: sb.AppendFormat("Сценарий заблокирован пользователем {0} для редактирования", userName); break; case PresentationStatus.LockedForShow: sb.AppendFormat("Сценарий заблокирован пользователем {0} для показа", userName); break; case PresentationStatus.SlideLocked: sb.Append("Сцена сценария заблокирована"); break; case PresentationStatus.Unknown: sb.Append("Неизвестно"); break; case PresentationStatus.AlreadyLocallyOpened: sb.Append("Сценарий уже открыт в другом экземпляре Дизайнера"); break; } return sb.ToString(); }
void sgworld_OnPresentationStatusChanged(string PresentationID, PresentationStatus Status) { //throw new NotImplementedException(); try { if (Status == PresentationStatus.PS_NOTPLAYING) { if (this.simpleBtnRecord.Enabled == false) this.simpleBtnRecord.Enabled = true; this.simpleBtnPlay.Image = Properties.Resources.GenericBlueRightArrowNoTail32; this.labelPlay.Text = "播放"; } } catch { DialogResult dr = MessageBox.Show("遇到问题!可能原因:缺乏必要图标文件,如果窗体显示无异常,可以选择忽略以继续", "", MessageBoxButtons.AbortRetryIgnore, MessageBoxIcon.Stop); if (dr == DialogResult.Abort) this.Close(); } }
void sgworld_OnPresentationStatusChanged(string PresentationID, PresentationStatus Status) { //throw new NotImplementedException(); try { if (Status == PresentationStatus.PS_NOTPLAYING) { if (this.simpleBtnRecord.Enabled == false) { this.simpleBtnRecord.Enabled = true; } this.simpleBtnPlay.Image = Properties.Resources.GenericBlueRightArrowNoTail32; this.labelPlay.Text = "播放"; } } catch { DialogResult dr = MessageBox.Show("遇到问题!可能原因:缺乏必要图标文件,如果窗体显示无异常,可以选择忽略以继续", "", MessageBoxButtons.AbortRetryIgnore, MessageBoxIcon.Stop); if (dr == DialogResult.Abort) { this.Close(); } } }
public static string GetPresentationStatusDescr(PresentationInfo info, PresentationStatus status, UserIdentity id) { return GetPresentationStatusDescr(info.Name, status, id); }
public async Task Execute(long presentationId, PresentationStatus status) { await presentationRepository.UpdateStatus(presentationId, status); }
public bool RemovePresentation(PresentationInfo info, ref PresentationStatus status) { if (DesignerClient.Instance.IsStandAlone) { Mutex presentationMutex = GetPresentationMutex(info); if (!presentationMutex.WaitOne(1, true)) { status = PresentationStatus.AlreadyLocallyOpened; } presentationMutex.Close(); } if (status == PresentationStatus.ExistsAndUnLocked) { if (DesignerClient.Instance.PresentationWorker.DeletePresentation(info.UniqueName)) { pList.Remove(info); return true; } } return false; }