void ReleaseDesignerOutlets() { if (Name != null) { Name.Dispose(); Name = null; } if (Scroll != null) { Scroll.Dispose(); Scroll = null; } if (Text != null) { Text.Dispose(); Text = null; } if (NameView != null) { NameView.Dispose(); NameView = null; } }
private void ModifyNameView() { NameView nv = new NameView(); _appSettings.nameView.SaveTo(nv); Controller.Run <NameViewSetupPresenter, NameView>(nv); if (!_appSettings.nameView.Equals(nv)) { _appSettings.nameView = nv; NameViewChanged?.Invoke(); } }
protected override void Dispose(bool disposing) { if (disposing) { _layoutManager?.Dispose(); _childAdapter?.Dispose(); NameView?.Dispose(); ProductRecyclerView?.Dispose(); } base.Dispose(disposing); }
void ReleaseDesignerOutlets() { if (DescriptionView != null) { DescriptionView.Dispose(); DescriptionView = null; } if (NameView != null) { NameView.Dispose(); NameView = null; } if (SaveButton != null) { SaveButton.Dispose(); SaveButton = null; } }
void ReleaseDesignerOutlets() { if (BonusButton != null) { BonusButton.Dispose(); BonusButton = null; } if (DeleteButton != null) { DeleteButton.Dispose(); DeleteButton = null; } if (HandLabel != null) { HandLabel.Dispose(); HandLabel = null; } if (HandView != null) { HandView.Dispose(); HandView = null; } if (NameLabel != null) { NameLabel.Dispose(); NameLabel = null; } if (NameView != null) { NameView.Dispose(); NameView = null; } if (SpecialButton != null) { SpecialButton.Dispose(); SpecialButton = null; } }
public void Run(Camera camera, bool newSource = false) { _camera = camera; _nameView = new NameView(); if (_camera.nameView != null) { _camera.nameView.SaveTo(_nameView); } View.Show(); View.IsNewSource = newSource; View.SrcName = _camera.name; View.RtspBad = _camera.rtspBad; View.RtspGood = _camera.rtspGood; View.AspectRatio = _camera.aspectRatio; View.CamIcon = _camera.camIcon; View.Position = _camera.position; View.IsNameShow = _nameView.enabled; View.IsNameInherit = _nameView.inheritGlobal; }
private void SaveClick() { _nameView.enabled = View.IsNameShow; _nameView.inheritGlobal = View.IsNameInherit; NameView nv = _camera.nameView == null ? new NameView() : _camera.nameView; bool notModified = nv.Equals(_nameView) && _camera.name == View.SrcName && _camera.rtspBad == View.RtspBad && _camera.rtspGood == View.RtspGood && _camera.aspectRatio == View.AspectRatio && _camera.goodOnlyInFullview == View.IsGoodOnlyInFullview && _camera.camIcon == View.CamIcon; if (notModified) { View.Hide(); Cancel?.Invoke(); } else { _camera.nameView = _nameView; _camera.name = View.SrcName; _camera.rtspBad = View.RtspBad; _camera.rtspGood = View.RtspGood; _camera.aspectRatio = View.AspectRatio; _camera.camIcon = View.CamIcon; _camera.goodOnlyInFullview = View.IsGoodOnlyInFullview; if (View.IsNewSource) { Create?.Invoke(); } else { Save?.Invoke(); } View.Hide(); } }
void ReleaseDesignerOutlets() { if (ClientLabel != null) { ClientLabel.Dispose(); ClientLabel = null; } if (CloseButton != null) { CloseButton.Dispose(); CloseButton = null; } if (ColorCircleView != null) { ColorCircleView.Dispose(); ColorCircleView = null; } if (ColorPickerOpeningView != null) { ColorPickerOpeningView.Dispose(); ColorPickerOpeningView = null; } if (DoneButton != null) { DoneButton.Dispose(); DoneButton = null; } if (ErrorLabel != null) { ErrorLabel.Dispose(); ErrorLabel = null; } if (NameTextField != null) { NameTextField.Dispose(); NameTextField = null; } if (PrivateProjectLabel != null) { PrivateProjectLabel.Dispose(); PrivateProjectLabel = null; } if (PrivateProjectSwitch != null) { PrivateProjectSwitch.Dispose(); PrivateProjectSwitch = null; } if (PrivateProjectSwitchContainer != null) { PrivateProjectSwitchContainer.Dispose(); PrivateProjectSwitchContainer = null; } if (ProjectNameUsedErrorTextHeight != null) { ProjectNameUsedErrorTextHeight.Dispose(); ProjectNameUsedErrorTextHeight = null; } if (ProjectNameUsedErrorView != null) { ProjectNameUsedErrorView.Dispose(); ProjectNameUsedErrorView = null; } if (TitleLabel != null) { TitleLabel.Dispose(); TitleLabel = null; } if (WorkspaceLabel != null) { WorkspaceLabel.Dispose(); WorkspaceLabel = null; } if (NameView != null) { NameView.Dispose(); NameView = null; } if (WorkspaceView != null) { WorkspaceView.Dispose(); WorkspaceView = null; } if (ClientView != null) { ClientView.Dispose(); ClientView = null; } }
public override void ViewDidLoad() { base.ViewDidLoad(); CloseButton.SetTemplateColor(ColorAssets.Text2); TitleLabel.Text = Resources.NewProject; NameTextField.Placeholder = Resources.ProjectName; ErrorLabel.Text = Resources.ProjectNameTakenError; DoneButton.SetTitle(Resources.Create, UIControlState.Normal); ProjectNameUsedErrorTextHeight.Constant = 0; PrivateProjectLabel.Text = Resources.PrivateProject; // Name NameTextField.Rx().Text() .Subscribe(ViewModel.Name.Accept) .DisposedBy(DisposeBag); ViewModel.Name .Subscribe(NameTextField.Rx().TextObserver()) .DisposedBy(DisposeBag); // Color ColorPickerOpeningView.Rx() .BindAction(ViewModel.PickColor) .DisposedBy(DisposeBag); ViewModel.Color .Select(color => color.ToNativeColor()) .Subscribe(ColorCircleView.Rx().BackgroundColor()) .DisposedBy(DisposeBag); // Error ViewModel.Error .Subscribe(ErrorLabel.Rx().Text()) .DisposedBy(DisposeBag); ViewModel.Error .Select(e => string.IsNullOrEmpty(e) ? new nfloat(0) : errorVisibleHeight) .Subscribe(ProjectNameUsedErrorTextHeight.Rx().Constant()) .DisposedBy(DisposeBag); if (TraitCollection.HorizontalSizeClass == UIUserInterfaceSizeClass.Regular) { ViewModel.Error .Select(e => string.IsNullOrEmpty(e) ? desiredIpadHeight : errorVisibleHeight + desiredIpadHeight) .Select(h => new CGSize(0, h)) .Subscribe(this.Rx().PreferredContentSize()) .DisposedBy(DisposeBag); } // Workspace WorkspaceLabel.Rx() .BindAction(ViewModel.PickWorkspace) .DisposedBy(DisposeBag); ViewModel.WorkspaceName .Subscribe(WorkspaceLabel.Rx().Text()) .DisposedBy(DisposeBag); // Client ClientLabel.Rx() .BindAction(ViewModel.PickClient) .DisposedBy(DisposeBag); var emptyText = Resources.AddClient.PrependWithAddIcon(ClientLabel.Font.CapHeight); ViewModel.ClientName .Select(attributedClientName) .Subscribe(ClientLabel.Rx().AttributedText()) .DisposedBy(DisposeBag); // Is Private PrivateProjectSwitch.Rx().Changed() .Select(_ => PrivateProjectSwitch.On) .Subscribe(ViewModel.IsPrivate.Accept) .DisposedBy(DisposeBag); ViewModel.CanCreatePublicProjects .Subscribe(PrivateProjectSwitchContainer.Rx().IsVisible()) .DisposedBy(DisposeBag); // Save DoneButton.Rx() .BindAction(ViewModel.Save) .DisposedBy(DisposeBag); CloseButton.Rx().Tap() .Subscribe(() => ViewModel.CloseWithDefaultResult()) .DisposedBy(DisposeBag); NSAttributedString attributedClientName(string clientName) { if (string.IsNullOrEmpty(clientName)) { return(emptyText); } return(new NSAttributedString(clientName)); } NameView.InsertSeparator(); WorkspaceView.InsertSeparator(); ClientView.InsertSeparator(); PrivateProjectSwitchContainer.InsertSeparator(); }
private void SetSource(Camera source) { if (log) { View.Log("SetSource"); } if (_settings == null) { return; } source.position = _position; if (String.IsNullOrEmpty(source.rtspBad)) { if (String.IsNullOrEmpty(source.rtspGood)) { return; //todo: generate error message on empty bad (and good?) strings } _badString = source.rtspGood; _goodString = ""; } else { _badString = source.rtspBad; _goodString = source.rtspGood; } if (_badPlayer == null) { CreateBadSource(); } _badPlayer.SetSourceString(_badString); _badPlayer.SetAspectRatio(source.aspectRatio); _badPlayer.Volume = 0; _badPlayer.LostRtspRetryMin = _settings.alert.email.whenDissapearMin; if (!String.IsNullOrEmpty(_goodString)) { if (_goodPlayer == null) { _goodPlayer = Controller.Get <PlayerPresenter>(); View.SetGoodPlayerControl(_goodPlayer.Control); _goodPlayer.Playing += GoodPlaying; _goodPlayer.Stopped += GoodStopped; _goodPlayer.SoundDetected += GoodSoundDetected; _goodPlayer.Buffering += GoodBuffering; _goodPlayer.LostStream += SignalLostF; _goodPlayer.LostStreamRestored += SignalRestoredF; _goodPlayer.LostRtspRetryMin = _settings.alert.email.whenDissapearMin; } _goodPlayer.SetSourceString(_goodString); _goodPlayer.SetAspectRatio(source.aspectRatio); _goodPlayer.Volume = _badPlayer.Volume; _goodPlayer.LostRtspRetryMin = _settings.alert.email.whenDissapearMin; } View.SrcName = source.name; View.SrcNameShow = source.nameView.enabled; NameView nv = source.nameView.inheritGlobal ? _settings.nameView : source.nameView; View.SrcNameAutoHide = nv.autoHide; View.SrcNameColor = nv.color; View.SrcNameBg = nv.paintBg; View.SrcNameBgColor = nv.bgColor; View.SrcNameSize = nv.size; View.SrcNameAlign = (int)nv.position; View.SrcNameShowSec = nv.autoHideSec; View.SrcNameRefresh(); _source = source; if (!_badPlayer.IsPlaying) // todo: can be Buffering, SourceSet need not! { View.HidePlayer = true; _badH = 0; _badW = 0; _control.SourceSet(); } if (_settings.autoplay_now == 1) { CommandPlay(); } }