Esempio n. 1
0
        private void AddSectionHeader(int leftMargin, string iconKey, string header)
        {
            RowDefinitions.Add(new RowDefinition()
            {
                Height = new GridLength(1, GridUnitType.Auto)
            });

            var section = new StackLayout();
            var icon    = new LagoVista.XPlat.Core.Icon();

            icon.IconKey   = iconKey;
            icon.Margin    = new Thickness(leftMargin, 5, 0, 0);
            icon.FontSize  = 16;
            icon.TextColor = Color.FromRgb(0xD4, 0x8D, 0x17);

            var label = new Label();

            label.Margin         = new Thickness(0, 0, 0, 0);
            label.Text           = header;
            label.FontSize       = 16;
            label.FontAttributes = FontAttributes.Bold;

            section.Orientation = StackOrientation.Horizontal;
            section.Children.Add(icon);
            section.Children.Add(label);

            section.SetValue(Grid.RowProperty, RowDefinitions.Count - 1);

            Children.Add(section);
        }
Esempio n. 2
0
        private void AddRoute(RouteSummary route)
        {
            var routeHeader = new StackLayout();

            routeHeader.SetValue(Grid.ColumnSpanProperty, 4);
            routeHeader.Orientation = StackOrientation.Horizontal;
            routeHeader.Margin      = new Thickness(40, 5, 0, 0);

            var icon = new LagoVista.XPlat.Core.Icon();

            icon.IconKey   = "fa-map";
            icon.Margin    = new Thickness(0, 5, 0, 0);
            icon.FontSize  = 16;
            icon.TextColor = Color.FromRgb(0xD4, 0x8D, 0x17);
            routeHeader.Children.Add(icon);

            var routeLabel = new Label()
            {
                Text           = "Route: ",
                FontSize       = 16,
                FontAttributes = FontAttributes.Bold,
            };

            routeHeader.Children.Add(routeLabel);

            var routeName = new Label()
            {
                Text     = $"{route.Name} ({route.MessageTypes.First().Name})",
                FontSize = 16,
            };

            routeHeader.Children.Add(routeName);

            RowDefinitions.Add(new RowDefinition()
            {
                Height = new GridLength(1, GridUnitType.Auto)
            });
            routeHeader.SetValue(Grid.RowProperty, RowDefinitions.Count - 1);
            Children.Add(routeHeader);

            AddSectionHeader(50, "fa-list-ol", PlatformManagerResources.InstanceDetails_PipelineModules);
            foreach (var pipelienModule in route.PipelineModules)
            {
                AddItem(60, pipelienModule.Name, pipelienModule.Status.ToString(), pipelienModule.Type, PIPELINEMODULE_TYPE, pipelienModule.Id);
            }
        }
Esempio n. 3
0
        private void AddDeviceConfiguration(DeviceConfigSummary deviceConfig)
        {
            var deviecConfigSection = new StackLayout();

            deviecConfigSection.SetValue(Grid.ColumnSpanProperty, 4);
            deviecConfigSection.Orientation = StackOrientation.Horizontal;
            deviecConfigSection.Margin      = new Thickness(30, 5, 0, 0);

            var icon = new LagoVista.XPlat.Core.Icon();

            icon.IconKey   = "fa-gears";
            icon.Margin    = new Thickness(0, 5, 0, 0);
            icon.FontSize  = 16;
            icon.TextColor = Color.FromRgb(0xD4, 0x8D, 0x17);
            deviecConfigSection.Children.Add(icon);

            var routeLabel = new Label()
            {
                Text           = "Device Configuration: ",
                FontSize       = 16,
                FontAttributes = FontAttributes.Bold,
            };

            deviecConfigSection.Children.Add(routeLabel);

            var deviceConfigName = new Label()
            {
                Text     = deviceConfig.Name,
                FontSize = 16,
            };

            deviecConfigSection.Children.Add(deviceConfigName);

            RowDefinitions.Add(new RowDefinition()
            {
                Height = new GridLength(1, GridUnitType.Auto)
            });
            deviecConfigSection.SetValue(Grid.RowProperty, RowDefinitions.Count - 1);
            Children.Add(deviecConfigSection);

            foreach (var route in deviceConfig.Routes)
            {
                AddRoute(route);
            }
        }