Ejemplo n.º 1
0
        private void SetConfig(List <KeyValuePair <string, string> > pairs)
        {
            bool changed = false;

            foreach (KeyValuePair <string, string> kvp in pairs)
            {
                switch (kvp.Key.ToLower())
                {
                case "transition":
                    if (Transition.TryParse <Transition>(kvp.Value, true, out Transition transition))
                    {
                        Transition = transition;
                        SlidesAPI.State.Transition = transition;
                        changed = true;
                    }
                    break;

                case "theme":
                    if (Theme.TryParse <Theme>(kvp.Value, true, out Theme theme))
                    {
                        Theme = theme;
                        SlidesAPI.State.Theme = theme;
                        changed = true;
                    }
                    break;

                default:
                    break;
                }
            }
            if (changed)
            {
                SlidesAPI.UpdateStatus();
            }
        }
Ejemplo n.º 2
0
        //Scripts Events
        private async void OnWindowResize(object sender, EventArgs e)
        {
            await UpdateJsInteropVars();

            SlidesAPI.UpdateStatus();
        }