/// <summary> /// Initialize a new instance of this class /// </summary> public FormMain() { InitializeComponent(); client1.ImagePath = Properties.Settings.Default.ImagePath; _Manager = new MessagingSessionsManager(this); client1.CommandExecutionManager.Subscribe( CommandNames.LOGIN, new CommandExecuteHandler(OnLoginCommandExecuted)); client1.ServerCommandsManager.Subscribe( CommandNames.U_LOGIN, new CommandExecuteHandler(OnUserConnect)); client1.ServerCommandsManager.Subscribe( CommandNames.U_DISCONNECT, new CommandExecuteHandler(OnUserDisconnect)); client1.ServerCommandsManager.Subscribe( CommandNames.U_STATUS_CHANGED, new CommandExecuteHandler(OnUserStatusChanged)); client1.ServerCommandsManager.Subscribe( CommandNames.GET_PICTURE, new CommandExecuteHandler(OnGetPicture)); client1.ServerCommandsManager.Subscribe( CommandNames.CLIENT_UPDATE_PICTURE, new CommandExecuteHandler(OnClientUpdatePicture)); }
/// <summary> /// Initialize a new instance of this class /// </summary> /// <param name="manager"></param> internal FormMsgScreen(MessagingSessionsManager manager, string userName) : this() { _SessionManager = manager; TargetUser = userName; _MessageManager = new MessageManager(this); _SessionManager.MainForm.client1.CommandExecutionManager.Subscribe( CommandNames.SEND_MESSAGE, new CommandExecuteHandler(OnSendCommandExecuted)); }