void ReleaseDesignerOutlets() { if (ImageView != null) { ImageView.Dispose(); ImageView = null; } if (ClassificationLabel != null) { ClassificationLabel.Dispose(); ClassificationLabel = null; } if (CameraButton != null) { CameraButton.Dispose(); CameraButton = null; } if (GalleryButton != null) { GalleryButton.Dispose(); GalleryButton = null; } }
private void ShowImagesCollectionView() { if (AllowUserCompletion) { btnSubmitChallenge.UserInteractionEnabled = true; btnSubmitChallenge.SetBackgroundImage(UIImage.FromBundle("challenge-btn_submit"), UIControlState.Normal);//btnSubmitChallenge.Alpha = 1; } else { btnSubmitChallenge.UserInteractionEnabled = false; btnSubmitChallenge.SetBackgroundImage(new UIImage(), UIControlState.Normal);//btnSubmitChallenge.Alpha = 0.25f; } CollectionView.Hidden = false; bottomButtonsContainer.Hidden = false; vCameraCenter.Hidden = true; vDescriptionContainer.Hidden = true; submitContainer.Hidden = true; CameraButton.SetBackgroundImage(UIImage.FromBundle("challenge-btn_photo"), UIControlState.Normal); UploadedCountText.Text = AllImagesCount.ToString(); if (_collectionSource != null) { ImagesAttach.ForEach(x => x.Description = DescriptionText.Text); Images.AddRange(ImagesAttach); _collectionSource.Pictures = Images; RefreshCollections(); } }
public void CloseTyping() { toolbar.SetActive(false); joystick.SetActive(true); CameraButton.SetActive(true); GoBackHomeButton.SetActive(true); }
public override void ViewDidLoad() { base.ViewDidLoad(); GalleryButton.SetCommand(ViewModel.GalleryCommand); CameraButton.SetCommand(ViewModel.CameraCommand); }
private void UpdateButton(bool isPost) { if (!isPost) { CameraButton.SetBackgroundImage(UIImage.FromBundle("challenge-btn_submit"), UIControlState.Normal); return; } CameraButton.SetBackgroundImage(UIImage.FromBundle("challenge-btn_photo"), UIControlState.Normal); }
void ReleaseDesignerOutlets() { if (CameraButton != null) { CameraButton.Dispose(); CameraButton = null; } if (CancelUserButton != null) { CancelUserButton.Dispose(); CancelUserButton = null; } if (cnsButtomScroll != null) { cnsButtomScroll.Dispose(); cnsButtomScroll = null; } if (LogOutButton != null) { LogOutButton.Dispose(); LogOutButton = null; } if (MainScroll != null) { MainScroll.Dispose(); MainScroll = null; } if (SaveUserButton != null) { SaveUserButton.Dispose(); SaveUserButton = null; } if (UserImg != null) { UserImg.Dispose(); UserImg = null; } if (UserName != null) { UserName.Dispose(); UserName = null; } if (UserSurname != null) { UserSurname.Dispose(); UserSurname = null; } }
public void ToggleKeyboard() { joystick.SetActive(false); CameraButton.SetActive(false); GoBackHomeButton.SetActive(false); keyboard = TouchScreenKeyboard.Open("", TouchScreenKeyboardType.Default, false, false, false); // To test on editor -> comment out // toolbar.SetActive(true); // toolbar.transform.position = new Vector3(toolbar.transform.position.x, 15, toolbar.transform.position.z); // inputTransform = toolbar.transform.GetChild(0); // keyboardActive = true; // EventSystem.current.SetSelectedGameObject(inputTransform.gameObject, null); }
private int GetCameraSwitchVisibilityValue(CameraButton cameraButton) { switch (cameraButton) { case CameraButton.Always: return(ScanOverlay.CameraSwitchAlways); case CameraButton.OnTablet: return(ScanOverlay.CameraSwitchOnTablet); default: return(ScanOverlay.CameraSwitchOnTablet); } }
void ReleaseDesignerOutlets() { if (CameraButton != null) { CameraButton.Dispose(); CameraButton = null; } if (ChatBackground != null) { ChatBackground.Dispose(); ChatBackground = null; } if (ChatScrollView != null) { ChatScrollView.Dispose(); ChatScrollView = null; } if (GalleryButton != null) { GalleryButton.Dispose(); GalleryButton = null; } if (LoadingIndicatorView != null) { LoadingIndicatorView.Dispose(); LoadingIndicatorView = null; } if (SendButton != null) { SendButton.Dispose(); SendButton = null; } if (SmileyButton != null) { SmileyButton.Dispose(); SmileyButton = null; } if (TextField != null) { TextField.Dispose(); TextField = null; } }
private async Task ShowOptionsLayout() { await AttachButton.TranslateTo(0, 50, 0); await CameraButton.TranslateTo(50, 25, 0); await VideoButton.TranslateTo(50, 0, 0); AttachOptionLayout.IsVisible = true; var tasks = new Task[] { AttachButton.TranslateTo(0, 0, 300), CameraButton.TranslateTo(0, 0, 300), VideoButton.TranslateTo(0, 0, 300), ShowOptionsLayoutButton.RotateTo(45, 200), AttachOptionLayout.FadeTo(1, 200) }; await Task.WhenAll(tasks); }
public CameraButtonView(Context context, CameraButton cameraButton) : base(context) { FormsButton = cameraButton; ArcPaint = new Paint(PaintFlags.AntiAlias) { Color = Color.Red, StrokeWidth = BorderThickness }; ArcPaint.SetStyle(Paint.Style.Stroke); //CirclePaint = new Paint(PaintFlags.AntiAlias) { Color = Color.LightGray }; //CirclePaint.SetStyle(Paint.Style.Fill); BorderPaint = new Paint(PaintFlags.AntiAlias) { Color = Color.White, StrokeWidth = BorderThickness }; BorderPaint.SetStyle(Paint.Style.Stroke); }
/// <summary> /// Handle user selection of a camera as frame source /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private async void CameraButton_Click(object sender, RoutedEventArgs e) { // Disable the top menu while handling the click await UpdateMediaSourceButtonsAsync(false); var devicePicker = new DevicePicker(); devicePicker.Filter.SupportedDeviceClasses.Add(DeviceClass.VideoCapture); // Calculate the position to show the picker (right below the buttons) GeneralTransform ge = CameraButton.TransformToVisual(null); Point point = ge.TransformPoint(new Point()); Rect rect = new Rect(point, new Point(point.X + CameraButton.ActualWidth, point.Y + CameraButton.ActualHeight)); DeviceInformation di = await devicePicker.PickSingleDeviceAsync(rect); if (di != null) { // Reset application state await m_lock.WaitAsync(); { m_bindings.Clear(); // Only need to clear bindings to stop skill executions } m_lock.Release(); try { NotifyUser("Attaching to camera " + di.Name, NotifyType.StatusMessage); await ConfigureFrameSourceAsync(di); } catch (Exception ex) { NotifyUser("Error occurred while initializating MediaCapture:\n" + ex.Message, NotifyType.ErrorMessage); } } // Re-enable the top menu once done handling the click await UpdateMediaSourceButtonsAsync(true); }
void Start() { Initialize(); floorMask = LayerMask.GetMask("Floor"); uiMask = LayerMask.GetMask("UI"); indicatorCubePrefab = Resources.Load("IndicatorCubeGreen", typeof(GameObject)) as GameObject; //attackFrequency = 1 / attackSpeed; attackButton = GameManager.instance.hud.Find("CombatUI").Find("Panel").Find("AttackButton").GetComponent <AttackButton>(); cameraButton = GameManager.instance.hud.Find("CameraButton").Find("Panel").Find("CameraButton").GetComponent <CameraButton>(); healthScript = GetComponent <PlayerHealth>(); equipment = Inventory.instance.equipment; combatUI = equipment.weapon.combatUI; TouchInputManager.instance.touchStart += GetMoveTo; }
void ReleaseDesignerOutlets() { if (CameraButton != null) { CameraButton.Dispose(); CameraButton = null; } if (CameraUnavailableLabel != null) { CameraUnavailableLabel.Dispose(); CameraUnavailableLabel = null; } if (MetadataObjectTypesButton != null) { MetadataObjectTypesButton.Dispose(); MetadataObjectTypesButton = null; } if (PreviewView != null) { PreviewView.Dispose(); PreviewView = null; } if (SessionPresetsButton != null) { SessionPresetsButton.Dispose(); SessionPresetsButton = null; } if (ZoomSlider != null) { ZoomSlider.Dispose(); ZoomSlider = null; } }
public CameraButtonView(CameraButton cameraButton) { BackgroundColor = UIColor.Clear; FormsButton = cameraButton; Layer.SetNeedsDisplay(); }
void ReleaseDesignerOutlets() { if (AddPosterButton != null) { AddPosterButton.Dispose(); AddPosterButton = null; } if (CameraButton != null) { CameraButton.Dispose(); CameraButton = null; } if (CheckBoxsView != null) { CheckBoxsView.Dispose(); CheckBoxsView = null; } if (CollectionFullView != null) { CollectionFullView.Dispose(); CollectionFullView = null; } if (CollectionView != null) { CollectionView.Dispose(); CollectionView = null; } if (DeleteButton != null) { DeleteButton.Dispose(); DeleteButton = null; } if (DescriptionText != null) { DescriptionText.Dispose(); DescriptionText = null; } if (PreviewImage != null) { PreviewImage.Dispose(); PreviewImage = null; } if (StepOneImage != null) { StepOneImage.Dispose(); StepOneImage = null; } if (StepOneText != null) { StepOneText.Dispose(); StepOneText = null; } if (StepTwoImage != null) { StepTwoImage.Dispose(); StepTwoImage = null; } if (StepTwoText != null) { StepTwoText.Dispose(); StepTwoText = null; } if (UploadCountText != null) { UploadCountText.Dispose(); UploadCountText = null; } }
void ReleaseDesignerOutlets() { if (CameraButton != null) { CameraButton.Dispose(); CameraButton = null; } if (CameraUnavailableLabel != null) { CameraUnavailableLabel.Dispose(); CameraUnavailableLabel = null; } if (CaptureModeControl != null) { CaptureModeControl.Dispose(); CaptureModeControl = null; } if (CapturingLivePhotoLabel != null) { CapturingLivePhotoLabel.Dispose(); CapturingLivePhotoLabel = null; } if (DepthDataDeliveryButton != null) { DepthDataDeliveryButton.Dispose(); DepthDataDeliveryButton = null; } if (LivePhotoModeButton != null) { LivePhotoModeButton.Dispose(); LivePhotoModeButton = null; } if (PhotoButton != null) { PhotoButton.Dispose(); PhotoButton = null; } if (PreviewView != null) { PreviewView.Dispose(); PreviewView = null; } if (RecordButton != null) { RecordButton.Dispose(); RecordButton = null; } if (ResumeButton != null) { ResumeButton.Dispose(); ResumeButton = null; } }
public override void ViewWillLayoutSubviews() { base.ViewWillLayoutSubviews(); CameraButton.Layer.CornerRadius = CameraButton.Layer.Frame.Size.Width / 2; CameraButton.BackgroundColor = UIColor.FromRGB(0x5A, 0x86, 0x22); // 5A8622 dark-green CameraButton.SetTitleColor(UIColor.FromRGB(0xCF, 0xEF, 0xa7), UIControlState.Normal); // CFEFA7 light-green CameraButton.ClipsToBounds = true; //CameraButton.setImage(UIImage(named: "your-image"), for: .normal) CameraButton.TranslatesAutoresizingMaskIntoConstraints = false; GalleryButton.Layer.CornerRadius = GalleryButton.Layer.Frame.Size.Width / 2; GalleryButton.BackgroundColor = UIColor.FromRGB(0x5A, 0x86, 0x22); // 5A8622 dark-green GalleryButton.SetTitleColor(UIColor.FromRGB(0xCF, 0xEF, 0xa7), UIControlState.Normal); // CFEFA7 light-green GalleryButton.ClipsToBounds = true; //GalleryButton.setImage(UIImage(named: "your-image"), for: .normal) GalleryButton.TranslatesAutoresizingMaskIntoConstraints = false; CloseButton.Layer.CornerRadius = CloseButton.Layer.Frame.Size.Width / 2; CloseButton.BackgroundColor = UIColor.FromRGB(0x5A, 0x86, 0x22); // 5A8622 dark-green CloseButton.SetTitleColor(UIColor.FromRGB(0xCF, 0xEF, 0xa7), UIControlState.Normal); // CFEFA7 light-green CloseButton.ClipsToBounds = true; //CloseButton.setImage(UIImage(named: "your-image"), for: .normal) CloseButton.TranslatesAutoresizingMaskIntoConstraints = false; SaveButton.Layer.CornerRadius = SaveButton.Layer.Frame.Size.Width / 2; SaveButton.BackgroundColor = UIColor.FromRGB(0x5A, 0x86, 0x22); // 5A8622 dark-green SaveButton.SetTitleColor(UIColor.FromRGB(0xCF, 0xEF, 0xa7), UIControlState.Normal); // CFEFA7 light-green SaveButton.ClipsToBounds = true; //SaveButton.setImage(UIImage(named: "your-image"), for: .normal) SaveButton.TranslatesAutoresizingMaskIntoConstraints = false; ClassificationLabel.TranslatesAutoresizingMaskIntoConstraints = false; var safeGuide = View.SafeAreaLayoutGuide; NSLayoutConstraint.ActivateConstraints(new NSLayoutConstraint[] { CloseButton.TrailingAnchor.ConstraintEqualTo(safeGuide.TrailingAnchor, -23), CloseButton.BottomAnchor.ConstraintEqualTo(safeGuide.BottomAnchor, -13), CloseButton.WidthAnchor.ConstraintEqualTo(60), CloseButton.HeightAnchor.ConstraintEqualTo(60) }); NSLayoutConstraint.ActivateConstraints(new NSLayoutConstraint[] { CameraButton.TrailingAnchor.ConstraintEqualTo(CloseButton.LeadingAnchor, -23), CameraButton.BottomAnchor.ConstraintEqualTo(safeGuide.BottomAnchor, -13), CameraButton.WidthAnchor.ConstraintEqualTo(60), CameraButton.HeightAnchor.ConstraintEqualTo(60) }); NSLayoutConstraint.ActivateConstraints(new NSLayoutConstraint[] { GalleryButton.TrailingAnchor.ConstraintEqualTo(CameraButton.LeadingAnchor, -23), GalleryButton.BottomAnchor.ConstraintEqualTo(safeGuide.BottomAnchor, -13), GalleryButton.WidthAnchor.ConstraintEqualTo(60), GalleryButton.HeightAnchor.ConstraintEqualTo(60) }); NSLayoutConstraint.ActivateConstraints(new NSLayoutConstraint[] { SaveButton.TrailingAnchor.ConstraintEqualTo(GalleryButton.LeadingAnchor, -23), SaveButton.BottomAnchor.ConstraintEqualTo(safeGuide.BottomAnchor, -13), SaveButton.WidthAnchor.ConstraintEqualTo(60), SaveButton.HeightAnchor.ConstraintEqualTo(60) }); var marginGuide = View.LayoutMarginsGuide; NSLayoutConstraint.ActivateConstraints(new NSLayoutConstraint[] { ClassificationLabel.LeadingAnchor.ConstraintEqualTo(marginGuide.LeadingAnchor), ClassificationLabel.TrailingAnchor.ConstraintEqualTo(marginGuide.TrailingAnchor), ClassificationLabel.BottomAnchor.ConstraintEqualTo(CloseButton.TopAnchor, -13), ClassificationLabel.HeightAnchor.ConstraintEqualTo(120) }); }
void ReleaseDesignerOutlets() { if (borderSubmit != null) { borderSubmit.Dispose(); borderSubmit = null; } if (bottomButtonsContainer != null) { bottomButtonsContainer.Dispose(); bottomButtonsContainer = null; } if (btnSubmitChallenge != null) { btnSubmitChallenge.Dispose(); btnSubmitChallenge = null; } if (btnSubmitPictureWithDescription != null) { btnSubmitPictureWithDescription.Dispose(); btnSubmitPictureWithDescription = null; } if (CameraButton != null) { CameraButton.Dispose(); CameraButton = null; } if (CameraButtonCenter != null) { CameraButtonCenter.Dispose(); CameraButtonCenter = null; } if (CollectionView != null) { CollectionView.Dispose(); CollectionView = null; } if (CollectionViewAttach != null) { CollectionViewAttach.Dispose(); CollectionViewAttach = null; } if (CountContainer != null) { CountContainer.Dispose(); CountContainer = null; } if (DescriptionText != null) { DescriptionText.Dispose(); DescriptionText = null; } if (lblChallengeName != null) { lblChallengeName.Dispose(); lblChallengeName = null; } if (lblUpload != null) { lblUpload.Dispose(); lblUpload = null; } if (NeedUploadCountText != null) { NeedUploadCountText.Dispose(); NeedUploadCountText = null; } if (PreviewImage != null) { PreviewImage.Dispose(); PreviewImage = null; } if (submitContainer != null) { submitContainer.Dispose(); submitContainer = null; } if (UploadedCountText != null) { UploadedCountText.Dispose(); UploadedCountText = null; } if (vCameraCenter != null) { vCameraCenter.Dispose(); vCameraCenter = null; } if (vDescriptionContainer != null) { vDescriptionContainer.Dispose(); vDescriptionContainer = null; } }