public MainWindow() { InitializeComponent(); _scapi = new SocialcastApi("https://demo.socialcast.com", "*****@*****.**", "demo"); // Get community info _community = _scapi.GetCommunity(); // Find all stream ids, so we can fetch messages later on var streams = _scapi.GetStreams(); _streams.Add("Home Stream", streams.Where(x => x.Name.Equals("Home Stream")).Select(x => x.Id).First()); _streams.Add("@Mentions", streams.Where(x => x.Name.Equals("@Mentions")).Select(x => x.Id).First()); _streams.Add("Sent", streams.Where(x => x.Name.Equals("Sent")).Select(x => x.Id).First()); _streams.Add("Company Stream", streams.Where(x => x.Name.Equals("Company Stream")).Select(x => x.Id).First()); // Don't hook up the model before the window is loaded Loaded += MainWindowLoaded; }
public MainViewModel(Community community) { _community = community; }