Exemple #1
0
        public override void AddElements()
        {
            Stopwatch timer = Stopwatch.StartNew();

            timer.Start();
            this.BackgroundColor = ActiveTheme.Instance.PrimaryBackgroundColor;

            FlowLayoutWidget container = new FlowLayoutWidget(FlowDirection.TopToBottom);

            container.AnchorAll();

            ApplicationMenuRow menuRow = new ApplicationMenuRow();

            container.AddChild(menuRow);

            GuiWidget menuSeparator = new GuiWidget();

            menuSeparator.BackgroundColor = new RGBA_Bytes(200, 200, 200);
            menuSeparator.Height          = 2;
            menuSeparator.HAnchor         = HAnchor.ParentLeftRight;
            menuSeparator.Margin          = new BorderDouble(3, 6, 3, 3);

            container.AddChild(menuSeparator);
            Console.WriteLine("{0} ms 1".FormatWith(timer.ElapsedMilliseconds)); timer.Restart();

            widescreenPanel = new WidescreenPanel();
            container.AddChild(widescreenPanel);
            Console.WriteLine("{0} ms 2".FormatWith(timer.ElapsedMilliseconds)); timer.Restart();

            Console.WriteLine("{0} ms 3".FormatWith(timer.ElapsedMilliseconds)); timer.Restart();
            this.AddChild(container);
            Console.WriteLine("{0} ms 4".FormatWith(timer.ElapsedMilliseconds)); timer.Restart();
        }
Exemple #2
0
        public override void AddElements()
        {
            this.BackgroundColor = ActiveTheme.Instance.PrimaryBackgroundColor;

            FlowLayoutWidget container = new FlowLayoutWidget(FlowDirection.TopToBottom);

            container.AnchorAll();

            ApplicationMenuRow menuRow = new ApplicationMenuRow();

            container.AddChild(menuRow);

            GuiWidget menuSeparator = new GuiWidget();

            menuSeparator.BackgroundColor = new RGBA_Bytes(200, 200, 200);
            menuSeparator.Height          = 2;
            menuSeparator.HAnchor         = HAnchor.ParentLeftRight;
            menuSeparator.Margin          = new BorderDouble(3, 6, 3, 3);

            container.AddChild(menuSeparator);

            widescreenPanel = new WidescreenPanel();
            container.AddChild(widescreenPanel);

            this.AddChild(container);
        }
Exemple #3
0
        public override void CreateAndAddChildren()
        {
            this.BackgroundColor = ActiveTheme.Instance.PrimaryBackgroundColor;

            var container = new FlowLayoutWidget(FlowDirection.TopToBottom);

            container.AnchorAll();

            if (!UserSettings.Instance.IsTouchScreen)
            {
#if !__ANDROID__
                // The application menu bar, which is suppressed on Android
                var menuRow = new ApplicationMenuRow();
                container.AddChild(menuRow);
#endif
            }

            var menuSeparator = new GuiWidget()
            {
                BackgroundColor = new RGBA_Bytes(200, 200, 200),
                Height          = 2,
                HAnchor         = HAnchor.ParentLeftRight,
                Margin          = new BorderDouble(3, 6, 3, 3)
            };
            container.AddChild(menuSeparator);

            widescreenPanel = new WidescreenPanel();
            container.AddChild(widescreenPanel);

            using (new PerformanceTimer("ReloadAll", "AddChild"))
            {
                this.AddChild(container);
            }
        }
		public override void AddElements()
		{
			Stopwatch timer = Stopwatch.StartNew();
			timer.Start();
			this.BackgroundColor = ActiveTheme.Instance.PrimaryBackgroundColor;

			FlowLayoutWidget container = new FlowLayoutWidget(FlowDirection.TopToBottom);
			container.AnchorAll();

			ApplicationMenuRow menuRow = new ApplicationMenuRow();
			container.AddChild(menuRow);

			GuiWidget menuSeparator = new GuiWidget();
			menuSeparator.BackgroundColor = new RGBA_Bytes(200, 200, 200);
			menuSeparator.Height = 2;
			menuSeparator.HAnchor = HAnchor.ParentLeftRight;
			menuSeparator.Margin = new BorderDouble(3, 6, 3, 3);

			container.AddChild(menuSeparator);
			Console.WriteLine("{0} ms 1".FormatWith(timer.ElapsedMilliseconds)); timer.Restart();

			widescreenPanel = new WidescreenPanel();
			container.AddChild(widescreenPanel);
			Console.WriteLine("{0} ms 2".FormatWith(timer.ElapsedMilliseconds)); timer.Restart();

			Console.WriteLine("{0} ms 3".FormatWith(timer.ElapsedMilliseconds)); timer.Restart();
			this.AddChild(container);
			Console.WriteLine("{0} ms 4".FormatWith(timer.ElapsedMilliseconds)); timer.Restart();
		}
        void AddElements()
        {
            this.BackgroundColor = ActiveTheme.Instance.PrimaryBackgroundColor;
            
            FlowLayoutWidget container = new FlowLayoutWidget(FlowDirection.TopToBottom);
            container.AnchorAll();

            ApplicationMenuRow menuRow = new ApplicationMenuRow();
            container.AddChild(menuRow);

            GuiWidget menuSeparator = new GuiWidget();
            menuSeparator.BackgroundColor = new RGBA_Bytes(200, 200, 200);
            menuSeparator.Height = 2;
            menuSeparator.HAnchor = HAnchor.ParentLeftRight;
            menuSeparator.Margin = new BorderDouble(3, 6,3,3);

            container.AddChild(menuSeparator);

            widescreenPanel = new WidescreenPanel();
            container.AddChild(widescreenPanel);

            this.AddChild(container);
        }
		public override void AddElements()
		{

			this.BackgroundColor = ActiveTheme.Instance.PrimaryBackgroundColor;

			var container = new FlowLayoutWidget(FlowDirection.TopToBottom);
			container.AnchorAll();

			var menuRow = new ApplicationMenuRow();
			container.AddChild(menuRow);

			var menuSeparator = new GuiWidget()
			{
				BackgroundColor = new RGBA_Bytes(200, 200, 200),
				Height = 2,
				HAnchor = HAnchor.ParentLeftRight,
				Margin = new BorderDouble(3, 6, 3, 3)
			};
			container.AddChild(menuSeparator);

			widescreenPanel = new WidescreenPanel();
			container.AddChild(widescreenPanel);

			using (new PerformanceTimer("ReloadAll", "AddChild"))
			{
				this.AddChild(container);
			}
		}