예제 #1
0
파일: Common.cs 프로젝트: tmpkus/openvss
        /// <summary>
        /// Create a html button to display custom messages
        /// </summary>
        /// <param name="htmlElement"></param>
        /// <returns></returns>
        public static System.Windows.Browser.HtmlElement GetDisplayMessageButton(System.Windows.Browser.HtmlElement htmlElement)
        {
            htmlElement = System.Windows.Browser.HtmlPage.Document.CreateElement("input");
            htmlElement.SetProperty("id", "inputText");
            htmlElement.SetProperty("type", "button");
            htmlElement.SetStyleAttribute("border", "solid 1px black");
            htmlElement.SetStyleAttribute("position", "absolute");
            htmlElement.SetStyleAttribute("width", "900px");
            htmlElement.SetStyleAttribute("height", "20px");
            htmlElement.SetStyleAttribute("top", "520px");
            htmlElement.SetStyleAttribute("left", "0px");

            return(htmlElement);
        }
예제 #2
0
        public void NavigateToHtml(String To)
        {
#if SILVERLIGHT
            System.Windows.Browser.HtmlElement element = System.Windows.Browser.HtmlPage.Document.GetElementById("Comments");
            if (element != null)
            {
                element.SetProperty("src", string.Format("source/{0}", To));
            }
#else
            Stream s = GetStream("source." + To, "html");
            if (s != null)
            {
                myComment.NavigateToStream(s);
            }
#endif
        }