public DesktopRecordForm(SessionHandler session) { this._session = session; _context = session.AppTokens[1] as SessionSyncContext; InitializeComponent(); }
private void OnLoginHandlerEvent(SessionSyncContext syncContext) { var listItem = new USessionListItem(syncContext); syncContext.KeyDictions.Add(SysConstantsExtend.SessionListItem, listItem); //是否开启桌面视图 if (!syncContext.KeyDictions[SysConstants.OpenScreenWall].ConvertTo <bool>()) { listItem.BackColor = _closeScreenColor; } var groupName = syncContext.KeyDictions[SysConstants.GroupName].ConvertTo <string>(); if (!groupBox.Items.Contains(groupName)) { this.groupBox.Items.Add(groupName); } //分组 if (groupBox.Text == groupName || groupBox.Text == GROUP_ALL) { this.servicesOnlineList.Items.Add(listItem); } this._connect_count++; this.stripConnectedNum.Text = _connect_count.ToString(); Win32Api.FlashWindow(this.Handle, true); //上线任务栏图标闪烁 }
private void OnLoginUpdateHandlerEvent(SessionSyncContext syncContext) { var listItem = syncContext.KeyDictions[SysConstantsExtend.SessionListItem].ConvertTo <USessionListItem>();; listItem.UpdateListItemText(); if (!syncContext.KeyDictions[SysConstants.OpenScreenWall].ConvertTo <bool>()) { listItem.BackColor = _closeScreenColor; } }
private void OnLogOutHandlerEvent(SessionSyncContext syncContext) { if (syncContext.KeyDictions.ContainsKey(SysConstants.DesktopView)) //如果屏幕墙已开启,移除桌面墙 { this.DisposeDesktopView(syncContext.KeyDictions[SysConstants.DesktopView].ConvertTo <UDesktopView>()); } syncContext.KeyDictions[SysConstantsExtend.SessionListItem].ConvertTo <USessionListItem>().Remove(); _connect_count--; stripConnectedNum.Text = _connect_count.ToString(); }
private IDesktopView OnCreateDesktopViewHandlerEvent(SessionSyncContext syncContext) { var view = new UDesktopView(syncContext) { Height = this._viewCarouselContext.ViewHeight, Width = this._viewCarouselContext.ViewWidth }; view.OnDoubleClickEvent += DesktopViewDbClick; this.desktopViewLayout.Controls.Add(view); return(view); }
public USessionListItem(SessionSyncContext syncContext) { SyncContext = syncContext; this.Text = syncContext.IPv4; this.SubItems.Add(syncContext.MachineName); this.SubItems.Add(syncContext.OSVersion); this.SubItems.Add(syncContext.CpuInfo); this.SubItems.Add("1*" + syncContext.CoreCount); this.SubItems.Add(syncContext.MemroySize / 1024 / 1024 + "MB"); this.SubItems.Add(syncContext.AdminName); this.SubItems.Add(syncContext.IsCameraExist ? "YES" : "NO"); this.SubItems.Add(syncContext.IsRecordExist ? "YES" : "NO"); this.SubItems.Add(syncContext.IsPlayerExist ? "YES" : "NO"); this.SubItems.Add(syncContext.Remark); this.SubItems.Add(syncContext.Version); this.SubItems.Add(syncContext.StarupDateTime); }
public DesktopRecordForm(SessionSyncContext syncContext) { _syncContext = syncContext; InitializeComponent(); }
/// <summary> /// 双击屏幕墙执行一些任务 /// </summary> /// <param name="session"></param> private void DesktopViewDbClick(SessionSyncContext syncContext) { this._appMainAdapterHandler.RemoteActiveService(syncContext, AppConfiguration.DbClickViewExc); }
public USessionListItem(SessionSyncContext syncContext) { SessionSyncContext = syncContext; UpdateListItemText(); }
public UDesktopView(SessionSyncContext syncContext) { SessionSyncContext = syncContext; InitializeComponent(); }
public void LoginHandler(SessionHandler session) { try { var login = session.CompletedBuffer.GetMessageEntity <LoginPack>(); var syncContext = new SessionSyncContext() { IPv4 = login.IPV4, MachineName = login.MachineName, Remark = login.Remark, CpuInfo = login.ProcessorInfo, CoreCount = login.ProcessorCount, MemroySize = login.MemorySize, StarupDateTime = login.StartRunTime, Version = login.ServiceVison, AdminName = login.UserName, OSVersion = login.OSVersion, IsCameraExist = login.ExistCameraDevice, IsRecordExist = login.ExitsRecordDevice, IsPlayerExist = login.ExitsPlayerDevice, IsOpenScreenRecord = login.OpenScreenRecord, IsOpenScreenView = login.OpenScreenWall, IdentifyId = login.IdentifyId, RecordScreenIsAction = false, //桌面记录状态 RecordScreenHeight = login.RecordHeight, //用于桌面记录的高 RecordScreenWidth = login.RecordWidth, //用于桌面记录宽 RecordScreenSpanTime = login.RecordSpanTime, Session = session }; _syncContexts.Add(syncContext); var listItem = new USessionListItem(syncContext); syncContext.OnSessionListItem = listItem; session.AppTokens[SysConstants.INDEX_WORKER] = syncContext; onlineList.Items.Add(listItem); //是否开启桌面视图 if (syncContext.IsOpenScreenView != true) { listItem.BackColor = _closeScreenColor; } else { byte[] data = MessageHelper.CopyMessageHeadTo(MessageHead.S_MAIN_DESKTOPVIEW, new byte[] { 0 });//强制创建视图 session.SendAsync(data); } //是否桌面记录 if (syncContext.IsOpenScreenRecord) { byte[] data = MessageHelper.CopyMessageHeadTo(MessageHead.S_MAIN_SCREEN_RECORD_OPEN, new DesktopRecordGetFramePack() { Height = syncContext.RecordScreenHeight, Width = syncContext.RecordScreenWidth, TimeSpan = syncContext.RecordScreenSpanTime }); session.SendAsync(data); } _connect_count++; stripConnectedNum.Text = _connect_count.ToString(); Win32Api.FlashWindow(this.Handle, true); //上线任务栏图标闪烁 this.WriteRuninglog("计算机:" + syncContext.MachineName + "(" + syncContext.Remark + ") -->已连接控制端!", "ok"); } catch (Exception ex) { LogHelper.WriteErrorByCurrentMethod(ex); //可能是旧版本上线包 } }