コード例 #1
0
        public static ValueTask <int> GetTimezoneOffset()
        {
            BWHelperFunctions.CheckHasJsRuntime();

            return(BWHWindowHelper.jsRuntime.InvokeAsync <int>(
                       "BWHJsFunctions.GetTimezoneOffset"));
        }
コード例 #2
0
        public static ValueTask <long> GetDateMilliseconds()
        {
            BWHelperFunctions.CheckHasJsRuntime();

            return(BWHWindowHelper.jsRuntime.InvokeAsync <long>(
                       "BWHJsFunctions.GetDateMilliseconds"));
        }
コード例 #3
0
        public static ValueTask <bool> LogWithTime(string message)
        {
            BWHelperFunctions.CheckHasJsRuntime();

            return(BWHWindowHelper.jsRuntime.InvokeAsync <bool>(
                       "BWHJsFunctions.logWithTime", message));
        }
コード例 #4
0
        public static ValueTask <bool> SetOnOrOff(bool OnOrOff)
        {
            BWHelperFunctions.CheckHasJsRuntime();

            return(BWHWindowHelper.jsRuntime.InvokeAsync <bool>(
                       "BWHJsFunctions.setOnOrOff", OnOrOff));
        }
コード例 #5
0
        public static ValueTask <bool> Print()
        {
            BWHelperFunctions.CheckHasJsRuntime();

            return(BWHWindowHelper.jsRuntime.InvokeAsync <bool>(
                       "BWHJsFunctions.Print"));
        }
コード例 #6
0
        public static ValueTask <string> Prompt(string message)
        {
            BWHelperFunctions.CheckHasJsRuntime();

            return(BWHWindowHelper.jsRuntime.InvokeAsync <string>(
                       "BWHJsFunctions.showPrompt",
                       message));
        }
コード例 #7
0
        public static void Add(string Par_Name, MethodBase Par_Method, string Par_Description = "NA")
        {
            if (!DevelopmentMode)
            {
                return;
            }

            TimeTask t = new TimeTask
            {
                ID          = list.Count + 1,
                Name        = Par_Name,
                Description = Par_Description,
                Method      = BWHelperFunctions.getMethodName(Par_Method),
                StartDate   = DateTime.Now,
            };

            list.Add(t);

            if (LogAllAddition)
            {
                BWHJsInterop.JsLog("added new TimeAnalyzer item - " + t.ID + "   " + t.Name + "   " + t.Description + "   " + t.Method + "   " + t.StartDate.ToString("HH:mm:ss.fff"));
            }
        }
コード例 #8
0
 public static ValueTask <bool> Clear()
 {
     BWHelperFunctions.CheckHasJsRuntime();
     return(BWHWindowHelper.jsRuntime.InvokeAsync <bool>("BWHJsFunctions.ClearLocalStorage"));
 }
コード例 #9
0
 public static ValueTask <bool> RemoveItem(string key)
 {
     BWHelperFunctions.CheckHasJsRuntime();
     return(BWHWindowHelper.jsRuntime.InvokeAsync <bool>(
                "BWHJsFunctions.RemoveItemLocalStorage", key));
 }
コード例 #10
0
 public static ValueTask <double> GetElementActualTop(string elementID)
 {
     BWHelperFunctions.CheckHasJsRuntime();
     return(BWHWindowHelper.jsRuntime.InvokeAsync <double>(
                "BWHJsFunctions.GetElementActualTop", elementID));
 }
コード例 #11
0
 public static ValueTask SetFocus(string id)
 {
     BWHelperFunctions.CheckHasJsRuntime();
     return(BWHWindowHelper.jsRuntime.InvokeVoidAsync(
                "BWHJsFunctions.SetFocus", id));
 }
コード例 #12
0
 public static ValueTask <double> GetWindowHeight()
 {
     BWHelperFunctions.CheckHasJsRuntime();
     return(BWHWindowHelper.jsRuntime.InvokeAsync <double>(
                "BWHJsFunctions.GetWindowHeight"));
 }
コード例 #13
0
 public static void SetElementHeight(string elementID, int h)
 {
     BWHelperFunctions.CheckHasJsRuntime();
     BWHWindowHelper.jsRuntime.InvokeVoidAsync(
         "BWHJsFunctions.SetElementHeight", elementID, h);
 }
コード例 #14
0
 public static void SetElementWidth(string elementID, int w)
 {
     BWHelperFunctions.CheckHasJsRuntime();
     BWHWindowHelper.jsRuntime.InvokeVoidAsync(
         "BWHJsFunctions.SetElementWidth", elementID, w);
 }
コード例 #15
0
 public static void ClearConsole()
 {
     BWHelperFunctions.CheckHasJsRuntime();
     BWHWindowHelper.jsRuntime.InvokeVoidAsync(
         "BWHJsFunctions.ClearConsole");
 }