public override void ViewDidLoad() { base.ViewDidLoad(); UIButton button = new UIButton(UIButtonType.System) { TranslatesAutoresizingMaskIntoConstraints = false }; button.SetTitle("Done", UIControlState.Normal); button.TouchUpInside += (s, e) => { this.DismissModalViewController(true); }; this.View.AddSubview(button); popupViewer = new PopupViewer() { Frame = new CoreGraphics.CGRect(0, 0, 414, 736), BackgroundColor = UIColor.White, ContentStretch = new CoreGraphics.CGRect(0, 0, 1, 1), TranslatesAutoresizingMaskIntoConstraints = false }; popupViewer.PopupManager = new PopupManager(popup); this.View.AddSubview(popupViewer); button.TopAnchor.ConstraintEqualTo(View.SafeAreaLayoutGuide.TopAnchor).Active = true; button.LeftAnchor.ConstraintEqualTo(View.LayoutMarginsGuide.LeftAnchor).Active = true; popupViewer.TopAnchor.ConstraintEqualTo(button.BottomAnchor).Active = true; popupViewer.LeftAnchor.ConstraintEqualTo(View.LeftAnchor).Active = true; popupViewer.BottomAnchor.ConstraintEqualTo(View.SafeAreaLayoutGuide.BottomAnchor).Active = true; popupViewer.RightAnchor.ConstraintEqualTo(View.RightAnchor).Active = true; }
/* * Build Popup * */ void BuildPopup() { popup = new PopupViewer(); popup.Build(this.gameObject); popup.Hide(); popup = popup.GetPopUP; }
/* * Set Parametrs From FieldBulder * */ public void SetParametrs(InfoPanel panel, Dice dice, PlayerModel player_model, PlayerModel ai_model, PlayerView player_view, PlayerView ai_view, PopupViewer popup, List <GameFieldViewer> fields) { this.panel = panel; this.dice = dice; this.player_model = player_model; this.ai_model = ai_model; this.player_view = player_view; this.ai_view = ai_view; this.popup = popup; this.fields = fields; }
private void CreateLayout() { // Create a new vertical layout for the app. SetContentView(Resource.Layout.ShowPopup); _myMapView = FindViewById <MapView>(Resource.Id.MapView); _popupViewer = FindViewById <PopupViewer>(Resource.Id.popupViewer); _textView = FindViewById <TextView>(Resource.Id.instructionsLabel); // Add event handlers. _myMapView.GeoViewTapped += MapViewTapped; }
public override void LoadView() { // Create the views. View = new UIView { BackgroundColor = ApplicationTheme.BackgroundColor }; _stackView = new UIStackView { TranslatesAutoresizingMaskIntoConstraints = false, Spacing = 8, Distribution = UIStackViewDistribution.FillEqually }; if (View.TraitCollection.VerticalSizeClass == UIUserInterfaceSizeClass.Compact) { _stackView.Axis = UILayoutConstraintAxis.Horizontal; } else { _stackView.Axis = UILayoutConstraintAxis.Vertical; } _myMapView = new MapView { TranslatesAutoresizingMaskIntoConstraints = false }; _popupViewer = new PopupViewer { TranslatesAutoresizingMaskIntoConstraints = false }; _instructionsLabel = new UILabel { TranslatesAutoresizingMaskIntoConstraints = false, Text = "Tap a feature to display its popup." }; _stackView.AddArrangedSubview(_myMapView); _stackView.AddArrangedSubview(_instructionsLabel); // Add the views. View.AddSubviews(_stackView); // Lay out the views. NSLayoutConstraint.ActivateConstraints(new[] { _stackView.TopAnchor.ConstraintEqualTo(View.SafeAreaLayoutGuide.TopAnchor), _stackView.BottomAnchor.ConstraintEqualTo(View.SafeAreaLayoutGuide.BottomAnchor), _stackView.LeadingAnchor.ConstraintEqualTo(View.SafeAreaLayoutGuide.LeadingAnchor), _stackView.TrailingAnchor.ConstraintEqualTo(View.SafeAreaLayoutGuide.TrailingAnchor), }); }
public override async void ViewDidLoad() { base.ViewDidLoad(); // Used to demonstrate display of EditSummary in PopupViewer // Provides credentials to token-secured layer that has editor-tracking enabled AuthenticationManager.Current.ChallengeHandler = new ChallengeHandler(async(info) => { return(await AuthenticationManager.Current.GenerateCredentialAsync(info.ServiceUri, "user1", "user1")); }); mapView = new MapView() { Map = new Map(Basemap.CreateLightGrayCanvasVector()), TranslatesAutoresizingMaskIntoConstraints = false }; this.View.AddSubview(mapView); popupViewer = new PopupViewer() { Frame = new CoreGraphics.CGRect(0, 0, 414, 736), BackgroundColor = UIColor.White, ContentStretch = new CoreGraphics.CGRect(0, 0, 1, 1), TranslatesAutoresizingMaskIntoConstraints = false, Hidden = true }; this.View.AddSubview(popupViewer); mapView.LeadingAnchor.ConstraintEqualTo(View.LeadingAnchor).Active = true; mapView.TrailingAnchor.ConstraintEqualTo(View.TrailingAnchor).Active = true; mapView.TopAnchor.ConstraintEqualTo(View.SafeAreaLayoutGuide.TopAnchor).Active = true; mapView.BottomAnchor.ConstraintEqualTo(View.BottomAnchor).Active = true; popupViewer.TopAnchor.ConstraintEqualTo(View.TopAnchor).Active = true; popupViewer.LeadingAnchor.ConstraintEqualTo(View.LeadingAnchor).Active = true; // Used in Callout to see feature details in PopupViewer InfoIcon = await UIImage.FromBundle("info.png")?.ToRuntimeImageAsync(); mapView.GeoViewTapped += mapView_GeoViewTapped; // Webmap configured with Popup mapView.Map = new Map(new Uri("https://www.arcgis.com/home/item.html?id=d4fe39d300c24672b1821fa8450b6ae2")); }
private void PopupSwf(string path,int width,int height) { PopupViewer viewer = new PopupViewer(); viewer.Text = Path.GetFileName(path) + " - Player"; viewer.Icon = playerIcon; viewer.ClientSize = new Size(width,height); viewer.Location = MainForm.CommandBarManager.Parent.Location; viewer.Left += 6 + 15; viewer.Top += 111 + 15; AxShockwaveFlash flash = new AxShockwaveFlash(); flash.FSCommand += new _IShockwaveFlashEvents_FSCommandEventHandler(flash_FSCommand); flash.Dock = DockStyle.Fill; viewer.Controls.Add(flash); viewer.Show(); flash.LoadMovie(0,path); }