Added images of the team leaders, and redesigned the dialog layout.

This commit is contained in:
2016-12-07 22:50:17 +08:00
parent 085ffc2d47
commit 8c2cb726f7
20 changed files with 169 additions and 72 deletions

View File

@ -72,8 +72,7 @@ Sub subMain
End If
maIVs = fnFindIV (aQuery)
If UBound (maIVs) = -1 Then
'MsgBox "Found no matching IV."
MsgBox fnGetResString ("msg1000")
MsgBox fnGetResString ("ErrorNotFound")
Else
subSaveIV (aQuery, maIVs)
End If
@ -96,6 +95,11 @@ Function fnAskParam As aFindIVParam
oDialog.getControl ("cbxBest3").setVisible (False)
oDialog.getControl ("lstApprasal2").setVisible (False)
oDialog.getControl ("imgPokemon").getModel.setPropertyValue ( _
"ImageURL", fnGetImageUrl ("Unknown"))
oDialog.getControl ("imgTeamLogo").getModel.setPropertyValue ( _
"ImageURL", fnGetImageUrl ("Unknown"))
If oDialog.execute = 0 Then
aQuery.bIsCancelled = True
fnAskParam = aQuery
@ -235,9 +239,17 @@ Sub subRdoTeamRedItemChanged_itemStateChanged (oEvent As object)
oDialog = oEvent.Source.getContext
oImageModel = oDialog.getControl ("imgTeam").getModel
oImageModel = oDialog.getControl ("imgTeamLogo").getModel
oImageModel.setPropertyValue ("ImageURL", _
fnGetImageUrl ("TeamValor"))
fnGetImageUrl ("TeamLogoValor"))
oDialog.getControl ("imgTeamLeader").setVisible (True)
oImageModel = oDialog.getControl ("imgTeamLeader").getModel
oImageModel.setPropertyValue ("ImageURL", _
fnGetImageUrl ("TeamLeaderCandela"))
oText = oDialog.getControl ("txtLeaderAppraise")
oText.setVisible (True)
oText.setText (fnGetResString ("AppraiseFromCandela"))
mItems = Array ( _
"Overall, your [Pokémon] simply amazes me. It can accomplish anything!", _
@ -250,8 +262,8 @@ Sub subRdoTeamRedItemChanged_itemStateChanged (oEvent As object)
oList.setVisible (True)
oText = oDialog.getControl ("txtBestBefore")
oText.setPosSize (30, 96, 20, 8, _
com.sun.star.awt.PosSize.X + com.sun.star.awt.PosSize.WIDTH)
oText.setPosSize (-1, -1, 20, -1, _
com.sun.star.awt.PosSize.WIDTH)
oText.setVisible (True)
oText.setText ("Its")
@ -259,12 +271,12 @@ Sub subRdoTeamRedItemChanged_itemStateChanged (oEvent As object)
oList = oDialog.getControl ("lstBest")
oList.removeItems (0, oList.getItemCount())
oList.addItems (mItems, 0)
oList.setPosSize (50, 96, 35, 8, _
oList.setPosSize (140, -1, -1, -1, _
com.sun.star.awt.PosSize.X)
oList.setVisible (True)
oText = oDialog.getControl ("txtBestAfter")
oText.setPosSize (145, 96, 160, 8, _
oText.setPosSize (240, -1, 160, -1, _
com.sun.star.awt.PosSize.X + com.sun.star.awt.PosSize.WIDTH)
oText.setVisible (True)
oText.setText ("is its strongest feature.")
@ -298,9 +310,17 @@ Sub subRdoTeamBlueItemChanged_itemStateChanged (oEvent As object)
oDialog = oEvent.Source.getContext
oImageModel = oDialog.getControl ("imgTeam").getModel
oImageModel = oDialog.getControl ("imgTeamLogo").getModel
oImageModel.setPropertyValue ("ImageURL", _
fnGetImageUrl ("TeamMystic"))
fnGetImageUrl ("TeamLogoMystic"))
oDialog.getControl ("imgTeamLeader").setVisible (True)
oImageModel = oDialog.getControl ("imgTeamLeader").getModel
oImageModel.setPropertyValue ("ImageURL", _
fnGetImageUrl ("TeamLeaderBlanche"))
oText = oDialog.getControl ("txtLeaderAppraise")
oText.setVisible (True)
oText.setText (fnGetResString ("AppraiseFromBlanche"))
mItems = Array ( _
"Overall, your [Pokémon] is a wonder! What a breathtaking Pokémon!", _
@ -313,8 +333,8 @@ Sub subRdoTeamBlueItemChanged_itemStateChanged (oEvent As object)
oList.setVisible (True)
oText = oDialog.getControl ("txtBestBefore")
oText.setPosSize (30, 96, 200, 8, _
com.sun.star.awt.PosSize.X + com.sun.star.awt.PosSize.WIDTH)
oText.setPosSize (-1, -1, 200, -1, _
com.sun.star.awt.PosSize.WIDTH)
oText.setVisible (True)
oText.setText ("I see that its best attribute is its")
@ -322,12 +342,12 @@ Sub subRdoTeamBlueItemChanged_itemStateChanged (oEvent As object)
oList = oDialog.getControl ("lstBest")
oList.removeItems (0, oList.getItemCount())
oList.addItems (mItems, 0)
oList.setPosSize (230, 96, 35, 8, _
oList.setPosSize (320, -1, -1, -1, _
com.sun.star.awt.PosSize.X)
oList.setVisible (True)
oText = oDialog.getControl ("txtBestAfter")
oText.setPosSize (325, 96, 5, 8, _
oText.setPosSize (415, -1, 5, -1, _
com.sun.star.awt.PosSize.X + com.sun.star.awt.PosSize.WIDTH)
oText.setVisible (True)
oText.setText (".")
@ -361,9 +381,17 @@ Sub subRdoTeamYellowItemChanged_itemStateChanged (oEvent As object)
oDialog = oEvent.Source.getContext
oImageModel = oDialog.getControl ("imgTeam").getModel
oImageModel = oDialog.getControl ("imgTeamLogo").getModel
oImageModel.setPropertyValue ("ImageURL", _
fnGetImageUrl ("TeamInstinct"))
fnGetImageUrl ("TeamLogoInstinct"))
oDialog.getControl ("imgTeamLeader").setVisible (True)
oImageModel = oDialog.getControl ("imgTeamLeader").getModel
oImageModel.setPropertyValue ("ImageURL", _
fnGetImageUrl ("TeamLeaderSpark"))
oText = oDialog.getControl ("txtLeaderAppraise")
oText.setVisible (True)
oText.setText (fnGetResString ("AppraiseFromSpark"))
mItems = Array ( _
"Overall, your [Pokémon] looks like it can really battle with the best of them!", _
@ -376,8 +404,8 @@ Sub subRdoTeamYellowItemChanged_itemStateChanged (oEvent As object)
oList.setVisible (True)
oText = oDialog.getControl ("txtBestBefore")
oText.setPosSize (30, 96, 115, 8, _
com.sun.star.awt.PosSize.X + com.sun.star.awt.PosSize.WIDTH)
oText.setPosSize (-1, -1, 115, -1, _
com.sun.star.awt.PosSize.WIDTH)
oText.setVisible (True)
oText.setText ("Its best quality is")
@ -385,12 +413,12 @@ Sub subRdoTeamYellowItemChanged_itemStateChanged (oEvent As object)
oList = oDialog.getControl ("lstBest")
oList.removeItems (0, oList.getItemCount())
oList.addItems (mItems, 0)
oList.setPosSize (145, 96, 35, 8, _
oList.setPosSize (240, -1, -1, -1, _
com.sun.star.awt.PosSize.X)
oList.setVisible (True)
oText = oDialog.getControl ("txtBestAfter")
oText.setPosSize (240, 96, 5, 8, _
oText.setPosSize (335, -1, 5, -1, _
com.sun.star.awt.PosSize.X + com.sun.star.awt.PosSize.WIDTH)
oText.setVisible (True)
oText.setText (".")

View File

@ -39,3 +39,5 @@
195.DlgMain.txtBestAfter.HelpText=
201.DlgMain.cbxBest2.HelpText=
203.DlgMain.cbxBest3.HelpText=
208.DlgMain.txtLeaderAppraise.HelpText=
210.DlgMain.imgTeamLeader.HelpText=

View File

@ -39,3 +39,5 @@
195.DlgMain.txtBestAfter.HelpText=
201.DlgMain.cbxBest2.HelpText=
203.DlgMain.cbxBest3.HelpText=
208.DlgMain.txtLeaderAppraise.HelpText=
210.DlgMain.imgTeamLeader.HelpText=

View File

@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE dlg:window PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "dialog.dtd">
<dlg:window xmlns:dlg="http://openoffice.org/2000/dialog" xmlns:script="http://openoffice.org/2000/script" dlg:id="DlgMain" dlg:left="188" dlg:top="92" dlg:width="220" dlg:height="215" dlg:help-text="&amp;2.DlgMain.HelpText" dlg:closeable="true" dlg:moveable="true" dlg:title="&amp;3.DlgMain.Title">
<dlg:window xmlns:dlg="http://openoffice.org/2000/dialog" xmlns:script="http://openoffice.org/2000/script" dlg:id="DlgMain" dlg:left="100" dlg:top="100" dlg:width="220" dlg:height="230" dlg:help-text="&amp;2.DlgMain.HelpText" dlg:closeable="true" dlg:moveable="true" dlg:title="&amp;3.DlgMain.Title">
<dlg:styles>
<dlg:style dlg:style-id="0" dlg:background-color="0xff0000" dlg:text-color="0xffffff" dlg:font-weight="100"/>
<dlg:style dlg:style-id="1" dlg:background-color="0xff" dlg:text-color="0xffffff"/>
<dlg:style dlg:style-id="2" dlg:background-color="0xffff00"/>
<dlg:style dlg:style-id="3" dlg:border="none"/>
<dlg:style dlg:style-id="0" dlg:border="none"/>
<dlg:style dlg:style-id="1" dlg:background-color="0xff0000" dlg:text-color="0xffffff" dlg:font-weight="100"/>
<dlg:style dlg:style-id="2" dlg:background-color="0xff" dlg:text-color="0xffffff"/>
<dlg:style dlg:style-id="3" dlg:background-color="0xffff00"/>
</dlg:styles>
<dlg:bulletinboard>
<dlg:text dlg:id="txtPokemon" dlg:tab-index="16" dlg:left="5" dlg:top="21" dlg:width="30" dlg:height="8" dlg:help-text="&amp;22.DlgMain.txtPokemon.HelpText" dlg:value="&amp;23.DlgMain.txtPokemon.Label"/>
@ -165,6 +165,7 @@
</dlg:menupopup>
<script:event script:event-name="on-itemstatechange" script:macro-name="vnd.sun.star.script:PokemonGoIV.0Main.subLstPokemonSelected?language=Basic&amp;location=application" script:language="Script"/>
</dlg:menulist>
<dlg:img dlg:style-id="0" dlg:id="imgPokemon" dlg:tab-index="26" dlg:left="90" dlg:top="0" dlg:width="30" dlg:height="30" dlg:help-text="&amp;209.DlgMain.imgPokemon.HelpText"/>
<dlg:text dlg:id="txtCP" dlg:tab-index="17" dlg:left="5" dlg:top="36" dlg:width="15" dlg:height="8" dlg:help-text="&amp;26.DlgMain.txtCP.HelpText" dlg:value="&amp;27.DlgMain.txtCP.Label"/>
<dlg:numericfield dlg:id="numCP" dlg:tab-index="1" dlg:left="20" dlg:top="34" dlg:width="20" dlg:height="12" dlg:help-text="&amp;28.DlgMain.numCP.HelpText" dlg:decimal-accuracy="0" dlg:value-min="10" dlg:value-max="5000">
<script:event script:event-name="on-textchange" script:macro-name="vnd.sun.star.script:PokemonGoIV.0Main.subBtnOKCheck?language=Basic&amp;location=application" script:language="Script"/>
@ -245,33 +246,34 @@
</dlg:menupopup>
</dlg:menulist>
<dlg:checkbox dlg:id="cbxIsNew" dlg:tab-index="5" dlg:left="5" dlg:top="51" dlg:width="210" dlg:height="8" dlg:help-text="&amp;46.DlgMain.cbxIsNew.HelpText" dlg:value="&amp;47.DlgMain.cbxIsNew.Label" dlg:checked="true"/>
<dlg:titledbox dlg:id="grpApprasals" dlg:tab-index="21" dlg:left="5" dlg:top="65" dlg:width="210" dlg:height="125" dlg:help-text="&amp;50.DlgMain.grpApprasals.HelpText">
<dlg:titledbox dlg:id="grpApprasals" dlg:tab-index="21" dlg:left="5" dlg:top="65" dlg:width="210" dlg:height="140" dlg:help-text="&amp;50.DlgMain.grpApprasals.HelpText">
<dlg:title dlg:value="&amp;51.DlgMain.grpApprasals.Label"/>
</dlg:titledbox>
<dlg:text dlg:id="txtTeam" dlg:tab-index="22" dlg:left="10" dlg:top="96" dlg:width="20" dlg:height="8" dlg:help-text="&amp;180.DlgMain.txtTeam.HelpText" dlg:value="&amp;181.DlgMain.txtTeam.Label"/>
<dlg:img dlg:style-id="0" dlg:id="imgTeamLogo" dlg:tab-index="25" dlg:left="10" dlg:top="75" dlg:width="30" dlg:height="30" dlg:help-text="&amp;204.DlgMain.imgTeamLogo.HelpText"/>
<dlg:text dlg:id="txtTeam" dlg:tab-index="22" dlg:left="45" dlg:top="96" dlg:width="20" dlg:height="8" dlg:help-text="&amp;180.DlgMain.txtTeam.HelpText" dlg:value="&amp;181.DlgMain.txtTeam.Label"/>
<dlg:radiogroup>
<dlg:radio dlg:style-id="0" dlg:id="rdoTeamRed" dlg:tab-index="6" dlg:left="30" dlg:top="96" dlg:width="25" dlg:height="8" dlg:help-text="&amp;182.DlgMain.rdoTeamRed.HelpText" dlg:value="&amp;183.DlgMain.rdoTeamRed.Label">
<dlg:radio dlg:style-id="1" dlg:id="rdoTeamRed" dlg:tab-index="6" dlg:left="65" dlg:top="96" dlg:width="25" dlg:height="8" dlg:help-text="&amp;182.DlgMain.rdoTeamRed.HelpText" dlg:value="&amp;183.DlgMain.rdoTeamRed.Label">
<script:event script:event-name="on-itemstatechange" script:macro-name="vnd.sun.star.script:PokemonGoIV.0Main.subRdoTeamRedItemChanged_itemStateChanged?language=Basic&amp;location=application" script:language="Script"/>
</dlg:radio>
<dlg:radio dlg:style-id="1" dlg:id="rdoTeamBlue" dlg:tab-index="7" dlg:left="60" dlg:top="96" dlg:width="30" dlg:height="8" dlg:help-text="&amp;184.DlgMain.rdoTeamBlue.HelpText" dlg:value="&amp;185.DlgMain.rdoTeamBlue.Label">
<dlg:radio dlg:style-id="2" dlg:id="rdoTeamBlue" dlg:tab-index="7" dlg:left="95" dlg:top="96" dlg:width="30" dlg:height="8" dlg:help-text="&amp;184.DlgMain.rdoTeamBlue.HelpText" dlg:value="&amp;185.DlgMain.rdoTeamBlue.Label">
<script:event script:event-name="on-itemstatechange" script:macro-name="vnd.sun.star.script:PokemonGoIV.0Main.subRdoTeamBlueItemChanged_itemStateChanged?language=Basic&amp;location=application" script:language="Script"/>
</dlg:radio>
<dlg:radio dlg:style-id="2" dlg:id="rdoTeamYellow" dlg:tab-index="8" dlg:left="95" dlg:top="96" dlg:width="30" dlg:height="8" dlg:help-text="&amp;186.DlgMain.rdoTeamYellow.HelpText" dlg:value="&amp;187.DlgMain.rdoTeamYellow.Label">
<dlg:radio dlg:style-id="3" dlg:id="rdoTeamYellow" dlg:tab-index="8" dlg:left="130" dlg:top="96" dlg:width="30" dlg:height="8" dlg:help-text="&amp;186.DlgMain.rdoTeamYellow.HelpText" dlg:value="&amp;187.DlgMain.rdoTeamYellow.Label">
<script:event script:event-name="on-itemstatechange" script:macro-name="vnd.sun.star.script:PokemonGoIV.0Main.subRdoTeamYellowItemChanged_itemStateChanged?language=Basic&amp;location=application" script:language="Script"/>
</dlg:radio>
</dlg:radiogroup>
<dlg:img dlg:style-id="3" dlg:id="imgTeam" dlg:tab-index="25" dlg:left="180" dlg:top="75" dlg:width="30" dlg:height="30" dlg:help-text="&amp;207.DlgMain.imgTeam.HelpText"/>
<dlg:menulist dlg:id="lstApprasal1" dlg:tab-index="9" dlg:left="10" dlg:top="109" dlg:width="200" dlg:height="12" dlg:help-text="&amp;164.DlgMain.lstApprasal1.HelpText" dlg:spin="true"/>
<dlg:text dlg:id="txtBestBefore" dlg:tab-index="23" dlg:left="10" dlg:top="126" dlg:width="20" dlg:height="8" dlg:help-text="&amp;194.DlgMain.txtBestBefore.HelpText"/>
<dlg:menulist dlg:id="lstBest" dlg:tab-index="10" dlg:left="30" dlg:top="124" dlg:width="35" dlg:height="12" dlg:help-text="&amp;193.DlgMain.lstBest.HelpText" dlg:spin="true">
<dlg:img dlg:style-id="0" dlg:id="imgTeamLeader" dlg:tab-index="28" dlg:left="10" dlg:top="105" dlg:width="30" dlg:height="35" dlg:help-text="&amp;210.DlgMain.imgTeamLeader.HelpText"/>
<dlg:text dlg:id="txtLeaderAppraise" dlg:tab-index="27" dlg:left="45" dlg:top="111" dlg:width="165" dlg:height="8" dlg:help-text="&amp;208.DlgMain.txtLeaderAppraise.HelpText"/>
<dlg:menulist dlg:id="lstApprasal1" dlg:tab-index="9" dlg:left="45" dlg:top="124" dlg:width="165" dlg:height="12" dlg:help-text="&amp;164.DlgMain.lstApprasal1.HelpText" dlg:spin="true"/>
<dlg:text dlg:id="txtBestBefore" dlg:tab-index="23" dlg:left="45" dlg:top="141" dlg:width="20" dlg:height="8" dlg:help-text="&amp;194.DlgMain.txtBestBefore.HelpText"/>
<dlg:menulist dlg:id="lstBest" dlg:tab-index="10" dlg:left="65" dlg:top="139" dlg:width="35" dlg:height="12" dlg:help-text="&amp;193.DlgMain.lstBest.HelpText" dlg:spin="true">
<script:event script:event-name="on-itemstatechange" script:macro-name="vnd.sun.star.script:PokemonGoIV.0Main.subLstBestItemChanged_itemStateChanged?language=Basic&amp;location=application" script:language="Script"/>
</dlg:menulist>
<dlg:text dlg:id="txtBestAfter" dlg:tab-index="24" dlg:left="65" dlg:top="126" dlg:width="100" dlg:height="8" dlg:help-text="&amp;195.DlgMain.txtBestAfter.HelpText"/>
<dlg:checkbox dlg:id="cbxBest2" dlg:tab-index="11" dlg:left="10" dlg:top="141" dlg:width="200" dlg:height="8" dlg:help-text="&amp;201.DlgMain.cbxBest2.HelpText" dlg:checked="false"/>
<dlg:checkbox dlg:id="cbxBest3" dlg:tab-index="12" dlg:left="10" dlg:top="156" dlg:width="200" dlg:height="8" dlg:help-text="&amp;203.DlgMain.cbxBest3.HelpText" dlg:checked="false"/>
<dlg:menulist dlg:id="lstApprasal2" dlg:tab-index="13" dlg:left="10" dlg:top="169" dlg:width="200" dlg:height="12" dlg:help-text="&amp;165.DlgMain.lstApprasal2.HelpText" dlg:spin="true"/>
<dlg:button dlg:id="btnOK" dlg:tab-index="14" dlg:disabled="true" dlg:left="35" dlg:top="195" dlg:width="60" dlg:height="15" dlg:help-text="&amp;85.DlgMain.btnOK.HelpText" dlg:default="true" dlg:button-type="ok"/>
<dlg:button dlg:id="btnCancel" dlg:tab-index="15" dlg:left="125" dlg:top="195" dlg:width="60" dlg:height="15" dlg:help-text="&amp;87.DlgMain.btnCancel.HelpText" dlg:button-type="cancel"/>
<dlg:img dlg:style-id="3" dlg:id="imgPokemon" dlg:tab-index="26" dlg:left="90" dlg:top="0" dlg:width="30" dlg:height="30" dlg:help-text="&amp;209.DlgMain.imgPokemon.HelpText"/>
<dlg:text dlg:id="txtBestAfter" dlg:tab-index="24" dlg:left="100" dlg:top="141" dlg:width="100" dlg:height="8" dlg:help-text="&amp;195.DlgMain.txtBestAfter.HelpText"/>
<dlg:checkbox dlg:id="cbxBest2" dlg:tab-index="11" dlg:left="45" dlg:top="156" dlg:width="165" dlg:height="8" dlg:help-text="&amp;201.DlgMain.cbxBest2.HelpText" dlg:checked="false"/>
<dlg:checkbox dlg:id="cbxBest3" dlg:tab-index="12" dlg:left="45" dlg:top="171" dlg:width="165" dlg:height="8" dlg:help-text="&amp;203.DlgMain.cbxBest3.HelpText" dlg:checked="false"/>
<dlg:menulist dlg:id="lstApprasal2" dlg:tab-index="13" dlg:left="45" dlg:top="184" dlg:width="165" dlg:height="12" dlg:help-text="&amp;165.DlgMain.lstApprasal2.HelpText" dlg:spin="true"/>
<dlg:button dlg:id="btnOK" dlg:tab-index="14" dlg:disabled="true" dlg:left="35" dlg:top="210" dlg:width="60" dlg:height="15" dlg:help-text="&amp;85.DlgMain.btnOK.HelpText" dlg:default="true" dlg:button-type="ok"/>
<dlg:button dlg:id="btnCancel" dlg:tab-index="15" dlg:left="125" dlg:top="210" dlg:width="60" dlg:height="15" dlg:help-text="&amp;87.DlgMain.btnCancel.HelpText" dlg:button-type="cancel"/>
</dlg:bulletinboard>
</dlg:window>
</dlg:window>