Esempio n. 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            // Add CSS files
            Master.AddCss("style.css");
            Master.AddCss("history.css");
            Master.AddCss("entry.css");

            // Identify our position; load data
            loadData();
            // Navigation
            buildPageLinks();
            // Add changes
            for (int i = 0; i != changes.Count; ++i)
            {
                SqlDict.ChangeItem ci = changes[i];
                changeList.Controls.Add(new HistoryItem(ci));
            }

            //// Render static content
            //string path = HttpRuntime.AppDomainAppPath;
            //path = Path.Combine(path, "Content");
            //path = Path.Combine(path, "HistoryDoodle.html");
            //using (StreamReader sr = new StreamReader(path))
            //{
            //    lit.Text = sr.ReadToEnd();
            //}
        }
Esempio n. 2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     // Add CSS files
     Master.AddCss("style.css");
     Master.AddCss("forms.css");
     Master.AddCss("newentry.css");
     Master.AddCss("entry.css");
     // Add JS includes
     Master.AddJS("newentry.js", false);
 }
Esempio n. 3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            // Add CSS files
            Master.AddCss("tooltipster.css");
            Master.AddCss("style.css");
            Master.AddCss("entry.css");
            Master.AddCss("lookup.css");
            // Add JS includes
            Master.AddJS("jquery.tooltipster.min.js", true);
            Master.AddJS("common.js", false);
            Master.AddJS("lookup.js", false);
            Master.AddJS("strokeanim.js", false);

            if (string.IsNullOrEmpty(Request.Params["query"]))
            {
                loadStatic("Welcome");
                return;
            }

            string query = Request.Params["query"].Replace('+', ' ');

            txtSearch.Value = query;
            CedictLookupResult lr;

            using (SqlDict.Query q = new SqlDict.Query())
            {
                lr = q.Lookup(query);
            }
            // No results
            if (lr.Results.Count == 0 && lr.Annotations.Count == 0)
            {
                loadStatic("NoResults");
                return;
            }
            prov = lr.EntryProvider;
            // Add regular results
            for (int i = 0; i != lr.Results.Count; ++i)
            {
                if (i >= 256)
                {
                    break;
                }
                var           res     = lr.Results[i];
                OneResultCtrl resCtrl = new OneResultCtrl(res, lr.EntryProvider,
                                                          Master.UiScript, Master.UiTones, false);
                resultsHolder.Controls.Add(resCtrl);
            }
            // SOA BOX
            soaBox.Visible = true;
        }
Esempio n. 4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            // Add CSS files
            Master.AddCss("style.css");

            // Render static content
            // TO-DO: auto-map to required file from raw query
            // TO-DO: substitute with HU where EN in missing
            string path = HttpRuntime.AppDomainAppPath;

            path = Path.Combine(path, "Content");
            path = Path.Combine(path, "WorkInProgress." + Master.Lang + ".html");
            using (StreamReader sr = new StreamReader(path))
            {
                lit.Text = sr.ReadToEnd();
            }
        }
Esempio n. 5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            // Add CSS files
            Master.AddCss("style.css");
            Master.AddCss("diagnostics.css");
            // Add JS includes
            Master.AddJS("jquery-2.1.4.min.js", true);
            Master.AddJS("diagnostics.js", false);

            // Render static content
            string path = HttpRuntime.AppDomainAppPath;

            path = Path.Combine(path, "Content");
            path = Path.Combine(path, "Diagnostics.html");
            using (StreamReader sr = new StreamReader(path))
            {
                lit.Text = sr.ReadToEnd();
            }
        }