示例#1
0
        partial void ButtonClicked(NSObject sender)
        {
            string text = MessageTextField.Text;

            if (String.IsNullOrWhiteSpace(text))
            {
                MDToast toast = new MDToast("Enter message to text field above", MDToast.DurationShort);
                toast.Show();
            }
            else
            {
                MDToast toast = new MDToast(text, MDToast.DurationShort);
                toast.Show();
            }
        }
示例#2
0
        public async Task CapturePhoto()
        {
            var videoConnection = stillImageOutput.ConnectionFromMediaType(AVMediaType.Video);
            var sampleBuffer    = await stillImageOutput.CaptureStillImageTaskAsync(videoConnection);


            var jpegImageAsNsData = AVCaptureStillImageOutput.JpegStillToNSData(sampleBuffer);


            var image = new UIImage(jpegImageAsNsData);

            image.SaveToPhotosAlbum(null);

            var toast = new MDToast("Une photo est disponible dans votre bibliothèque", 2);

            toast.Show();
        }
示例#3
0
        partial void handleSingleLineToast(MaterialControls.MDButton sender)
        {
            var toast = new MDToast("Toast test message", 1.0);

            toast.Show();
        }
示例#4
0
        partial void handleLongLineToast(MaterialControls.MDButton sender)
        {
            var toast = new MDToast("Attention! This is a very very very long long text message", 1.0);

            toast.Show();
        }