public ActionResult Leave(int id)
        {
            ViewerModel vm = new ViewerModel(() => sp.GetRequiredService <ShcDataModel>(), HttpContext.User.Identity?.Name);

            vm.Leave(id);
            return(Redirect("~/"));
        }
Beispiel #2
0
        public ActionResult Leave(int id)
        {
            ViewerModel vm = new ViewerModel(HttpContext.User.Identity?.Name);

            vm.Leave(id);
            return(Redirect("~/"));
        }
Beispiel #3
0
        public override void RunCommand(TwitchIRCMessage message)
        {
            try
            {
                string[] command = message.Message.Split(' ');

                if (command.Length < 3)
                {
                    return;
                }

                string target = command[1].Replace("@", "");
                int    amount;
                bool   isNumeric = int.TryParse(command[2], out amount);
                if (isNumeric)
                {
                    Viewer targeted = ViewerModel.GetViewerByTypeAndUsername(target, message.Viewer.ViewerType);
                    targeted.Karma = amount;
                    Toolkit.client.SendMessage($"@{message.User}" + Helper.ReplacePlaceholder("TwitchToolkitSetKarma".Translate(), viewer: targeted.Username, karma: amount.ToString()), CommandsHandler.SendToChatroom(message));
                }
            }
            catch (InvalidCastException e)
            {
                Helper.Log("Invalid Check User Command " + e.Message);
            }
        }
Beispiel #4
0
        private void InitAplication()
        {
            //Configuracion
            var settings = Settings.Default;

            //Titulo de la ventana principal
            Text = settings.Title;

            fpsToolStripMenuItem.Checked  = true;
            axisToolStripMenuItem.Checked = true;

            Modelo = new ViewerModel();

            CheckMediaFolder();

            //Iniciar graficos
            Modelo.InitGraphics(this, treeViewExamples, panel3D, toolStripStatusCurrentExample);

            try
            {
                //Cargo los ejemplos en el arbol
                Modelo.LoadExamples(treeViewExamples, flowLayoutPanelModifiers, dataGridUserVars);
                var defaultExample = Modelo.ExampleLoader.GetExampleByName(settings.DefaultExampleName,
                                                                           settings.DefaultExampleCategory);
                ExecuteExample(defaultExample);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "No se pudo cargar el ejemplo", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }

            Modelo.InitRenderLoop();

            panel3D.Focus();
        }
        public ActionResult Index()
        {
            var tableClient  = _storageAccount.CreateCloudTableClient();
            var indicesTable = tableClient.GetTableReference(StorageNames.BenchmarksTable);

            IEnumerable <TableEntity> benchmarks;

            if (indicesTable.Exists())
            {
                var query = new TableQuery <TableEntity>()
                            .Where(TableQuery.GenerateFilterCondition("PartitionKey", QueryComparisons.Equal, "index"));

                benchmarks = indicesTable.ExecuteQuery(query);
            }
            else
            {
                benchmarks = new TableEntity[0];
            }


            ViewerModel model = new ViewerModel()
            {
                Benchmarks = benchmarks.Select(r => r.RowKey)
            };

            return(View(model));
        }
Beispiel #6
0
 public Window_Viewers()
 {
     ViewerModel.RefreshActiveViewers();
     if (Current.Game != null)
     {
         this.component = Current.Game.GetComponent <GameComponentPawns>();
     }
     this.doCloseButton = true;
 }
Beispiel #7
0
 public async Task AddToSquadGroup(string userName)
 {
     ViewerModel vm    = new ViewerModel(() => sp.GetRequiredService <ShcDataModel>(), userName);
     var         model = sp.GetRequiredService <ShcDataModel>();
     {
         foreach (var user in model.SquadMember.Where(x => x.Userhash == vm.Userhash))
         {
             await Groups.AddToGroupAsync(Context.ConnectionId, user.Squad.ToString());
         }
     }
 }
Beispiel #8
0
        public void AddToSquadGroup(string userName)
        {
            ViewerModel vm = new ViewerModel(userName);

            using (var model = new ShcDataModel())
            {
                foreach (var user in model.SquadMembers.Where(x => x.Userhash == vm.Userhash))
                {
                    Groups.Add(Context.ConnectionId, user.Squad.ToString());
                }
            }
        }
        private void InitAplication()
        {
            //Configuracion
            var settings = Settings.Default;

            //Titulo de la ventana principal
            Text = settings.Title;

            fpsToolStripMenuItem.Checked  = true;
            axisToolStripMenuItem.Checked = true;

            Modelo = new ViewerModel();

            CheckMediaFolder();

            //Generic TGC shaders
            var commonShaders = Settings.Default.ShadersDirectory + Settings.Default.CommonShaders;

            if (!Directory.Exists(commonShaders))
            {
                //TODO mejorar esta valicacion ya que si esta la carpeta pero no los shaders necesarios pasaria lo mismo.
                MessageBox.Show("Debe configurar correctamente el directorio con los shaders comunes y reiniciar la aplicación.", "No se encontro la carpeta de shaders", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            //Iniciar graficos
            Modelo.InitGraphics(this, panel3D, commonShaders);

            try
            {
                //Cargo los ejemplos en el arbol
                Modelo.LoadExamples(treeViewExamples, panelModifiers, dataGridUserVars, settings.MediaDirectory, settings.ShadersDirectory);
                var defaultExample = Modelo.ExampleLoader.GetExampleByName(settings.DefaultExampleName, settings.DefaultExampleCategory);
                ExecuteExample(defaultExample);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "No se pudo cargar el ejemplo " + settings.DefaultExampleName, MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            try
            {
                Modelo.InitRenderLoop();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error en RenderLoop del ejemplo: " + Modelo.ExampleLoader.CurrentExample.Name, MessageBoxButtons.OK, MessageBoxIcon.Error);
            }

            panel3D.Focus();
        }
Beispiel #10
0
        /// <summary>
        /// Inicializacion de los componentes principales y carga de ejemplos.
        /// </summary>
        private void InitAplication()
        {
            //Archivo de configuracion
            var settings = Settings.Default;

            //Titulo de la ventana principal
            Text = settings.Title;

            //Herramientas basicas.
            fpsToolStripMenuItem.Checked  = true;
            axisToolStripMenuItem.Checked = true;

            //Modelo de la aplicacion
            Model = new ViewerModel();

            //Verificamos la carpeta Media y la de TGC shaders basicos
            if (Model.CheckFolder(settings.MediaDirectory) || Model.CheckFolder(settings.CommonShaders))
            {
                if (OpenOption() == DialogResult.Cancel)
                {
                    //Fuerzo el cierre de la aplicacion.
                    Environment.Exit(0);
                }
            }

            //Iniciar graficos
            Model.InitGraphics(this, panel3D, settings.CommonShaders);

            try
            {
                //Cargo los ejemplos en el arbol
                Model.LoadExamples(treeViewExamples, panelModifiers, dataGridUserVars, settings.MediaDirectory, settings.ShadersDirectory);
                var defaultExample = Model.GetExampleByName(settings.DefaultExampleName, settings.DefaultExampleCategory);
                ExecuteExample(defaultExample);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "No se pudo cargar el ejemplo " + settings.DefaultExampleName, MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            try
            {
                Model.InitRenderLoop();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error en RenderLoop del ejemplo: " + Model.CurrentExample().Name, MessageBoxButtons.OK, MessageBoxIcon.Error);
            }

            panel3D.Focus();
        }
        public IActionResult Index()
        {
            string mapDef = "Library://Samples/Sheboygan/Maps/Sheboygan.MapDefinition";

            var model = new ViewerModel(mapDef, Url.Action(nameof(TaskPaneHome)));

            model.Toolbar = new ToolbarItemModel[]
            {

            };

            return View(model);
        }
Beispiel #12
0
 public IActionResult AddViewer([FromBody] ViewerModel addViewerInfo)
 {
     var(stream, viewer) = addViewerInfo;
     try
     {
         _streamService.AddViewer(stream, viewer);
         return(Ok());
     }
     catch (Exception e)
     {
         PrintException(e);
         return(BadRequest(new { message = e.Message }));
     }
 }
Beispiel #13
0
        public void SetUserValue(int squadid, int itemid, ItemValue value)
        {
            var caller = Clients.Caller;
            var group  = Clients.Group(squadid.ToString());

            var vm = new ViewerModel(Context.User.Identity.Name);
            var iv = vm.SetUserValue(itemid, value, squadid);


            var ceiling = $"url('/Content/{ ((ItemValue)(int)Math.Ceiling(iv.SquadValue)).ToString()}.png')";
            var floor   = $"url('/Content/{ ((ItemValue)(int)Math.Floor(iv.SquadValue)).ToString()}.png')";

            caller.updateId($"#TrafficLight{squadid}_{itemid}", $"url('/Content/{iv.Value.ToString()}.png')");
            group.updateId($"#Ceiling{squadid}_{itemid}", ceiling);
            group.updateId($"#Floor{squadid}_{itemid}", floor);
            group.updateValue($"#Good{squadid}_{itemid}", iv.SquadGoodCount > 0 ? iv.SquadGoodCount.ToString() : " ");
            group.updateValue($"#Medium{squadid}_{itemid}", iv.SquadMediumCount > 0 ? iv.SquadMediumCount.ToString() : " ");
            group.updateValue($"#Bad{squadid}_{itemid}", iv.SquadBadCount > 0 ? iv.SquadBadCount.ToString() : " ");
        }
Beispiel #14
0
        public async Task SetUserValue(int squadid, int itemid, ItemValue value)
        {
            var caller = Clients.Caller;
            var group  = Clients.Group(squadid.ToString());

            var vm = new ViewerModel(() => sp.GetRequiredService <ShcDataModel>(), Context.User.Identity.Name);
            var iv = vm.SetUserValue(itemid, value, squadid);


            var ceiling = $"url('/{ ((ItemValue)(int)Math.Ceiling(iv.SquadValue)).ToString()}.png')";
            var floor   = $"url('/{ ((ItemValue)(int)Math.Floor(iv.SquadValue)).ToString()}.png')";
            await Task.WhenAll(
                caller.SendCoreAsync("updateId", new object[] { $"TrafficLight{squadid}_{itemid}", $"url('/{iv.Value.ToString()}.png')" }),
                group.SendCoreAsync("updateId", new object[] { $"Ceiling{squadid}_{itemid}", ceiling }),
                group.SendCoreAsync("updateId", new object[] { $"Floor{squadid}_{itemid}", floor }),
                group.SendCoreAsync("updateValue", new object[] { $"Good{squadid}_{itemid}", iv.SquadGoodCount > 0 ? iv.SquadGoodCount.ToString() : " " }),
                group.SendCoreAsync("updateValue", new object[] { $"Medium{squadid}_{itemid}", iv.SquadMediumCount > 0 ? iv.SquadMediumCount.ToString() : " " }),
                group.SendCoreAsync("updateValue", new object[] { $"Bad{squadid}_{itemid}", iv.SquadBadCount > 0 ? iv.SquadBadCount.ToString() : " " })
                );
        }
Beispiel #15
0
        public override void RunCommand(TwitchIRCMessage message)
        {
            try
            {
                string[] command = message.Message.Split(' ');

                if (command.Length < 2)
                {
                    return;
                }

                string target = command[1].Replace("@", "");

                Viewer targeted = ViewerModel.GetViewerByTypeAndUsername(target, message.Viewer.ViewerType);
                Toolkit.client.SendMessage($"@{message.User} " + Helper.ReplacePlaceholder("TwitchToolkitCheckUser".Translate(), viewer: targeted.Username, amount: targeted.Coins.ToString(), karma: targeted.Karma.ToString()), CommandsHandler.SendToChatroom(message));
            }
            catch (InvalidCastException e)
            {
                Helper.Log("Invalid Check User Command " + e.Message);
            }
        }
        public override void GameComponentTick()
        {
            if (Find.TickManager.TicksGame % 1000 != 0)
            {
                return;
            }

            List <Pawn> currentColonists = Find.ColonistBar.GetColonistsInOrder();

            foreach (KeyValuePair <string, Pawn> pair in pawnHistory)
            {
                if (!currentColonists.Contains(pair.Value))
                {
                    pawnHistory.Remove(pair.Key);
                }
            }

            if (ViewerModel.All != null && viewerNameQueue != null)
            {
                List <Viewer> bannedViewers = ViewerModel.All.Where(s => s.IsBanned).ToList();
                viewerNameQueue = viewerNameQueue.Where(s => !ViewerModel.GetViewer(s).IsBanned).ToList();
            }
        }
Beispiel #17
0
        public override void RunCommand(TwitchIRCMessage message)
        {
            try
            {
                string[] command = message.Message.Split(' ');

                if (command.Length < 3)
                {
                    return;
                }

                string receiver = command[1].Replace("@", "");

                if (message.User.ToLower() != ToolkitSettings.Channel.ToLower() && receiver.ToLower() == message.User.ToLower())
                {
                    Toolkit.client.SendMessage($"@{message.User} " + "TwitchToolkitModCannotGiveCoins".Translate());
                    return;
                }

                int  amount;
                bool isNumeric = int.TryParse(command[2], out amount);
                if (isNumeric)
                {
                    Viewer giftee = ViewerModel.GetViewerByTypeAndUsername(receiver, message.Viewer.ViewerType);

                    Helper.Log($"Giving viewer {giftee.Username} {amount} coins");
                    giftee.GiveCoins(amount);
                    Toolkit.client.SendMessage($"@{message.User} " + Helper.ReplacePlaceholder("TwitchToolkitGivingCoins".Translate(), viewer: giftee.Username, amount: amount.ToString(), newbalance: giftee.Coins.ToString()), CommandsHandler.SendToChatroom(message));
                    Store_Logger.LogGiveCoins(message.User, giftee.Username, amount);
                }
            }
            catch (InvalidCastException e)
            {
                Helper.Log("Invalid Give Viewer Coins Command " + e.Message);
            }
        }
Beispiel #18
0
        public ActionResult Index()
        {
            ViewerModel vm = new ViewerModel(HttpContext.User.Identity?.Name);

            return(View(vm));
        }
Beispiel #19
0
        public override void DoWindowContents(Rect inRect)
        {
            float firstColumn = inRect.width * 0.67f;
            float cellHeight  = 28f;

            Rect searchBar = new Rect(0, 0, firstColumn * 0.66F, cellHeight);

            viewerBuffer = searchQuery;
            searchQuery  = Widgets.TextEntryLabeled(searchBar, "Search:", searchQuery);

            searchBar.x    += searchBar.width;
            searchBar.width = 20f;

            if (Widgets.ButtonText(searchBar, "X") ||
                searchQuery == "" ||
                (searchQuery != viewerBuffer && (selectedViewer != null || allViewers))
                )
            {
                ClearViewer();
            }

            searchBar.x    += searchBar.width;
            searchBar.width = firstColumn / 3;

            if (Widgets.ButtonText(searchBar, "All Viewers"))
            {
                SelectAllViewers();
            }

            if (selectedViewer == null && allViewers == false)
            {
                if (searchQuery == "")
                {
                    return;
                }

                List <Viewer> searchViewers = ViewerModel.All.Where(s =>
                                                                    s.Username.Contains(searchQuery.ToLower()) ||
                                                                    s.Username == searchQuery.ToLower()
                                                                    ).Take(6).ToList();

                Rect viewerButton = new Rect(0, searchBar.y + cellHeight, 200f, cellHeight);

                foreach (Viewer viewer in searchViewers)
                {
                    if (Widgets.ButtonText(viewerButton, viewer.Username))
                    {
                        SelectViewer(viewer);
                    }

                    viewerButton.y += viewerButton.height;
                }

                return;
            }

            Rect editLabel = new Rect(0, searchBar.y + cellHeight + 10f, firstColumn, cellHeight);

            Widgets.Label(editLabel, "Editing: " + viewerBuffer);

            // three rows
            Rect smallLabel  = new Rect(0, editLabel.y + cellHeight, firstColumn * 0.33f, cellHeight);
            Rect smallButton = new Rect(0, smallLabel.y + cellHeight, firstColumn * 0.33f, cellHeight);

            // first row
            Widgets.Label(smallLabel, "Coins");

            if (Widgets.ButtonText(smallButton, "Give"))
            {
                OpenEditProp(EditPropsActions.Give, EditProp.Coins);
            }

            smallButton.y += cellHeight;

            if (Widgets.ButtonText(smallButton, "Take"))
            {
                OpenEditProp(EditPropsActions.Take, EditProp.Coins);
            }

            smallButton.y += cellHeight;

            if (Widgets.ButtonText(smallButton, "Set"))
            {
                OpenEditProp(EditPropsActions.Set, EditProp.Coins);
            }

            // second row

            smallButton.y = smallLabel.y + cellHeight;
            smallButton.x = firstColumn * 0.45f;
            smallLabel.x  = smallButton.x;

            Widgets.Label(smallLabel, "Karma");

            if (Widgets.ButtonText(smallButton, "Give"))
            {
                OpenEditProp(EditPropsActions.Give, EditProp.Karma);
            }

            smallButton.y += cellHeight;

            if (Widgets.ButtonText(smallButton, "Take"))
            {
                OpenEditProp(EditPropsActions.Take, EditProp.Karma);
            }

            smallButton.y += cellHeight;

            if (Widgets.ButtonText(smallButton, "Set"))
            {
                OpenEditProp(EditPropsActions.Set, EditProp.Karma);
            }

            float viewerInfoHeight = smallButton.y + cellHeight;

            // third row

            if (allViewers)
            {
                smallButton.y    = smallLabel.y + cellHeight;
                smallButton.x    = firstColumn * 1f;
                smallLabel.x     = smallButton.x;
                smallLabel.width = 400f;

                if (Widgets.ButtonText(smallButton, "Karma round"))
                {
                    ViewerModel.AwardViewersCoins();
                }

                smallButton.y += cellHeight;


                //// banned viewers
                //if (Widgets.ButtonText(smallButton, "placeholder"))
                //{

                //}

                //smallButton.y += cellHeight;

                if (Widgets.ButtonText(smallButton, (resetAllWarning ? "Are you sure?" : "Reset All")))
                {
                    if (resetAllWarning)
                    {
                        ViewerModel.ResetAllViewers();
                        resetAllWarning = false;
                    }
                    else
                    {
                        resetAllWarning = true;
                    }
                }

                smallButton.y += cellHeight;

                if (Widgets.ButtonText(smallButton, (resetCoinWarning ? "Are you sure?" : "Reset All Coins")))
                {
                    if (resetCoinWarning)
                    {
                        ViewerModel.ResetAllViewersCoins();
                        resetCoinWarning = false;
                    }
                    else
                    {
                        resetCoinWarning = true;
                    }
                }

                smallButton.y += cellHeight;

                if (Widgets.ButtonText(smallButton, (resetKarmaWarning ? "Are you sure?" : "Reset All Karma")))
                {
                    if (resetKarmaWarning)
                    {
                        ViewerModel.ResetAllViewersKarma();
                        resetKarmaWarning = false;
                    }
                    else
                    {
                        resetKarmaWarning = true;
                    }
                }

                smallButton.y += cellHeight;
            }

            if (selectedViewer == null)
            {
                return;
            }


            // viewer info

            smallLabel.x     = 0f;
            smallLabel.width = 200f;
            smallLabel.y     = viewerInfoHeight + 20f;

            string colorCode = Viewer.GetViewerColorCode(selectedViewer.username);

            Widgets.Label(smallLabel, $"<b>Viewer:</b> <color=#{colorCode}>{selectedViewer.username}</color>");

            smallLabel.y += cellHeight;
            smallButton.y = smallLabel.y;
            smallButton.x = 250f;

            Widgets.Label(smallLabel, "Banned: " + (selectedViewer.IsBanned ? "Yes" : "No"));
            if (Widgets.ButtonText(smallButton, (selectedViewer.IsBanned ? "Unban" : "Ban")))
            {
                if (selectedViewer.IsBanned)
                {
                    selectedViewer.UnBanViewer();
                }
                else
                {
                    selectedViewer.BanViewer();
                }
            }

            smallLabel.y += cellHeight;
            smallButton.y = smallLabel.y;

            Widgets.Label(smallLabel, "Toolkit Mod: " + (selectedViewer.mod ? "Yes" : "No"));
            if (Widgets.ButtonText(smallButton, (selectedViewer.mod ? "Unmod" : "Mod")))
            {
                selectedViewer.mod = !selectedViewer.mod;
            }

            if (component != null)
            {
                smallLabel.y += cellHeight;
                smallButton.y = smallLabel.y;

                Widgets.Label(smallLabel, "Colonist: " + (component.HasUserBeenNamed(selectedViewer.username) ? component.PawnAssignedToUser(selectedViewer.username).Name.ToStringShort : "None"));
                if (component.HasUserBeenNamed(selectedViewer.username) && Widgets.ButtonText(smallButton, "Unassign"))
                {
                    component.pawnHistory.Remove(selectedViewer.username);
                }
            }



            smallLabel.y += cellHeight;

            Widgets.Label(smallLabel, "Coins: " + selectedViewer.GetViewerCoins());

            smallLabel.y += cellHeight;

            Widgets.Label(smallLabel, "Karma: " + selectedViewer.GetViewerKarma() + "%");

            smallButton.y = smallLabel.y + cellHeight;
            smallButton.x = 0f;

            if (Widgets.ButtonText(smallButton, (resetWarning ? "Are you sure?" : "Reset Viewer")))
            {
                if (resetWarning)
                {
                    Viewers.All = Viewers.All.Where(s => s != selectedViewer).ToList();
                    string username = selectedViewer.username;
                    resetWarning = false;
                    SelectViewer(Viewers.GetViewer(username));
                }
                else
                {
                    resetWarning = true;
                }
            }
        }
        public ActionResult Index( )
        {
            ViewerModel vm = new ViewerModel(() => sp.GetRequiredService <ShcDataModel>(), HttpContext.User.Identity?.Name);

            return(View(vm));
        }
Beispiel #21
0
        public ViewerModel GetEntriesFrom(string blogUrl, int numberOfEntries, int bodyMaxLength)
        {
            var accessToken = _spContext.UserAccessTokenForSPHost;

            if (string.IsNullOrEmpty(accessToken))
            {
                throw new Exception(Viewer.NotAccessTokenError);
            }

            using (var clientContext = TokenHelper.GetClientContextWithAccessToken(blogUrl, accessToken))
            {
                if (clientContext == null)
                {
                    throw new Exception(Viewer.BlogNotFoundError);
                }

                var web  = clientContext.Web;
                var list = web.Lists.GetByTitle(Viewer.BlogListTitle);
                clientContext.Load(list);
                clientContext.ExecuteQuery();

                var viewXml = string.Format("<View><Query><OrderBy><FieldRef Name='PublishedDate' Ascending='False' /></OrderBy></Query><ViewFields><FieldRef Name='Title' /><FieldRef Name='Body' /><FieldRef Name='Author' /><FieldRef Name='PublishedDate' /></ViewFields><QueryOptions /><RowLimit>{0}</RowLimit></View>", numberOfEntries);
                var query   = new CamlQuery {
                    ViewXml = viewXml
                };

                var blogItems = list.GetItems(query);
                clientContext.Load(blogItems);
                clientContext.ExecuteQuery();

                var entries = new List <BlogEntryModel>();
                foreach (var item in blogItems)
                {
                    var authorUser = item["Author"] as FieldUserValue;
                    var htmlBody   = item["Body"] as string;
                    var body       = htmlBody.ToTextWithoutHtmlTags();

                    var firstPartOfBody = body.Length <= bodyMaxLength ? body : body.Substring(0, bodyMaxLength) + "...";
                    var publishedDate   = (DateTime)item["PublishedDate"];
                    publishedDate = publishedDate.AddHours(1.0);
                    var entry = new BlogEntryModel
                    {
                        Id      = item.Id,
                        Title   = item["Title"] as string,
                        Content = firstPartOfBody,
                        Author  = authorUser.LookupValue,
                        Date    = publishedDate.ToString("HH:mm")
                    };
                    entries.Add(entry);
                }

                clientContext.Load(web, w => w.Title);
                clientContext.ExecuteQuery();
                var blogTitle = web.Title;

                var viewerModel = new ViewerModel
                {
                    BlogUrl     = blogUrl,
                    BlogTitle   = blogTitle,
                    BlogEntries = entries
                };
                return(viewerModel);
            }
        }