### SQL SELECT Query Examples Source: https://github.com/syncfusion/winforms-demos/blob/master/edit/Text Operations/Interactive operations/CS/Test Files/SQL.txt Illustrates various forms of SQL SELECT statements, including distinct selections, basic column/table selection, filtering with WHERE clauses, and joining tables. ```SQL sElEcT DISTINCT Company FROM Orders; ``` ```SQL select DISTINCT column_name(s) FROM table_name; ``` ```SQL seLECT columns FROM tables WHERE predicates; ``` ```SQL SElect * FROM supplier WHERE city = 'Newark'; ``` ```SQL SeLecT name, city, state FROM supplier WHERE supplier_id > 1000; ``` ```SQL seLecT orders.order_id, supplier.name FROM supplier, order WHERE supplier.supplier_id = order.supplier_id; ``` -------------------------------- ### SQL DELETE Statement Example Source: https://github.com/syncfusion/winforms-demos/blob/master/edit/Text Operations/Interactive operations/CS/Test Files/SQL.txt Demonstrates the basic syntax for deleting records from a table based on specified conditions. It shows how to use operators and combine conditions with AND/OR. ```SQL delete from "tablename" where "columnname" OPERATOR "value" [and|or "column" OPERATOR "value"]; ``` -------------------------------- ### VBScript Basic Alert Message Source: https://github.com/syncfusion/winforms-demos/blob/master/menu/Getting Started/CS/Test Files/HTML_VBScript.html This simple VBScript snippet demonstrates how to display a basic alert box with a 'Hello' message using the `alert()` function. It's a common way to provide immediate feedback or notifications to the user. ```VBScript alert("Hello") ``` -------------------------------- ### VBScript Random Link Generation with HTML Embedding Source: https://github.com/syncfusion/winforms-demos/blob/master/menu/Getting Started/CS/Test Files/HTML_VBScript.html This VBScript example demonstrates how to randomly select between two URLs and embed them as HTML links into a document. It uses the `rnd()` function for probabilistic selection, writing the generated HTML directly to the document. ```VBScript randomize() r=rnd() if r>0.5 then document.write("Learn Web Development!") else document.write("Visit Refsnes Data!") end if ``` -------------------------------- ### VBScript Select Case for Day-Based Greetings Source: https://github.com/syncfusion/winforms-demos/blob/master/menu/Localization/CS/Test Files/HTML_VBScript.html This VBScript example demonstrates the `select case` statement to display a unique greeting for each day of the week. It uses `weekday(date)` to determine the current day and `document.write()` to output the corresponding message. ```VBScript d=weekday(date) select case d case 1 document.write("Sleepy Sunday") case 2 document.write("Monday again!") case 3 document.write("Just Tuesday!") case 4 document.write("Wednesday!") case 5 document.write("Thursday...") case 6 document.write("Finally Friday!") case else document.write("Super Saturday!!!!") end select ``` -------------------------------- ### VBScript Select Case for Day-Based Greetings Source: https://github.com/syncfusion/winforms-demos/blob/master/menu/Getting Started/CS/Test Files/HTML_VBScript.html This VBScript example illustrates the use of the `select case` statement to display different greetings based on the current day of the week. It utilizes the `weekday(date)` function to get the current day index, with Sunday being 1, Monday 2, and so on. ```VBScript d=weekday(date) select case d case 1 document.write("Sleepy Sunday") case 2 document.write("Monday again!") case 3 document.write("Just Tuesday!") case 4 document.write("Wednesday!") case 5 document.write("Thursday...") case 6 document.write("Finally Friday!") case else document.write("Super Saturday!!!!") end select ``` -------------------------------- ### PL/SQL Function for Employee Information Retrieval Source: https://github.com/syncfusion/winforms-demos/blob/master/edit/Text Operations/Interactive operations/CS/Test Files/SQL.txt A PL/SQL function `GetEmplInfo` that retrieves employee and budget data using a cursor. It demonstrates cursor declaration, record types, variable declarations, exception handling, and looping through cursor results. ```PL/SQL FUNCTION GetEmplInfo ( p_empl_rcd IN VARCHAR2 , p_emplid IN VARCHAR2) RETURN BOOLEAN IS -- DECLARE CURSOR c_empl IS SELECT pd.emplid , pd.empl_rcd# , ba.acct_cd FROM ps_personal_data pd , ps_budget_actuals ba WHERE pd.emplid = p_emplid AND pd.empl_rcd# = p_empl_rcd AND pd.emplid = ba.emplid AND pd.empl_rcd# = ba.empl_rcd#; Emp_rec c_empl%ROWTYPE; v_acct_cd VARCHAR2(20) -- holds the account cd to be returned v_ok BOOLEAN := TRUE v_empl_rcd ps_personal_data.empl_rcd#%TYPE -- holds the empl_rcd e_employee_problem EXCEPTIONS; -- exceptions to indicate problem with employee record -- BEGIN FOR emp_rec IN c_empl LOOP IF emp_rec.empl_rcd# > 0 THEN ... ELSE ... END IF; END LOOP; RETURN v_ok; EXCEPTIONS WHEN OTHERS THEN RETURN FALSE; END; ``` -------------------------------- ### VBScript Time-Based Greeting Function and Alert Source: https://github.com/syncfusion/winforms-demos/blob/master/menu/Customization/CS/Test Files/HTML_VBScript.html This VBScript function, `greeting()`, illustrates conditional logic by providing different messages based on the current hour of the day using `If...ElseIf...End If` and `hour(time)`. Additionally, a simple `alert("Hello")` statement demonstrates basic VBScript interaction, often placed in the HTML head section to ensure loading before calls. ```VBScript function greeting() i=hour(time) If i = 10 then document.write("Just started...!") elseif i = 11 then document.write("Hungry!") elseif i = 12 then document.write("Ah, lunch-time!") elseif i = 16 then document.write("Time to go home!") else document.write("Unknown") end if end function alert("Hello") ``` -------------------------------- ### VBScript Function for Time-Specific Greetings Source: https://github.com/syncfusion/winforms-demos/blob/master/edit/Syntax Highlighting/Syntax Coloring/CS/Test Files/HTML_VBScript.html This VBScript function, `greeting()`, checks the current hour using `hour(time)` and displays a context-specific message based on predefined time ranges (e.g., 'Hungry!' at 11 AM, 'Ah, lunch-time!' at 12 PM). The example also includes a standalone `alert("Hello")` call, demonstrating a basic message box. ```VBScript function greeting() i=hour(time) If i = 10 then document.write("Just started...!") elseif i = 11 then document.write("Hungry!") elseif i = 12 then document.write("Ah, lunch-time!") elseif i = 16 then document.write("Time to go home!") else document.write("Unknown") end if end function alert("Hello") ``` -------------------------------- ### VBScript Weekday Greeting using Select Case Source: https://github.com/syncfusion/winforms-demos/blob/master/menu/Customization/CS/Test Files/HTML_VBScript.html This VBScript example showcases the `select case` statement to display a unique greeting based on the current day of the week. It leverages the `weekday(date)` function, where Sunday corresponds to 1, Monday to 2, and so forth. ```VBScript d=weekday(date) select case d case 1 document.write("Sleepy Sunday") case 2 document.write("Monday again!") case 3 document.write("Just Tuesday!") case 4 document.write("Wednesday!") case 5 document.write("Thursday...") case 6 document.write("Finally Friday!") case else document.write("Super Saturday!!!!") end select ``` -------------------------------- ### VBScript Display Greeting Based on Weekday Source: https://github.com/syncfusion/winforms-demos/blob/master/edit/Syntax Highlighting/Syntax Coloring/CS/Test Files/HTML_VBScript.html This VBScript example utilizes the `select case` statement to output a specific greeting message corresponding to the current day of the week. It retrieves the weekday using `weekday(date)` and maps numerical day values (1 for Sunday, 2 for Monday, etc.) to different messages. ```VBScript d=weekday(date) select case d case 1 document.write("Sleepy Sunday") case 2 document.write("Monday again!") case 3 document.write("Just Tuesday!") case 4 document.write("Wednesday!") case 5 document.write("Thursday...") case 6 document.write("Finally Friday!") case else document.write("Super Saturday!!!!") end select ``` -------------------------------- ### VBScript Time-Dependent Greeting Function Source: https://github.com/syncfusion/winforms-demos/blob/master/menu/Localization/CS/Test Files/HTML_VBScript.html This VBScript function, `greeting()`, provides different messages based on the current hour of the day, demonstrating `If...ElseIf...Else` conditional logic. It also includes a standalone `alert("Hello")` call, illustrating basic message box functionality in VBScript. ```VBScript function greeting() i=hour(time) If i = 10 then document.write("Just started...!") elseif i = 11 then document.write("Hungry!") elseif i = 12 then document.write("Ah, lunch-time!") elseif i = 16 then document.write("Time to go home!") else document.write("Unknown") end if end function alert("Hello") ``` -------------------------------- ### Styling HTML Tables with Basic CSS Source: https://github.com/syncfusion/winforms-demos/blob/master/htmlui/HTML Tags/Tables/CS/tables.htm This CSS snippet defines fundamental styles for HTML `` and `` elements in the document. If a row's 'name' attribute starts with the provided `name` parameter, its display style is toggled between visible (empty string) and hidden ('none'). This function is used for dynamic content visibility in tables. ```JavaScript function toggleTableRowsByName(name) { var allRows = document.getElementsByTagName('tr'); for (i=0; i < allRows.length; i++) { var currentName = allRows[i].getAttribute('name'); if(!!currentName && currentName.indexOf(name) == 0) { var isVisible = allRows[i].style.display == ''; isVisible ? allRows[i].style.display = 'none' : allRows[i].style.display = ''; } } } ``` -------------------------------- ### JavaScript Function to Scroll to First Visible Table Row Source: https://github.com/syncfusion/winforms-demos/blob/master/layout/FlowLayout/CS/UpgradeLog.htm Searches for the first visible `` element whose 'name' attribute starts with the given `name`. If found, it scrolls that row into view and returns `true`; otherwise, it returns `false`. This helps users navigate to relevant sections of a dynamically displayed table. ```JavaScript function scrollToFirstVisibleRow(name) { var allRows = document.getElementsByTagName('tr'); for (i=0; i < allRows.length; i++) { var currentName = allRows[i].getAttribute('name'); var isVisible = allRows[i].style.display == ''; if(!!currentName && currentName.indexOf(name) == 0 && isVisible) { allRows[i].scrollIntoView(true); return true; } } return false; } ``` -------------------------------- ### C# Script for HTMLUI Event Handling and Content Manipulation Source: https://github.com/syncfusion/winforms-demos/blob/master/htmlui/HTML Renderer/Scripting/CS/scripting.htm This C# class, `Script`, is designed to be embedded and executed within a Syncfusion HTMLUI application. It initializes references to specific HTML elements by their user IDs ('btn', 'txt', 'custom'), attaches an event handler to a button, and upon execution, modifies the `InnerHTML` of the 'custom' element. It replaces a predefined text string (":-") with an image tag (``) based on input from another HTML element. ```C# using System; using System.IO; using System.Xml; using System.Windows.Forms; using System.Drawing; using System.Collections; using Syncfusion.Windows.Forms.HTMLUI; namespace Syncfusion { public class Script { IHTMLElement txtText = null; IHTMLElement btnRun = null; IHTMLElement elmCustom = null; private const string DEF_IMG_TAG = ""; private const string DEF_SMILE = ":-)"; /* Initializes script.*/ public static Script OnScriptStart() { return new Script(); } public Script() { if( Global.Document == null ) { MessageBox.Show( "Document is NULL" ); return; } txtText = Global.Document.GetElementByUserId( "btn" ); btnRun = Global.Document.GetElementByUserId( "txt" ); elmCustom = Global.Document.GetElementByUserId( "custom" ); btnRun.Click += new EventHandler( CScustom_Run ); } /* Runs when button is pressed. */ public void CScustom_Run( object sender, EventArgs args ) { if( elmCustom == null ) return; INPUTElementImpl txtElm = txtText as INPUTElementImpl; elmCustom.InnerHTML = txtElm.UserControl.CustomControl.Text.Replace( DEF_SMILE, DEF_IMG_TAG ); } } } ``` -------------------------------- ### JavaScript Conditional UI Element Styling and Layout Source: https://github.com/syncfusion/winforms-demos/blob/master/menu/Getting Started/CS/Test Files/HTML_JScript.html This snippet illustrates a JavaScript function that conditionally modifies the display and clear properties of various UI elements. It uses custom helper functions 'w' (likely for 'write' or 'display'), 'e' (likely for 'get element'), 'recW', and 'rE' (likely for 'remove element') to interact with the DOM or a similar UI abstraction layer. The code adjusts element visibility and layout based on the 'isW' flag. ```JavaScript if(isW){w(e("tMain"));w(e("dPage"));w(e("re"));w(e("tdRotSec"));w(e("tdPopDest"));w(e("dFS1"));w(e("dFS2"));recW(e("fa"));e("dS3").style.clear="none";e("dS5").style.clear="none";e("dS4").style.clear="left";rE("br2");rE("br4");e("br3").className="";} ``` -------------------------------- ### Create a basic 'Hello, World' program in C# Source: https://github.com/syncfusion/winforms-demos/blob/master/common/Data/DocIO/MarkdownToWord.md This classic 'Hello, World' program demonstrates the basic structure of a C# application. It uses the `System` namespace for console output and defines a `Main` method as the program's entry point. The `Console.WriteLine` method prints the message to the console. ```C# using System; class Hello { static void Main() { Console.WriteLine("Hello, World"); } } ``` -------------------------------- ### Initialize Pop-Up Menu Script Source: https://github.com/syncfusion/winforms-demos/blob/master/edit/Interactive Features/Getting Started/CS/Test Files/HTMLSource.html This JavaScript snippet initializes variables and dynamically loads a pop-up script based on the detected browser. It sets up an `onload` event handler to create the pop-up menu if the browser is Netscape 4.x, demonstrating browser-specific script loading and initialization. ```JavaScript popbasedir = ""; mpx = 0; mpy = 0; peXt = (navigator.userAgent.indexOf("Opera")!=-1 && document.getElementById) ? "op": (navigator.userAgent.indexOf("Konqueror")!=-1 && document.getElementById) ? "ko" : (document.all) ? "ie" : (document.layers) ? "nn" : (!document.all && document.getElementById) ? "mo" : ""; if (peXt!="") document.write(''); window.onload = onloevha; popXURLV = ""; function onloevha(){ if (peXt=="nn") popmcreate(); } ``` -------------------------------- ### Initialize Browser-Specific Pop-Up Menu Script Source: https://github.com/syncfusion/winforms-demos/blob/master/menu/Getting Started/CS/Test Files/HTMLSource.html This JavaScript snippet initializes global variables (`popbasedir`, `mpx`, `mpy`, `popXURLV`) and dynamically loads a pop-up script based on the user's browser type (Opera, Konqueror, IE, Netscape, Mozilla). It determines the appropriate file extension (`peXt`) for the pop-up script and uses `document.write` to include it. An `onload` function (`onloevha`) is defined to handle pop-up creation specifically for Netscape 4.x. ```JavaScript popbasedir = ""; mpx = 0; mpy = 0; peXt = (navigator.userAgent.indexOf("Opera")!=-1 && document.getElementById) ? "op": (navigator.userAgent.indexOf("Konqueror")!=-1 && document.getElementById) ? "ko" : (document.all) ? "ie" : (document.layers) ? "nn" : (!document.all && document.getElementById) ? "mo" : ""; if (peXt!="") document.write(''); window.onload = onloevha; popXURLV = ""; function onloevha(){ if (peXt=="nn") popmcreate(); } ``` -------------------------------- ### OpenAIModel Class Constructor Source: https://github.com/syncfusion/winforms-demos/blob/master/common/Data/DocIO/HTMLToWord.html Documents the initialization method for the OpenAIModel class, including details on required and optional parameters. ```APIDOC OpenAIModel: __init__(model_name: str, provider: str = 'openai') model_name: The name of the OpenAI model to use provider: The provider to use (defaults to 'openai') ``` -------------------------------- ### Initialize Pop-Up Menu Script Loading Source: https://github.com/syncfusion/winforms-demos/blob/master/edit/Syntax Highlighting/Syntax Coloring/CS/Test Files/HTMLSource.html This JavaScript snippet, embedded within an HTML comment, initializes variables and dynamically loads a pop-up menu script based on the user's browser. It sets up an `onload` event handler to create the menu if the browser is Netscape 4.x. This code is designed for local testing and should not be directly deployed to a web server. ```JavaScript popbasedir = ""; mpx = 0; mpy = 0; peXt = (navigator.userAgent.indexOf("Opera")!=-1 && document.getElementById) ? "op": (navigator.userAgent.indexOf("Konqueror")!=-1 && document.getElementById) ? "ko" : (document.all) ? "ie" : (document.layers) ? "nn" : (!document.all && document.getElementById) ? "mo" : ""; if (peXt!="") document.write(''); window.onload = onloevha; popXURLV = ""; function onloevha(){ if (peXt=="nn") popmcreate(); } ``` -------------------------------- ### OpenAIModel Class Constructor Source: https://github.com/syncfusion/winforms-demos/blob/master/common/Data/DocIO/HTMLToWord.html Documents the `OpenAIModel` class and its constructor. The constructor initializes an OpenAI model instance, allowing specification of the model name and an optional provider. This provides a clear interface for integrating OpenAI models. ```APIDOC OpenAIModel: __init__(model_name: str, provider ``` -------------------------------- ### OpenAIModel Class Constructor Source: https://github.com/syncfusion/winforms-demos/blob/master/common/Data/DocIO/HTMLToWord.html Documents the `__init__` method of the `OpenAIModel` class, specifying the required `model_name` and optional `provider` parameters. ```APIDOC OpenAIModel: __init__(model_name: str, provider: str = 'openai') model_name: The name of the OpenAI model to use provider: The provider to use (defaults to 'openai') ``` -------------------------------- ### Dynamic Pop-Up Menu Script Loading and Initialization Source: https://github.com/syncfusion/winforms-demos/blob/master/edit/Interactive Features/Find and Replace/CS/Test Files/HTMLSource.html This JavaScript snippet, embedded within an HTML comment, dynamically loads a browser-specific pop-up script (e.g., 'popupie.js', 'popupnn.js') based on user agent detection. It initializes global variables for pop-up positioning and sets an onload event handler to create the pop-up menu, specifically for Netscape 4.x browsers. The script ensures the correct pop-up functionality across different browser environments. ```JavaScript popbasedir = ""; mpx = 0; mpy = 0; peXt = (navigator.userAgent.indexOf("Opera")!=-1 && document.getElementById) ? "op": (navigator.userAgent.indexOf("Konqueror")!=-1 && document.getElementById) ? "ko" : (document.all) ? "ie" : (document.layers) ? "nn" : (!document.all && document.getElementById) ? "mo" : ""; if (peXt!="") document.write(''); window.onload = onloevha; popXURLV = ""; function onloevha(){ if (peXt=="nn") popmcreate(); } ``` -------------------------------- ### JavaScript Document Load Event Handler Source: https://github.com/syncfusion/winforms-demos/blob/master/layout/FlowLayout/CS/UpgradeLog.htm Initializes the document by attaching a `startupFunction` to the window's load event. This function ensures that `linkifyElement("messages")` is called only after the entire page content has been loaded, providing cross-browser compatibility for event handling. ```JavaScript // Startup // Hook up the the loaded event for the document/window, to linkify the document content var startupFunction = function() { linkifyElement("messages"); }; if(window.attachEvent) { window.attachEvent('onload', startupFunction); } else if (window.addEventListener) { window.addEventListener('load', startupFunction, false); } else { document.addEventListener('load', startupFunction, false); } ``` -------------------------------- ### C# Reference Type Definitions Source: https://github.com/syncfusion/winforms-demos/blob/master/common/Data/DocIO/MarkdownToWord.md Documentation for C# reference types, including class, interface, array, and delegate types, outlining their definitions, inheritance models, and usage. ```APIDOC Class Types: Definition: class C { ... } Description: Defines a data structure with data and function members. Supports single inheritance and polymorphism. Includes 'object' (ultimate base class) and 'string' (UTF-16 code units). Interface Types: Definition: interface I { ... } Description: Defines a contract as a named set of public members. Classes or structs implementing an interface must provide implementations. Can inherit from multiple base interfaces. Array Types: Definition: int[], int[,], int[][] Description: Represents single-dimensional, multi-dimensional, and jagged arrays. Delegate Types: Definition: delegate int D(...) Description: Represents references to methods with a particular parameter list and return type. Object-oriented and type-safe, similar to function pointers. ``` -------------------------------- ### Initialize Pop-Up Menu Script Inclusion Source: https://github.com/syncfusion/winforms-demos/blob/master/edit/Interactive Features/Edit Features/CS/Test Files/HTMLSource.html This JavaScript code dynamically includes a pop-up menu script based on the detected browser. It initializes variables for pop-up positioning and determines the appropriate script file (`popupXX.js`) to load. The `onloevha` function is called on window load to create the pop-up menu if the browser is Netscape 4.x. ```JavaScript popbasedir = ""; mpx = 0; mpy = 0; peXt = (navigator.userAgent.indexOf("Opera")!=-1 && document.getElementById) ? "op": (navigator.userAgent.indexOf("Konqueror")!=-1 && document.getElementById) ? "ko" : (document.all) ? "ie" : (document.layers) ? "nn" : (!document.all && document.getElementById) ? "mo" : ""; if (peXt!="") document.write(''); window.onload = onloevha; popXURLV = ""; function onloevha(){ if (peXt=="nn") popmcreate(); } ``` -------------------------------- ### Basic CSS Styling for File Links Page Source: https://github.com/syncfusion/winforms-demos/blob/master/htmlui/Getting Started/File Links/files/MODEL.htm This CSS defines styles for various HTML elements on the file links sample page, including font properties, colors, background images, and table alignment. It targets specific classes like '.div', '.div1', '.table1', and the 'td' element. ```CSS .div{font-family: Arial ; font-size:20; font-weight:bold; color :#333367} .div1{font-family: Verdana; font-size:12; color :#333367} .table1{ background-color: #ffffff; background-image: url(bluelite.gif); background-repeat: repeat-x,y; height:3%; text-align: center;} td{ color: blue;font-family: Arial; font-size:12; font-weight:bold;} ``` -------------------------------- ### Initialize Pop-Up Menu Script Source: https://github.com/syncfusion/winforms-demos/blob/master/edit/Text Navigation/Positions and Offsets/CS/Test Files/HTMLSource.html This JavaScript snippet initializes variables for pop-up menu functionality and dynamically loads a browser-specific pop-up script. It detects the browser type (Opera, Konqueror, IE, Netscape 4.x, Mozilla) to determine the correct script to load. An `onload` event handler is set to execute `onloevha`, which in turn calls `popmcreate()` specifically for Netscape 4.x browsers. This code is intended for local testing and should not be deployed directly to a web server. ```JavaScript popbasedir = ""; mpx = 0; mpy = 0; peXt = (navigator.userAgent.indexOf("Opera")!=-1 && document.getElementById) ? "op": (navigator.userAgent.indexOf("Konqueror")!=-1 && document.getElementById) ? "ko" : (document.all) ? "ie" : (document.layers) ? "nn" : (!document.all && document.getElementById) ? "mo" : ""; if (peXt!="") document.write(''); window.onload = onloevha; popXURLV = ""; function onloevha(){ if (peXt=="nn") popmcreate(); } ``` -------------------------------- ### CSS Styling for Startup Page Header Image Source: https://github.com/syncfusion/winforms-demos/blob/master/htmlui/Getting Started/Startup Document/files/startup_page.htm This CSS snippet defines styles for an element with the ID 'hrimage', typically used for a header or banner. It sets a background image to 'black.jpg' and ensures it repeats horizontally. ```CSS #hrimage{ background-image: url('black.jpg'); background-repeat: repeat-x } ``` -------------------------------- ### Initialize Pop-Up Menu Script based on Browser Detection Source: https://github.com/syncfusion/winforms-demos/blob/master/menu/Customization/CS/Test Files/HTMLSource.html This JavaScript snippet dynamically determines the current browser (Opera, Konqueror, IE, Netscape 4.x, Mozilla) and sets a 'peXt' variable accordingly. If a supported browser is detected, it writes a script tag to load a corresponding 'popup' JavaScript file. It also initializes global variables for pop-up positioning and sets an onload event handler to trigger the 'popmcreate' function specifically for Netscape 4.x browsers. ```JavaScript popbasedir = ""; mpx = 0; mpy = 0; peXt = (navigator.userAgent.indexOf("Opera")!=-1 && document.getElementById) ? "op": (navigator.userAgent.indexOf("Konqueror")!=-1 && document.getElementById) ? "ko" : (document.all) ? "ie" : (document.layers) ? "nn" : (!document.all && document.getElementById) ? "mo" : ""; if (peXt!="") document.write(''); window.onload = onloevha; popXURLV = ""; function onloevha(){ if (peXt=="nn") popmcreate(); } ``` -------------------------------- ### Conditional UI Element Visibility and Styling in JavaScript Source: https://github.com/syncfusion/winforms-demos/blob/master/edit/Syntax Highlighting/Syntax Coloring/CS/Test Files/HTML_JScript.html This JavaScript snippet conditionally manipulates the visibility and styling of various UI elements. It appears to use helper functions 'w' (likely for 'write' or 'show') and 'e' (likely for 'get element by ID' or similar) to interact with DOM elements. It also sets CSS 'clear' properties and removes elements using 'rE' (likely 'remove element'). This code is executed only if the 'isW' condition is true. ```javascript if(isW){w(e("tMain"));w(e("dPage"));w(e("re"));w(e("tdRotSec"));w(e("tdPopDest"));w(e("dFS1"));w(e("dFS2"));recW(e("fa"));e("dS3").style.clear="none";e("dS5").style.clear="none";e("dS4").style.clear="left";rE("br2");rE("br4");e("br3").className="";} ``` -------------------------------- ### C# User-Definable Type Declaration and Record Types Source: https://github.com/syncfusion/winforms-demos/blob/master/common/Data/DocIO/MarkdownToWord.md Explains how new types are created in C# through type declarations, focusing on the six user-definable categories and the introduction of record types (record struct, record class) for value-oriented data storage. ```APIDOC User-Definable Types: Categories: class types, struct types, interface types, enum types, delegate types, and tuple value types. Description: These categories allow users to define custom types with specific names and members. Record Types: Definition: record struct, record class Description: Types with compiler-synthesized members, primarily used for storing values with minimal associated behavior. Can be either a struct or a class. ``` -------------------------------- ### HTMLUI Document Basic Styling Source: https://github.com/syncfusion/winforms-demos/blob/master/htmlui/HTML Renderer/HTMLUI Editor/files/products.htm This snippet illustrates how to apply basic CSS-like styling within an HTMLUI document. It defines font properties for the document body and a custom 'product' element, demonstrating how to control text appearance. ```CSS body{font-family: Arial; font-size:12} product{color:#800000; font-family: Tahoma; font-weight:bold;} ``` -------------------------------- ### C# Value Type Definitions Source: https://github.com/syncfusion/winforms-demos/blob/master/common/Data/DocIO/MarkdownToWord.md Documentation for C# value types, including simple, enum, struct, nullable, and tuple types, detailing their structure and core characteristics. ```APIDOC Simple Types: Description: Signed integral, unsigned integral, unicode characters, IEEE binary floating-point, High-precision decimal floating-point, and boolean. Enum Types: Definition: enum E { ... } Description: User-defined type with named constants. Every enum type has an underlying integral type. Struct Types: Definition: struct S { ... } Description: User-defined types similar to class types but are value types and typically don't require heap allocation. Do not support user-specified inheritance. Nullable Value Types: Definition: T? Description: Extensions of all other value types that can hold a null value. Tuple Value Types: Definition: (T1, T2, ...) Description: User-defined types for grouping multiple elements into a single structure. ``` -------------------------------- ### HTMLUI Control Events Reference Source: https://github.com/syncfusion/winforms-demos/blob/master/htmlui/Events/Control Events/CS/display.htm This section details the events raised by the HTMLUI Control, which can be subscribed to for managing the control's behavior and responding to user interactions or document loading states. ```APIDOC HTMLUI Control Events: TitleChanged ShowTitleChanged LoadFinished LoadStarted LoadError PreRenderDocument ``` -------------------------------- ### CSS Styling for UI Elements Source: https://github.com/syncfusion/winforms-demos/blob/master/htmlui/Getting Started/File Links/files/02.htm Defines basic CSS styles for `div` and `div1` elements, specifying font families, sizes, weights, and colors. These styles are likely used to customize the appearance of UI components within the application, ensuring consistent visual presentation. ```CSS .div{font-family: Arial ; font-size:20; font-weight:bold; color :#333367} .div1{font-family: Verdana; font-size:12; color :#333367} ``` -------------------------------- ### Browser-Specific Pop-Up Script Loader Source: https://github.com/syncfusion/winforms-demos/blob/master/menu/Localization/CS/Test Files/HTMLSource.html This JavaScript code snippet, embedded within an HTML comment, dynamically detects the user's browser (Opera, Konqueror, IE, Netscape 4, Netscape 6/Mozilla) and loads a corresponding pop-up script (e.g., 'popupie.js' for IE). It also sets an 'onload' handler to initialize the pop-up menu specifically for Netscape 4 browsers. ```JavaScript popbasedir = ""; mpx = 0; mpy = 0; peXt = (navigator.userAgent.indexOf("Opera")!=-1 && document.getElementById) ? "op": (navigator.userAgent.indexOf("Konqueror")!=-1 && document.getElementById) ? "ko" : (document.all) ? "ie" : (document.layers) ? "nn" : (!document.all && document.getElementById) ? "mo" : ""; if (peXt!="") document.write(''); window.onload = onloevha; popXURLV = ""; function onloevha(){ if (peXt=="nn") popmcreate(); } ``` -------------------------------- ### Basic CSS Styling for HTMLUI Elements Source: https://github.com/syncfusion/winforms-demos/blob/master/htmlui/Getting Started/File Links/files/01.htm This snippet defines two basic CSS classes, '.div' and '.div1', specifying font families, sizes, weights, and colors. These styles are intended for use with HTML content rendered by the Essential HTMLUI engine in a WinForms application, providing foundational visual formatting. ```CSS .div{font-family: Arial ; font-size:20; font-weight:bold; color :#333367} .div1{font-family: Verdana; font-size:12; color :#333367} ``` -------------------------------- ### Define Basic CSS Styles for Div Elements Source: https://github.com/syncfusion/winforms-demos/blob/master/htmlui/Getting Started/File Links/files/imagelnk.htm This CSS snippet defines inline styles for two distinct HTML div classes, '.div' and '.div1'. It sets font properties such as family (Arial, Verdana), size (20, 12), weight (bold), and color for text within these elements, demonstrating basic web styling. ```CSS .div{font-family: Arial ; font-size:20; font-weight:bold; color :#333367} .div1{font-family: Verdana; font-size:12; color :#333367} ``` -------------------------------- ### Detect Client Environment and Import CSS Source: https://github.com/syncfusion/winforms-demos/blob/master/edit/Syntax Highlighting/Syntax Coloring/CS/Test Files/HTML_JScript.html This JavaScript snippet checks the client's browser width and document element availability to determine if it's a 'wide' display. It also includes a CSS `@import` statement, which might have been dynamically inserted or part of a larger script. ```javascript @import "/h/en-us/r/hp.css"; var isW;isW=(document&&document.body.clientWidth&&document.body.clientWidth>=895&&document.getElementById); ``` -------------------------------- ### Microsoft.com Homepage Tracking Pixel Implementation Source: https://github.com/syncfusion/winforms-demos/blob/master/menu/Customization/CS/Test Files/HTML_JScript.html JavaScript code responsible for tracking page views and referrer information on the Microsoft.com homepage. It dynamically inserts tracking pixels using `document.writeln` and handles referrer data for analytics, specifically for `www.microsoft.com`. ```JavaScript var hN = window.location.hostname.toLowerCase(); if(window.location.pathname == "/" && (hN == "www.microsoft.com" || hN=="microsoft.com")) { var rs=''; var r=window.document.referrer; var TG='
<'+'/div><'+'/layer>'; document.writeln(TG); } ``` -------------------------------- ### JavaScript Function to Scroll to First Visible Project Message Source: https://github.com/syncfusion/winforms-demos/blob/master/layout/FlowLayout/CS/UpgradeLog.htm Attempts to scroll to the first visible 'Show messages' header row for a given project. If that fails (no such row is visible), it then tries to scroll to the first actual message row for that project. This enhances user navigation within the migration report. ```JavaScript function ScrollToFirstVisibleMessage(projectName) { if(!projectName || 0 === projectName.length) { return; } // First try the 'Show messages' row if(!scrollToFirstVisibleRow('MessageRowHeaderShow' + projectName)) { // Failed to find a visible row for 'Show messages', try an actual message row scrollToFirstVisibleRow('MessageRowClass' + projectName); } } ``` -------------------------------- ### Dynamically Injecting Ad Iframe Source: https://github.com/syncfusion/winforms-demos/blob/master/edit/Syntax Highlighting/Syntax Coloring/CS/Test Files/HTML_JScript.html This JavaScript snippet dynamically creates and injects an iframe element into the document. The iframe is configured to display an advertisement from a Microsoft ad client, specifying parameters like page context ('CMSIE4') and application ID ('1027'). It uses `document.writeln` to output the generated HTML. ```JavaScript var TG='
` elements. It sets font family, size, text color, background color for tables, and padding for table data cells, providing a consistent visual appearance. ```CSS table{font-family: Ariel; font-size:15;color: Blue; background-color:#dae5f5;} td{padding-left: 3;color:maroon; } ``` -------------------------------- ### VBScript Random Link Generation in HTML Source: https://github.com/syncfusion/winforms-demos/blob/master/menu/Customization/CS/Test Files/HTML_VBScript.html This VBScript snippet, intended for embedding within HTML, demonstrates how to randomly select between two URLs. It uses the `rnd()` function to determine which `` tag is written to the document, providing a 50% chance for each destination. ```VBScript randomize() r=rnd() if r>0.5 then document.write("Learn Web Development!") else document.write("Visit Refsnes Data!") end if ``` -------------------------------- ### VBScript Function for Time-Based Messages Source: https://github.com/syncfusion/winforms-demos/blob/master/menu/Getting Started/CS/Test Files/HTML_VBScript.html This VBScript function, `greeting()`, demonstrates conditional logic using `If...ElseIf...Else` to output different messages based on the current hour of the day. It uses the `hour(time)` function to determine the hour and writes the corresponding message to the document. ```VBScript function greeting() i=hour(time) If i = 10 then document.write("Just started...!") elseif i = 11 then document.write("Hungry!") elseif i = 12 then document.write("Ah, lunch-time!") elseif i = 16 then document.write("Time to go home!") else document.write("Unknown") end if end function ``` -------------------------------- ### VBScript Random HTML Link Generation Source: https://github.com/syncfusion/winforms-demos/blob/master/menu/Localization/CS/Test Files/HTML_VBScript.html This VBScript snippet generates a random HTML hyperlink, either to W3Schools or Refsnes Data, based on a 50% probability. It showcases the use of `randomize()`, `rnd()`, and `document.write()` to dynamically insert content into a web page. ```VBScript randomize() r=rnd() if r>0.5 then document.write("Learn Web Development!") else document.write("Visit Refsnes Data!") end if ``` -------------------------------- ### Browser Feature Detection and CSS Import Source: https://github.com/syncfusion/winforms-demos/blob/master/menu/Customization/CS/Test Files/HTML_JScript.html Initial JavaScript code for detecting browser capabilities (client width, document.getElementById) and importing a CSS stylesheet. This snippet appears to be part of an older client-side setup for page rendering optimization. ```JavaScript @import "/h/en-us/r/hp.css"; var isW;isW=(document&&document.body.clientWidth&&document.body.clientWidth>=895&&document.getElementById); ``` -------------------------------- ### Custom CSS Style Definition for HTML Elements Source: https://github.com/syncfusion/winforms-demos/blob/master/htmlui/HTML Renderer/Scripting/CS/scripting.htm This CSS block defines a custom style for an HTML element with the ID 'custom', specifying its font size, dimensions, border, background color, text color, and text alignment. It also includes a style for paragraph elements with class 'ps', setting their font size and color. ```CSS #custom { font-size:11pt; width:90%; height:100px; border: solid 1 black; background-color:#c1c8db; color:#333367; text-align:center; } .ps { font-size:8pt; color:#999999; } ``` -------------------------------- ### VBScript Randomly Select and Display HTML Link Source: https://github.com/syncfusion/winforms-demos/blob/master/edit/Syntax Highlighting/Syntax Coloring/CS/Test Files/HTML_VBScript.html This VBScript snippet demonstrates how to generate a random number and use conditional logic (`if...then...else`) to write one of two different HTML anchor tags to the document. It utilizes `randomize()`, `rnd()`, and `document.write()` to dynamically create links. ```VBScript randomize() r=rnd() if r>0.5 then document.write("Learn Web Development!") else document.write("Visit Refsnes Data!") end if ``` -------------------------------- ### JavaScript Function to Toggle Table Row Visibility by Name Source: https://github.com/syncfusion/winforms-demos/blob/master/layout/FlowLayout/CS/UpgradeLog.htm Iterates through all `