示例#1
0
        public override void OnLoaded()
        {
            _vueData.Initialize();

            Task.Run(() =>
            {
                BeforeVue();

                foreach (var comp in _componentTypes)
                {
                    Execute(CreateComponentTemplate(comp.Value));
                }

                Execute(VueTemplates.Format_VueCore(VueElementID,
                                                    _vueData.AsVueDataString(), base.IPCAvailable
                                                    .Select(x => $"'{x}':{x}")
                                                    .ToArray()));
            }).ContinueWith((t) =>
            {
                AggregateException ex = t.Exception;
                if (ex != null && ex.InnerExceptions.Count > 0)
                {
                    foreach (Exception x in ex.InnerExceptions)
                    {
                        WebAppLogger.Log(WebAppLogLevel.Error, $"[{x.GetType().Name}]{x.Message}");
                    }
                }
            });
        }
示例#2
0
        public VueComponent(string id, VueWindow parent)
        {
            ComponentID = id;
            _compName   = GetType().Name;
            Parent      = parent;

            MapIPC(WebExposeType.All);

            _data = new VueData(this, GetVueProperties(GetType(), false));
            _data.Initialize();
        }