// Камера internal void CheckListSnapshot_OnClick(object sender, EventArgs eventArgs) { if (_readonly) { return; } _imgToReplace = (Image)((VerticalLayout)sender).GetControl(0); _currentCheckListItemID = ((VerticalLayout)sender).Id; if (_imgToReplace.Source.StartsWith("~")) { Navigation.Move(nameof(PhotoScreen), new Dictionary <string, object> { [Parameters.IdImage] = _imgToReplace.Source, [nameof(CheckListScreen)] = _currentCheckListItemID }); } else if (_imgToReplace.Source == ResourceManager.GetImage("checklistscreen_photo")) { _newGuid = Guid.NewGuid().ToString(); _pathToImg = $@"\private\{_newGuid}.jpg"; Camera.MakeSnapshot(_pathToImg, Settings.PictureSize, CameraCallback, _newGuid); } }
private void btn_OnClick(object sender, EventArgs e) { var id = Guid.NewGuid(); var fileName = string.Format("shared/{0}", id); Camera.MakeSnapshot(fileName, 500, delegate { //var photo = new Photos(); //photo.Id = id; //photo.FileName = fileName; //photo.Save(); UpdateSyncButton(); } ); }
void btn_OnClick(object sender, EventArgs e) { Guid id = Guid.NewGuid(); String fileName = String.Format("shared/{0}", id.ToString()); Camera.MakeSnapshot(fileName, 500, delegate(object sender2, EventArgs e2) { Test.Model.Document.Photos photo = new Model.Document.Photos(); photo.Id = id; photo.FileName = fileName; photo.Save(); BusinessProcess.DoBack(); } ); }
internal void RetakeButton_OnClick(object sender, EventArgs args) { var guid = Guid.NewGuid(); string path = $@"\private\{guid}.jpg"; var oldPath = _photo.Source.StartsWith("~") ? _photo.Source.Substring(1) : _photo.Source; Camera.MakeSnapshot(path, Settings.PictureSize, (o, eventArgs) => { if (!eventArgs.Result) { return; } FileSystem.Delete(oldPath); _photo.Source = "~" + path; _photo.Refresh(); ChangePhotoInDB(guid.ToString()); Navigation.Back(); }); }
private void Camera_OnClick(object sender, EventArgs e) { Camera.MakeSnapshot("//private//test.jpg", 5, DconsoleWriteLine); }