Jump to content

55143681

uniGUI Subscriber
  • Posts

    613
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by 55143681

  1. Solved. If I move the code from void __fastcall TUniFormMindYear::UniFormBeforeShow(TObject *Sender) into void __fastcall TUniFormMindYear::UniFormOnCreate(TObject *Sender) It works well, why? What's the difference between BeforeShow() and OnCreate()???
  2. Dear Sherzod: I use UniHTMLFrame to call jsmind to draw a mind picture, but I find something strange, I click a button to call a form with UniHTMLFrame, if I click the button to test 10 times, 1、3、5、7、9 runs normal, 2、4、6、8 10 have nothing to display, why? void __fastcall TUniFormMindYear::UniFormBeforeShow(TObject *Sender) { int lineNo=0,lineNo1=0,lineNo2=0,lineNo3=0; String yearNo,instName,partName,teamName,rowId,rowId1,rowId2,rowId3,taskName1,taskName2,taskName3; String planDate1,planDate2,overDate1,overDate2,execStat,nodeText,holdUser; String screenWidth=UniApplication->ScreenWidth; String screenHeight=UniApplication->ScreenHeight; UniHTMLFrame1->HTML->Add("<!doctype html>") ; UniHTMLFrame1->HTML->Add("<html>") ; UniHTMLFrame1->HTML->Add("<head>") ; UniHTMLFrame1->HTML->Add(" <meta charset=\"utf-8\">") ; UniHTMLFrame1->HTML->Add(" <meta http-equiv=\"Content-Type\" content=\"text/html\"; charset=\"utf-8\">") ; UniHTMLFrame1->HTML->Add(" <title>年度计划思维导图</title>") ; UniHTMLFrame1->HTML->Add(" <link type=\"text/css\" rel=\"stylesheet\" href=\"filesHome/jsmind-master/style/jsmind.css\" />") ; UniHTMLFrame1->HTML->Add(" <style type=\"text/css\">") ; UniHTMLFrame1->HTML->Add(" #jsmind_container{") ; UniHTMLFrame1->HTML->Add(" width:"+screenWidth+"px;") ; UniHTMLFrame1->HTML->Add(" height:"+screenHeight+"px;") ; UniHTMLFrame1->HTML->Add(" border:solid 1px #ccc;") ; UniHTMLFrame1->HTML->Add(" background:#f4f4f4;") ; UniHTMLFrame1->HTML->Add(" }") ; UniHTMLFrame1->HTML->Add(" </style>") ; UniHTMLFrame1->HTML->Add("</head>") ; UniHTMLFrame1->HTML->Add("<body>") ; UniHTMLFrame1->HTML->Add("<div id=\"jsmind_container\"></div>") ; UniHTMLFrame1->HTML->Add("<script type=\"text/javascript\">") ; UniHTMLFrame1->HTML->Add(" function load_jsmind(){") ; UniHTMLFrame1->HTML->Add(" var mind = {") ; UniHTMLFrame1->HTML->Add(" \"meta\":{") ; UniHTMLFrame1->HTML->Add(" \"name\":\"年度工作计划思维导图\",") ; UniHTMLFrame1->HTML->Add(" \"author\":\"zhangweihou@126.com\",") ; UniHTMLFrame1->HTML->Add(" \"version\":\"1.0\",") ; UniHTMLFrame1->HTML->Add(" },") ; UniHTMLFrame1->HTML->Add(" \"format\":\"node_array\",") ; UniHTMLFrame1->HTML->Add(" \"data\":[") ; UniHTMLFrame1->HTML->Add(" {\"id\":\"root\", \"isroot\":true, \"topic\":\""+UniMainModule()->selectYear+"年度计划\"},") ; UniHTMLFrame1->HTML->Add(" ]") ; UniHTMLFrame1->HTML->Add(" };") ; UniHTMLFrame1->HTML->Add(" var options = {") ; UniHTMLFrame1->HTML->Add(" container:'jsmind_container',") ; UniHTMLFrame1->HTML->Add(" editable:true,") ; UniHTMLFrame1->HTML->Add(" theme:'primary'") ; UniHTMLFrame1->HTML->Add(" }") ; UniHTMLFrame1->HTML->Add(" var jm = jsMind.show(options,mind);") ; UniHTMLFrame1->HTML->Add(" jm.set_readonly(true);") ; //UniHTMLFrame1->HTML->Add(" var mind_data = jm.get_data();") ; //UniHTMLFrame1->HTML->Add(" alert(mind_data);") ; //UniHTMLFrame1->HTML->Add(" jm.add_node(\"sub2\",\"sub23\", \"new node\", {\"background-color\":\"red\"});") ; //UniHTMLFrame1->HTML->Add(" jm.set_node_color('sub21', 'green', '#ccc');") ; UniHTMLFrame1->HTML->Add(" }") ; UniHTMLFrame1->HTML->Add(" load_jsmind();") ; UniHTMLFrame1->HTML->Add("</script>") ; UniHTMLFrame1->HTML->Add("</body>") ; UniHTMLFrame1->HTML->Add("</html>
  3. I call "jsmind.css" to setup my page,but I find that: if I call the code from UniServerModule->CustomCss (files\jsmind-master\style\jsmind.css), The page comes out abnormal. If I call some code to UniHTMLFrame->HTML,the page is normal. UniHTMLFrame1->HTML->Add("<!doctype html>") ; UniHTMLFrame1->HTML->Add("<html>") ; UniHTMLFrame1->HTML->Add("<head>") ; UniHTMLFrame1->HTML->Add(" <meta charset=\"utf-8\">") ; UniHTMLFrame1->HTML->Add(" <meta http-equiv=\"Content-Type\" content=\"text/html\"; charset=\"utf-8\">") ; UniHTMLFrame1->HTML->Add(" <title>我的年度计划思维导图</title>") ; UniHTMLFrame1->HTML->Add(" <link type=\"text/css\" rel=\"stylesheet\" href=\"files/jsmind-master/style/jsmind.css\" />") ; UniHTMLFrame1->HTML->Add(" <style type=\"text/css\">") ; UniHTMLFrame1->HTML->Add(" #jsmind_container{") ; UniHTMLFrame1->HTML->Add(" width:800px;") ; UniHTMLFrame1->HTML->Add(" height:500px;") ; UniHTMLFrame1->HTML->Add(" border:solid 1px #ccc;") ; UniHTMLFrame1->HTML->Add(" background:#f4f4f4;") ; UniHTMLFrame1->HTML->Add(" }") ; UniHTMLFrame1->HTML->Add(" </style>") ; UniHTMLFrame1->HTML->Add("</head>") ; My question is : what is the priority between UniHTMLFrame->HTML and UniServerModule->CustomCss ?
  4. Maybe I have to use "UniHTMLFrame1->HTML->Add()" to do this. UniHTMLFrame1->HTML->Add(" \"data\":[") ; UniHTMLFrame1->HTML->Add(" {\"id\":\"root\", \"isroot\":true, \"topic\":\"jsMind\"},") ; UniHTMLFrame1->HTML->Add(" {\"id\":\"sub1\", \"parentid\":\"root\", \"topic\":\"sub1\", \"background-color\":\"#0000ff\"},") ; UniHTMLFrame1->HTML->Add(" {\"id\":\"sub11\", \"parentid\":\"sub1\", \"topic\":\"sub11\"},") ; UniHTMLFrame1->HTML->Add(" {\"id\":\"sub12\", \"parentid\":\"sub1\", \"topic\":\"sub12\"},") ; UniHTMLFrame1->HTML->Add(" {\"id\":\"sub13\", \"parentid\":\"sub1\", \"topic\":\"sub13\"},") ; UniHTMLFrame1->HTML->Add(" {\"id\":\"sub2\", \"parentid\":\"root\", \"topic\":\"sub2\"},") ; UniHTMLFrame1->HTML->Add(" {\"id\":\"sub21\", \"parentid\":\"sub2\", \"topic\":\"sub21\"},") ; UniHTMLFrame1->HTML->Add(" {\"id\":\"sub22\", \"parentid\":\"sub2\", \"topic\":\"sub22\",\"foreground-color\":\"#33ff33\"},") ; UniHTMLFrame1->HTML->Add(" {\"id\":\"sub3\", \"parentid\":\"root\", \"topic\":\"sub3\"},") ; UniHTMLFrame1->HTML->Add(" ]") ; UniHTMLFrame1->HTML->Add(" };") ;
  5. Thank you very much, I just want to use UniDAC to query my data and transfer my mind data "node_array" into the jsmind to draw my mind picture.
  6. I am so glad to tell you that I have call jsmind from my unigui project successfully, but I want to call the jsmind dynamicly, How to transfer my own mind data into the html code or javascript? My example is follow: 1、Add js to UniServerModule->CustomFiles: files/js/jsmind.js files/js/jsmind.screenshot.js files/js/jsmind.draggable.js 2、Add css to UniServerModule->CustomCss: files/style/jsmind.css 3、Add HTML code to UniHTMLFrame->HTML: <!doctype html> <html> <head> <meta charset="utf-8"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>jsMind</title> <link type="text/css" rel="stylesheet" href="../style/jsmind.css" /> <style type="text/css"> #jsmind_container{ width:800px; height:500px; border:solid 1px #ccc; /*background:#f4f4f4;*/ background:#f4f4f4; } </style> </head> <body> <div id="jsmind_container"></div> <script type="text/javascript" src="../js/jsmind.js"></script> <script type="text/javascript" src="../js/jsmind.draggable.js"></script> <script type="text/javascript"> function load_jsmind(){ var mind = { "meta":{ "name":"demo", "author":"hizzgdev@163.com", "version":"0.2", }, "format":"node_array", "data":[ {"id":"root", "isroot":true, "topic":"jsMind"}, {"id":"sub1", "parentid":"root", "topic":"sub1", "background-color":"#0000ff"}, {"id":"sub11", "parentid":"sub1", "topic":"sub11"}, {"id":"sub12", "parentid":"sub1", "topic":"sub12"}, {"id":"sub13", "parentid":"sub1", "topic":"sub13"}, {"id":"sub2", "parentid":"root", "topic":"sub2"}, {"id":"sub21", "parentid":"sub2", "topic":"sub21"}, {"id":"sub22", "parentid":"sub2", "topic":"sub22","foreground-color":"#33ff33"}, {"id":"sub3", "parentid":"root", "topic":"sub3"}, ] }; var options = { container:'jsmind_container', editable:true, theme:'primary' } var jm = jsMind.show(options,mind); // jm.set_readonly(true); // var mind_data = jm.get_data(); // alert(mind_data); jm.add_node("sub2","sub23", "new node", {"background-color":"red"}); jm.set_node_color('sub21', 'green', '#ccc'); } load_jsmind(); </script> </body> </html>
  7. Dear Shezrod: "JSMind" is a javascript can used to draw some mind picture, and it give me some examples and docs: jsmind-master\docs jsmind-master\examples Can you tell me how to use it in my unigui project? Thank you very much. jsmind-master (2).zip
  8. How to draw a mind map from the data in my database?
  9. UniSession.AddJS (UnimPDFFrame1.JSName + '.iframe.contentWindow.document.' + 'getElementById ("print").click()');
  10. So sorry to tell everyone ,you should run hyper_server.exe instead run your demo.exe, Once you run your hyper_server.exe, your hyper_server.cfg will have token value.
  11. I want to test server farm in one pc I create three path to make three servernodes the same exe with three different port When I run the exe for the first time.I can get a token in the cfg file. but,if I delete the token,i can not reproduce it again, it seems that it can only be produced for the first time, and the other's servernodes can not produce the token too, How can I reproduce the token? And if I test three nodes in one machine,should the token be same? can I write different token into the three server node myself?
  12. How change the title's font size?
  13. Well,UnimPanel does not has the problem, But,UniPanel has this problem, With Sherzod's code, works well.
  14. without any setup, wo!!! I use UnimPanel,not UniPanel.
  15. I have tested it with UniGUI1555 + xe10.3.3 The Title is what you want.
×
×
  • Create New...