public static IHTMLElement AutoSizeSpriteTo(this Sprite e, IHTMLElement shadow)
        {
            var i = e.ToHTMLElement();

            Action Update =
                 delegate
                 {
                     var w = shadow.scrollWidth;
                     var h = shadow.scrollHeight;

                     i.style.SetSize(w, h);
                 };


            Native.window.onresize +=
                delegate
                {
                    Update();
                };

            Update();


            return i;
        }
        public ZoomedPoint ApplyZoomedSize(IHTMLElement e)
        {
            e.style.width = ZoomedXpx;
            e.style.height = ZoomedYpx;

            return this;
        }
Example #3
0
 public static TextArea AsTextArea(IHTMLElement e) {
     IHTMLTextAreaElement e2 = e as IHTMLTextAreaElement;
     if (e2 != null) {
         return new TextArea(e);
     }
     return null;
 }
                public static List<GetPositionData> Of(IHTMLElement e)
                {
                    var a = new List<GetPositionData>();

                    var x = 0;
                    var y = 0;

                    while (ShouldVisitParent(e))
                    {
                        x += e.offsetLeft;
                        y += e.offsetTop;

                        a.Add(
                            new GetPositionData
                            {
                                Element = e,
                                X = x,
                                Y = y
                            }
                        );

                        e = (IHTMLElement)e.parentNode;
                    }

                    return a;
                }
			public XRectangle()
			{
				var aelement = new IHTMLDiv();



				// WPF: Rectangle, Image or Label
				var acontent = new IHTMLDiv();

				acontent.style.backgroundColor = "#ff0000";

				this.Rotor = new IHTMLDiv();

				//this.Rotor.style.backgroundColor = "#ffd0d0";

				this.Rotor.style.border = "1px solid black";

				//this.Rotor.style.paddingRight = "10px";

				this.Rotor.AttachTo(aelement);

				acontent.AttachTo(this.Rotor);

				aelement.AttachToDocument();

				Element = aelement;
				Content = acontent;
			}
Example #6
0
        public List<FunctionPage> GetApplicableFunctions(IHTMLElement element, AppSettings.CodeLanguages language)
        {
            List<FunctionPage> applicable = new List<FunctionPage>();
            foreach (FunctionPage page in Functions)
            {
                if (page.IsApplicable(element, language))
                {
                    applicable.Add(page);
                }
            }

            if (applicable.Count==0)
            {
                // load the default page
                applicable.Add(GetPageFromTitle("Default"));
            }

            foreach (FunctionPage page in Functions)
            {
                if (page.ShowOnAll && page.Languages.Contains(language.ToString()))
                {
                    applicable.Add(page);
                }
            }

            return applicable;
        }
Example #7
0
        static public void FadeOut(IHTMLElement target, int waittime, int fadetime)
        {
            target.style.Opacity = 1;

            new Timer(
                delegate
                {
                    Timer a = null;

                    a = new Timer(
                        delegate
                        {

                            target.style.Opacity = 1 - (a.Counter / a.TimeToLive);

                            if (a.Counter == a.TimeToLive)
                            {
                                target.Hide();

                            }

                        }
                    );


                    a.StartInterval(fadetime / 25, 25);
                }
            ).StartTimeout(waittime);
        }
Example #8
0
        /// <summary>
        /// fades an element and provides async callback
        /// </summary>
        /// <param name="target"></param>
        /// <param name="waittime"></param>
        /// <param name="fadetime"></param>
        /// <param name="done"></param>
        static public void Fade(IHTMLElement target, int waittime, int fadetime, System.Action done)
        {
            // if IE
            target.style.height = target.clientHeight + "px";

            new Timer(
                delegate
                {
                    Timer a = null;

                    a = new Timer(
                        delegate
                        {

                            target.style.Opacity = 1 - (a.Counter / a.TimeToLive);

                            if (a.Counter == a.TimeToLive)
                            {
                                if (done != null)
                                    done();

                            }

                        }
                        );


                    a.StartInterval(fadetime / 25, 25);
                }
            ).StartTimeout(waittime);
        }
Example #9
0
 public static AnchorLink AsAnchorLink(IHTMLElement e) {
     if ( e is IHTMLAnchorElement2 ) {
         return new AnchorLink( e );
     } else {
         return null;
     }
 }
        //AvalonExampleGallery.JavaScript.AvalonExampleGalleryDocument Reference;


		public AvalonExampleGalleryContainer(IHTMLElement e)
		{
			var lookup = new Dictionary<string, AvalonExampleGallery.Shared.AvalonExampleGalleryCanvas.OptionPosition>();

			e.childNodes.Where(k => k.nodeName.ToLower() == "div").Select(k => (IHTMLDiv)k).ForEach(
				k =>
				{
					var p = new AvalonExampleGallery.Shared.AvalonExampleGalleryCanvas.OptionPosition
					{
						X = k.Bounds.Left,
						Y = k.Bounds.Top
					};

					p.Clear = () => k.Dispose();

					lookup[k.className] = p;

				}
			);

			new AvalonExampleGallery.Shared.AvalonExampleGalleryCanvas(false,
				Text =>
				{
					if (lookup.ContainsKey(Text))
						return lookup[Text];

					return null;
				}
			).AttachToContainer(e);
		}
Example #11
0
		// code creates class, we create element.
		public __Button()
		{
			InternalDisplayObject = new IHTMLElement(ElementName);

			var s = InternalDisplayObject.createShadowRoot();

			var button = new IHTMLButton();

			button.AttachTo(s);

			button.onclick +=
				delegate
				{
					InternalRaiseClick();
				};

			this.InternalVirtualSetContent =
				value =>
				{
					// what aboout? shadow dom ContentElement?
					// X:\jsc.svn\examples\javascript\Avalon\Test\TestShadowTextBox\TestShadowTextBox\ApplicationCanvas.cs

					button.innerText = "" + value;
				};
		}
Example #12
0
        private string CreateJSONData(IHTMLElement element)
        {
            StringBuilder sbJSON = new StringBuilder();

            string strLanguage = System.Enum.GetName(typeof(AppSettings.CodeLanguages), wscript.settings.CodeLanguage);

            sbJSON.Append("{");
            sbJSON.Append("\"CodeLanguage\": \"" + strLanguage + "\",");
            sbJSON.Append("\"tagName\": \"" + element.tagName+"\"");

            IHTMLDOMNode node = element as IHTMLDOMNode;
            foreach (IHTMLDOMAttribute attr in node.attributes)
            {
                if (attr.specified)
                {
                    sbJSON.AppendFormat(",\"{0}\": \"{1}\"", attr.nodeName, System.Uri.EscapeDataString(attr.nodeValue.ToString()));
                }
            }

            if (element.innerText != null)
            {
                sbJSON.Append(",\"innerText\": \"" + System.Uri.EscapeDataString(element.innerText) + "\"");
            }
                           
            sbJSON.Append("}");

            return sbJSON.ToString();
        }
Example #13
0
 public static bool ElementsAreEqual(IHTMLElement element1, IHTMLElement element2)
 {
     if (element1 == null || element2 == null)
         return false;
     else
         return element1.sourceIndex == element2.sourceIndex;
 }
		public UltraApplication(IHTMLElement e)
		{
			var Title = new IHTMLDiv
				{
					innerHTML = @"
<img border='0' src='http://www.w3schools.com/images/compatible_ie.gif' width='31' height='30' alt='Internet Explorer' title='Internet Explorer' />
<img border='0' src='http://www.w3schools.com/images/compatible_firefox.gif' width='31' height='30' alt='Firefox' title='Firefox' />
<img border='0' src='http://www.w3schools.com/images/compatible_opera.gif' width='28' height='30' alt='Opera' title='Opera' />
<img border='0' src='http://www.w3schools.com/images/compatible_chrome.gif' width='31' height='30' alt='Google Chrome' title='Google Chrome' />
<img border='0' src='http://www.w3schools.com/images/compatible_safari.gif' width='28' height='30' alt='Safari' title='Safari' />
"
				};


			var TitleLogo = new IHTMLImage("assets/ScriptCoreLib/jsc.png");
			var TitleText = new IHTMLSpan("UltraApplication");
			TitleText.style.fontFamily = ScriptCoreLib.JavaScript.DOM.IStyle.FontFamilyEnum.Verdana;
			TitleText.style.paddingLeft = "2em";
			TitleText.style.fontSize = "xx-large";
			TitleLogo.style.verticalAlign = "middle";


			Title.appendChild(TitleLogo);
			Title.appendChild(TitleText);

			Title.style.height = "128px";

			Title.AttachToDocument();
			Title.FadeIn(2500, 1000,
				delegate
				{
					1500.AtDelay(ContinueBuildingApplication);
				}
			);
		}
        public IHTMLElement getSelectedAnchor(IHTMLElement currentSelectedElement)
        {
            // Is a valid anchor element currently selected in the editor?
            IHTMLElement selectedAnchor = this.TryGetAnchorFromSelection();

            if (selectedAnchor == null)
            {
                // No achor is currently selected, but one might be contained within the currently
                // selected element:
                IHTMLElementCollection children = (IHTMLElementCollection)currentSelectedElement.children;
                foreach (IHTMLElement child in children)
                {
                    if (child.tagName == "A")
                    {
                        selectedAnchor = child;
                    }
                }

                // Otherwise . . .
                if (selectedAnchor == null)
                {
                    // . . . Create one:
                    selectedAnchor = this.CreateNewSelectedAnchor(currentSelectedElement);
                }
            }
            return selectedAnchor;
        }
Example #16
0
 public static TextBlock AsTextBlock(IHTMLElement e) {
     string txt = e.innerText;
     if ( (txt == null) || (txt.Length==0)) {
         return null;
     }
     return new TextBlock(e, txt);
 }
            public static List<GetPositionData> Of(IHTMLElement e)
            {
                var a = new List<GetPositionData>();

                var x = 0;
                var y = 0;

                while ((INode)e.parentNode != Native.Document)
                {
                    x += e.offsetLeft;
                    y += e.offsetTop;

                    a.Add(
                        new GetPositionData
                        {
                            Element = e,
                            X = x,
                            Y = y
                        }
                    );

                    e = (IHTMLElement)e.parentNode;
                }

                return a;
            }
Example #18
0
        public SoundTest(IHTMLElement e)
        //: base(e)
        {
            Native.Document.body.appendChild(Control);



            Control.style.color = Color.Red;

            Control.onmouseup += delegate(IEvent ev)
            {
                var w = new System.Text.StringBuilder();

                w.AppendLine("mousebutton: " + ev.MouseButton);

                Native.Window.alert(w.ToString());

                Native.PlaySound("assets/CardGames/sounds/hint.wav");


            };



        }
Example #19
0
 public static ImageElement AsImageElement(IHTMLElement e) {
     if ( e is  HTMLImgClass ) {
         return new ImageElement(e);
     } else {
         return null;
     }
 }
Example #20
0
 public void SetElement(IHTMLElement ele)
 {
     if (this._element != ele)
     {
         this._element = ele;
         this._isClick = false;
         this._couldClick = false;
         HTMLAnchorEvents2_Event event2 = ele as HTMLAnchorEvents2_Event;
         if (event2 != null)
         {
             this._couldClick = true;
             event2.onclick += (new HTMLAnchorEvents2_onclickEventHandler(this.HtmlElement1_Click));
         }
         else
         {
             HTMLInputTextElementEvents2_Event event3 = ele as HTMLInputTextElementEvents2_Event;
             if (event3 != null)
             {
                 this._couldClick = true;
                 event3.onclick += (new HTMLInputTextElementEvents2_onclickEventHandler(this.HtmlElement1_Click));
             }
             else
             {
                 HTMLButtonElementEvents2_Event event4 = ele as HTMLButtonElementEvents2_Event;
                 if (event4 != null)
                 {
                     this._couldClick = true;
                     event4.onclick += (new HTMLButtonElementEvents2_onclickEventHandler(this.HtmlElement1_Click));
                 }
                 else
                 {
                     HTMLControlElementEvents2_Event event5 = ele as HTMLControlElementEvents2_Event;
                     if (event5 != null)
                     {
                         this._couldClick = true;
                         event5.onclick += (new HTMLControlElementEvents2_onclickEventHandler(this.HtmlElement1_Click));
                     }
                     else
                     {
                         HTMLImgEvents2_Event event6 = ele as HTMLImgEvents2_Event;
                         if (event6 != null)
                         {
                             this._couldClick = true;
                             event6.onclick += (new HTMLImgEvents2_onclickEventHandler(this.HtmlElement1_Click));
                         }
                         else
                         {
                             HTMLElementEvents2_Event event7 = ele as HTMLElementEvents2_Event;
                             if (event7 != null)
                             {
                                 this._couldClick = true;
                                 event7.onclick += (new HTMLElementEvents2_onclickEventHandler(this.HtmlElement1_Click));
                             }
                         }
                     }
                 }
             }
         }
     }
 }
		public UltraApplication(IHTMLElement e)
		{
			new IHTMLDiv { innerHTML = "Hello world" }.AttachToDocument();

			var GetTime = new IHTMLButton { innerText = "GetTime" }.AttachToDocument();

			GetTime.onclick +=
				delegate
				{
					new AlphaWebService().GetTime("[client time]: " + DateTime.Now + " [server time]",
						x =>
						{
							new IHTMLDiv { innerText = x }.AttachToDocument();
						}
					);
				};

			var url = new IHTMLInput(ScriptCoreLib.Shared.HTMLInputTypeEnum.text, "http://example.com");

			url.AttachToDocument();

			
			var DownloadData = new IHTMLButton { innerText = "DownloadData" }.AttachToDocument();

			DownloadData.onclick +=
				delegate
				{
					new AlphaWebService().DownloadData(url.value,
						x =>
						{
							new IHTMLPre { innerText = url.value + Environment.NewLine + Environment.NewLine + x }.AttachToDocument();
						}
					);
				};
		}
        public MineSweeperGame(MineSweeperSettings _Data = null, IHTMLElement _Owner = null)
        {
            this.Data = _Data;

            if (this.Data == null)
                this.Data = DefaultData;

            var Settings = new
            {
                X = this.Data.X.ToInt32(8),
                Y = this.Data.Y.ToInt32(8),
                Mines = this.Data.Mines.ToDouble(0.2)
            };


            Panel = new MineSweeperPanel(
                Settings.X,
                Settings.Y,
                Settings.Mines,
                new Assets()
            );

            if (_Owner == null)
                Panel.Control.AttachToDocument();
            else
                _Owner.replaceWith(Panel.Control);
        }
Example #23
0
 public static ForeignFrame AsForeignFrame(IHTMLElement e) {
     if ( (e is IHTMLIFrameElement) || (e is IHTMLFrameElement) ) {
         // Notice: Only Foreign frame element should be passed to this method.
         return new ForeignFrame(e);
     } 
     return null;
 }
 /// <summary>
 /// Removes node element
 /// If RemoveAllChildren == true, Removes this element and all it's children from the document
 /// else it just strips this element but does not remove its children
 /// E.g.  "<BIG><b>Hello World</b></BIG>"  ---> strip BIG tag --> "<b>Hello World</b>"
 /// </summary>
 /// <param name="elem">element to remove</param>
 /// <param name="removeAllChildren"></param>
 public static IHTMLDOMNode RemoveNode(IHTMLElement elem, bool removeAllChildren)
 {
     var node = elem as IHTMLDOMNode;
     if (!node.IsNull())
         return node.removeNode(removeAllChildren);
     return null;
 }
		// should/could the concepts be bound automatically to html pages?
		public static ApplyToggleConceptTuple ApplyToggleConcept(
			this IHTMLElement Content,
			IHTMLElement HideContent,
			IHTMLElement ShowContent
			)
		{
			var t = new ApplyToggleConceptTuple
			{
				Show = delegate
				{
					Content.Show();
					HideContent.Show();
					ShowContent.Hide();
				},

				Hide = delegate
				{
					Content.Hide();
					HideContent.Hide();
					ShowContent.Show();
				}
			};

			HideContent.onclick += eee => { eee.preventDefault(); t.Hide(); };
			ShowContent.onclick += eee => { eee.preventDefault(); t.Show(); };

			t.Show();

			return t;
		}
        static bool ShouldVisitParent(IHTMLElement e)
        {
            if (e.parentNode == null)
                return false;

            return e.parentNode != Native.Document;
        }
Example #27
0
 /// <summary>
 /// Get a new IElement from a base IHTMLElement.
 /// </summary>
 /// <param name="ihe">Base IHTMLElement</param>
 /// <returns>An implementation of IElement.</returns>
 internal static IElement GetIElementFromBase(IHTMLElement ihe)
 {
     return GetIElementFromHandlers(
         Factories.ElementActionHandlerFactory.GetActionHandler(ihe),
         Factories.ElementDescendantHandlerFactory.GetDescendantHandler(ihe)
     );
 }
        public static IHTMLInput AttachToWithLabel(this IHTMLInput e, string label, IHTMLElement c)
        {
            new IHTMLDiv(
                 new IHTMLLabel(label, e), e
             ).AttachTo(c);

            return e;
        }
        private void AddSaveButton(IHTMLElement C, Action<ISaveAction> y)
        {
            //var ss = new SaveActionSprite();

            //ss.AttachSpriteTo(C);

            //ss.WhenReady(y);
        }
 /// <summary>
 /// Initializes a new instance of the NewImageInfo class.
 /// </summary>
 /// <param name="imageInfo">Information about the image.</param>
 /// <param name="element">A reference to the image's html element.</param>
 /// <param name="initialSize">The size at which this image should initially appear.</param>
 /// <param name="attachedBehavior">A reference to the behavior that has been manually attached to this image.</param>
 public NewImageInfo(ImagePropertiesInfo imageInfo, IHTMLElement element, Size initialSize, DisabledImageElementBehavior attachedBehavior)
 {
     this.ImageInfo = imageInfo;
     this.Element = element;
     this.InitialSize = initialSize;
     this.DisabledImageBehavior = attachedBehavior;
     this.Remove = false;
 }
Example #31
0
 public static bool IsOrderedListElement(IHTMLElement e)
 {
     return(e.tagName.Equals("OL"));
 }
Example #32
0
 public ElementEqualsFilter(IHTMLElement e)
 {
     _element = e;
 }
Example #33
0
        //async Task __buttryfly()
        //{
        //    //Task.Factory.
        //}

        //async
        void Spawn(IHTMLElement e)
        {
            Native.Document.body.style.margin   = "0px";
            Native.Document.body.style.padding  = "0px";
            Native.Document.body.style.overflow = IStyle.OverflowEnum.hidden;

            e.style.position = IStyle.PositionEnum.absolute;
            e.style.left     = "0px";
            e.style.top      = "0px";
            e.style.right    = "0px";
            e.style.bottom   = "0px";

            e.style.backgroundColor = Color.FromRGB(209, 245, 245);

            IHTMLElement loading = new IHTMLElement(IHTMLElement.HTMLElementEnum.code, "loading...");

            loading.style.SetLocation(64, 64, 200, 64);

            e.appendChild(loading);

            //await __buttryfly();

            new global::ButterFlyWithInteractiveInt32Offset.HTML.Images.FromAssets.buttryfly().InvokeOnComplete(
                img =>
            {
                loading.FadeOut();

                try
                {
                    //IStyleSheet.Default.AddRule("*", "cursor: none, url('" + new global::ButterFlyWithInteractiveInt32Offset.HTML.Images.FromAssets.nocursor().src + "'), auto;", 0);
                    //IStyleSheet.Default.AddRule("*", "cursor: none;", 0);
                }
                catch (Exception exc)
                {
                    new IHTMLElement(IHTMLElement.HTMLElementEnum.pre, exc.Message).AttachToDocument();
                }


                e.style.backgroundImage  = "url(" + img.src + ")";
                e.style.backgroundRepeat = "no-repeat";



                e.DisableContextMenu();


                var x = 0;
                var y = 0;


                var overlay          = new IHTMLDiv();
                overlay.style.border = "1px solid red";
                overlay.style.SetSize(64, 64);
                overlay.AttachToDocument();

                Native.window.onframe +=
                    delegate
                {
                    e.style.backgroundPosition = x + "px " + y + "px";

                    overlay.style.SetLocation(
                        // how does this work with the background compiler?
                        // once browser clicks save, visual studio asks if
                        // to accept, and bacground compiler
                        // starts a new compilation
                        // so, the running app could first be able
                        // to inspect, whats new?
                        // and if only the same constant was changed,
                        // it can be discarded. same with comments.
                        x + 67.ToInteractiveInt32Form(),
                        y + 2.ToInteractiveInt32Form()
                        );
                };

                e.onmousemove +=
                    delegate(IEvent i)
                {
                    #region where is the cursor?
                    if (Native.Document.pointerLockElement == e)
                    {
                        x += i.movementX;
                        y += i.movementY;
                    }
                    else
                    {
                        x = i.CursorX;
                        y = i.CursorY;
                    }

                    if (x < -img.width / 2)
                    {
                        x += Native.window.Width;
                    }

                    if (y < -img.height / 2)
                    {
                        y += Native.window.Height;
                    }

                    x = x % Native.window.Width;
                    y = y % Native.window.Height;
                    #endregion
                };

                e.onclick +=
                    delegate
                {
                    e.requestPointerLock();
                };
            });
        }
Example #34
0
        private async void ParsingTables(string o)
        {
            tb.ShowBalloonTip($"讀取完成 [{current_op?.UID}]", "開始解析與寫入資料庫", BalloonIcon.Info);
            log.Info($"[Info] all HTML loaded into memory. start to analyze. [{current_op?.UID}]");

            // Count = 0 代表最後一個 tab
            // 20200504 這裡一個BUG, 漏了把F_DATA_Loadcompleted刪掉,以至於不斷重複多次. ******

            /// 確定是最後一個tab這段程式到此結束
            /// 4. Parsing & Saving to SQL: async
            ///     4-1. 多工同時處理, 快速
            ///     4-2. 依照欄位資料/位置 Parsing
            ///     4-3. 存入SQL
            ///     4-4. 製作Query
            /// 查核機制?
            log.Debug($"[Start] async process, {current_op?.UID}");
            List <Response_DataModel> rds = await VPN_Dictionary.RunWriteSQL_Async(ListRetrieved);

            log.Debug($"[End] async process, {current_op?.UID}");

            /// 1. 讀取特殊註記, 如果有的話
            ///    這是在ContentPlaceHolder1_tab02
            ///    是個table
            // 每當刷新後都要重新讀一次
            // d 是parent HTML document
            HTMLDocument d = (HTMLDocument)g.Document;

            IHTMLElement Special_remark  = d?.getElementById("ContentPlaceHolder1_tab02");
            string       _special_remark = Special_remark?.innerText;

            // 製作紀錄by rd
            try
            {
                short?med_N = (short?)(from p1 in rds
                                       where p1.SQL_Tablename == SQLTableName.Medicine
                                       select p1.Count).Sum(),
                     lab_N = (short?)(from p1 in rds
                                      where p1.SQL_Tablename == SQLTableName.Laboratory
                                      select p1.Count).Sum(),
                     schedule_N = (short?)(from p1 in rds
                                           where p1.SQL_Tablename == SQLTableName.Schedule_report
                                           select p1.Count).Sum(),
                     op_N = (short?)(from p1 in rds
                                     where p1.SQL_Tablename == SQLTableName.Operations
                                     select p1.Count).Sum(),
                     dental_N = (short?)(from p1 in rds
                                         where p1.SQL_Tablename == SQLTableName.Dental
                                         select p1.Count).Sum(),
                     allergy_N = (short?)(from p1 in rds
                                          where p1.SQL_Tablename == SQLTableName.Allergy
                                          select p1.Count).Sum(),
                     discharge_N = (short?)(from p1 in rds
                                            where p1.SQL_Tablename == SQLTableName.Discharge
                                            select p1.Count).Sum(),
                     rehab_N = (short?)(from p1 in rds
                                        where p1.SQL_Tablename == SQLTableName.Rehabilitation
                                        select p1.Count).Sum(),
                     tcm_N = (short?)(from p1 in rds
                                      where p1.SQL_Tablename == SQLTableName.TraditionalChineseMedicine_detail
                                      select p1.Count).Sum();
                Com_clDataContext dc = new Com_clDataContext();
                tbl_Query2        q  = new tbl_Query2()
                {
                    uid    = ListRetrieved.First().UID,
                    QDATE  = ListRetrieved.First().QDate,
                    EDATE  = DateTime.Now,
                    remark = _special_remark
                };
                q.cloudmed_N  = med_N;
                q.cloudlab_N  = lab_N;
                q.schedule_N  = schedule_N;
                q.op_N        = op_N;
                q.dental_N    = dental_N;
                q.allergy_N   = allergy_N;
                q.discharge_N = discharge_N;
                q.rehab_N     = rehab_N;
                q.tcm_N       = tcm_N;
                dc.tbl_Query2.InsertOnSubmit(q);
                dc.SubmitChanges();
                log.Info($"[Final Step]Successfully write into tbl_Query2. From: {ListRetrieved.First().UID}, [{ListRetrieved.First().QDate}]");
                tb.ShowBalloonTip($"寫入完成 [{current_op?.UID}]", "已寫入資料庫", BalloonIcon.Info);
            }
            catch (Exception ex)
            {
                log.Error($"[Final Step]Failed to write into tbl_Querry2. From:  {ListRetrieved.First().UID}, [{ListRetrieved.First().QDate}] Error: {ex.Message}");
            }

            // 更新顯示資料
            string tempSTR = s.m.Label1.Text;

            s.m.Label1.Text = string.Empty;
            s.m.Label1.Text = tempSTR;
            s.m.Web_refresh();

            // activate hotkeys 4
            Activate_Hotkeys();

            log.Debug(o);
            log.Info("===========================================================================");
            log.Info($" ");
        }
Example #35
0
 public EqualElementFilter(IHTMLElement element)
 {
     _element = element;
 }
Example #36
0
 public bool Filter(IHTMLElement e)
 {
     return((e as IHTMLControlElement) != null);
 }
Example #37
0
 public bool Filter(IHTMLElement e)
 {
     return(e.tagName.Equals(_name, StringComparison.OrdinalIgnoreCase));
 }
Example #38
0
 public static bool IsTableCellElement(IHTMLElement e)
 {
     return(e is IHTMLTableCell);
 }
Example #39
0
 public static bool IsBlockQuoteElement(IHTMLElement e)
 {
     return(e.tagName.ToUpperInvariant() == "BLOCKQUOTE");
 }
Example #40
0
 public static bool IsBlockOrTableCellOrBodyElement(IHTMLElement e)
 {
     return(((BlockTagNames[e.tagName] != null) || IsTableCellElement(e)) || e is IHTMLBodyElement);
 }
Example #41
0
 public static bool IsBlockOrTableElement(IHTMLElement e)
 {
     return(IsBlockElement(e) || IsTableElement(e));
 }
Example #42
0
 /// <summary>
 /// Returns true if this element is the body element.
 /// </summary>
 /// <param name="e"></param>
 /// <returns></returns>
 public static bool IsBodyElement(IHTMLElement e)
 {
     return((e as IHTMLBodyElement) != null);
 }
Example #43
0
            public bool Filter(IHTMLElement e)
            {
                string attributeName = e.getAttribute(_attributeName, 2) as string;

                return(!String.IsNullOrEmpty(attributeName));
            }
Example #44
0
 public static bool IsImageElement(IHTMLElement e)
 {
     return(e.tagName.Equals("IMG"));
 }
Example #45
0
 /// <summary>
 /// Returns true if the specified element triggers something to be visible in the document
 /// when it contains no text.
 /// </summary>
 /// <param name="e"></param>
 /// <returns></returns>
 public static bool IsVisibleEmptyElement(IHTMLElement e)
 {
     return(e.tagName.Equals("HR") || e.tagName.Equals("IMG") || e.tagName.Equals("EMBED") ||
            e.tagName.Equals("OBJECT") || IsBlockElement(e) || IsTableElement(e));
 }
Example #46
0
 public bool Filter(IHTMLElement e)
 {
     return(e.className == _className);
 }
Example #47
0
 public bool Filter(IHTMLElement e)
 {
     return(HTMLElementHelper.ElementsAreEqual(e, _element));
 }
 public ToolTipDelayTimer(IHTMLElement delayElement, int delay)
 {
     DelayElement = delayElement;
     Interval     = delay;
 }
Example #49
0
 public static bool IsLTRElement(IHTMLElement e)
 {
     return(IsDirElement(e, "ltr"));
 }
Example #50
0
 public static bool IsRTLElement(IHTMLElement e)
 {
     return(IsDirElement(e, "rtl"));
 }
Example #51
0
 public bool Filter(IHTMLElement e)
 {
     return(true);
 }
Example #52
0
 public static bool IsListElement(IHTMLElement e)
 {
     return(IsUnorderedListElement(e) || IsOrderedListElement(e));
 }
 public NoBorderDecoratorSettings(IHTMLElement imgElement)
 {
     ImgElement = imgElement;
 }
Example #54
0
 public static bool IsListItemElement(IHTMLElement e)
 {
     return(e.tagName.Equals("LI"));
 }
Example #55
0
 public static IHTMLElementFilter CreateEqualFilter(IHTMLElement element)
 {
     return(new IHTMLElementFilter(new EqualElementFilter(element).Filter));
 }
Example #56
0
 public bool Filter(IHTMLElement e)
 {
     return(!String.IsNullOrEmpty((string)e.style.backgroundColor));
 }
Example #57
0
 public static bool IsAnchorElement(IHTMLElement e)
 {
     return(e.tagName.Equals("A"));
 }
Example #58
0
 public static bool IsParagraphElement(IHTMLElement e)
 {
     return(e.tagName.Equals("P"));
 }
Example #59
0
 public bool Filter(IHTMLElement e)
 {
     return(e.sourceIndex == _element.sourceIndex);
 }
 internal new static Element New(DomContainer domContainer, IHTMLElement element)
 {
     return(new Area(domContainer, (IHTMLAreaElement)element));
 }