Beispiel #1
0
        public void ShowView(SubviewType type)
        {
            // Take action based on requested type
            switch (type)
            {
            case SubviewType.Buttons:
                PerformSegue("ButtonsSegue", this);
                break;

            case SubviewType.CheckAndRadioButtons:
                PerformSegue("CheckboxSegue", this);
                break;

            case SubviewType.MenuControls:
                PerformSegue("MenuSegue", this);
                break;

            case SubviewType.SelectionControls:
                PerformSegue("SelectionSegue", this);
                break;

            case SubviewType.IndicatorControls:
                PerformSegue("IndicatorSegue", this);
                break;

            case SubviewType.TextControls:
                PerformSegue("TextSegue", this);
                break;

            case SubviewType.ContentViews:
                PerformSegue("ContentSegue", this);
                break;
            }
        }
Beispiel #2
0
        private void DisplaySubview(NSViewController controller, SubviewType type)
        {
            // Is this view already displayed?
            if (ViewType == type)
            {
                return;
            }

            // Is there a view already being displayed?
            if (Subview != null)
            {
                // Yes, remove it from the view
                Subview.RemoveFromSuperview();

                // Release memory
                Subview           = null;
                SubviewController = null;
            }

            // Save values
            ViewType          = type;
            SubviewController = controller;
            Subview           = controller.View;

            // Define frame and display
            Subview.Frame = new CGRect(0, 0, ViewContainer.Frame.Width, ViewContainer.Frame.Height);
            ViewContainer.AddSubview(Subview);
        }
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            // Populate Source List
            SourceList.Initialize();

            var TableViews = new SourceListItem("Data Binding Type");

            TableViews.AddItem("Simple Binding", "shoebox.png", () => {
                ViewType = SubviewType.SimpleBinding;
                PerformSegue("SimpleSegue", this);
            });
            TableViews.AddItem("Table Binding", "shoebox.png", () => {
                ViewType = SubviewType.TableBinding;
                PerformSegue("TableSegue", this);
            });
            TableViews.AddItem("Outline Binding", "shoebox.png", () => {
                ViewType = SubviewType.OutlineBinging;
                PerformSegue("OutlineSegue", this);
            });
            TableViews.AddItem("Collection View", "shoebox.png", () => {
                ViewType = SubviewType.CollectionView;
                PerformSegue("CollectionSegue", this);
            });
            SourceList.AddItem(TableViews);

            // Display Source List
            SourceList.ReloadData();
            SourceList.ExpandItem(null, true);
        }
Beispiel #4
0
        public void OnSetSubviewCamera(SubviewType subviewType, Camera camera, bool isShowing)
        {
            int index = (int)subviewType - 1;

            if ((DateTime.Now - this.subviewLastUpdateTime[index]).TotalMilliseconds < MaxCameraListUpdateInterval)
            {
                SIGVerseLogger.Warn("The update time interval of Subview is too short. (<" + MaxCameraListUpdateInterval + "[ms])");
                return;
            }

            this.subviewLastUpdateTime[index] = DateTime.Now;

            // Update button state
            if (isShowing)
            {
                this.subviewPanels[index].SetActive(true);
            }
            else
            {
                this.subviewPanels[index].SetActive(false);
            }

            this.UpdateButtonState(this.subviewPanels[index], this.subviewButtons[index]);

            // Update a camera info
            this.ChangeCamera(index, camera);
        }
		public override void ViewDidLoad ()
		{
			base.ViewDidLoad ();

			// Populate Source List
			SourceList.Initialize ();

			var TableViews = new SourceListItem ("Data Binding Type");
			TableViews.AddItem ("Simple Binding", "shoebox.png", () => {
				ViewType = SubviewType.SimpleBinding;
				PerformSegue("SimpleSegue", this);
			});
			TableViews.AddItem ("Table Binding", "shoebox.png", () => {
				ViewType = SubviewType.TableBinding;
				PerformSegue("TableSegue", this);
			});
			TableViews.AddItem ("Outline Binding", "shoebox.png", () => {
				ViewType = SubviewType.OutlineBinging;
				PerformSegue("OutlineSegue", this);
			});
			TableViews.AddItem ("Collection View", "shoebox.png", () => {
				ViewType = SubviewType.CollectionView;
				PerformSegue("CollectionSegue", this);
			});
			SourceList.AddItem (TableViews);

			// Display Source List
			SourceList.ReloadData();
			SourceList.ExpandItem (null, true);
		}
		public void ShowView(SubviewType type) {

			// Take action based on requested type
			switch (type) {
			case SubviewType.Buttons:
				PerformSegue ("ButtonsSegue", this);
				break;
			case SubviewType.CheckAndRadioButtons:
				PerformSegue ("CheckboxSegue", this);
				break;
			case SubviewType.MenuControls:
				PerformSegue ("MenuSegue", this);
				break;
			case SubviewType.SelectionControls:
				PerformSegue ("SelectionSegue", this);
				break;
			case SubviewType.IndicatorControls:
				PerformSegue ("IndicatorSegue", this);
				break;
			case SubviewType.TextControls:
				PerformSegue ("TextSegue", this);
				break;
			case SubviewType.ContentViews:
				PerformSegue ("ContentSegue", this);
				break;
			}

		}
 internal void RaiseViewTypeChanged(SubviewType type)
 {
     if (this.ViewTypeChanged != null)
     {
         this.ViewTypeChanged(type);
     }
 }
		private void DisplaySubview(SubviewType type) {

			// Is this view already displayed?
			if (ViewType == type) return;

			// Save values
			ViewType = type;
			RaiseViewTypeChanged (type);
		}
 private void DisplaySubView(SubviewType type)
 {
     if (ViewType == type)
     {
         return;
     }
     ViewType = type;
     RaiseViewTypeChanged(type);
 }
Beispiel #10
0
 internal void RaiseViewTypeChanged(SubviewType type)
 {
     if (AppDelegate.Conn != null)
     {
         if (this.ViewTypeChanged != null)
         {
             this.ViewTypeChanged(type);
         }
     }
 }
Beispiel #11
0
        private void DisplaySubview(SubviewType type)
        {
            // Is thisview already displayed?
            if (ViewType == type)
            {
                return;
            }

            // Save values
            ViewType = type;
            RaiseViewTypeChanged(type);
        }
Beispiel #12
0
        private void DisplaySubview(NSViewController controller, SubviewType type)
        {
            // Is this view already displayed?
            if (ViewType == type)
            {
                return;
            }

            // Is there a view already being displayed?
            if (Subview != null)
            {
                // Yes, remove it from the view
                Subview.RemoveFromSuperview();

                // Release memory
                Subview           = null;
                SubviewController = null;
            }

            // Save values
            ViewType          = type;
            SubviewController = controller;
            Subview           = controller.View;

            // Define frame and display
            Subview.Frame = new CGRect(0, 0, ViewContainer.Frame.Width, ViewContainer.Frame.Height);
            ViewContainer.AddSubview(Subview);

            // Take action on type
            switch (type)
            {
            case SubviewType.TableBinding:
                AddButton.Active    = true;
                EditButton.Active   = true;
                DeleteButton.Active = true;
                Search.Enabled      = true;
                break;

            case SubviewType.CollectionView:
                AddButton.Active    = true;
                EditButton.Active   = true;
                DeleteButton.Active = true;
                Search.Enabled      = true;
                break;

            default:
                AddButton.Active    = false;
                EditButton.Active   = false;
                DeleteButton.Active = false;
                Search.Enabled      = false;
                break;
            }
        }
Beispiel #13
0
		private void DisplaySubview(NSViewController controller, SubviewType type) {

			// Is this view already displayed?
			if (ViewType == type) return;

			// Is there a view already being displayed?
			if (Subview != null) {
				// Yes, remove it from the view
				Subview.RemoveFromSuperview ();

				// Release memory
				Subview = null;
				SubviewController = null;
			}

			// Save values
			ViewType = type;
			SubviewController = controller;
			Subview = controller.View;

			// Define frame and display
			Subview.Frame = new CGRect (0, 0, ViewContainer.Frame.Width, ViewContainer.Frame.Height);
			ViewContainer.AddSubview (Subview);

			// Take action on type
			switch (type) {
			case SubviewType.TableBinding:
				AddButton.Active = true;
				EditButton.Active = true;
				DeleteButton.Active = true;
				Search.Enabled = true;
				break;
			case SubviewType.CollectionView:
				AddButton.Active = true;
				EditButton.Active = true;
				DeleteButton.Active = true;
				Search.Enabled = true;
				break;
			default:
				AddButton.Active = false;
				EditButton.Active = false;
				DeleteButton.Active = false;
				Search.Enabled = false;
				break;
			}
		}
Beispiel #14
0
        public static void SetSubviewCamera(SubviewType subviewType, Camera camera)
        {
            SIGVerseMenu sigverseMenu = GameObject.FindObjectOfType <SIGVerseMenu>();

            if (sigverseMenu == null)
            {
                SIGVerseLogger.Warn("SIGVerseMenu is not exists.");
                return;
            }

            ExecuteEvents.Execute <ISubviewHandler>
            (
                target: sigverseMenu.gameObject,
                eventData: null,
                functor: (reciever, eventData) => reciever.OnSetSubviewCamera(subviewType, camera)
            );
        }
Beispiel #15
0
        public static void SetSubviewPosition(SubviewType subviewType, SubviewPositionType subviewPositionType, float offsetX, float offsetY, float sizeX, float sizeY)
        {
            SIGVerseMenu sigverseMenu = GameObject.FindObjectOfType <SIGVerseMenu>();

            if (sigverseMenu == null)
            {
                SIGVerseLogger.Warn("SIGVerseMenu is not exists.");
                return;
            }

            ExecuteEvents.Execute <ISubviewHandler>
            (
                target: sigverseMenu.gameObject,
                eventData: null,
                functor: (reciever, eventData) => reciever.OnSetSubviewPosition(subviewType, subviewPositionType, offsetX, offsetY, sizeX, sizeY)
            );
        }
        public void ShowView(SubviewType type)
        {
            // Take action based on requested type
            switch (type)
            {
            case SubviewType.Personen:
                PerformSegue("PersonenSeque", this);
                break;

            case SubviewType.Opleidingen:
                PerformSegue("OpleidingenSeque", this);
                break;

            case SubviewType.Apparaten:
                PerformSegue("ApparatenSeque", this);
                break;

            case SubviewType.Clubs:
                PerformSegue("ClubsSeque", this);
                break;
            }
        }
Beispiel #17
0
		private void DisplaySubview(NSViewController controller, SubviewType type) {

			// Is this view already displayed?
			if (ViewType == type) return;

			// Is there a view already being displayed?
			if (Subview != null) {
				// Yes, remove it from the view
				Subview.RemoveFromSuperview ();

				// Release memory
				Subview = null;
				SubviewController = null;
			}

			// Save values
			ViewType = type;
			SubviewController = controller;
			Subview = controller.View;

			// Define frame and display
			Subview.Frame = new CGRect (0, 0, ViewContainer.Frame.Width, ViewContainer.Frame.Height);
			ViewContainer.AddSubview (Subview);
		}
Beispiel #18
0
 public static void SetSubviewPosition(SubviewType subviewType, SubviewPositionType subviewPositionType)
 {
     SetSubviewPosition(subviewType, subviewPositionType, DefaultPositionOffset, DefaultPositionOffset, DefaultSizeX, DefaultSizeY);
 }
Beispiel #19
0
 public static void SetSubviewPosition(SubviewType subviewType, SubviewPositionType subviewPositionType, float offsetX, float offsetY)
 {
     SetSubviewPosition(subviewType, subviewPositionType, offsetX, offsetY, DefaultSizeX, DefaultSizeY);
 }
Beispiel #20
0
        public void OnSetSubviewPosition(SubviewType subviewType, SubviewPositionType subviewPositionType, float offsetX, float offsetY, float sizeX, float sizeY)
        {
            int index = (int)subviewType - 1;

            this.subviewLastUpdateTime[index] = DateTime.Now;

            // Change subviews position
            RectTransform rectTransform = this.subviewPanels[index].GetComponent <RectTransform>();

            rectTransform.sizeDelta = new Vector2(sizeX, sizeY);

            Vector2 offset = CorrectOffset(rectTransform, offsetX, offsetY);

            switch (subviewPositionType)
            {
            case SubviewPositionType.TopLeft:
            {
                rectTransform.anchorMin = new Vector2(0.0f, 1.0f);
                rectTransform.anchorMax = new Vector2(0.0f, 1.0f);
                rectTransform.pivot     = new Vector2(0.0f, 1.0f);

                float posX = +offset.x;
                float posY = -offset.y + Screen.height;

                rectTransform.position = new Vector3(posX, posY, 0.0f);

                break;
            }

            case SubviewPositionType.TopRight:
            {
                rectTransform.anchorMin = new Vector2(1.0f, 1.0f);
                rectTransform.anchorMax = new Vector2(1.0f, 1.0f);
                rectTransform.pivot     = new Vector2(1.0f, 1.0f);

                float posX = -offset.x + Screen.width;
                float posY = -offset.y + Screen.height;

                rectTransform.position = new Vector3(posX, posY, 0.0f);

                break;
            }

            case SubviewPositionType.BottomLeft:
            {
                rectTransform.anchorMin = new Vector2(0.0f, 0.0f);
                rectTransform.anchorMax = new Vector2(0.0f, 0.0f);
                rectTransform.pivot     = new Vector2(0.0f, 0.0f);

                float posX = +offset.x;
                float posY = +offset.y;



                rectTransform.position = new Vector3(posX, posY, 0.0f);

                break;
            }

            case SubviewPositionType.BottomRight:
            {
                rectTransform.anchorMin = new Vector2(1.0f, 0.0f);
                rectTransform.anchorMax = new Vector2(1.0f, 0.0f);
                rectTransform.pivot     = new Vector2(1.0f, 0.0f);

                float posX = -offset.x + Screen.width;
                float posY = +offset.y;

                rectTransform.position = new Vector3(posX, posY, 0.0f);

                break;
            }
            }
        }
Beispiel #21
0
 public void OnSetSubviewCamera(SubviewType subviewType, Camera camera)
 {
     this.OnSetSubviewCamera(subviewType, camera, true);
 }
		internal void RaiseViewTypeChanged(SubviewType type) {
			if (this.ViewTypeChanged != null)
				this.ViewTypeChanged (type);
		}
 internal void RaiseViewTypeChanged(SubviewType type)
 {
     ViewTypeChanged?.Invoke(type);
 }