public LoginViewModel(IWindowManager windowManager) { _windowManager = windowManager; _connection = FowaConnection.Instance; _connection.ConnectionFailed += OnConnectionFailed; FowaMetaData data = new FowaMetaData { OnIncomingFriendlistMessageCallback = OnIncomingFriendlistMessage, OnIncomingErrorMessageCallback = OnIncomingErrorMessage}; _connection.FowaMetaData = data; }
public ContactViewModel(IWindowManager windowManager, IEnumerable<IContact> friends) { _connection = FowaConnection.Instance; FowaMetaData metaData = new FowaMetaData { OnIncomingUserMessageCallback = OnIncomingUserMessage }; _connection.FowaMetaData = metaData; _windowManager = windowManager; Friends = new BindableCollection<IContact>(friends); OpenTabs = new Dictionary<int, int>(); StartListeningAsync(); }
public MainWindow() { _metaData = new FowaMetaData { OnIncomingLoginMessageCallback = OnIncomingLoginMessage, OnIncomingUserMessageCallback = OnIncomingUserMessage, OnIncomingRegisterMessageeCallback = OnIncomingRegisterMessage }; _service = new FowaService(_metaData, 55555); _service.UserDisconnected += OnUserDiconnected; _userFriendService = new UserFriendsService(); InitializeComponent(); _service.StartServer(); }
public RegisterViewModel(IWindowManager windowManager) { FowaMetaData metaData = new FowaMetaData { OnIncomingErrorMessageCallback = OnIncomingErrorMessage, OnIncomingFriendlistMessageCallback = OnIncomingFriendListMessage }; Info = "Register info\n\tFill in the fields and register to be cool :D\n\t..."; _windowManager = windowManager; _connection = FowaConnection.Instance; _connection.FowaMetaData = metaData; }