Ejemplo n.º 1
0
        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);
            //    }
            //}
        }
Ejemplo n.º 2
0
 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
     }));
 }
Ejemplo n.º 3
0
        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();
            //});
        }