示例#1
0
        protected override async Task OnInitializedAsync()
        {
            ActivityLogger = new ActivityLogger(() => StateHasChanged(), (m) => Wait.ShowMessage(m));

            MinimizeFunctionCode = new Models.MinimizeFunctionCode
            {
                Code = Resource.JavascriptCodeSample
                       // Code = "\r\nfunction minimize(p1 /*p2, anything, etc*/)\r\n{\r\n\treturn;\r\n}"
            };

            await base.OnInitializedAsync();
        }
        protected override async Task OnInitializedAsync()
        {
            ActivityLogger = new ActivityLogger(() => StateHasChanged(), m => Wait.ShowMessage(m));

            MinimizeFunctionCode = new Models.MinimizeFunctionCode
            {
                Code = Resource.JavascriptCodeSample
                       // Code = "\r\nfunction minimize(p1 /*p2, anything, etc*/)\r\n{\r\n\treturn;\r\n}"
            };

            BlazorClientState.SubscribeStateHasChanged(typeof(CodeEditorBase), async() => await Cancel());

            await base.OnInitializedAsync();
        }