コード例 #1
0
ファイル: MoreViewController.cs プロジェクト: joachimda/I4PRJ
		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);
        }
コード例 #3
0
		public override UIKit.UITableViewCell GetCell (UIKit.UITableView tv)
		{
			cell = base.GetCell (tv);
			cell.UserInteractionEnabled = enabled;
			cell.TextLabel.Enabled = enabled;
			return cell;
		}
コード例 #4
0
        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;
        }
コード例 #5
0
		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
ファイル: UISelectStage.cs プロジェクト: dosusang/CodeLearn
 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
ファイル: UIMenu.cs プロジェクト: dosusang/CodeLearn
        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);
 }
コード例 #14
0
 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;
 }
コード例 #15
0
 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
ファイル: ILUIKit.cs プロジェクト: JiYangJi/QFramework
        public static void OpenPanel(string panelName)
        {
            var panel = UIKit.OpenPanel(panelName)
                        .GetILComponent <ILUIPanelInterface>();

            panel.Open();
        }
コード例 #17
0
		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");
            });
        }
コード例 #19
0
		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);
		}
コード例 #20
0
        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());
            });
        }
コード例 #21
0
		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
ファイル: UITransition.cs プロジェクト: JiYangJi/QFramework
 /// <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;
 }
コード例 #25
0
            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
ファイル: ILUIKit.cs プロジェクト: JiYangJi/QFramework
        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>();
         };
     });
 }
コード例 #30
0
		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
ファイル: UITransition.cs プロジェクト: JiYangJi/QFramework
 /// <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
ファイル: ChangesetElement.cs プロジェクト: RaineriOS/CodeHub
 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;
 }
コード例 #34
0
 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);
 }
コード例 #35
0
        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
ファイル: ReadmeView.cs プロジェクト: Mikoj/CodeBucket
        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;
		}
コード例 #41
0
		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();
		}
コード例 #42
0
        internal static void Open()
        {
            if (instance == null)
            {
                instance = UIKit.CreateUI <MapIconSelector>(UIMain.appCanvasRect, "KKMapIconSelector");
            }

            instance.rectTransform.anchoredPosition3D = eventData.position;
            CreateContent();
            instance.SetActive(true);
        }
コード例 #43
0
        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);
            });
        }
コード例 #44
0
		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
ファイル: ILUIKit.cs プロジェクト: JiYangJi/QFramework
        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
ファイル: LoginView.cs プロジェクト: jsuo/CodeBucket
		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
ファイル: StageButton.cs プロジェクト: dosusang/CodeLearn
 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();
        }
コード例 #54
0
        /// <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
ファイル: AvoidScene.cs プロジェクト: W3SS/mac-ios-samples
        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));
        }
コード例 #56
0
        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
ファイル: UITransition.cs プロジェクト: JiYangJi/QFramework
        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");
        }