Exemple #1
0
        private void _SendResponse(PrinGetPost method, string url)
        {
            string folder = AppDomain.CurrentDomain.BaseDirectory + "\\data";

            if (method == PrinGetPost.Get)
            {
                switch (url)
                {
                case "/":
                    _SendFile(folder + "/index.html");
                    return;

                case "/print":
                    _SendOk();
                    return;

                default:
                    _SendFile(AppDomain.CurrentDomain.BaseDirectory + "\\data" + url);
                    return;
                }
            }
            if (method == PrinGetPost.Post)
            {
            }
            //_client.Close();
        }
Exemple #2
0
 private void _Raise(PrinGetPost method, string url)
 {
     if (OnGet != null)
     {
         OnGet(method, url);
     }
 }