• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# JsNumber类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中JsNumber的典型用法代码示例。如果您正苦于以下问题:C# JsNumber类的具体用法?C# JsNumber怎么用?C# JsNumber使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



JsNumber类属于命名空间,在下文中一共展示了JsNumber类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: OnReady

        static void OnReady()
        {

            var start_counter = new jQuery("#event-start");
            var drag_counter = new jQuery("#event-drag");
            var stop_counter = new jQuery("#event-stop");
            var counts = new JsNumber[3] { 0, 0, 0 };
            new jQuery("#draggable").draggable(new DraggableOptions
            {
                start = (e, ui) =>
                {
                    counts[0]++;
                    updateCounterStatus(drag_counter, counts[0]);
                },
                drag = (e, ui) =>
                    {
                        counts[1]++;
                        updateCounterStatus(drag_counter, counts[1]);
                    },
                stop = (e, ui) =>
                    {
                        counts[2]++;
                        updateCounterStatus(drag_counter, counts[2]);
                    }
            });
        }
开发者ID:fjgandrade,项目名称:sharpkit,代码行数:26,代码来源:Events.cs


示例2: getPrefix

 public string getPrefix(JsNumber price)
 {
     JsString res = price.As<JsString>();
     if (res.indexOf(".") > 0) {
         res = res.substr(0, res.indexOf("."));
     }
     return res;
 }
开发者ID:mgerasika,项目名称:gam-gam,代码行数:8,代码来源:ngMobileFoodController.cs


示例3: updateCounterStatus

        static void updateCounterStatus(jQuery event_counter, JsNumber new_count)
        {
            if (!event_counter.hasClass("ui-state-hover"))
            {
                event_counter.addClass("ui-state-hover")
                    .siblings().removeClass("ui-state-hover");
            }
            // ...then update the numbersKD
            new jQuery("span.count", event_counter).text(new_count.As<JsString>());

        }
开发者ID:fjgandrade,项目名称:sharpkit,代码行数:11,代码来源:Events.cs


示例4: buildSpinner

 void buildSpinner(SpinnerData sd)
 {
     spinnerData = sd;
     var canvas = document.getElementsByTagName("canvas")[0].As<HTMLCanvasElement>();
     ctx = canvas.getContext("2d").As<CanvasRenderingContext2D>();
     index = 0;
     degrees = spinnerData.degrees;
     degreesList = new JsArray<JsNumber>();
     for (var x = 0; x < degrees; x++)
         degreesList.push(x);
     // reset
     index = 0;
     // so I can kill it later
     canvasTimer = setInterval(draw, 1000 / degrees);
 }
开发者ID:fjgandrade,项目名称:sharpkit,代码行数:15,代码来源:Canvas.cs


示例5: round

 //TODO: type parameter's type?
 /// <summary>
 /// The method returns rounded version of the given input number.
 /// The type of rounding is defined by the second parameter: type. With the optional third parameter decimals, you can specify the number of decimal digits to be returned.
 /// For example round(1.2345, M.FLOOR, 3) would return 1.234. The default for this parameter is 0.
 /// </summary>
 /// <param name="input"> The input value.</param>
 /// <param name="type">The type of rounding. Needs to be one of these three:
 /// M.FLOOR: Returns the next lower integer, so 2.1 and 2.9 both would return 2.
 /// M.CEIL: Returns the next higher integer, so 2.1 and 2.9 both would return 3.
 /// M.ROUND: Returns the nearest integer, so 2.1 would return 2 and 2.9 would return 3.</param>
 /// <returns>The rounded number.</returns>
 public JsNumber round(JsNumber input, object type) { return null; }
开发者ID:hultqvist,项目名称:SharpKit-SDK,代码行数:13,代码来源:TheMProject.cs


示例6: random

        //TODO: parametrs type?

        /// <summary>
        /// The method returns a random number within the range given by the min property and the max property, including the min and max value.
        /// A test with 100.000 iterations for random(1, 3) created the following distribution:
        /// - 1: 33.2% 
        /// - 2: 33.2% 
        /// - 3: 33.6%
        /// </summary>
        /// <param name="min"> The minimal value.</param>
        /// <param name="max">The maximal value.</param>
        /// <returns>A random number between the passed range.</returns>
        public JsNumber random(JsNumber min, JsNumber max) { return null; }
开发者ID:hultqvist,项目名称:SharpKit-SDK,代码行数:13,代码来源:TheMProject.cs


示例7: log

 /// <summary>
 /// Logs the passed message on the console. The type of output is defined via an optional passed logging level. If no level is passed, M.DEBUG is used by default.
 /// The method also takes care, that things don't blow up, when this object is used in browsers that don't support this or don't have a console.
 /// </summary>
 /// <param name="msg">The logging message.</param>
 /// <param name="level">level (Number, optional): The logging level, as a number from 0 to 3. Can be passed via constant:
 /// M.INFO: 0
 /// M.DEBUG: 1
 /// M.WARN: 2
 /// M.ERR: 3</param>
 public void log(JsString msg, JsNumber level) { }
开发者ID:hultqvist,项目名称:SharpKit-SDK,代码行数:11,代码来源:TheMProject.cs


示例8: getDatesOfCalendarWeek

 /// <summary>
 /// This method returns an array containing all dates within one calendar week as an M.Date object..
 /// If no parameters are given, the calendar week of the current date is taken.
 /// </summary>
 /// <param name="calendarWeek">The calendar week. Note: Pass 'null' if you use this method on an existing M.Date object.</param>
 /// <returns></returns>
 public JsArray getDatesOfCalendarWeek(JsNumber calendarWeek) { return null; }
开发者ID:hultqvist,项目名称:SharpKit-SDK,代码行数:7,代码来源:TheMProject.cs


示例9: getCalendarWeek

 /// <summary>
 /// This method computes the calendar week of a date. It can either be executed on a M.Date object,
 /// to get the calendar week of that date, or you can pass parameters to get the calendar week for the specified date.
 /// </summary>
 /// <param name="year"> The year part of the date, e.g. 2011. Must be four digits.</param>
 /// <param name="month">The month part of the date: 0-11. Must be one/two digit.</param>
 /// <param name="day">The day part of the date: 1-31. Must be one/two digits.</param>
 /// <returns></returns>
 public JsNumber getCalendarWeek(JsNumber year, JsNumber month, JsNumber day) { return null; }
开发者ID:hultqvist,项目名称:SharpKit-SDK,代码行数:9,代码来源:TheMProject.cs


示例10: secondsFromDate

 /// <summary>
 /// This method returns a date in the future or past, based on seconds and the current date.
 /// Basically it adds or subtracts x times the milliseconds of a second,
 /// but also checks for clock changes and automatically includes these into the calculation of the future or past date.
 /// </summary>
 /// <param name="seconds">The number of seconds to be added to or subtracted from the current date.</param>
 /// <returns></returns>
 public Date secondsFromDate(JsNumber seconds) { return null; }
开发者ID:hultqvist,项目名称:SharpKit-SDK,代码行数:8,代码来源:TheMProject.cs


示例11: getHeaderAtIndex

 /// <summary>
 /// Get a leaf level header by index regardless of what the nesting
 /// structure is.
 /// </summary>
 /// <param name="The"><p>column index for which to retrieve the column.</p>
 /// </param>
 public void getHeaderAtIndex(JsNumber The){}
开发者ID:hultqvist,项目名称:SharpKit-SDK,代码行数:7,代码来源:Ext.grid.header.Container.cs


示例12: getPrintData

 /// <summary>
 /// Gets the data for printing a template row
 /// </summary>
 /// <param name="index"><p>The index in the template</p>
 /// </param>
 /// <returns>
 /// <span><see cref="Array">Array</see></span><div><p>The template values</p>
 /// </div>
 /// </returns>
 private JsArray getPrintData(JsNumber index){return null;}
开发者ID:fjgandrade,项目名称:sharpkit,代码行数:10,代码来源:Ext.grid.feature.GroupingSummary.cs


示例13: setPageSize

 /// <summary>
 /// Sets the number of menu items per submenu "page size".
 /// </summary>
 /// <param name="pageSize"><p>The page size</p>
 /// </param>
 public void setPageSize(JsNumber pageSize){}
开发者ID:hultqvist,项目名称:SharpKit-SDK,代码行数:6,代码来源:Ext.ux.TabScrollerMenu.cs


示例14: setMaxText

 /// <summary>
 /// Sets the maximum text size for each menu item.
 /// </summary>
 /// <param name="t"><p>The max text per each menu item.</p>
 /// </param>
 public void setMaxText(JsNumber t){}
开发者ID:hultqvist,项目名称:SharpKit-SDK,代码行数:6,代码来源:Ext.ux.TabScrollerMenu.cs


示例15: CylinderGeometry

 public CylinderGeometry(JsNumber radiusTop, JsNumber radiusBottom) { }
开发者ID:hultqvist,项目名称:SharpKit-SDK,代码行数:1,代码来源:CylinderGeometry.cs


示例16: hoursFromDate

 /// <summary>
 /// This method returns a date in the future or past, based on hours and the current date.
 /// Basically it adds or subtracts x times the milliseconds of an hour,
 /// but also checks for clock changes and automatically includes these into the calculation of the future or past date.
 /// </summary>
 /// <param name="hours">The number of hours to be added to or subtracted from the current date.</param>
 /// <returns></returns>
 public Date hoursFromDate(JsNumber hours) { return null; }
开发者ID:hultqvist,项目名称:SharpKit-SDK,代码行数:8,代码来源:TheMProject.cs


示例17: minutesFromDate

 /// <summary>
 /// This method returns a date in the future or past, based on minutes and the current date.
 /// Basically it adds or subtracts x times the milliseconds of a minute,
 /// but also checks for clock changes and automatically includes these into the calculation of the future or past date.
 /// </summary>
 /// <param name="minutes">The number of minutes to be added to or subtracted from the current date.</param>
 /// <returns></returns>
 public Date minutesFromDate(JsNumber minutes) { return null; }
开发者ID:hultqvist,项目名称:SharpKit-SDK,代码行数:8,代码来源:TheMProject.cs


示例18: getVisibleHeaderClosestToIndex

 /// <summary>
 /// When passed a column index, returns the closet visible column to that. If the column at the passed index is visible,
 /// that is returned. If it is hidden, either the next visible, or the previous visible column is returned.
 /// </summary>
 /// <param name="index"><p>Position at which to find the closest visible column.</p>
 /// </param>
 public void getVisibleHeaderClosestToIndex(JsNumber index){}
开发者ID:hultqvist,项目名称:SharpKit-SDK,代码行数:7,代码来源:Ext.grid.header.Container.cs


示例19: millisecondsFromDate

 /// <summary>
 /// This method returns a date in the future or past, based on milliseconds and the current date.
 /// Basically it adds or subtracts x milliseconds,
 /// but also checks for clock changes and automatically includes these into the calculation of the future or past date.
 /// </summary>
 /// <param name="milliseconds">The number of milliseconds to be added to or subtracted from the current date.</param>
 /// <returns></returns>
 public Date millisecondsFromDate(JsNumber milliseconds) { return null; }
开发者ID:hultqvist,项目名称:SharpKit-SDK,代码行数:8,代码来源:TheMProject.cs


示例20: columnmove

 /// <summary>
 /// Parameters<li><span>ct</span> : <see cref="Ext.grid.header.Container">Ext.grid.header.Container</see><div><p>The grid's header Container which encapsulates all column headers.</p>
 /// </div></li><li><span>column</span> : <see cref="Ext.grid.column.Column">Ext.grid.column.Column</see><div><p>The Column header Component which provides the column definition</p>
 /// </div></li><li><span>fromIdx</span> : <see cref="Number">Number</see><div>
 /// </div></li><li><span>toIdx</span> : <see cref="Number">Number</see><div>
 /// </div></li><li><span>eOpts</span> : <see cref="Object">Object</see><div><p>The options object passed to <see>Ext.util.Observable.addListener</see>.</p>
 /// </div></li>
 /// </summary>
 /// <param name="ct"><p>The grid's header Container which encapsulates all column headers.</p>
 /// </param>
 /// <param name="column"><p>The Column header Component which provides the column definition</p>
 /// </param>
 /// <param name="fromIdx">
 /// </param>
 /// <param name="toIdx">
 /// </param>
 /// <param name="eOpts"><p>The options object passed to <see cref="Ext.util.Observable.addListener">Ext.util.Observable.addListener</see>.</p>
 /// </param>
 public void columnmove(Ext.grid.header.Container ct, Ext.grid.column.Column column, JsNumber fromIdx, JsNumber toIdx, object eOpts){}
开发者ID:hultqvist,项目名称:SharpKit-SDK,代码行数:19,代码来源:Ext.grid.header.Container.cs



注:本文中的JsNumber类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# JsObject类代码示例发布时间:2022-05-24
下一篇:
C# JsExpression类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap