📄 guigeneral.java
字号:
BluetoothRemoteControl.debug("N: " + paramArrayOfString[j]);
++j;
str = str.substring(i + 1);
BluetoothRemoteControl.debug("S: " + paramArrayOfString[j]);
}
else
{
paramArrayOfString[j] = str;
BluetoothRemoteControl.debug("L: " + paramArrayOfString[j]);
++j;
break;
}
}
while (j < 998);
int k = j;
return k;
}
catch (Exception localException)
{
localObject1 = new Exception("getSubStrings " + localException.toString());
throw ((Throwable)localObject1);
}
catch (Error localError)
{
localObject1 = new Error("getSubStrings " + localError.toString());
throw ((Throwable)localObject1);
}
}
private void insertEmptyString()
{
int i = getWidth();
Font localFont = Font.getDefaultFont();
int j = localFont.getHeight();
append(new Spacer(i, j));
}
public void replayScreenProperty()
{
BluetoothRemoteControl.debug("askScreenProperty");
int i = getWidth();
int j = getHeight();
byte[] arrayOfByte = new byte[12];
arrayOfByte[0] = 0;
arrayOfByte[1] = 12;
arrayOfByte[2] = 0;
arrayOfByte[3] = 8;
setLengthAtPos(arrayOfByte, 4, i);
setLengthAtPos(arrayOfByte, 6, j);
setLengthAtPos(arrayOfByte, 8, this.parent.maxScreenX);
setLengthAtPos(arrayOfByte, 10, this.parent.maxScreenY);
writePacket(arrayOfByte);
}
private void showText(byte[] paramArrayOfByte, int paramInt)
throws Exception, Error
{
Object localObject1;
try
{
this.stateDisplay = SHOW_TEXT;
BluetoothRemoteControl.debug("showText");
int i = getLengthAtPos(paramArrayOfByte, 4);
int j = getLengthAtPos(paramArrayOfByte, 6 + i);
String str = new String(paramArrayOfByte, 6, i, "UTF-8");
localObject1 = new String(paramArrayOfByte, 6 + i + 2, j, "UTF-8");
BluetoothRemoteControl.debug(Integer.toString(i));
BluetoothRemoteControl.debug(Integer.toString(j));
BluetoothRemoteControl.debug(str + "\n");
BluetoothRemoteControl.debug(((String)localObject1) + "\n");
this.parentWin = Display.getDisplay(this.own).getCurrent();
int k = 0;
k = getSubStrings((String)localObject1, this.stringBuffer);
this.tCan.setText(str, "", this.stringBuffer, k, false, "");
this.tCan.show(false);
}
catch (Exception localException)
{
localObject1 = new Exception("showText " + localException.toString());
throw ((Throwable)localObject1);
}
catch (Error localError)
{
localObject1 = new Error("showText " + localError.toString());
throw ((Throwable)localObject1);
}
}
private void showTextTitleCanvas(byte[] paramArrayOfByte, int paramInt)
throws Exception, Error
{
Object localObject1;
try
{
int i;
int j;
int k;
int i1;
String str1;
String str2;
String str3;
String str4;
int i4;
this.stateDisplay = SHOW_TEXT;
int i2 = 0;
int i3 = 0;
switch (paramArrayOfByte[4])
{
case 0:
case 3:
i = getLengthAtPos(paramArrayOfByte, 5);
j = getLengthAtPos(paramArrayOfByte, 7 + i);
k = getLengthAtPos(paramArrayOfByte, 9 + i + j);
i1 = getLengthAtPos(paramArrayOfByte, 11 + i + j + k);
str1 = new String(paramArrayOfByte, 7, i, "UTF-8");
str2 = new String(paramArrayOfByte, 7 + i + 2, j, "UTF-8");
str3 = new String(paramArrayOfByte, 7 + i + 2 + j + 2, k, "UTF-8");
str4 = new String(paramArrayOfByte, 7 + i + 2 + j + 2 + k + 2, i1, "UTF-8");
i4 = 0;
i4 = getSubStrings(str3, this.stringBuffer);
if ((i > 0) || (j > 0) || (k > 0))
if (paramArrayOfByte[4] == 0)
this.tCan.setText(str1, str2, this.stringBuffer, i4, false, str4);
else
this.tCan.setText(str1, str2, this.stringBuffer, i4, true, str4);
break;
case 1:
i = getLengthAtPos(paramArrayOfByte, 5);
j = getLengthAtPos(paramArrayOfByte, 7 + i);
k = getLengthAtPos(paramArrayOfByte, 9 + i + j);
i1 = getLengthAtPos(paramArrayOfByte, 17 + i + j + k);
str1 = new String(paramArrayOfByte, 7, i, "UTF-8");
str2 = new String(paramArrayOfByte, 7 + i + 2, j, "UTF-8");
str3 = new String(paramArrayOfByte, 7 + i + 2 + j + 2, k, "UTF-8");
str4 = new String(paramArrayOfByte, 7 + i + 2 + j + 2 + k + 2 + 2 + 4, i1, "UTF-8");
i2 = getLengthAtPos(paramArrayOfByte, 11 + i + j + k + 2);
i3 = getLengthAtPos(paramArrayOfByte, 11 + i + j + k + 4);
i4 = 0;
i4 = getSubStrings(str3, this.stringBuffer);
if ((i > 0) || (j > 0) || (k > 0))
this.tCan.setText(str1, str2, this.stringBuffer, i4, true, str4);
if ((i2 > 0) && (i3 > 0))
this.tCan.setImage(false, paramArrayOfByte, 0, 0, i2, i3);
break;
case 2:
int l = getLengthAtPos(paramArrayOfByte, 5);
i2 = getLengthAtPos(paramArrayOfByte, 7);
i3 = getLengthAtPos(paramArrayOfByte, 9);
if (l > 0)
this.tCan.setImage(true, paramArrayOfByte, 11, l, i2, i3);
break;
default:
return;
}
this.tCan.show(true);
}
catch (Exception localException)
{
localObject1 = new Exception("showTextTitleCanvas " + localException.toString());
throw ((Throwable)localObject1);
}
catch (Error localError)
{
localObject1 = new Error("showTextTitleCanvas " + localError.toString());
throw ((Throwable)localObject1);
}
}
private void vibrate(byte[] paramArrayOfByte, int paramInt)
{
BluetoothRemoteControl.debug("vibrate");
int i = 0;
try
{
i = getLengthAtPos(paramArrayOfByte, 4);
}
catch (Exception localException)
{
}
Display.getDisplay(this.own).vibrate(i);
}
private void showDialog(byte[] paramArrayOfByte, int paramInt)
throws Exception, Error
{
Object localObject1;
this.stateDisplay = SHOW_DIALOG;
BluetoothRemoteControl.debug("showDialog");
try
{
int i = getLengthAtPos(paramArrayOfByte, 4);
int j = getLengthAtPos(paramArrayOfByte, 6 + i);
int k = getLengthAtPos(paramArrayOfByte, 6 + i + 2);
int l = getLengthAtPos(paramArrayOfByte, 6 + i + 2 + 2);
int i1 = getLengthAtPos(paramArrayOfByte, 6 + i + 2 + 2 + 2);
int i2 = getLengthAtPos(paramArrayOfByte, 6 + i + 2 + 2 + 2 + 2);
int i3 = getLengthAtPos(paramArrayOfByte, 6 + i + 2 + 2 + 2 + 2 + 2);
String str = new String(paramArrayOfByte, 6, i, "UTF-8");
deleteAll();
int i4 = 0;
i4 = getSubStrings(str, this.stringBuffer);
this.can.setText(this.stringBuffer, i4);
this.can.setTimerBar(j, k);
this.can.setButtonStatus(l);
this.can.setShuffleButton(i1);
this.can.setRepeatButton(i2);
this.can.setMuteStatus(i3);
this.can.show();
}
catch (Exception localException)
{
localObject1 = new Exception("showDialog " + localException.toString());
throw ((Throwable)localObject1);
}
catch (Error localError)
{
localObject1 = new Error("showDialog " + localError.toString());
throw ((Throwable)localObject1);
}
}
private void showImage(byte[] paramArrayOfByte, int paramInt)
throws Exception, Error
{
Object localObject1;
this.stateDisplay = SHOW_IMAGE;
BluetoothRemoteControl.debug("showImage");
try
{
int i = getLengthAtPos(paramArrayOfByte, 2);
this.img.setImage(paramArrayOfByte, 4, i);
this.img.show();
}
catch (Exception localException)
{
localObject1 = new Exception("showImage " + localException.toString());
throw ((Throwable)localObject1);
}
catch (Error localError)
{
localObject1 = new Error("showImage " + localError.toString());
throw ((Throwable)localObject1);
}
}
private void showPercentInput(byte[] paramArrayOfByte, int paramInt)
throws Exception, Error
{
Object localObject1;
try
{
this.stateDisplay = SHOW_PERCENT_INPUT;
BluetoothRemoteControl.debug("showPercentInput");
int i = getLengthAtPos(paramArrayOfByte, 4);
int j = getLengthAtPos(paramArrayOfByte, 6 + i);
String str = new String(paramArrayOfByte, 6, i, "UTF-8");
BluetoothRemoteControl.debug(Integer.toString(i));
BluetoothRemoteControl.debug(Integer.toString(j));
BluetoothRemoteControl.debug(str + "\n");
deleteAll();
insertEmptyString();
this.percentInput = new Gauge(str, true, 100, 0);
this.percentInput.setValue(j);
this.percentInput.setLayout(3);
this.percentInput.setPreferredSize(getWidth(), getHeight());
append(this.percentInput);
show();
}
catch (Exception localException)
{
localObject1 = new Exception("showPercentInput " + localException.toString());
throw ((Throwable)localObject1);
}
catch (Error localError)
{
localObject1 = new Error("showPercentInput " + localError.toString());
throw ((Throwable)localObject1);
}
}
private void showProgress(byte[] paramArrayOfByte, int paramInt)
throws Exception, Error
{
Object localObject1;
try
{
this.stateDisplay = SHOW_PROGRESS;
BluetoothRemoteControl.debug("showProgress");
int i = getLengthAtPos(paramArrayOfByte, 2);
String str = new String(paramArrayOfByte, 4, i, "UTF-8");
BluetoothRemoteControl.debug(str + "\n");
deleteAll();
insertEmptyString();
append(new Gauge(str, false, -1, 2));
show();
}
catch (Exception localException)
{
localObject1 = new Exception("showProgress " + localException.toString());
throw ((Throwable)localObject1);
}
catch (Error localError)
{
localObject1 = new Error("showProgress " + localError.toString());
throw ((Throwable)localObject1);
}
}
private void showTextInput(byte[] paramArrayOfByte, int paramInt)
throws Exception, Error
{
Object localObject1;
try
{
this.stateDisplay = SHOW_TEXT_INPUT;
BluetoothRemoteControl.debug("showTextInput");
int i = getLengthAtPos(paramArrayOfByte, 4);
int j = getLengthAtPos(paramArrayOfByte, 6 + i);
String str = new String(paramArrayOfByte, 6, i, "UTF-8");
localObject1 = new String(paramArrayOfByte, 6 + i + 2, j, "UTF-8");
BluetoothRemoteControl.debug(Integer.toString(i));
BluetoothRemoteControl.debug(Integer.toString(j));
BluetoothRemoteControl.debug(str + "\n");
BluetoothRemoteControl.debug(((String)localObject1) + "\n");
deleteAll();
this.myInput = new TextBox(str, (String)localObject1, 300, 0);
this.myInput.addCommand(this.SCR_MAIN_BACK_CMD);
this.myInput.addCommand(this.SCR_MAIN_OK_CMD);
this.myInput.setCommandListener(this);
showTextBox();
}
catch (Exception localException)
{
localObject1 = new Exception("showTextInput " + localException.toString());
throw ((Throwable)localObject1);
}
catch (Error localError)
{
localObject1 = new Error("showTextInput " + localError.toString());
throw ((Throwable)localObject1);
}
}
private void showMenu(byte[] paramArrayOfByte, int paramInt1, int paramInt2)
throws Exception, Error
{
label445: label458: Object localObject2;
try
{
String str2;
this.stateDisplay = SHOW_MENU;
BluetoothRemoteControl.debug("showMenu");
String str1 = "";
try
{
if (this.menuList != null)
str1 = this.menuList.getTitle();
}
catch (Exception localException1)
{
}
catch (Error localError1)
{
}
this.menuList = new List("", 3);
this.menuList.addCommand(this.SCR_MAIN_BACK_CMD);
this.menuList.addCommand(this.SCR_MAIN_OK_CMD);
this.menuList.setCommandListener(this);
deleteAll();
int k = 4;
int i1 = 0;
if (paramInt2 == DIRECTION_NO)
{
int i = getLengthAtPos(paramArrayOfByte, 2);
this.menuCount = 0;
this.menuStore.removeAllElements();
int l = 1;
while (true)
{
if (k > i)
break label458;
int j = getLengthAtPos(paramArrayOfByte, k);
String str3 = new String(paramArrayOfByte, k + 2, j, "UTF-8");
if (l != 0)
{
this.menuList.setTitle(str3);
l = 0;
}
else
{
this.menuStore.addElement(str3);
if (i1 < MAX_MENU_ITEMS)
this.menuList.append(str3, null);
i1 += 1;
}
BluetoothRemoteControl.debug("Row: " + str3);
k = k + 2 + j;
}
}
if (paramInt2 == DIRECTION_NEXT)
{
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -