peczenyj 31 de jul. de 2018 1 like
Ola
Sua pergunta é extremamente ampla.
Primeiramente, imagine q o seu programa pode ser customizado através de uma estrutura de dados que vai conter as informações que vc deseja.
Imagine que vc tem 2 versões dessa estrutura em um array, e com um botão vc troca a estrutura em uso dinamicamente.
Para isso funcionar vc precisa separar bem a logica do seu programa com a logica de apresentação (ou layout). E ai imaginar toda uma forma de aplicar a estrutura enquanto seu program esta executando.
Uma vez q isso funcione, trocar para uma forma de importar essa estrutura a partir de um arquivo é sem maiores problemas, uma vez que xml é apenas uma das formas de serializar uma estrutura de dados.
Agora se vc disser as tecnologias que vc está trabalhando, ajuda
AntonioSantos 1 de ago. de 2018 1 like
Aqui está um exemplo:
<?xml version="1.0" encoding="Windows-1252" ?>
<NotepadPlus>
<FindHistory nbMaxFindHistoryPath= "10" nbMaxFindHistoryFilter= "10" nbMaxFindHistoryFind= "10" nbMaxFindHistoryReplace= "10" matchWord= "no" matchCase= "no" wrap= "yes" directionDown= "yes" fifRecuisive= "yes" fifInHiddenFolder= "no" dlgAlwaysVisible= "no" fifFilterFollowsDoc= "no" fifFolderFollowsDoc= "no" searchMode= "0" transparencyMode= "1" transparency= "150" dotMatchesNewline= "no" />
<History nbMaxFile= "10" inSubMenu= "no" customLength= "-1" >
<File filename= "E:\workspace\Java Avancado\src\jdbc\DAO.java" />
<File filename= "E:\workspace\Java Avancado\src\jdbc\ConnectionFactory.java" />
<File filename= "E:\workspace\BlueKeeper\src\main\java\br\com\java\avancado\bluekeeper\dao\DAOFactory.java" />
<File filename= "E:\workspace\BlueKeeper\src\main\java\br\com\java\avancado\bluekeeper\resource\dao.properties" />
<File filename= "E:\workspace\BlueKeeper\src\main\java\br\com\java\avancado\bluekeeper\dao\db\ConnectionFactory.java" />
<File filename= "E:\workspace\BlueKeeper\src\main\java\br\com\java\avancado\bluekeeper\dao\DAOProperties.java" />
</History>
<GUIConfigs>
<GUIConfig name= "ToolBar" visible= "yes" > standard</GUIConfig>
<GUIConfig name= "StatusBar" > show</GUIConfig>
<GUIConfig name= "TabBar" dragAndDrop= "yes" drawTopBar= "yes" drawInactiveTab= "yes" reduce= "yes" closeButton= "yes" doubleClick2Close= "no" vertical= "no" multiLine= "no" hide= "no" quitOnEmpty= "no" />
<GUIConfig name= "ScintillaViewsSplitter" > vertical</GUIConfig>
<GUIConfig name= "UserDefineDlg" position= "undocked" > hide</GUIConfig>
<GUIConfig name= "TabSetting" replaceBySpace= "no" size= "4" />
<GUIConfig name= "AppPosition" x= "531" y= "0" width= "1124" height= "728" isMaximized= "yes" />
<GUIConfig name= "noUpdate" intervalDays= "15" nextUpdateDate= "20080426" > no</GUIConfig>
<GUIConfig name= "Auto-detection" > yes</GUIConfig>
<GUIConfig name= "CheckHistoryFiles" > no</GUIConfig>
<GUIConfig name= "TrayIcon" > no</GUIConfig>
<GUIConfig name= "MaitainIndent" > yes</GUIConfig>
<GUIConfig name= "TagsMatchHighLight" TagAttrHighLight= "yes" HighLightNonHtmlZone= "no" > yes</GUIConfig>
<GUIConfig name= "RememberLastSession" > yes</GUIConfig>
<GUIConfig name= "DetectEncoding" > yes</GUIConfig>
<GUIConfig name= "NewDocDefaultSettings" format= "0" encoding= "4" lang= "0" codepage= "-1" openAnsiAsUTF8= "yes" />
<GUIConfig name= "langsExcluded" gr0= "0" gr1= "0" gr2= "0" gr3= "0" gr4= "0" gr5= "0" gr6= "0" gr7= "0" gr8= "0" gr9= "0" gr10= "0" gr11= "0" gr12= "0" langMenuCompact= "yes" />
<GUIConfig name= "Print" lineNumber= "yes" printOption= "3" headerLeft= "" headerMiddle= "" headerRight= "" footerLeft= "" footerMiddle= "" footerRight= "" headerFontName= "" headerFontStyle= "0" headerFontSize= "0" footerFontName= "" footerFontStyle= "0" footerFontSize= "0" margeLeft= "0" margeRight= "0" margeTop= "0" margeBottom= "0" />
<GUIConfig name= "Backup" action= "0" useCustumDir= "no" dir= "" isSnapshotMode= "yes" snapshotBackupTiming= "7000" />
<GUIConfig name= "TaskList" > yes</GUIConfig>
<GUIConfig name= "MRU" > yes</GUIConfig>
<GUIConfig name= "URL" > 2</GUIConfig>
<GUIConfig name= "globalOverride" fg= "no" bg= "no" font= "no" fontSize= "no" bold= "no" italic= "no" underline= "no" />
<GUIConfig name= "auto-completion" autoCAction= "3" triggerFromNbChar= "1" autoCIgnoreNumbers= "yes" funcParams= "yes" />
<GUIConfig name= "auto-insert" parentheses= "no" brackets= "no" curlyBrackets= "no" quotes= "no" doubleQuotes= "no" htmlXmlTag= "no" />
<GUIConfig name= "sessionExt" ></GUIConfig>
<GUIConfig name= "workspaceExt" ></GUIConfig>
<GUIConfig name= "MenuBar" > show</GUIConfig>
<GUIConfig name= "Caret" width= "1" blinkRate= "600" />
<GUIConfig name= "ScintillaGlobalSettings" enableMultiSelection= "no" />
<GUIConfig name= "openSaveDir" value= "0" defaultDirPath= "" />
<GUIConfig name= "titleBar" short= "no" />
<GUIConfig name= "stylerTheme" path= "C:\Users\antoniobernardo-lic\Desktop\Documentos Antonio\notepad++\stylers.xml" />
<GUIConfig name= "wordCharList" useDefault= "yes" charsAdded= "" />
<GUIConfig name= "delimiterSelection" leftmostDelimiter= "40" rightmostDelimiter= "41" delimiterSelectionOnEntireDocument= "no" />
<GUIConfig name= "multiInst" setting= "0" />
<GUIConfig name= "MISC" fileSwitcherWithoutExtColumn= "no" backSlashIsEscapeCharacterForSql= "yes" newStyleSaveDlg= "no" isFolderDroppedOpenFiles= "no" docPeekOnTab= "no" docPeekOnMap= "no" />
<GUIConfig name= "searchEngine" searchEngineChoice= "2" searchEngineCustom= "" />
<GUIConfig name= "SmartHighLight" matchCase= "no" wholeWordOnly= "yes" useFindSettings= "no" onAnotherView= "no" > yes</GUIConfig>
<GUIConfig name= "ScintillaPrimaryView" lineNumberMargin= "show" bookMarkMargin= "show" indentGuideLine= "show" folderMarkStyle= "box" lineWrapMethod= "aligned" currentLineHilitingShow= "show" scrollBeyondLastLine= "no" disableAdvancedScrolling= "no" wrapSymbolShow= "hide" Wrap= "no" borderEdge= "yes" edge= "no" edgeNbColumn= "80" zoom= "0" zoom2= "0" whiteSpaceShow= "hide" eolShow= "hide" borderWidth= "2" smoothFont= "no" />
<GUIConfig name= "DockingManager" leftWidth= "200" rightWidth= "200" topHeight= "200" bottomHeight= "200" >
<ActiveTabs cont= "0" activeTab= "-1" />
<ActiveTabs cont= "1" activeTab= "-1" />
<ActiveTabs cont= "2" activeTab= "-1" />
<ActiveTabs cont= "3" activeTab= "-1" />
</GUIConfig>
</GUIConfigs>
<ProjectPanels>
<ProjectPanel id= "0" workSpaceFile= "" />
<ProjectPanel id= "1" workSpaceFile= "" />
<ProjectPanel id= "2" workSpaceFile= "" />
</ProjectPanels>
</NotepadPlus>
É o arquivo de configuração do notepad++.
Pesquisa sobre como manipular arquivos xml ecria o seu modelo.
< NotepadPlus >
< Session activeView = "0" >
< mainView activeIndex = "2" >
< File firstVisibleLine = "0" xOffset = "0" scrollWidth = "1736" startPos = "504" endPos = "504" selMode = "0" lang = "Python" encoding = "-1" filename = "C:\Users \a ntoniobernardo-lic\Desktop\Documentos Antonio\Nova pasta\CRUD-Employee-Python-with-MySQL-master\CRUD-Employee-Python-with-MySQL-master\CRUDPythonWithMySQL.py" backupFilePath = "" originalFileLastModifTimestamp = "[telefone removido]" mapFirstVisibleDisplayLine = "-1" mapFirstVisibleDocLine = "-1" mapLastVisibleDocLine = "-1" mapNbLine = "-1" mapHigherPos = "-1" mapWidth = "-1" mapHeight = "-1" mapKByteInDoc = "-202182160" mapWrapIndentMode = "-1" mapIsWrap = "no" />
< File firstVisibleLine = "0" xOffset = "0" scrollWidth = "496" startPos = "865" endPos = "0" selMode = "0" lang = "XML" encoding = "-1" filename = "new 2" backupFilePath = "C:\Users \a ntoniobernardo-lic\Desktop\Documentos Antonio \n otepad++ \b ackup \n ew 2@2018-07-11_103928" originalFileLastModifTimestamp = "0" mapFirstVisibleDisplayLine = "-1" mapFirstVisibleDocLine = "-1" mapLastVisibleDocLine = "-1" mapNbLine = "-1" mapHigherPos = "-1" mapWidth = "-1" mapHeight = "-1" mapKByteInDoc = "512" mapWrapIndentMode = "-1" mapIsWrap = "no" />
< File firstVisibleLine = "0" xOffset = "0" scrollWidth = "128" startPos = "16" endPos = "16" selMode = "0" lang = "Normal Text" encoding = "-1" filename = "new 1" backupFilePath = "C:\Users \a ntoniobernardo-lic\Desktop\Documentos Antonio \n otepad++ \b ackup \n ew 1@2018-07-24_103747" originalFileLastModifTimestamp = "0" mapFirstVisibleDisplayLine = "-1" mapFirstVisibleDocLine = "-1" mapLastVisibleDocLine = "-1" mapNbLine = "-1" mapHigherPos = "-1" mapWidth = "-1" mapHeight = "-1" mapKByteInDoc = "0" mapWrapIndentMode = "-1" mapIsWrap = "no" />
</ mainView >
< subView activeIndex = "0" />
</ Session >
</ NotepadPlus >
Wpenach1 1 de ago. de 2018
Bom dia
Obrigado pela resposta…
Basicamente queria algo mais dinâmico, e acredito que usando configurações variáveis (aumentar, diminuir, alterar, ícones e botões assim por diante) o programa tenha uma evolução e meus conhecimentos também.
Basicamente e tudo que você informou na resposta, só não sei por onde começar…hehehe
Vlw
Wpenach1 1 de ago. de 2018
Perfect, acho que vou ter que me aprofundar em xml antes de tentar levar a pratica e teoria juntos.
Vou pesquisar e usar seu modelo
vlw
AntonioSantos 1 de ago. de 2018 1 like
Wpenach1 1 de ago. de 2018