public override SmartDeviceConfig GenerateConfig(SmartDeviceConfig conf)
        {
//            //Generate Actions
//            var ChatAction = new UiAction
//            {
//            };
//            Actions = new[] {ChatAction};
//
//            //Generate Groups
//            var ChatGroup = new DeviceGroup
//            {
//            };
//            DeviceGroups = new[] {ChatGroup};
//
//            //Generate UiLayouts
//            Uis = new List<UiLayout>
//            {
//                new UiLayout()
//                {
//                }
//            };
//
//            //Generate Users
//            var users = new List<User>();
//            for (var i = 0; i < 4; i++)
//            {
//                users.Add(new User
//                {
//                    Username = $"debug{i}",
//                    FullName = $"Debug {i}",
//                    Groups = new[] { WorkerGroup.GroupName },
//                    Devices = new []{ new SmartDevice
//                        {
//                            DeviceName = "A",
//                            DeviceFamily = DeviceFamily.Phone,
//                            DeviceType = DeviceType.Android,
//                            DeviceGroups = new [] { ChatGroup.GroupName, TodoEditorGroup.GroupName }
//                        },
//                        new SmartDevice
//                        {
//                            DeviceName = "B",
//                            DeviceFamily = DeviceFamily.Watch,
//                            DeviceType = DeviceType.Android,
//                            DeviceGroups = null
//                        },
//                    }
//                });
//            }
//            Users = users;

            return(conf);
        }
        public override SmartDeviceConfig GenerateConfig(SmartDeviceConfig conf)
        {
            //Generate Actions
            var ReportToolBreakageAction = new UiAction
            {
                Id     = "ReportToolBreakage",
                Type   = Components.GenericAction,
                Name   = "Report tool breakage",
                JobKey = "ToolBreakage",
                Tab    = Tabs.Actions,
                AdditionalProperties = { { "Image", AppDrawables.broken.ToString() } }
            };

            conf.Actions = new[] { ReportToolBreakageAction };

            //Generate Groups
            var WorkerGroup = new DeviceGroup
            {
                GroupName   = "Operators",
                VisibleTabs = new[] { Tabs.Dashboard },
                Dashboard   = new DashboardTabConfig {
                    Actions = new [] { ReportToolBreakageAction.Id }
                }
            };
            var LogisticGroup = new DeviceGroup
            {
                GroupName   = "Logistics",
                VisibleTabs = new[] { Tabs.Dashboard }
            };
            var MaintenanceGroup = new DeviceGroup
            {
                GroupName   = "Maintenance",
                VisibleTabs = new[] { Tabs.Dashboard }
            };

            conf.DeviceGroups = new[] { WorkerGroup, LogisticGroup, MaintenanceGroup };

            //Define UI-Elements
            var SendCancelDoubleButton = new UiComponent
            {
                Type = Components.DoubleButton,
                Id   = "submit",
                Name = "Senden",
                AdditionalProperties =
                {
                    { "TextSecondary",    "Abbrechen" },
                    { "OnClickPrimary",   "SendJob"   },
                    { "OnClickSecondary", "RemoveJob" },
                    { "Primary",          true        }
                }
            };

            //Generate UI-Layouts
            conf.Uis = new List <UiLayout>
            {
                new UiLayout()
                {
                    Id       = "ChatSendMessage",
                    Title    = "Nachricht senden",
                    Type     = Views.JobView,
                    Elements = new List <UiComponent>
                    {
                        new UiComponent
                        {
                            Type = Components.Spinner,
                            Id   = "subject",
                            Name = "Senden an"
                        },
                        new UiComponent
                        {
                            Type = Components.TextInput,
                            Id   = "text",
                            Name = "Message"
                        },
                        new UiComponent
                        {
                            Type = Components.DoubleButton,
                            Id   = "submit",
                            Name = "Bearbeiten",
                            AdditionalProperties =
                            {
                                { "TextSecondary",    "Abbrechen" },
                                { "OnClickPrimary",   "SendJob"   },
                                { "OnClickSecondary", "RemoveJob" },
                                { "Primary",          true        }
                            }
                        },
                    },
                    AdditionalProperties = { { "OnBackPressed", "RemoveJob" } }
                },
                new UiLayout()
                {
                    Id       = "ToolBreakage",
                    Title    = "Report tool breakage",
                    Type     = Views.JobView,
                    Elements = new List <UiComponent>
                    {
                        new UiComponent
                        {
                            Type = Components.Spinner,
                            Id   = "subject",
                            Name = "Maschine / Location"
                        },
                        new UiComponent
                        {
                            Type = Components.TextInput,
                            Id   = "text",
                            Name = "Article / Number"
                        },
                        new UiComponent
                        {
                            Type = Components.TextInput,
                            Id   = "description",
                            Name = "Description",
                            AdditionalProperties = { { "InputType", "multiline" } }
                        },
                        new UiComponent
                        {
                            Type = Components.Switch,
                            Id   = "helpRequested",
                            Name = "Needs assessment from Maintenance Team?"
                        },
                        new UiComponent
                        {
                            Type = Components.NumberInput,
                            Id   = "timeoffset",
                            Name = "Tool is disasselbled in ...",
                            AdditionalProperties =
                            {
                                { "Interval",          5 },
                                { "Count",            25 },
                                { "Suffix",   " Minutes" }
                            }
                        },
                        new UiComponent
                        {
                            Type = Components.Button,
                            Id   = "submit",
                            Name = "Bestätigen",
                            AdditionalProperties =
                            {
                                { "OnClick", "SendJob" },
                                { "Primary", true      }
                            }
                        },
                        SendCancelDoubleButton
                    }
                }
                //TODO: Add all remaining UIs
            };

            //Generate Users
            var users = new List <User>();

            for (var i = 0; i < 4; i++)
            {
                users.Add(new User
                {
                    Username = $"operator{i}",
                    FullName = $"Operator {i}",
                    Groups   = new[] { WorkerGroup.GroupName },
                    Devices  = new [] { new SmartDevice
                                        {
                                            DeviceName   = "A",
                                            DeviceFamily = DeviceFamily.Phone,
                                            DeviceType   = DeviceType.Android,
                                            DeviceGroups = new [] { DefaultConfig.GroupChat }
                                        },
                                        new SmartDevice
                                        {
                                            DeviceName   = "B",
                                            DeviceFamily = DeviceFamily.Watch,
                                            DeviceType   = DeviceType.Android,
                                            DeviceGroups = null
                                        }, }
                });
            }
            for (var i = 0; i < 4; i++)
            {
                users.Add(new User
                {
                    Username = $"log{i}",
                    FullName = $"Logistician {i}",
                    Groups   = new[] { WorkerGroup.GroupName },
                    Devices  = new[] { new SmartDevice
                                       {
                                           DeviceName   = "A",
                                           DeviceFamily = DeviceFamily.Phone,
                                           DeviceType   = DeviceType.Android,
                                           DeviceGroups = new [] { DefaultConfig.GroupChat }
                                       },
                                       new SmartDevice
                                       {
                                           DeviceName   = "B",
                                           DeviceFamily = DeviceFamily.Watch,
                                           DeviceType   = DeviceType.Android,
                                           DeviceGroups = null
                                       }, }
                });
            }
            for (var i = 0; i < 4; i++)
            {
                users.Add(new User
                {
                    Username = $"maintenance{i}",
                    FullName = $"Maintainer {i}",
                    Groups   = new[] { WorkerGroup.GroupName },
                    Devices  = new[] { new SmartDevice
                                       {
                                           DeviceName   = "A",
                                           DeviceFamily = DeviceFamily.Phone,
                                           DeviceType   = DeviceType.Android,
                                           DeviceGroups = new [] { DefaultConfig.GroupChat }
                                       },
                                       new SmartDevice
                                       {
                                           DeviceName   = "B",
                                           DeviceFamily = DeviceFamily.Watch,
                                           DeviceType   = DeviceType.Android,
                                           DeviceGroups = null
                                       }, }
                });
            }
            conf.Users = users;

            return(conf);
        }
示例#3
0
        public override SmartDeviceConfig GenerateConfig(SmartDeviceConfig conf)
        {
            conf.AppInfo = new AppInfo
            {
                Id            = "Sample",
                Title         = "SmartDevices",
                Theme         = null,
                TitleResource = null,
                Subtitle      = "Sample App",
            };

            //Generate TabConfig
            var statusFilter = new TabFilterEntry()
            {
                Key        = "status",
                Name       = "State",
                FilterType = "state",
                Invertable = true
            };

            var textFilter = new TabFilterEntry()
            {
                Key        = "text",
                Name       = "Text",
                FilterType = "text",
                Invertable = false
            };

            var titleFilter = new TabFilterEntry()
            {
                Key        = "title",
                Name       = "Titel",
                FilterType = "text",
                Invertable = false
            };

            var textSort = new TabSortEntry()
            {
                Key = "text", Name = "Text"
            };
            var titleSort = new TabSortEntry()
            {
                Key = "title", Name = "Titel"
            };
            var dateSort = new TabSortEntry()
            {
                Key = "createdate", Name = "Create Date"
            };
            var typeSort = new TabSortEntry()
            {
                Key = "type", Name = "Type"
            };
            var stateSort = new TabSortEntry()
            {
                Key = "state", Name = "State"
            };
            var nameSort = new TabSortEntry()
            {
                Key = "name", Name = "Name"
            };
            var idSort = new TabSortEntry()
            {
                Key = "id", Name = "Id"
            };

            conf.TabConfig = new List <TabConfig>()
            {
                new TabConfig()
                {
                    Title         = "Live-Data",
                    Key           = ConfigConstants.Tabs.Livedata,
                    MainTab       = false,
                    Icon          = AppDrawables.livefeed,
                    FilterEntries = new List <TabFilterEntry>(),
                    SortEntries   = new List <TabSortEntry> {
                        nameSort, idSort
                    }
                },
                new TabConfig()
                {
                    Title           = "Jobs",
                    Key             = ConfigConstants.Tabs.Dashboard,
                    MainTab         = true,
                    ShowBadgeNumber = true,
                    Icon            = AppDrawables.job,
                    FilterEntries   = new List <TabFilterEntry>()
                    {
                        titleFilter,
                        textFilter,
                        statusFilter
                    },
                    SortEntries = new List <TabSortEntry>()
                    {
                        titleSort,
                        textSort,
                        dateSort,
                        typeSort,
                        stateSort
                    }
                },
                new TabConfig()
                {
                    Title         = "Actions",
                    Key           = ConfigConstants.Tabs.Actions,
                    MainTab       = false,
                    Icon          = AppDrawables.action,
                    FilterEntries = new List <TabFilterEntry>(),
                    SortEntries   = new List <TabSortEntry> {
                        nameSort
                    }
                }
            };

            //Generate Actions
            var ChatAction = new UiAction
            {
                Id     = "ChatAction",
                Type   = ConfigConstants.Components.GenericAction,
                Name   = "Chat",
                JobKey = "ChatSendMessage",
                Tab    = ConfigConstants.Tabs.Actions,
                AdditionalProperties = { { "Image", AppDrawables.notification.ToString() } }
            };

            conf.Actions = new[] { ChatAction };

            //Generate Groups
            var ChatGroup = new DeviceGroup
            {
                GroupName = GroupChat,
                Dashboard = new DashboardTabConfig
                {
                    Actions = new[] { ChatAction.Id }
                },
                VisibleTabs = new[] { ConfigConstants.Tabs.Actions, ConfigConstants.Tabs.Dashboard }
            };

            conf.DeviceGroups = new[] { ChatGroup };

            //Generate UiLayouts
            conf.Uis = new List <UiLayout>
            {
                new UiLayout()
                {
                    Id       = "ChatSendMessage",
                    Title    = "Nachricht senden",
                    Type     = ConfigConstants.Views.JobView,
                    Elements = new List <UiComponent>
                    {
                        new UiComponent
                        {
                            Type = ConfigConstants.Components.Spinner,
                            Id   = "subject",
                            Name = "Senden an"
                        },
                        new UiComponent
                        {
                            Type = ConfigConstants.Components.TextInput,
                            Id   = "text",
                            Name = "Message"
                        },
                        new UiComponent
                        {
                            Type = ConfigConstants.Components.DoubleButton,
                            Id   = "submit",
                            Name = "Bearbeiten",
                            AdditionalProperties =
                            {
                                { "TextSecondary",    "Abbrechen" },
                                { "OnClickPrimary",   "SendJob"   },
                                { "OnClickSecondary", "RemoveJob" },
                                { "Primary",          true        }
                            }
                        },
                    },
                    AdditionalProperties = { { "OnBackPressed", "RemoveJob" } }
                },
                new UiLayout()
                {
                    Id       = "ChatConfirmMessage",
                    Title    = "Nachricht bestätigen",
                    Type     = ConfigConstants.Views.JobView,
                    Elements = new List <UiComponent>
                    {
                        new UiComponent
                        {
                            Type = ConfigConstants.Components.TextView,
                            Id   = "subject",
                            Name = "Absender"
                        },
                        new UiComponent
                        {
                            Type = ConfigConstants.Components.TextView,
                            Id   = "text",
                            Name = "Message"
                        },
                        new UiComponent
                        {
                            Type = ConfigConstants.Components.Button,
                            Id   = "submit",
                            Name = "Bestätigen",
                            AdditionalProperties =
                            {
                                { "OnClick", "SendJob" },
                                { "Primary", true      }
                            }
                        },
                    }
                }
            };

            //Generate Users
            var users = new List <User>();

            for (var i = 0; i < 4; i++)
            {
                users.Add(new User
                {
                    Username = $"chat{i}",
                    FullName = $"Chat-User {i}",
                    Groups   = new[] { GroupChat },
                    Devices  = new[] { new SmartDevice
                                       {
                                           DeviceName   = "A",
                                           DeviceFamily = DeviceFamily.Phone,
                                           DeviceType   = DeviceType.Android,
                                           DeviceGroups = new [] { ChatGroup.GroupName }
                                       },
                                       new SmartDevice
                                       {
                                           DeviceName   = "B",
                                           DeviceFamily = DeviceFamily.Watch,
                                           DeviceType   = DeviceType.Android,
                                           DeviceGroups = null
                                       }, }
                });
            }
            conf.Users = users;
            return(conf);
        }
        public override SmartDeviceConfig GenerateConfig(SmartDeviceConfig conf)
        {
            #region ComponentDefinitions

            var EquipmentView = new UiComponent
            {
                Type = ConfigConstants.Components.TextView,
                Id   = "equipment",
                Name = "Equipment"
            };
            var TextView = new UiComponent
            {
                Type = ConfigConstants.Components.TextView,
                Id   = "text",
                Name = "Text"
            };
            var ActualView = new UiComponent
            {
                Type = ConfigConstants.Components.TextView,
                Id   = "actual_value",
                Name = "Actual Value"
            };
            var SetPValue = new UiComponent
            {
                Type = ConfigConstants.Components.TextView,
                Id   = "temperature_setp",
                Name = "Set Point Value"
            };
            var HHView = new UiComponent
            {
                Type = ConfigConstants.Components.TextView,
                Id   = "temperature_HH",
                Name = "Upper Error Value"
            };
            var HView = new UiComponent
            {
                Type = ConfigConstants.Components.TextView,
                Id   = "temperature_H",
                Name = "Upper Warn Value"
            };
            var LView = new UiComponent
            {
                Type = ConfigConstants.Components.TextView,
                Id   = "temperature_L",
                Name = "Lower Warn Value"
            };
            var LLView = new UiComponent
            {
                Type = ConfigConstants.Components.TextView,
                Id   = "temperature_LL",
                Name = "Lower Error Value"
            };
            var DateView = new UiComponent
            {
                Type = ConfigConstants.Components.DateView,
                Id   = "time",
                Name = "Time"
            };
            var AcceptDeclineButton = new UiComponent
            {
                Type = ConfigConstants.Components.DoubleButton,
                Id   = "submit",
                Name = "Accept",
                AdditionalProperties =
                {
                    { "Value",            "Accept"  },
                    { "OnClickPrimary",   "SendJob" },
                    { "TextSecondary",    "Decline" },
                    { "ValueSecondary",   "Decline" },
                    { "OnClickSecondary", "SendJob" },
                    { "Primary",          true      }
                }
            };
            #endregion

            #region UIs
            var uiLayouts = new List <UiLayout>()
            {
                new UiLayout
                {
                    Id       = JobLimitViolation,
                    Title    = "Limit Violation",
                    Type     = ConfigConstants.Views.JobView,
                    Elements = new []
                    {
                        EquipmentView,
                        TextView,
                        DateView,
                        ActualView,
                        HHView,
                        HView,
                        SetPValue,
                        LView,
                        LLView,
                        AcceptDeclineButton
                    }
                },
            };
            conf.Uis = uiLayouts;
            #endregion

            #region Groups

            conf.DeviceGroups = new[]
            {
                new DeviceGroup
                {
                    GroupName   = GroupValueMonitoring,
                    VisibleTabs = new[] { Tabs.Dashboard },
                }
            };

            #endregion

            #region Users

            //Generate Users
            var users = new List <User>();
            for (var i = 0; i < 2; i++)
            {
                users.Add(new User
                {
                    Username = $"user{i + 1}",
                    FullName = $"User {i + 1}",
                    Groups   = new[] { DefaultConfig.GroupChat, GroupValueMonitoring },
                    Devices  = new[] { new SmartDevice
                                       {
                                           DeviceName   = "A",
                                           DeviceFamily = DeviceFamily.Phone,
                                           DeviceType   = DeviceType.Android,
                                           DeviceGroups = new [] { Uc5LiveData.GroupLiveData }
                                       },
                                       new SmartDevice
                                       {
                                           DeviceName   = "B",
                                           DeviceFamily = DeviceFamily.Watch,
                                           DeviceType   = DeviceType.Android,
                                           DeviceGroups = null
                                       }, }
                });
            }
            conf.Users = users;

            #endregion

            return(conf);
        }
示例#5
0
        public override SmartDeviceConfig GenerateConfig(SmartDeviceConfig conf)
        {
            #region ValueDefinitions

            const string queue        = "sdgw";
            var          valueDefs    = new List <ConfigValueSpecification>();
            var          valueActions = new List <UiComponent>();
            string[]     m            = { "mEQ1", "mEQ2" };
            for (var i = 0; i < m.Length; i++)
            {
                valueDefs.Add(new ConfigValueSpecification
                {
                    Name       = $"{m[i]}:NumRevolutions",
                    DataSource = new ValueDataSource
                    {
                        QueueName = queue,
                        Namespace = m[i],
                        Name      = "NumRevolutions"
                    }
                });
                valueDefs.Add(new ConfigValueSpecification
                {
                    Name       = $"{m[i]}:Pressure",
                    DataSource = new ValueDataSource
                    {
                        QueueName = queue,
                        Namespace = m[i],
                        Name      = "Pressure"
                    }
                });
                valueDefs.Add(new ConfigValueSpecification
                {
                    Name       = $"{m[i]}:Temperature",
                    DataSource = new ValueDataSource
                    {
                        QueueName = queue,
                        Namespace = m[i],
                        Name      = "Temperature"
                    }
                });

                valueActions.Add(new UiComponent
                {
                    Id   = $"ValueDisplay{i + 1}a",
                    Type = ConfigConstants.Components.ValueMonitor,
                    Name = $"{m[i]}:NumRevolutions",
                    Tab  = ConfigConstants.Tabs.Livedata
                });
                valueActions.Add(new UiComponent
                {
                    Id   = $"ValueDisplay{i + 1}b",
                    Type = ConfigConstants.Components.ValueMonitor,
                    Name = $"{m[i]}:Pressure",
                    Tab  = ConfigConstants.Tabs.Livedata
                });
                valueActions.Add(new UiComponent
                {
                    Id   = $"ValueDisplay{i + 1}c",
                    Type = ConfigConstants.Components.GraphDisplay,
                    Name = $"{m[i]}:Temperature",
                    Tab  = ConfigConstants.Tabs.Livedata
                });
            }

            conf.Actions          = valueActions;
            conf.ValueDefinitions = valueDefs;

            var LiveDataGroup = new DeviceGroup
            {
                GroupName   = GroupLiveData,
                VisibleTabs = new[] { ConfigConstants.Tabs.Livedata },
                Dashboard   = new DashboardTabConfig
                {
                    Actions = valueActions.Select(x => x.Id).ToArray()
                },
                LiveFeed = new LiveFeedTabConfig()
                {
                    DataUpdateInterval = 500,
                    Values             = valueDefs.Select(x => x.Name).ToArray()
                }
            };
            #endregion

            #region UIs
            var uiLayouts = new List <UiLayout>()
            {
                //No UIs
            };
            conf.Uis = uiLayouts;
            #endregion

            #region Groups

            conf.DeviceGroups = new[]
            {
                LiveDataGroup
            };

            #endregion



            //Generate Users
            var users = new List <User>();
            for (var i = 0; i < 4; i++)
            {
                users.Add(new User
                {
                    Username = $"operator{i+1}",
                    FullName = $"Operator {i+1}",
                    Groups   = new[] { DefaultConfig.GroupChat },
                    Devices  = new[] { new SmartDevice
                                       {
                                           DeviceName   = "A",
                                           DeviceFamily = DeviceFamily.Phone,
                                           DeviceType   = DeviceType.Android,
                                           DeviceGroups = new [] { GroupLiveData }
                                       },
                                       new SmartDevice
                                       {
                                           DeviceName   = "B",
                                           DeviceFamily = DeviceFamily.Watch,
                                           DeviceType   = DeviceType.Android,
                                           DeviceGroups = null
                                       }, }
                });
            }
            conf.Users = users;

            return(conf);
        }
示例#6
0
        public override SmartDeviceConfig GenerateConfig(SmartDeviceConfig conf)
        {
            conf.Actions = new[] {
                new UiAction
                {
                    Id     = TodoListStartAction,
                    Type   = ConfigConstants.Components.GenericAction,
                    Name   = "Neue TODO-Liste starten",
                    JobKey = "TodoListStart",
                    Tab    = ConfigConstants.Tabs.Actions,
                    AdditionalProperties = { { "Image", AppDrawables.list_add.ToString() } }
                },
                new UiAction
                {
                    Id     = TodoListBarcodeAction,
                    Type   = ConfigConstants.Components.GenericAction,
                    Name   = "TODO-Liste: Auftrag scannen",
                    JobKey = "TodoListBarcodeStart",
                    Tab    = ConfigConstants.Tabs.Actions,
                    AdditionalProperties = { { "Image", AppDrawables.barcode.ToString() } }
                },
                new UiAction
                {
                    Id     = TodoListPickupAction,
                    Type   = ConfigConstants.Components.GenericAction,
                    Name   = "TODO-Liste weiter bearbeiten",
                    JobKey = "TodoListPickup",
                    Tab    = ConfigConstants.Tabs.Actions,
                    AdditionalProperties = { { "Image", AppDrawables.list_play.ToString() } }
                }
            };

            conf.Uis = new List <UiLayout>
            {
                new UiLayout()
                {
                    Id       = "TodoListPickup",
                    Title    = "TODO-Liste weiter bearbeiten",
                    Type     = ConfigConstants.Views.JobView,
                    Elements = new List <UiComponent>
                    {
                        new UiComponent
                        {
                            Type = ConfigConstants.Components.Spinner,
                            Id   = "subject",
                            Name = "Liste"
                        },
                        new UiComponent
                        {
                            Type = ConfigConstants.Components.DoubleButton,
                            Id   = "submit",
                            Name = "Bearbeiten",
                            AdditionalProperties =
                            {
                                { "TextSecondary",    "Abbrechen" },
                                { "OnClickPrimary",   "SendJob"   },
                                { "OnClickSecondary", "RemoveJob" },
                                { "Primary",          true        }
                            }
                        },
                    }
                },
                new UiLayout()
                {
                    Id       = "TodoListBarcodeStart",
                    Title    = "Todo-Liste: Auftrag scannen",
                    Type     = ConfigConstants.Views.JobView,
                    Elements = new List <UiComponent>
                    {
                        new UiComponent
                        {
                            Type = ConfigConstants.Components.BarcodeInput,
                            Id   = "subject",
                            Name = "Barcode"
                        },
                        new UiComponent
                        {
                            Type = ConfigConstants.Components.TextInput,
                            Id   = "number",
                            Name = "Auftragsnummer"
                        },
                        new UiComponent
                        {
                            Type = ConfigConstants.Components.TextInput,
                            Id   = "notes",
                            Name = "weitere Informationen"
                        },
                        new UiComponent
                        {
                            Type = ConfigConstants.Components.DoubleButton,
                            Id   = "submit",
                            Name = "Bearbeiten",
                            AdditionalProperties =
                            {
                                { "TextSecondary",    "Abbrechen" },
                                { "OnClickPrimary",   "SendJob"   },
                                { "OnClickSecondary", "RemoveJob" },
                                { "Primary",          true        }
                            }
                        },
                    }
                },
                new UiLayout()
                {
                    Id       = "TodoListStart",
                    Title    = "TODO-Liste Starten",
                    Type     = ConfigConstants.Views.JobView,
                    Elements = new List <UiComponent>
                    {
                        new UiComponent
                        {
                            Type = ConfigConstants.Components.Spinner,
                            Id   = "subject",
                            Name = "Liste"
                        },
                        new UiComponent
                        {
                            Type = ConfigConstants.Components.TextInput,
                            Id   = "number",
                            Name = "Auftragsnummer"
                        },
                        new UiComponent
                        {
                            Type = ConfigConstants.Components.TextInput,
                            Id   = "notes",
                            Name = "weitere Informationen"
                        },
                        new UiComponent
                        {
                            Type = ConfigConstants.Components.DoubleButton,
                            Id   = "submit",
                            Name = "Bearbeiten",
                            AdditionalProperties =
                            {
                                { "TextSecondary",    "Abbrechen" },
                                { "OnClickPrimary",   "SendJob"   },
                                { "OnClickSecondary", "RemoveJob" },
                                { "Primary",          true        }
                            }
                        },
                    }
                },
                new UiLayout()
                {
                    Id    = "GenericTodoList",
                    Title = "TODO-Liste",
                    Type  = ConfigConstants.Views.TodoList,
                    AdditionalProperties =
                    {
                        { "CanDelete",  true },
                        { "CanForward", true },
                    }
                }
            };

            var TodoEditorGroup = new DeviceGroup
            {
                GroupName = "TodoEditor",
                Dashboard = new DashboardTabConfig
                {
                    Actions = new[] { TodoListStartAction, TodoListBarcodeAction, TodoListPickupAction }
                },
                VisibleTabs = new[] { ConfigConstants.Tabs.Actions, ConfigConstants.Tabs.Dashboard }
            };

            conf.DeviceGroups = new List <DeviceGroup> {
                TodoEditorGroup
            };
            return(conf);
        }
示例#7
0
 private void OnConfigChangedEvent(object sender, ConfigChangedEventArgs <SmartDeviceConfig> configChangedEventArgs)
 {
     _smartDeviceConfig = configChangedEventArgs.NewValue;
 }