Jump to content

MVakili

uniGUI Subscriber
  • Posts

    178
  • Joined

  • Last visited

  • Days Won

    9

MVakili last won the day on August 10 2023

MVakili had the most liked content!

3 Followers

Profile Information

  • Gender
    Male
  • Location
    Isfahan

Recent Profile Visitors

1268 profile views

MVakili's Achievements

Active Member

Active Member (3/4)

48

Reputation

  1. This version correctly identifies the version of Windows on the server side. But the client side shows wrongly for the Windows server version. For better test you can run this sample. I run this code in windows 11 (http://localhost:8077/) . and when I call it in windows 10 ( another client in address http://192.168.25.1:8077/) , it shows windows 11 again ! you can find 2 test movie in HELP folder Win_ver11_simple11_030324.zip
  2. Hi @Sherzod I installed my test app in windows server 2016 and I check in client sides. You can see output of user agent in below with Google Chrome/ Mozilla Firefox / Microsoft edge browsers and all browsers in for windows 10/11/windows server 2016 shows "Windows NT 10.0". --------------------------------------------------------- output of user agent in Windows edition 11 Enterprise version 22H2 with Mozilla browser: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:126.0) Gecko/20100101 Firefox/126.0 output of user agent in Windows edition 11 Enterprise version 22H2 with Chrome browser: Mozilla/5.0 (Windows NT 10.0; Win64; x64) Apple WebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36 output of user agent in Windows edition 11 Enterprise version 22H2 with Microsoft edge browser: Mozilla/5.0 (Windows NT 10.0; Win64; x64) Apple WebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36 Edge/125.0.0.0 --------------------------------------------------------- output of user agent in Windows edition 10 Enterprise with Chrome browser: Mozilla/5.0 (Windows NT 10.0; Win64; x64) Apple WebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 --------------------------------------------------------- output of user agent in windows server 2016 data center with Mozilla browser: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:84.0) Gecko/20100101 Firefox/84.0 output of user agent in windows server 2016 data center with Chrome browser: Mozilla/5.0 (Windows NT 10.0; Win64; x64) Apple WebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36 Test case UNIGUI_UserAgent_Vakili.zip
  3. put (or create at runtime) a htmlframe and insert this code to make a clock <!DOCTYPE html> <html lang="en"> <head> <style> body { background-color: #0000ffff ; text-align: center; color: #0000ffff ; font-family: 'Poppins', sans-serif; overflow: hidden; } canvas { width: 100%; Height: 100%; margin: 0px auto; display: block; } a { color: #0000ffff ; transition: linear 0.3s; } a:hover { opacity: 0.8; } </style> </head> <body> <canvas id="canvas"></canvas><br> <script> const ctx = canvas.getContext('2d'); const threePIByTwo = (3 * Math.PI) / 2; console.log(threePIByTwo); let amOrPm = 'AM'; const canvasBg = '#0000ffff'; // Define colors for hour, minute and second hand const hourActiveColor = '#FFF0BE', minuteActiveColor = '#FFD340', secondActiveColor = '#FFE48A'; // Define inactive colors for hour, minute and second hand const hourInactiveColor = '#0000ffff ', minuteInactiveColor = '#0000ffff ', secondInactiveColor = '#0000ffff '; const timerBg = '#0000ffff '; function init() { canvas.width = document.documentElement.clientWidth - 35; canvas.height = document.documentElement.clientHeight - 45; // This calls the draw function repeatedly at a rate of 60 times per second window.requestAnimationFrame(draw); } function draw() { // Finding center point of canvas const centerX = canvas.width / 2, centerY = canvas.height / 2; const date = new Date(); let hr = date.getHours(); let min = date.getMinutes(); let sec = date.getSeconds(); let ms = date.getMilliseconds(); if(hr > 12) { amOrPm = 'PM'; hr -= 12; } /* Defines how much radians each hand should move */ let radH = 0.000008333 * ( ( hr * 60 * 60 * 1000 ) + ( min * 60 * 1000 ) + ( sec * 1000 ) + ms ); let radM = 0.0001 * ( ( min * 60 * 1000 ) + ( sec * 1000 ) + ms ); let radS = 0.006 * ( ( sec * 1000 ) + ms ); // Draw Canvas drawRect(0, 0, canvas.width, canvas.height, canvasBg); // Hour Hand drawCircle(centerX, centerY, 110, 0, 360 , false, hourInactiveColor, 'stroke', 90); drawCircle(centerX, centerY, 110, threePIByTwo, rad(radH) + threePIByTwo, false, hourActiveColor, 'stroke', 90); // Minute Hand drawCircle(centerX, centerY, 180, 0, 360, false, minuteInactiveColor, 'stroke', 50); drawCircle(centerX, centerY, 180, threePIByTwo, rad(radM) + threePIByTwo, false, minuteActiveColor, 'stroke', 50); // Second Hand drawCircle(centerX, centerY, 220, 0, 360, false, secondInactiveColor, 'stroke', 30); drawCircle(centerX, centerY, 220, threePIByTwo, rad(radS) + threePIByTwo, false, secondActiveColor, 'stroke', 30); // Digital Timer drawCircle(centerX, centerY, 90, 0, 360, false, timerBg, 'fill', '50'); drawText(`${hr.toString().padStart(2, "0")}:${min.toString().padStart(2, "0")} ${amOrPm}`, canvas.width / 2 - 60, canvas.height / 2 + 15, '#ffffff', '28px'); window.requestAnimationFrame(draw); } init(); // Convert degree to radians function rad(deg){ return (Math.PI / 180) * deg; } function drawText(text, x, y, color, size) { ctx.font = `${size} "Poppins"`; ctx.fillStyle = color; ctx.fillText(text, x, y); } function drawRect(x, y, width, height, color) { ctx.fillStyle = color; ctx.fillRect(x, y, width, height); } function drawArc(x, y, radius, start, end, clockwise) { ctx.beginPath(); ctx.arc(x, y, radius, start, end, clockwise); } function drawCircle(x, y, radius, start, end, clockwise, color, type, thickness) { switch (type) { case 'fill': ctx.fillStyle = color; drawArc(x, y, radius, start, end, clockwise) ctx.fill(); break; case 'stroke': ctx.strokeStyle = color; ctx.lineWidth = thickness; drawArc(x, y, radius, start, end, clockwise) ctx.stroke(); break } } </script> </body> </html>
  4. Hello In my opinion, UNIGUI doesn't identify the version of Windows clients correctly and often shows Windows 7/10/11 as Windows 10.
  5. taskkill /f /im $(OUTPUTFILENAME) 2>1 || exit /B 0 start http://localhost:8077
  6. MVakili

    Get data HTML

    Thank you dear friend I hope I can repay your favor
  7. MVakili

    Get data HTML

    Hello Thank you for your kindness As stated from the beginning in this topic, it is necessary that 1- A form should be displayed This page contains Persian calendar and for example 3 types of its pages are attached. It is acceptable to do any of these three examples. 2- When the user clicks on one of the days in the calendar, the page will be closed and the date including day, month, and year will be returned
  8. MVakili

    Get data HTML

    Is it my files? no I cant I download this projects from Github or web
  9. MVakili

    Get data HTML

    That was a good point 😀 main problem very briefly 1- Display the Persian calendar in a modal form 2- If a date is passed for it, it will go to the same date (OnShow) 3- He can easily choose the desired date 4- Double click to return the selected date and close form And a series of other features that will be added later. For example 1- Have a parameter to display the Gregorian calendar values 2- The size of the calendar should be automatic. I searched the internet for various calendars with these features and found a few that were usable But I don't know how to use them in UNIGUI main program HTML2.rar 3 samples of JS codes pwt.calheatmap-master.zip JalaliJSCalendar-1.4(PersianScript.ir).tar.gz JalaliDatePicker-main.zip HTML2.rar
  10. MVakili

    Get data HTML

    Tank you , I will check The Persian planner and calendar make us some problem , I wish I find some way for it Do you have any suggestions?
  11. MVakili

    Get data HTML

    Please tell me which example can help
  12. MVakili

    Get data HTML

    Hello I need such an example program, does anyone have an example? In the main form, I want to press the Select button and it will show another form that has HTML content In the second form, the user selects the value and clicks OK, and the form is closed And finally I can show the user's choice
  13. 1- put (or create at runtime) a htmlframe and insert this code to make a matrix text <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> </head> <body> <canvas id=q> <script language="javascript"> const s = window.screen; const w = (q.width = s.width); const h = (q.height = s.height); const ctx = q.getContext("2d"); const p = Array(Math.floor(w / 10) + 1).fill(0); const random = (items) => items[Math.floor(Math.random() * items.length)]; const hex = "تحلیلگر سپاهان مدیران".split(" "); setInterval(() => { ctx.fillStyle = "rgba(0,0,0,.05)"; ctx.fillRect(0, 0, w, h); ctx.fillStyle = "#8BF"; p.map((v, i) => { ctx.fillText(random(hex), i * 50, v); p[i] = v >= h || v > 200 + 10000 * Math.random() ? 0 : v + 10; }); }, 2000 / 30); </script> </body> </html>
  14. 1- put (or create at runtime) a htmlframe and insert this code to make a simple analog clock <!DOCTYPE html> <style> html { text-align: center; font-size: 10px; } body { margin: 0; height:100% } .clock { width: 30rem; height: 30rem; border: #282828; border-radius: 50%; margin: 50px auto; position: Center; } .outer-clock-face { position: relative; width: 100%; height: 100%; border-radius: 100%; overflow: hidden; } .inner-clock-face::before { content: ''; position: absolute; top: 50%; left: 50%; width: 20px; height: 16px; border-radius: 18px; margin-left: -9px; margin-top: -6px; background: #D5A502; z-index: 11; } .hand { width: 50%; right: 50%; height: 6px; background: #D5A502; position: absolute; top: 50%; transform-origin: 100%; transition-timing-function: cubic-bezier(0.1, 2.7, 0.58, 1); } .hand.hour-hand { width: 20%; z-index: 3; } .hand.min-hand { height: 3px; z-index: 10; width: 35%; } .hand.second-hand { background: #D5A502; width: 45%; height: 1px; } </style> </head> <body> <div class="clock"> <div class="outer-clock-face"> <div class="marking marking-one"></div> <div class="marking marking-two"></div> <div class="marking marking-three"></div> <div class="marking marking-four"></div> <div class="inner-clock-face"> <div class="hand hour-hand"></div> <div class="hand min-hand"></div> <div class="hand second-hand"></div> </div> </div> </div> <script> const secondHand = document.querySelector('.second-hand'); const minsHand = document.querySelector('.min-hand'); const hourHand = document.querySelector('.hour-hand'); function setDate() { const now = new Date(); const seconds = now.getSeconds(); const secondsDegrees = ((seconds / 60) * 360) + 90; secondHand.style.transform = `rotate(${secondsDegrees}deg)`; const mins = now.getMinutes(); const minsDegrees = ((mins / 60) * 360) + ((seconds/60)*6) + 90; minsHand.style.transform = `rotate(${minsDegrees}deg)`; const hour = now.getHours(); const hourDegrees = ((hour / 12) * 360) + ((mins/60)*30) + 90; hourHand.style.transform = `rotate(${hourDegrees}deg)`; } setInterval(setDate, 1000); setDate(); </script> </body> </html>
×
×
  • Create New...