protected async override void OnNavigatedTo(NavigationEventArgs e) { base.OnNavigatedTo(e); if (e.Parameter == null) { return; } startUI = (StartUI)e.Parameter; //foreach (JObject contact in startUI.memberList) //{ // Conversation userInfo = new Conversation(); // userInfo.FromObj.Name = ((JValue)contact["NickName"]).Value.ToString(); // userInfo.subHeading = ""; // userInfo.FromObj.UserName = ((JValue)contact["UserName"]).Value.ToString(); // if (listContact.Keys.Contains(userInfo.FromObj.Name) == false) // { // listContact.Add(userInfo.FromObj.Name, userInfo); // } // if (dictUserInfo.ContainsKey(userInfo.FromObj.UserName) == false) // { // //userInfo.headImgBytes = await LoginPage.instance.startUI.GetHeadImg(userInfo.userName); // //userInfo.headImg = await Utils.ByteArrayToBitmapImage(userInfo.headImgBytes); // dictUserInfo.Add(userInfo.FromObj.UserName, userInfo); // } //} }
public async Task GoMainPage(StartUI startUI) //JArray sessionList { await CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync( CoreDispatcherPriority.High, new DispatchedHandler(() => { this.Frame.Navigate(typeof(MainPage), startUI);//sessionList })); }
public LoginPage() { this.InitializeComponent(); //修改标题栏颜色 var titleBar = Windows.UI.ViewManagement.ApplicationView.GetForCurrentView().TitleBar; Windows.UI.Color color = new Windows.UI.Color(); color.R = 245; color.G = 245; color.B = 245; //titleBar.BackgroundColor = color; titleBar.ButtonBackgroundColor = color; instance = this; startUI = new StartUI(); //IAsyncAction asyncAction = Windows.System.Threading.ThreadPool.RunAsync( //async (workItem) => //{ // await startUI.start(); //}); }