예제 #1
0
        async void OnLogin(object sender, EventArgs args)
        {
            User user = User.GetUser(Item.Email, Item.Mdp);

            if (user != null)
            {
                Services.Auth.UserAuth = user;
                OperationCompeleted?.Invoke(this, EventArgs.Empty);
                await Navigation.PopModalAsync();
            }
            else
            {
                CrossToastPopUp.Current.ShowToastMessage("Les identifiants sont incorrect.");
            }
        }
예제 #2
0
        public async void MyListView_ItemTapped(object sender, ItemTappedEventArgs e)
        {
            var media = CrossMedia.Current;

            // 権限チェック
            if (await CheckPermisson())
            {
                if (!media.IsTakePhotoSupported)
                {
                    await DisplayAlert("", "ファイルは読み込みできない。", "OK");

                    return;
                }

                string _ImageSrc  = (MyListView.SelectedItem as NewsListItemModel).ImageSrc;
                int    _CateLogId = (MyListView.SelectedItem as NewsListItemModel).CateLogId;

                List <IamgeSaveInfo> IamgeSaveInfoList = await SqliteUtil.Current.QueryIamgeSaveInfoByCateLogId(_CateLogId);

                var imageIdGroupList = IamgeSaveInfoList
                                       .Where(x => x.CateLogId == _CateLogId)
                                       .GroupBy(x => new { x.ImageID, x.CateLogId, x.Imagebuffer })
                                       .Select(group => new
                {
                    Keys = group.Key
                }).ToList();

                List <ImageColorInfo> ImageColorInfoList = await SqliteUtil.Current.QueryImageColorInfoByImageID(imageIdGroupList[0].Keys.ImageID);

                CataLogInfo cataLogInfo = await SqliteUtil.Current.QueryCataLog(_CateLogId);

                //FileStream _infoStream = new FileStream(_ImageSrc, FileMode.Open, FileAccess.Read);

                //await Navigation.PushModalAsync(new ImageDetail(Convert.FromBase64String(IamgeSaveInfoList[0].Imagebuffer), ImageColorInfoList, _ImageSrc));
                EventArgsEx eventargs = new EventArgsEx();
                eventargs.ByteArray = Convert.FromBase64String(IamgeSaveInfoList[0].Imagebuffer);
                eventargs.InputList = ImageColorInfoList;
                eventargs.Filepath  = _ImageSrc;
                if (cataLogInfo != null)
                {
                    eventargs.TitleName = cataLogInfo.Title;
                }
                await Navigation.PopModalAsync();

                OperationCompeleted?.Invoke(this, eventargs);
            }
        }
예제 #3
0
 async void Save_Clicked(object sender, EventArgs e)
 {
     Services.Auth.UserAuth = Item;
     OperationCompeleted?.Invoke(this, EventArgs.Empty);
     await Navigation.PopModalAsync();
 }