示例#1
0
		partial void LogOutTouchUpInside (UIKit.UIButton sender)
		{
			// present tab bar controller
			var storyBoard = UIStoryboard.FromName ("Main", null);
			var loginView = storyBoard.InstantiateViewController ("rootView") as UINavigationController;
			this.PresentViewController (loginView, animated: true, completionHandler: null);
		}
示例#2
0
        void BuildStorageItems(Storage storage)
        {
            Vessel vessel = FlightGlobals.ActiveVessel;

            resourceSet.Clear();
            resourceList.Clear();

            Part rootPart = vessel.parts[0].localRoot;
            var  manager  = new RMResourceManager(vessel.parts, rootPart);

            GetVesselResources(manager);
            GetStoredResources(storage);

            storageItems.Clear();
            storageItems.Storage = storage;
            storageItems.Vessel  = vessel;

            for (int i = 0; i < resourceList.Count; i++)
            {
                var            resDef         = resourceList[i];
                var            storedResource = storage.GetResource(resDef);
                RMResourceInfo vesselResource;
                manager.masterSet.resources.TryGetValue(resDef.name, out vesselResource);
                storageItems.Add(new StorageItem(storage, storedResource, vesselResource));
            }
            UIKit.UpdateListContent(storageItems);
        }
		public override UIKit.UITableViewCell GetCell (UIKit.UITableView tv)
		{
			cell = base.GetCell (tv);
			cell.UserInteractionEnabled = enabled;
			cell.TextLabel.Enabled = enabled;
			return cell;
		}
        public override UIKit.UITableViewCell GetCell(Cell item, UIKit.UITableViewCell reusableCell, UIKit.UITableView tv)
        {
            var cell = base.GetCell(item, reusableCell, tv);
            cell.SelectionStyle = UIKit.UITableViewCellSelectionStyle.None;

            return cell;
        }
		public override UIKit.UITableViewCell GetCell (Cell item, UIKit.UITableViewCell reusableCell, UIKit.UITableView tv)
		{
			var cell = base.GetCell (item, reusableCell, tv);
			cell.SeparatorInset = UIEdgeInsets.Zero;
			cell.TextLabel.Font = UIFont.FromName ("baskervillebecker", 18f);
			return cell;
		}
示例#6
0
        // Start is called before the first frame update

        void Start()
        {
            UIKit.OpenPanel("UIMenu");

            //test
            //GameStart(6);
        }
示例#7
0
		public override UIKit.UITableViewCell GetCell (Cell item, UIKit.UITableViewCell reusableCell, UIKit.UITableView tv)
		{
			var cell = base.GetCell (item, reusableCell, tv);
			cell.Accessory = UIKit.UITableViewCellAccessory.DisclosureIndicator;

			return cell;
		}
示例#8
0
 protected override void OnOpen(IUIData uiData = null)
 {
     BackBtn.onClick.AddListener(() => {
         CloseSelf();
         UIKit.OpenPanel <UIMenu>();
     });
 }
示例#9
0
 public void QuitStage()
 {
     QEventSystem.SendEvent(EventDefine.MainGameEvent.StageEnd);
     MoveCam(-1);
     uIMain.FadeClose();
     UIKit.OpenPanel("UISelectStage");
 }
示例#10
0
        void FindLocalGroups()
        {
            CelestialBody body     = FlightGlobals.currentMainBody;
            Vector3       position = FlightGlobals.ActiveVessel.GetTransform().position;
            float         range    = KerbalKonstructs.localGroupRange;

            range *= range;

            localGroups.Clear();

            for (int i = 0; i < StaticDatabase.allGroupCenters.Length; i++)
            {
                var groupCenter = StaticDatabase.allGroupCenters[i];
                //if (groupCenter.isInSavegame || groupCenter.isBuiltIn) {
                //	continue;
                //}
                if (groupCenter.CelestialBody == body)
                {
                    Vector3 dist = position - groupCenter.gameObject.transform.position;
                    if (dist.sqrMagnitude < range)
                    {
                        localGroups.Add(new GroupItem(groupCenter));
                    }
                }
            }
            UIKit.UpdateListContent(localGroups);
        }
示例#11
0
        void SpawnGroup()
        {
            EditorGUI.instance.Close();
            MapDecalEditor.Instance.Close();
            EditorGUI.selectedInstance = null;

            GroupCenter groupCenter = new GroupCenter {
                RadialPosition = FlightGlobals.currentMainBody.transform.InverseTransformPoint(FlightGlobals.ActiveVessel.transform.position),
                Group          = "NewGroup",
                CelestialBody  = FlightGlobals.currentMainBody
            };

            groupCenter.Spawn();

            GroupEditor.selectedGroup = groupCenter;

            if (GroupEditor.selectedGroup == null)
            {
                Log.UserError("No Group created");
            }
            else
            {
                Log.Normal("Group Editor spawned");

                localGroups.Add(new GroupItem(groupCenter));
                UIKit.UpdateListContent(localGroups);

                GroupEditor.instance.Open();
            }
        }
示例#12
0
        protected override void OnOpen(IUIData uiData = null)
        {
            Button.onClick.AddListener(() => {
                FadeClose();
                UIKit.OpenPanel <UISelectStage>();
            });
            ButtonClr.onClick.AddListener(() => {
                GameDataManager.Clear();
            });
            ButtonSetting.onClick.AddListener(() => {
                FadeClose();
                UIKit.OpenPanel <UISettings>();
            });
            ButtonSTAFF.onClick.AddListener(() => {
                FadeClose();
                UIKit.OpenPanel <UISTAFF>();
            });
            ButtonQuit.onClick.AddListener(() => {
#if UNITY_EDITOR
                UnityEditor.EditorApplication.isPlaying = false;
#else
                Application.Quit();
#endif
            });
        }
 public override void WireToViewController(UIKit.UIViewController viewController,
     CEInteractionOperation operation)
 {
     this.operation = operation;
     this.viewController = viewController;
     PrepareGestureRecognizer (viewController.View);
 }
 public override UIKit.UITableViewCell GetCell(Cell item, UIKit.UITableViewCell reusableCell,
     UIKit.UITableView tv)
 {
     var cell = base.GetCell(item, reusableCell, tv);
     cell.Accessory = CellAccessoryHelper.GetCellAccessory(item.StyleId);
     return cell;
 }
 public string GetTitle(UIKit.UIPickerView pickerView, System.nint row, System.nint component)
 {
     switch ((int)row) {
     case 0:
         return NearableType.Bag.ToString ();
     case 1:
         return NearableType.Bed.ToString ();
     case 2:
         return NearableType.Bike.ToString ();
     case 3:
         return NearableType.Car.ToString ();
     case 4:
         return NearableType.Chair.ToString ();
     case 5:
         return NearableType.Dog.ToString ();
     case 6:
         return NearableType.Door.ToString ();
     case 7:
         return NearableType.Fridge.ToString ();
     case 8:
         return NearableType.Generic.ToString ();
     case 9:
         return NearableType.Shoe.ToString ();
     default:
         return NearableType.Unknown.ToString ();
     }
 }
示例#16
0
        public static void OpenPanel(string panelName)
        {
            var panel = UIKit.OpenPanel(panelName)
                        .GetILComponent <ILUIPanelInterface>();

            panel.Open();
        }
		public override void TouchesBegan (Foundation.NSSet touches, UIKit.UIEvent evt)
		{

			swiped = false;
			UITouch touch = touches.AnyObject as UITouch ;
			lastPoint = touch.LocationInView (this);
		}
示例#18
0
        protected override void OnInit(IUIData uiData = null)
        {
            for (var i = 0; i < mButtons.Length; i++)
            {
                mButtons[i] = SectionBtn
                              .Instantiate()
                              .Parent(SectionBtn.transform.parent)
                              .LocalScaleIdentity()
                              .LocalPositionIdentity()
                              .Name("Section" + (i + 1))
                              .Show()
                              .ApplySelfTo(selfBtn => selfBtn.GetComponentInChildren <Text>().text = selfBtn.name)
                              .ApplySelfTo(selfBtn =>
                {
                    var index = i;
                    selfBtn.onClick.AddListener(() => { ChoiceSection(index); });
                });
            }

            SettingBtn.onClick.AddListener(() =>
            {
                UIKit.OpenPanel <UISettingPanel>(UILevel.PopUI, prefabName: "Resources/UISettingPanel");
            });

            BackBtn.onClick.AddListener(() =>
            {
                CloseSelf();
                UIKit.OpenPanel <UIMenuPanel>(UILevel.Common, prefabName: "Resources/UIMenuPanel");
            });
        }
		async partial void SaveRecord (UIKit.UIButton sender)
		{
			if (nameTextField.Text.Length < 1) {
				nameTextField.ResignFirstResponder ();
				return;
			}

			var saveLocation = new CLLocation (pin.Coordinate.Latitude, pin.Coordinate.Longitude);
			var record = await CloudManager.AddRecordAsync (nameTextField.Text, saveLocation);

			if (record == null) {
				Console.WriteLine ("Error: null returned on save");
				return;
			}

			nameTextField.Text = string.Empty;
			nameTextField.ResignFirstResponder ();

			var alert = UIAlertController.Create ("CloudKitAtlas", "Saved record", UIAlertControllerStyle.Alert);
			alert.AddAction (UIAlertAction.Create ("OK", UIAlertActionStyle.Default, (act) => {
				DismissViewController (true, null);
			}));

			PresentViewController (alert, true, null);
		}
        public override void Start()
        {
            btn_1.onClick.AddListener(async() =>
            {
                await UIKit.OpenUIAsync("msgBox", new MsgBox(),
                                        new OpenUIParam()
                {
                    UseMask = true, CloseByMask = true
                },
                                        "hello,world! ddddd44444dddd", "hello");
            });

            btn_counter.onClick.AddListener(async() =>
            {
                await UIKit.OpenUIAsync("counter",
                                        new CounterScreen(),
                                        new OpenUIParam
                {
                    UseMask     = true,
                    CloseByMask = true
                });
            });

            btn_fetchData.onClick.AddListener(() =>
            {
                UIKit.OpenUIAsync("fetchData", new FetchData());
            });
        }
		public override UIKit.UITableViewCell GetCell(UIKit.UITableView tv)
		{
			var cell = base.GetCell(tv);

			cell.ImageView.Image = this.Image;

			return cell;
		}
示例#22
0
 private void ChoiceSection(int i)
 {
     UIKit.HidePanel(name);
     UIKit.OpenPanel <UIGamePanel>(UILevel.Common, new UIGamePanelData {
         SectionNo = i + 1
     },
                                   prefabName: "Resources/UIGamePanel");
 }
示例#23
0
 /// <summary>
 /// 绑定跳转逻辑
 /// </summary>
 /// <param name="selfPanel"></param>
 /// <param name="btn"></param>
 /// <typeparam name="T"></typeparam>
 public static System.Action Transition <TDstPanel>(this UIPanel selfBehaviour, IUIData uidata = null) where TDstPanel : UIPanel
 {
     return(() =>
     {
         UIKit.ClosePanel(selfBehaviour.name);
         UIKit.OpenPanel <TDstPanel>(uidata);
     });
 }
示例#24
0
 public override UIKit.UITableViewCell GetCell(UIKit.UITableView tv)
 {
     var cell = base.GetCell(tv);
     cell.BackgroundColor = StyledStringElement.BgColor;
     cell.TextLabel.Font = StyledStringElement.DefaultTitleFont.WithSize(StyledStringElement.DefaultTitleFont.PointSize * Element.FontSizeRatio);
     cell.TextLabel.TextColor = StyledStringElement.DefaultTitleColor;
     return cell;
 }
            public override void LoadingFinished(UIKit.UIWebView webView)
            {
                var HeightHtml = webView.ScrollView.ContentSize.Height;
                pclControl.ContentHeight = (int)HeightHtml;

                webView.ScrollView.ScrollEnabled = false;
                //webView.LoadHtmlString ((pclControl.Source as HtmlWebViewSource).Html, null);
            }
示例#26
0
        public static T OpenPanel <T>(ILUIData uiData = null) where T : ILUIPanelInterface, new()
        {
            var panel = UIKit.OpenPanel(typeof(T).Name)
                        .GetILComponent <T>();

            panel.Open(uiData);
            return(panel);
        }
示例#27
0
        public override void TouchesMoved(Foundation.NSSet touches, UIKit.UIEvent evt)
        {
            base.TouchesMoved(touches, evt);

            System.Diagnostics.Debug.WriteLine("GestureSwitch: TouchesMoved");

            this.NextResponder.TouchesMoved(touches, evt);
        }
示例#28
0
 public override void DidReceiveLocalNotification(UIKit.UILocalNotification localNotification, Action<WKUserNotificationInterfaceType> completionHandler)
 {
     // This method is called when a local notification needs to be presented.
     // Implement it if you use a dynamic glance interface.
     // Populate your dynamic glance inteface as quickly as possible.
     //
     // After populating your dynamic glance interface call the completion block.
     completionHandler(WKUserNotificationInterfaceType.Custom);
 }
示例#29
0
 protected override void OnOpen(IUIData uiData = null)
 {
     BackBtn.onClick.AddListener(() => {
         transform.DOScale(Vector3.zero, 0.3f).onComplete = () => {
             CloseSelf();
             UIKit.OpenPanel <UIMenu>();
         };
     });
 }
		partial void SegmentedControlClicked (UIKit.UISegmentedControl sender){
			if(sender.SelectedSegment == 0){
				Type = "Timed";
			}
			else{
				Type = "Timers";
			}
			ShowCorrectPage();
		}
示例#31
0
        public MainWindow()
        {
            InitializeComponent();

            hangulClockIcon.Source            = UIKit.GetLogoImage();
            hangulClockCurrentVersion.Content = $"현재 설치된 버전 : {VersionKit.HANGULCLOCK_VERSION}";

            // checkUpdate();
        }
示例#32
0
 /// <summary>
 /// 绑定跳转逻辑
 /// </summary>
 /// <param name="selfPanel"></param>
 /// <param name="btn"></param>
 /// <typeparam name="T"></typeparam>
 public static void BindTransition <TSrcPanel, TDstPanel>(this UnityEngine.UI.Button btn) where TSrcPanel : UIPanel
     where TDstPanel : UIPanel
 {
     btn.onClick.AddListener(() =>
     {
         UIKit.ClosePanel <TSrcPanel>();
         UIKit.OpenPanel <TDstPanel>();
     });
 }
示例#33
0
 public override UIKit.UITableViewCell GetCell(UIKit.UITableView tv)
 {
     var cell = base.GetCell(tv);
     var addRemove = ((ChangesetCell)cell).AddRemoveView;
     addRemove.Added = _added;
     addRemove.Removed = _removed;
     addRemove.SetNeedsDisplay();
     return cell;
 }
 void BuildFacilities()
 {
     facilityItems.Clear();
     for (int i = 0, count = allFacilities.Count; i < count; i++)
     {
         var facility = allFacilities[i];
         facilityItems.Add(new FacilityItem(facility));
     }
     UIKit.UpdateListContent(facilityItems);
 }
        public override void HandleLocalNotificationAction(string identifier, UIKit.UILocalNotification localNotification)
        {
            Console.WriteLine($"HandleLocalNotificationAction: {identifier}");

            var baseCurrency = (string)(NSString)localNotification.UserInfo.ValueForKey((NSString)"baseCurrency");
            var counterCurrency = (string)(NSString)localNotification.UserInfo.ValueForKey((NSString)"counterCurrency");
            Pairs.NotificationCurrencyPair = new NotificationCurrencyPair(baseCurrency, counterCurrency);

            base.HandleLocalNotificationAction(identifier, localNotification);
        }
示例#36
0
        protected override bool ShouldStartLoad(Foundation.NSUrlRequest request, UIKit.UIWebViewNavigationType navigationType)
        {
            if (!request.Url.AbsoluteString.StartsWith("file://", System.StringComparison.Ordinal))
            {
                ViewModel.GoToLinkCommand.Execute(request.Url.AbsoluteString);
                return false;
            }

            return base.ShouldStartLoad(request, navigationType);
        }
 partial void OnUpdateItemButtonTapped(UIKit.UIButton sender)
 {
   if (null == this.CreatedItemPath)
   {
     AlertHelper.ShowLocalizedAlertWithOkOption("Message", "Create item at first");
   }
   else
   {
     this.SendUpdateRequest();
   }
 }
示例#38
0
        protected override void OnInit(IUIData uiData = null)
        {
            mData         = uiData as UIGamePanelData;
            gameText.text = "Hello,You are in Section {0}".FillFormat(mData.SectionNo);

            backBtn.onClick.AddListener(() =>
            {
                UIKit.OpenPanel <UISectionPanel>(UILevel.Common, prefabName: "Resources/UISectionPanel");
                CloseSelf();
            });
        }
示例#39
0
 public void GameStart(int id)
 {
     NowStage = id;
     uIMain   = (UIMain)UIKit.OpenPanel("UIMain");
     this.Delay(0.1f, () => {
         CreateGrass();
         CreateCar();
         SetOrder(id);
         MoveCam();
     });
 }
示例#40
0
		public override UIKit.UITableViewCell GetCell (UIKit.UITableView tv)
		{
			// try and dequeue a cell object to reuse. if one doesn't exist, create a new one
			ExhibitorCell cell = tv.DequeueReusableCell (cellKey) as ExhibitorCell;
			if (cell == null) {
				cell = new UI.CustomElements.ExhibitorCell (exhibitor);
			}
			cell.UpdateCell(exhibitor);

			return cell;
		}
		partial void LocalButtonClicked (UIKit.UIButton sender)
		{
			sender.SetImage (UIImage.FromBundle ("LocalSelected"), UIControlState.Normal);
			sender.SetImage (UIImage.FromBundle ("LocalSelected"), UIControlState.Normal);
			sender.SetImage (UIImage.FromBundle ("LocalSelected"), UIControlState.Normal);
			GlobalButton.SetImage (UIImage.FromBundle ("Global"), UIControlState.Normal);
			GlobalButton.SetImage (UIImage.FromBundle ("Global"), UIControlState.Normal);
			GlobalButton.SetImage (UIImage.FromBundle ("Global"), UIControlState.Normal);
			Scope = "Local";
			ShowCorrectPage();
		}
        internal static void Open()
        {
            if (instance == null)
            {
                instance = UIKit.CreateUI <MapIconSelector>(UIMain.appCanvasRect, "KKMapIconSelector");
            }

            instance.rectTransform.anchoredPosition3D = eventData.position;
            CreateContent();
            instance.SetActive(true);
        }
        protected override void OnInit(QFramework.IUIData uiData)
        {
            mData = uiData as UISomePanelFromResourcesData ?? new UISomePanelFromResourcesData();
            // please add init code here

            BtnCloseSelf.onClick.AddListener(() =>
            {
//                UIMgr.CloseAllPanel();

                UIKit.ClosePanel("resources://" + typeof(UISomePanelFromResources).Name);
            });
        }
		protected override UITableViewCell CreateCell (UIKit.UITableView tv)
		{
			string summary = GetSummary(tv);
			var cellStyle = (String.IsNullOrEmpty(summary))?UITableViewCellStyle.Default : UITableViewCellStyle.Subtitle;
			string key = rkey + (cellStyle.ToString());
			var cell = tv.DequeueReusableCell(key) as VerticalLayoutCell;
			if (cell == null) {
				cell = new VerticalLayoutCell(cellStyle, key);	
			}
			
			return cell;
		}
示例#45
0
        public static void ClosePanel <T>() where T : ILUIPanel
        {
            var panelName = typeof(T).Name;
            var panel     = UIKit.GetPanel(panelName);

            if (panel)
            {
                UIKit.ClosePanel(panelName);
                var ilPanel = panel.GetILComponent <ILUIPanelInterface>();
                ilPanel.Close();
            }
        }
示例#46
0
        public override UIKit.UITableViewCell GetCell(Xamarin.Forms.Cell item, UIKit.UITableViewCell reusableCell, UIKit.UITableView tv)
        {
            var cell = base.GetCell (item, reusableCell, tv);

            cell.Accessory = UIKit.UITableViewCellAccessory.DisclosureIndicator;

            //set blue border for image
            cell.ImageView.Layer.BorderColor = Color.White.ToCGColor();
            cell.ImageView.Layer.BorderWidth = 1;
            cell.BackgroundColor = Color.FromHex (ColorStyles.XamarinDark).ToUIColor ();

            return cell;
        }
示例#47
0
        public override void Draw(CoreGraphics.CGRect bounds, CoreGraphics.CGContext context, UIKit.UIView view)
        {
            UIColor.White.SetFill ();
            context.FillRect (bounds);

            if (this.cell == null) {
                this.cell = new CheckPointTableCell ();
                view.AddSubview (cell);
            }
            cell.RenderCheckpointForDetail(this.data);

            view.LayoutIfNeeded ();
        }
示例#48
0
        public override UIKit.UITableViewCell GetCell(Xamarin.Forms.Cell item, UIKit.UITableViewCell reusableCell, UIKit.UITableView tv)
        {
            var cell = base.GetCell (item, reusableCell, tv);

            cell.BackgroundColor = UIColor.Black;
            cell.TextLabel.TextColor = UIColor.White;

            cell.SelectedBackgroundView = new UIView {
                BackgroundColor = UIColor.FromRGB(119,129,137),
            };

            return cell;
        }
示例#49
0
 private void endExcute()
 {
     nowLine = 0;
     form.MoveLine(nowLine);
     status = nowStatus.COMPELETED;
     if (GameMode1Manager.Instance.CheckClear())
     {
         GameDataManager.SetBool(GameMode1Manager.Instance.NowStage + "cleared", true);
         UIKit.OpenPanel <UIStageClear>();
     }
     else
     {
         form.UpdateLog(str2);
     }
 }
示例#50
0
		protected override bool ShouldStartLoad(Foundation.NSUrlRequest request, UIKit.UIWebViewNavigationType navigationType)
        {
            // F*****g BitBucket and their horrible user interface.
            if (request.Url.AbsoluteString == "https://bitbucket.org/features")
                return false;

            //We're being redirected to our redirect URL so we must have been successful
            if (request.Url.Host == "codebucket")
            {
                var code = request.Url.Query.Split('=')[1];
				ViewModel.Login(code);
                return false;
            }
            return base.ShouldStartLoad(request, navigationType);
        }
		public override UIKit.UITableViewCell GetCell (Cell item, UIKit.UITableViewCell reusableCell, UIKit.UITableView tv)
		{
			var cell = base.GetCell (item,reusableCell, tv);
			var discItem = item as DisclosureCell;

			if (discItem.StyleId == "SearchControls") {
				cell.Accessory = UIKit.UITableViewCellAccessory.DisclosureIndicator;
			} else if (discItem.StyleId == "Details" && discItem.IsSelected) {
				cell.Accessory = UIKit.UITableViewCellAccessory.Checkmark;
			} else {
				cell.AccessoryView = new UIKit.UIView (new CoreGraphics.CGRect (0, 0, 20, cell.Bounds.Height));
			}

			return cell;
		}
示例#52
0
 void Start()
 {
     stageId   = transform.GetSiblingIndex();
     btn       = transform.GetComponent <Button>();
     mytag     = transform.GetChild(1).GetComponent <Image>();
     text      = transform.GetComponentInChildren <Text>();
     info      = StageDefine.Instance.stages[stageId];
     text.text = info.StageName;
     mytag.gameObject.SetActive(GameDataManager.GetBool(stageId + "cleared"));
     btn.onClick.AddListener(() => {
         //切换到对应关卡
         UIKit.ClosePanel <UISelectStage>();
         MyAudioPlayer.Instance.PlayVoice("Spacey");
         GameMode1Manager.Instance.GameStart(stageId);
     });
 }
示例#53
0
        public void UIKit_CloseAllPanelTest()
        {
            ResKit.Init();

            var uiKitTestPanel  = UIKit.OpenPanel <UIKitTestPanel>();
            var uiKitTestPanel2 = UIKit.OpenPanel <UIKitTestPanel2>();

            UIKit.CloseAllPanel();

            Assert.AreEqual(uiKitTestPanel.State, PanelState.Closed);
            Assert.IsFalse(uiKitTestPanel.gameObject.activeSelf);
            Assert.AreEqual(uiKitTestPanel2.State, PanelState.Closed);
            Assert.IsFalse(uiKitTestPanel2.gameObject.activeSelf);

            UIKit.CloseAllPanel();
        }
        /// <summary>
        /// Gets the cell.
        /// </summary>
        /// <param name="item">The item.</param>
        /// <param name="reusableCell">The reusable table view cell.</param>
        /// <param name="tv">The table view.</param>
        /// <returns>MonoTouch.UIKit.UITableViewCell.</returns>
        public override UITableViewCell GetCell(Cell item, UITableViewCell reusableCell, UIKit.UITableView tv)
        {
            var viewCell = item as AccessoryViewCell;
            var nativeCell = base.GetCell(item, reusableCell, tv);

            if (viewCell != null)
            {
                var frame = new CGRect (0, 0, (float)viewCell.AccessoryView.WidthRequest, (float)viewCell.AccessoryView.HeightRequest);
                var nativeView = RendererFactory.GetRenderer (viewCell.AccessoryView).NativeView;
                nativeView.Frame = frame;
                nativeView.Bounds = frame;
                nativeCell.AccessoryView = nativeView;
            }

            return nativeCell;
        }
示例#55
0
        public override void DidMoveToView(SKView view)
        {
            base.DidMoveToView (view);

            var obstacles = new [] {
                AddObstacle (new CGPoint (Frame.GetMidX (), Frame.GetMidY () + 150f)),
                AddObstacle (new CGPoint (Frame.GetMidX () - 200f, Frame.GetMidY () - 150f)),
                AddObstacle (new CGPoint (Frame.GetMidX () + 200f, Frame.GetMidY () - 150f))
            };

            Player = new AgentNode (this, DefaultAgentRadius, new CGPoint (Frame.GetMidX (), Frame.GetMidY ()));
            Player.Agent.Behavior = new GKBehavior ();
            AgentSystem.AddComponent (Player.Agent);
            SeekGoal = GKGoal.GetGoalToSeekAgent (TrackingAgent);
            Player.Agent.Behavior.SetWeight (100, GKGoal.GetGoalToAvoidObstacles (obstacles, 1));
        }
        void BuildLaunchsites()
        {
            launchsiteItems.Clear();
            int index = 0;

            for (int i = 0, count = center.launchsites.Count; i < count; i++)
            {
                var site = center.launchsites[i];
                if (site == selectedSite)
                {
                    index = launchsiteItems.Count;
                }
                launchsiteItems.Add(new LaunchsiteItem(site));
            }
            UIKit.UpdateListContent(launchsiteItems);
            launchsiteItems.Select(index);
        }
示例#57
0
        private async void Window_Loaded(object sender, RoutedEventArgs e)
        {
            WindowTitlebar.AttachTitlebar(this, mainContent, CloseButton_MouseDown, MinimizeButton_MouseDown);
            this.MouseDown += MainWindow_MouseDown;

            logo.Source = UIKit.GetLogoImage();

            dashboardTab.loadInitData();
            clockSettingTab.loadInitData();
            wallpaperSettingTab.loadInitData();
            commentSettingTab.loadInitData();

            await Task.Delay(1000);

            background.Source = BackgroundWallpaper.GetRandomDefaultImage();

            pageController.ShowPage(dashboardTab);
        }
示例#58
0
        public void UIKit_OpenPanelDefaultTest()
        {
            ResKit.Init();

            var uiKitTestPanel = UIKit.OpenPanel <UIKitTestPanel>();

            Assert.IsTrue(uiKitTestPanel);

            Assert.AreEqual(uiKitTestPanel.State, PanelState.Opening);
            Assert.AreEqual(uiKitTestPanel.Info.Level, UILevel.Common);
            Assert.AreEqual(uiKitTestPanel.Data.OnInitCalledCount, 1);
            Assert.AreEqual(uiKitTestPanel.Data.OnOpenCalledCount, 1);
            Assert.AreEqual(uiKitTestPanel.Data.OnShowCalledCount, 1);

            UIKit.ClosePanel <UIKitTestPanel>();

            UIKit.CloseAllPanel();
        }
示例#59
0
        public void UIKit_PushPopTest()
        {
            ResKit.Init();

            var uiKitTestPanel = UIKit.OpenPanel <UIKitTestPanel>();

            UIKit.Stack.Push <UIKitTestPanel>();

            Assert.AreEqual(uiKitTestPanel.State, PanelState.Closed);

            UIKit.Stack.Pop();

            uiKitTestPanel = UIKit.GetPanel <UIKitTestPanel>();

            Assert.AreEqual(uiKitTestPanel.State, PanelState.Opening);

            UIKit.CloseAllPanel();
        }
示例#60
0
        public static void DoTransition <TDstPanel>(this UIPanel selfBehaviour, UITransition transition,
                                                    UILevel uiLevel        = UILevel.Common,
                                                    IUIData uiData         = null,
                                                    string assetBundleName = null,
                                                    string prefabName      = null) where TDstPanel : UIPanel
        {
            transition.FromPanel   = selfBehaviour;
            transition.InCompleted = () =>
            {
                UIKit.OpenPanel <TDstPanel>(uiLevel, uiData, assetBundleName, prefabName);
            };


            UIKit.OpenPanel <UITransitionPanel>(UILevel.PopUI, new UITransitionPanelData()
            {
                Transition = transition
            }, prefabName: "Resources/UITransitionPanel");
        }