{"id":13342142,"url":"https://github.com/pulsejet/WinFormsToHTML","last_synced_at":"2025-03-12T00:30:57.078Z","repository":{"id":93822383,"uuid":"105441793","full_name":"pulsejet/WinFormsToHTML","owner":"pulsejet","description":"A quick converter from WinForms to HTML","archived":true,"fork":false,"pushed_at":"2017-10-04T05:44:06.000Z","size":62,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-24T12:09:34.872Z","etag":null,"topics":["converter","html","winforms"],"latest_commit_sha":null,"homepage":null,"language":"Visual Basic","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pulsejet.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-10-01T12:49:49.000Z","updated_at":"2023-01-28T14:53:50.000Z","dependencies_parsed_at":"2023-04-30T13:03:59.611Z","dependency_job_id":null,"html_url":"https://github.com/pulsejet/WinFormsToHTML","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pulsejet%2FWinFormsToHTML","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pulsejet%2FWinFormsToHTML/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pulsejet%2FWinFormsToHTML/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pulsejet%2FWinFormsToHTML/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pulsejet","download_url":"https://codeload.github.com/pulsejet/WinFormsToHTML/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243136265,"owners_count":20241987,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["converter","html","winforms"],"created_at":"2024-07-29T19:28:04.392Z","updated_at":"2025-03-12T00:30:57.066Z","avatar_url":"https://github.com/pulsejet.png","language":"Visual Basic","readme":"# WinFormsToHTML\nA quick converter from WinForms to HTML. The converter is written in VB.NET, but can be easily converted to C# since the two languages are equivalent.\n\nThis project does not serve the purpose of converting an entire WinForms application to a web application. The aim is to be able to get a head-start into converting a WinForms application to a webapp. All on form actions must be performed using JavaScript, which must be written separately. The `\u003cform.name\u003emap.js` file that is created is used by data based applications to store database mappings for easy access.\n\nA js script with some useful functions (`common.js`) is also provided.\n\n### Supported Controls\n* Label\n* TextBox (including multi-line)\n* PictureBox\n* DateTimePicker *(partial)*\n* CheckBox\n* ListBox\n* ComboBox\n* Button\n* TableLayoutPanel\n* Panel\n* GroupBox\n* DataGridView *(partial)*\n* TabControl and TabPage\n* MenuStrips *(partial)*\n\n### Styling\nAll styling including colors, hovering etc. must be done using external CSS. All controls must have the `position:absolute` directive to be positioned properly. It is recommendable to use the provided formstyle1.css as a starting point.\n\n### Custom HTML Headers\nThe `\u003chead\u003e` is read from a template and appropriate values are filled in. This can be customized to include any other js files, CSS etc.\n\n### Multiple form support *(partial)*\nMultiple forms have been crudely implemented with the help of `\u003ciframe\u003e`. A modal form `Form1` will open on clicking on `Button2` in the demo.\n\n### common.js Functions\nBelow explained are some common.js functions in no particular order:\n***Note**: common.js requries jQuery and some functions require Moment.js with moment-precise-range. Sorting grids requires jQuery tablesorter.*\n**Important:** *common.js is required for TabControls to work.*\n\n**General Functions:**\n\n* `$(document).ready` \nOn loading the document, common.js will perform some functions automatically, including adding the Return key handler to the AcceptButton and the Escape key handler to the CancelButton. It will also add the required markup for showing modals.\n* `showModal(URL)`\nShows a modal box with the given URL.\n* `closeModal()`\nCloses the open modal box.\n* `closeModalOnClick(control)`\nAssigns the close event to a control on click.\n* `addctrlShortcut(shortcutkey, control)`\nAdds a Ctrl+Key shortcut to a control. shortcutkey must be an ASCII value.\nSample Usage: `addctrlShortcut(toAscii('B'), $('#Button1'));`\n* `addaltrShortcut(shortcutkey, control)`\nAdds a Alt+Key shortcut to a control. shortcutkey must be an ASCII value.\n* `selectFirst(control)`\nMarks the first `option` as `selected`\n\n**Tools:**\n\n* `getParameterByName(name, url)`\nGet query string from URL. No URL specified defaults to the current URL of the window.\n* `escapeXml(unsafe)`\nEscapes unsafe characters from XML.\n* `toAscii(str)`\nReturns the ASCII value of the first character of a string.\n* `addValuesChangedAlert()`\nAdds an alert that values have been changed while closing the page if the user has pressed a key inside a TextBox.\n\n**Data Helpers:**\n\nAll exchange of data fro DataGridView Controls takes place as XML. The format is the same as the one generated by DataTable's WriteXML.\n* `initGrids()`:\nInitializes the grids on the form.\n* `fillDataGrid(control, data)`\nFills up the grid with id=control with XML data from XML data.\n* `fillList(data, datalist)`\nAdds `option`s to a datalist or a select from the first column of XML data.\n* `getDataGrid(control, tablename)`\nConverts the edited grid to XML. Deleted rows are present with an additional node `\u003cdelete\u003e`. tablename is the name for each row.\n* `getJsonMapping(data, pkey)`\nGets a JSON mapping from an XML datatable where pkey is the primary key, and each key is associated with another JSON object with keys as column names and values as the associated data.\n* `setControlsDatafromJSON(dataJson, controllist)`\nSets data to a list of controls from a Json Mapping. Usually used in conjunction with the JSON control object in `\u003cform.name\u003emap.js`\n* `getXMLfromForm()`\nGets an XML datatable from controls listed in `\u003cform.name\u003emap.js`.\n* `getJSONfromXML(data, rowno)`\nGets a JSON object from one row of an XML datatable.\n\n### Contribute\nThe project is licensed under the Apache license, so feel free to use it for any application, commercial or otherwise, and to contribute back in any way!","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpulsejet%2FWinFormsToHTML","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpulsejet%2FWinFormsToHTML","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpulsejet%2FWinFormsToHTML/lists"}