示例#1
0
 public override object __hx_invoke1_o(double __fn_float1, object __fn_dyn1)
 {
                 #line 331 "C:\\HaxeToolkit\\haxe\\std\\haxe\\io\\Path.hx"
     global::haxe.root.EReg v = (((__fn_dyn1 == global::haxe.lang.Runtime.undefined)) ? (((global::haxe.root.EReg)(((object)(__fn_float1))))) : (((global::haxe.root.EReg)(__fn_dyn1))));
                 #line 331 "C:\\HaxeToolkit\\haxe\\std\\haxe\\io\\Path.hx"
     return(global::haxe.lang.Runtime.concat("-x", global::haxe.lang.Runtime.toString(global::haxe.lang.StringExt.charCodeAt(v.matched(0), 0))));
 }
示例#2
0
        public static int getTuningForText(string str)
        {
            unchecked
            {
                int @base = 0;
                global::haxe.root.EReg regex = global::alphatab.model.Tuning.TuningRegex;
                if (regex.match(str.ToLower()))
                {
                    string note = regex.matched(1);
                    global::haxe.lang.Null <int> octave = global::Std.parseInt(regex.matched(2));
                    if (string.Equals(note, "c"))
                    {
                        @base = 0;
                    }
                    else
                    {
                        if (string.Equals(note, "db"))
                        {
                            @base = 1;
                        }
                        else
                        {
                            if (string.Equals(note, "d"))
                            {
                                @base = 2;
                            }
                            else
                            {
                                if (string.Equals(note, "eb"))
                                {
                                    @base = 3;
                                }
                                else
                                {
                                    if (string.Equals(note, "e"))
                                    {
                                        @base = 4;
                                    }
                                    else
                                    {
                                        if (string.Equals(note, "f"))
                                        {
                                            @base = 5;
                                        }
                                        else
                                        {
                                            if (string.Equals(note, "gb"))
                                            {
                                                @base = 6;
                                            }
                                            else
                                            {
                                                if (string.Equals(note, "g"))
                                                {
                                                    @base = 7;
                                                }
                                                else
                                                {
                                                    if (string.Equals(note, "ab"))
                                                    {
                                                        @base = 8;
                                                    }
                                                    else
                                                    {
                                                        if (string.Equals(note, "a"))
                                                        {
                                                            @base = 9;
                                                        }
                                                        else
                                                        {
                                                            if (string.Equals(note, "bb"))
                                                            {
                                                                @base = 10;
                                                            }
                                                            else
                                                            {
                                                                if (string.Equals(note, "b"))
                                                                {
                                                                    @base = 11;
                                                                }
                                                                else
                                                                {
                                                                    return(-1);
                                                                }
                                                            }
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }

                    @base += (((octave.@value + 1)) * 12);
                }
                else
                {
                    return(-1);
                }

                return(@base);
            }
        }
示例#3
0
 public override object __hx_invoke1_o(double __fn_float1, object __fn_dyn1)
 {
     unchecked {
                         #line 326 "C:\\HaxeToolkit\\haxe\\std\\haxe\\io\\Path.hx"
         global::haxe.root.EReg regex1 = (((__fn_dyn1 == global::haxe.lang.Runtime.undefined)) ? (((global::haxe.root.EReg)(((object)(__fn_float1))))) : (((global::haxe.root.EReg)(__fn_dyn1))));
                         #line 326 "C:\\HaxeToolkit\\haxe\\std\\haxe\\io\\Path.hx"
         return(global::haxe.lang.StringExt.fromCharCode(((int)(global::haxe.lang.Runtime.toInt(global::haxe.root.Std.parseInt(regex1.matched(1)))))));
     }
                 #line default
 }
示例#4
0
        protected static void __hx_ctor_hx_ws_WebSocket(global::hx.ws.WebSocket __hx_this, string uri)
        {
            unchecked {
                                #line 122 "D:\\project\\sangong\\sangong\\src\\hx\\ws\\WebSocket.hx"
                __hx_this._encodedKey = "wskey";
                                #line 121 "D:\\project\\sangong\\sangong\\src\\hx\\ws\\WebSocket.hx"
                __hx_this._key = "wskey";
                                #line 126 "D:\\project\\sangong\\sangong\\src\\hx\\ws\\WebSocket.hx"
                {
                                        #line 127 "D:\\project\\sangong\\sangong\\src\\hx\\ws\\WebSocket.hx"
                    global::haxe.root.EReg uriRegExp = new global::haxe.root.EReg("^(\\w+?)://([\\w\\.-]+)(:(\\d+))?(/.*)?$", "");
                                        #line 129 "D:\\project\\sangong\\sangong\\src\\hx\\ws\\WebSocket.hx"
                    if (!(uriRegExp.match(uri)))
                    {
                                                #line 130 "D:\\project\\sangong\\sangong\\src\\hx\\ws\\WebSocket.hx"
                        throw global::haxe.lang.HaxeException.wrap(global::haxe.lang.Runtime.concat(global::haxe.lang.Runtime.concat("Uri not matching websocket uri \"", uri), "\""));
                    }

                                        #line 132 "D:\\project\\sangong\\sangong\\src\\hx\\ws\\WebSocket.hx"
                    string proto = uriRegExp.matched(1);
                    if ((proto == "wss"))
                    {
                                                #line 135 "D:\\project\\sangong\\sangong\\src\\hx\\ws\\WebSocket.hx"
                        throw global::haxe.lang.HaxeException.wrap("Secure sockets not implemented");
                    }
                    else if ((proto == "ws"))
                    {
                                                #line 142 "D:\\project\\sangong\\sangong\\src\\hx\\ws\\WebSocket.hx"
                        __hx_this._port = 80;
                        global::hx.ws.WebSocketCommon.__hx_ctor_hx_ws_WebSocketCommon(__hx_this, null);
                    }
                    else
                    {
                                                #line 145 "D:\\project\\sangong\\sangong\\src\\hx\\ws\\WebSocket.hx"
                        throw global::haxe.lang.HaxeException.wrap(global::haxe.lang.Runtime.concat("Unknown protocol ", proto));
                    }

                                        #line 148 "D:\\project\\sangong\\sangong\\src\\hx\\ws\\WebSocket.hx"
                    __hx_this._host = uriRegExp.matched(2);
                    object parsedPort = global::haxe.root.Std.parseInt(uriRegExp.matched(4));
                                        #line 150 "D:\\project\\sangong\\sangong\\src\\hx\\ws\\WebSocket.hx"
                    if ((((int)(global::haxe.lang.Runtime.toInt(parsedPort))) > 0))
                    {
                                                #line 151 "D:\\project\\sangong\\sangong\\src\\hx\\ws\\WebSocket.hx"
                        __hx_this._port = ((int)(global::haxe.lang.Runtime.toInt(parsedPort)));
                    }

                                        #line 153 "D:\\project\\sangong\\sangong\\src\\hx\\ws\\WebSocket.hx"
                    __hx_this._uri = uriRegExp.matched(5);
                    if (((__hx_this._uri == null) || (__hx_this._uri.Length == 0)))
                    {
                                                #line 155 "D:\\project\\sangong\\sangong\\src\\hx\\ws\\WebSocket.hx"
                        __hx_this._uri = "/";
                    }

                                        #line 157 "D:\\project\\sangong\\sangong\\src\\hx\\ws\\WebSocket.hx"
                    __hx_this._socket.setBlocking(true);
                                        #line 159 "D:\\project\\sangong\\sangong\\src\\hx\\ws\\WebSocket.hx"
                    __hx_this._socket.connect(new global::sys.net.Host(((string)(__hx_this._host))), __hx_this._port);
                                        #line 162 "D:\\project\\sangong\\sangong\\src\\hx\\ws\\WebSocket.hx"
                    __hx_this._socket.setBlocking(false);
                                        #line 181 "D:\\project\\sangong\\sangong\\src\\hx\\ws\\WebSocket.hx"
                    global::hx.ws.WebSocket ws = __hx_this;
                    global::haxe.MainLoop.addThread(new global::hx.ws.WebSocket___hx_ctor_hx_ws_WebSocket_182__Fun(ws));
                                        #line 191 "D:\\project\\sangong\\sangong\\src\\hx\\ws\\WebSocket.hx"
                    __hx_this.sendHandshake();
                }
            }
                        #line default
        }