Example #1
0
        public void SelectTemplate(PresTemplate tm)
        {
            int temp_unified_idx = UnifySensorId;

            pokaWczytywanieTamplatow = false;
            Screen.pres   = tm.prezentacja;
            UnifySensorId = temp_unified_idx;
            UpdateUnifiedIdx();
            _preview_service?.SetPresentationToPlay(Screen.pres);
        }
Example #2
0
        public async Task SaveAsTemplateClicked()
        {
            if (!string.IsNullOrEmpty(templateName))
            {
                showTypeTemplateName = false;
                if (presTemplateService == null)
                {
                    presTemplateService = new UniversalMysqlService <PresTemplate>(new SqlDataAccess(null), PresTemplate.tableName, nameof(PresTemplate.Id));
                }
                string       data = DateTime.Now.ToString("G");
                PresTemplate pt   = new PresTemplate()
                {
                    TemplateName = templateName, Width = scr.width, Height = scr.height, prezentacja = Pres, ScreenType = scr.screen_type, UserAuthorId = loggeduser.UserId, CreateDate = data
                };
                await presTemplateService.PostRecordAsync(pt);

                templateKomunikat = lng.templateHasBeenSaved;
            }
            else
            {
                templateKomunikat = lng.templateNameIsEmpty;
            }
        }