コード例 #1
0
ファイル: Api.cs プロジェクト: fjgandrade/sharpkit
        static void OnReady()
        {
            var data = new[] {
                        "Red-violet",
                        "Red",
                        "Red-orange",
                        "Orange",
                        "Yellow-orange",
                        "Yellow",
                        "Yellow-green",
                        "Green",
                        "Blue-green",
                        "Blue",
                        "Blue-violet",
                        "Violet"
            };

            new jQuery("#products").kendoAutoComplete(data.As<AutoCompleteConfiguration>());

            autoComplete = new jQuery("#products").data("kendoAutoComplete").As<AutoComplete>();
            JsAction<Event> setValue = SetValue;
            JsAction<Event> setSearch = SetSearch;

            new jQuery("#set").click(setValue);
            new jQuery("#value").keypress(setValue);
            new jQuery("#search").click(setSearch);
            new jQuery("#word").keypress(setSearch);

            //new jQuery("#get").click(() => HtmlContext.window.alert(autoComplete.value()));


        }
コード例 #2
0
ファイル: Index.cs プロジェクト: fjgandrade/sharpkit
        static void OnReady()
        {
            var data = new[] {
                    "12 Angry Men",
                    "Il buono, il brutto, il cattivo.",
                    "Inception",
                    "One Flew Over the Cuckoo's Nest",
                    "Pulp Fiction",
                    "Schindler's List",
                    "The Dark Knight",
                    "The Godfather",
                    "The Godfather: Part II",
                    "The Shawshank Redemption"
                    };

            new jQuery("#search").kendoAutoComplete(new AutoCompleteConfiguration
            {
                dataSourceObject = data,
                separator = ", "
            });

            var validator = new jQuery("#tickets").kendoValidator().data("kendoValidator").As<Validator>();
            var status = new jQuery(".status");

            new jQuery("button").click(() =>
            {
                if (validator.validate())
                {
                    status.text("Hooray! Your tickets has been booked!").addClass("valid");
                }
                else
                {
                    status.text("Oops! There is invalid data in the form.").addClass("invalid");
                }
            });
        }
コード例 #3
0
ファイル: Default.cs プロジェクト: fjgandrade/sharpkit
 static Native_JavaScript_Classes()
 {
     var SharpKitSamples = new { };
     
 }
コード例 #4
0
ファイル: Default.cs プロジェクト: fjgandrade/sharpkit
 static TypeCastingSample()
 {
     var SharpKitSamples = new { };
 }
コード例 #5
0
ファイル: Default.cs プロジェクト: fjgandrade/sharpkit
 static NamespaceSample_Global()
 {
     //Declare the namespace objects
     var NamespaceSample = new { Namespace1 = new { }, Namespace2 = new { } };
 }
コード例 #6
0
ファイル: Default.cs プロジェクト: fjgandrade/sharpkit
    static InlineJSCodeSample()
    {
        var SharpKitSamples = new { };

    }
コード例 #7
0
ファイル: Events.cs プロジェクト: fjgandrade/sharpkit
 static void OnReady()
 {
     var data = new[] {
                     "Alabama",
                     "Alaska",
                     "American Samoa",
                     "Arizona",
                     "Arkansas",
                     "California",
                     "Colorado",
                     "Connecticut",
                     "Delaware",
                     "District of Columbia",
                     "Florida",
                     "Georgia",
                     "Guam",
                     "Hawaii",
                     "Idaho",
                     "Illinois",
                     "Indiana",
                     "Iowa",
                     "Kansas",
                     "Kentucky",
                     "Louisiana",
                     "Maine",
                     "Maryland",
                     "Massachusetts",
                     "Michigan",
                     "Minnesota",
                     "Mississippi",
                     "Missouri",
                     "Montana",
                     "Nebraska",
                     "Nevada",
                     "New Hampshire",
                     "New Jersey",
                     "New Mexico",
                     "New York",
                     "North Carolina",
                     "North Dakota",
                     "Northern Marianas Islands",
                     "Ohio",
                     "Oklahoma",
                     "Oregon",
                     "Pennsylvania",
                     "Puerto Rico",
                     "Rhode Island",
                     "South Carolina",
                     "South Dakota",
                     "Tennessee",
                     "Texas",
                     "Utah",
                     "Vermont",
                     "Virginia",
                     "Virgin Islands",
                     "Washington",
                     "West Virginia",
                     "Wisconsin",
                     "Wyoming"
             };
     new jQuery("#products").kendoAutoComplete(new AutoCompleteConfiguration
     {
         dataSourceObject = data,
         select = e => onSelect(e),
         change = onChange,
         close = onClose,
         open = onOpen
     });
 }