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]); } }); }
public string getPrefix(JsNumber price) { JsString res = price.As<JsString>(); if (res.indexOf(".") > 0) { res = res.substr(0, res.indexOf(".")); } return res; }
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>()); }
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); }
//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; }
/// <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; }
/// <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; }
/// <summary> /// This method sets the canvas' width. /// </summary> /// <param name="width">The width to be applied to the canvas view.</param> public void setWidth(JsNumber width) { }
/// <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){}
/// <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){}
/// <summary> /// Refreshes an individual node's data from the store. /// </summary> /// <param name="index"><p>The item's data index in the store</p> /// </param> public void refreshNode(JsNumber index) { }
/// <summary> /// Function which can be overridden to provide custom formatting for each Record that is used by this /// DataView's template to render each node. /// </summary> /// <param name="data"><p>The raw data object that was used to create the Record.</p> /// </param> /// <param name="recordIndex"><p>the index number of the Record being prepared for rendering.</p> /// </param> /// <param name="record"><p>The Record being prepared for rendering.</p> /// </param> /// <returns> /// <span><see cref="Array">Array</see>/<see cref="Object">Object</see></span><div><p>The formatted data in a format expected by the internal <see cref="Ext.view.AbstractViewConfig.tpl">template</see>'s overwrite() method. /// (either an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'}))</p> /// </div> /// </returns> public object prepareData(object data, JsNumber recordIndex, Ext.data.Model record) { return(null); }
/// <summary> /// Function which can be overridden which returns the data object passed to this /// DataView's template to render the whole DataView. /// This is usually an Array of data objects, each element of which is processed by an /// <see cref="Ext.XTemplate">XTemplate</see> which uses <tt>'<tpl for=".">'</tt> to iterate over its supplied /// data object as an Array. However, <i>named</i> properties may be placed into the data object to /// provide non-repeating data such as headings, totals etc. /// </summary> /// <param name="records"><p>An Array of <see cref="Ext.data.Model">Ext.data.Model</see>s to be rendered into the DataView.</p> /// </param> /// <param name="startIndex"><p>the index number of the Record being prepared for rendering.</p> /// </param> /// <returns> /// <span><see cref="Object">Object</see>[]</span><div><p>An Array of data objects to be processed by a repeating XTemplate. May also /// contain <i>named</i> properties.</p> /// </div> /// </returns> public object[] collectData(JsArray <Ext.data.Model> records, JsNumber startIndex) { return(null); }
/// <summary> /// Programmatically sets the value of the Slider. ... /// </summary> public object setValue(JsNumber index, JsNumber value, bool animate, object changeComplete) { return(null); }
/// <summary> /// Sets the minimum value for the slider instance. ... /// </summary> public object setMinValue(JsNumber val) { return(null); }
/// <summary> /// Returns the item at the specified index. ... /// </summary> public object getAt(JsNumber index) { return(null); }
public CylinderGeometry(JsNumber radiusTop, JsNumber radiusBottom) { }
/// <summary> /// Fired when either the drag pixel threshol or the mousedown hold /// time threshold has been met. /// </summary> /// <param name="x"><p>the X position of the original mousedown</p> /// </param> /// <param name="y"><p>the Y position of the original mousedown</p> /// </param> public static void startDrag(JsNumber x, JsNumber y) { }
/// <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){}
/// <summary> /// Finds the index of the first matching Record in this store by a specific field value. ... /// </summary> public JsNumber findExact(JsString fieldName, object value, JsNumber startIndex = null) { return(null); }
/// <summary> /// This method sets the canvas' height. /// </summary> /// <param name="height">The height to be applied to the canvas view.</param> public void setHeight(JsNumber height) { }
/// <summary> /// Get the Record at the specified index. ... /// </summary> public Ext.data.Model getAt(JsNumber index) { return(null); }
/// <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; }
/// <summary> /// Determines the page from a record index ... /// </summary> public JsNumber getPageFromRecordIndex(JsNumber index) { return(null); }
/// <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; }
/// <summary> /// Returns a range of Records between specified indices. ... /// </summary> public Ext.data.Model getRange(JsNumber startIndex = null, JsNumber endIndex = null) { return(null); }
/// <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) { }
/// <summary> /// Inserts Model instances into the Store at the given index and fires the add event. ... /// </summary> public object insert(JsNumber index, Ext.data.Model records) { return(null); }
//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; }
/// <summary> /// Loads a given 'page' of data by setting the start and limit values appropriately. ... /// </summary> public object loadPage(JsNumber page) { return(null); }
/// <summary> /// Find the index of the first matching object in this collection by a function. ... /// </summary> public JsNumber findIndexBy(JsAction fn, object scope = null, JsNumber start = null) { return(null); }
/// <summary> /// Prefetches a page of data. ... /// </summary> public object prefetchPage(JsNumber page, object options, object obj) { return(null); }
/// <summary> /// Returns a range of items in this collection ... /// </summary> public JsArray getRange(JsNumber startIndex = null, JsNumber endIndex = null) { return(null); }
/// <summary> /// Removes the model instance at the given index ... /// </summary> public object removeAt(JsNumber index) { return(null); }
/// <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){}
/// <summary> /// Fired when a node's id changes. Updates the node's id in the node hash. /// </summary> /// <param name="node"> /// </param> /// <param name="oldId"><p>The old id</p> /// </param> /// <param name="newId"><p>The new id</p> /// </param> private void onNodeIdChanged(NodeInterface node, JsNumber oldId, JsNumber newId) { }
/// <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;}
/// <summary> /// Fires when a new child node is appended /// </summary> /// <param name="this"><p>This node</p> /// </param> /// <param name="node"><p>The newly appended node</p> /// </param> /// <param name="index"><p>The index of the newly appended node</p> /// </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 append(NodeInterface @this, NodeInterface node, JsNumber index, object eOpts) { }
/// <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){}
/// <summary> /// Fires when this node is moved to a new location in the tree /// </summary> /// <param name="this"><p>This node</p> /// </param> /// <param name="oldParent"><p>The old parent of this node</p> /// </param> /// <param name="newParent"><p>The new parent of this node</p> /// </param> /// <param name="index"><p>The index it was moved to</p> /// </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 move(NodeInterface @this, NodeInterface oldParent, NodeInterface newParent, JsNumber index, object eOpts) { }
/// <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>width</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="width"> /// </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 columnresize(Ext.grid.header.Container ct, Ext.grid.column.Column column, JsNumber width, object eOpts){}
public LatheGeometry(Vector3[] points, JsNumber steps, JsNumber angle) { }
/// <summary> /// This method sets the canvas' size. /// </summary> /// <param name="width">The width to be applied to the canvas view.</param> /// <param name="height">The height to be applied to the canvas view.</param> public void setSize(JsNumber width, JsNumber height) { }
SpeechInputResult IJsArrayEnumerable <SpeechInputResult> .this[JsNumber index] { get { throw new NotImplementedException(); } }
/// <summary> /// This method returns a date in the future or past, based on days and the current date. /// Basically it adds or subtracts x times the milliseconds of a day, /// but also checks for clock changes and automatically includes these into the calculation of the future or past date. /// </summary> /// <param name="days">The number of days to be added to or subtracted from the current date.</param> /// <returns></returns> public Date daysFromDate(JsNumber days) { return null; }
Node IJsArrayEnumerable <Node> .this[JsNumber index] { get { throw new NotImplementedException(); } }
/// <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; }
/// <summary> /// Normally the drag element is moved pixel by pixel, but we can specify /// that it move a number of pixels at a time. This method resolves the /// location when we have it set up like this. /// </summary> /// <param name="val"><p>where we want to place the object</p> /// </param> /// <param name="tickArray"><p>sorted array of valid points</p> /// </param> /// <returns> /// <span><see cref="Number">Number</see></span><div><p>the closest tick</p> /// </div> /// </returns> private JsNumber getTick(JsNumber val, JsArray <Number> tickArray) { return(null); }
/// <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; }
/// <summary> /// Stores the initial placement of the linked element. /// </summary> /// <param name="diffX"><p>the X offset, default 0</p> /// </param> /// <param name="diffY"><p>the Y offset, default 0</p> /// </param> public void setInitPosition(JsNumber diffX, JsNumber diffY) { }
/// <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> /// <param name="startWeekOnMonday">Determines whether a week starts on monday or sunday. Optional, default is NO.</param> /// <returns></returns> public JsArray getDatesOfCalendarWeek(JsNumber calendarWeek, bool startWeekOnMonday) { return null; }
/// <summary> /// Configures the padding for the target zone in px. Effectively expands /// (or reduces) the virtual object size for targeting calculations. /// Supports css-style shorthand; if only one parameter is passed, all sides /// will have that padding, and if only two are passed, the top and bottom /// will have the first param, the left and right the second. /// </summary> /// <param name="iTop"><p>Top pad</p> /// </param> /// <param name="iRight"><p>Right pad</p> /// </param> /// <param name="iBot"><p>Bot pad</p> /// </param> /// <param name="iLeft"><p>Left pad</p> /// </param> public void setPadding(JsNumber iTop, JsNumber iRight, JsNumber iBot, JsNumber iLeft) { }
/// <summary> /// This method returns a date (M.Date) for a given calendar week and day of this week. /// </summary> /// <param name="dayOfWeek">The day of the week (0 = sunday, ..., 7 = saturday).</param> /// <returns></returns> public JsNumber getDateByWeekdayAndCalendarWeek(JsNumber dayOfWeek) { return null; }
/// <summary> /// By default, the element can be dragged any place on the screen. Use /// this method to limit the horizontal travel of the element. Pass in /// 0,0 for the parameters if you want to lock the drag to the y axis. /// </summary> /// <param name="iLeft"><p>the number of pixels the element can move to the left</p> /// </param> /// <param name="iRight"><p>the number of pixels the element can move to the /// right</p> /// </param> /// <param name="iTickSize"><p>parameter for specifying that the /// element should move iTickSize pixels at a time.</p> /// </param> public void setXConstraint(JsNumber iLeft, JsNumber iRight, object iTickSize = null) { }
/// <summary> /// This method returns the value of the base to the power of the exponent. So e.g. pow(2, 3) would return '2 to the power of 3' --> 8. /// </summary> /// <param name="base">The base.</param> /// <param name="exponent">The exponent.</param> /// <returns>The result of the exponentiation operation.</returns> public JsNumber pow(JsNumber @base, JsNumber exponent) { return null; }
/// <summary> /// By default, the element can be dragged any place on the screen. Set /// this to limit the vertical travel of the element. Pass in 0,0 for the /// parameters if you want to lock the drag to the x axis. /// </summary> /// <param name="iUp"><p>the number of pixels the element can move up</p> /// </param> /// <param name="iDown"><p>the number of pixels the element can move down</p> /// </param> /// <param name="iTickSize"><p>parameter for specifying that the /// element should move iTickSize pixels at a time.</p> /// </param> public void setYConstraint(JsNumber iUp, JsNumber iDown, object iTickSize = null) { }
/// <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> /// <param name="decimals">The number of decimals (only available for M.ROUND).</param> /// <returns>The rounded number.</returns> public JsNumber round(JsNumber input, object type, JsNumber decimals) { return null; }
/// <summary> /// Abstract method called after a drag/drop object is clicked /// and the drag or mousedown time thresholds have beeen met. /// </summary> /// <param name="X"><p>click location</p> /// </param> /// <param name="Y"><p>click location</p> /// </param> public void startDrag(JsNumber X, JsNumber Y) { }
/// <summary> /// Ordinalizes a given number by adding a prefix such as 'st', 'nd', 'rd' or 'th' based on the last digit of the /// number. 21 -> 21st, 22 -> 22nd, 23 -> 23rd, 24 -> 24th etc /// </summary> /// <param name="number"><p>The number to ordinalize</p> /// </param> /// <returns> /// <span><see cref="String">String</see></span><div><p>The ordinalized number</p> /// </div> /// </returns> public static JsString ordinalize(JsNumber number){return null;}
/// <summary> /// Finds the index of the first matching object in this collection by a specific property/value. ... /// </summary> public JsNumber findIndex(JsString property, object value, JsNumber start = null, bool anyMatch = false, bool caseSensitive = false) { return(null); }