Создание Эльфов : Эльфостроение : Форум

Страница 150 из 211: « 1 ... 146 147 148 149 [150] 151 152 153 154 ... 211 »

 den_po:
10.09.10, 13:00
 
MoneyMasteR пишет:
DuMOHsmol,

Код: 
int isActivityMenu(BOOK*bk)
{
  if(!strcmp(bk->xbook->name,"ActivityMenuBook")) return 1;
  return 0;
}

int main(void)
{
  if(FindBook(isActivityMenu))/*Your code*/;
  return 0;
}

кстати, до сих пор этим не лучшим способом ведь кто-то пользуется. я предлагал другой вариант
http://supertrubka.org/newbb_plus/viewtopic.php?topic_id=4454&post_id=150311#150311

 DuMOHsmol:
10.09.10, 14:27
 Пробовал так:

Код: 
int cmp_proc(BOOK* book,int* param)
{
  if(!strcmp(book->xbook->name, (char*)param)) return 1;
  return 0;
}

int ShowInfo(int key, int r1 , int mode) 
{  
  if (Display_GetTopBook(0) == FindBookEx(cmp_proc,(int*)"RightNowBook"));
  {
    if (key == KEY_VOL_UP || key == KEY_VOL_DOWN)
    {
      if (mode == KBD_SHORT_PRESS)
      {
        MessageBox(EMPTY_SID,STR("Найдено активити"),NOIMAGE,1,0,0);
        return(0);
      }
    }
  }
  return(0); 
}


И так:

Код: 
int ShowInfo(int key, int r1 , int mode) 
{  
  if (Display_GetTopBook(0) == FindBook(get_IsRightNowBook()));
  {
    if (key == KEY_VOL_UP || key == KEY_VOL_DOWN)
    {
      if (mode == KBD_SHORT_PRESS)
      {
        MessageBox(EMPTY_SID,STR("Найдено активити"),NOIMAGE,1,0,0);
        return(0);
      }
    }
  }
  return(0); 
}


Все равно работает так, как будто активити всё время на переднем плане.

 albertnet3:
15.09.10, 06:09
 thanks den_po for link to correctly topic for me question ;)
I need help,
I used for drawbar state for free memory in Card and view state for charge battery work perfectly for show, but show memory Phone, I have 1 bug, look sshot:

not work fine for show phone memory state.
please help me or explain correct method for view memory phone in bar
Код: 
  if (PHONEBAR_ENABLED==1)
   {
      switch( GetChipID() & CHIPID_MASK )
      {
  case CHIPID_DB2000:
  case CHIPID_DB2010:
  case CHIPID_DB2020:
  case CHIPID_PNX5230:
    {
      VOLUMESIZE vs;
     GetVolumeSize( L"/tpa/", &vs );
      DrawRect(Phonebar.x1, Phonebar.y1,Phonebar.x2,Phonebar.y2,COLORBBBORDERPHONE,COLORBBBGPHONE);
      DrawRect(Phonebar.x1, Phonebar.y1,Phonebar.x1+(vs.BytesPerCluster * vs.TotalFreeClusters*(Phonebar.x2-Phonebar.x1)/100),Phonebar.y2,COLORBBBORDERPHONE,COLORBBBARPHONE);
    break;
    }
  case CHIPID_DB3150:
  case CHIPID_DB3200:
  case CHIPID_DB3210:
  case CHIPID_DB3350:
  {
    VOLUMESIZE_A2 vs;
     GetVolumeSize( L"/tpa/", (VOLUMESIZE*)&vs );
      DrawRect(Phonebar.x1, Phonebar.y1,Phonebar.x2,Phonebar.y2,COLORBBBORDERPHONE,COLORBBBGPHONE);
      DrawRect(Phonebar.x1, Phonebar.y1,Phonebar.x1+(vs.FreeSpace*(Phonebar.x2-Phonebar.x1)/100),Phonebar.y2,COLORBBBORDERPHONE,COLORBBBARPHONE);
    break;
    }
      }
    }

not work correctly xD
den_po
yes. delete me post in the topic "Проблемы и некорректная работа эльфов· for post in this topic
or am wrong, if so sorry please.

excuse me but I do not know, only I ask want to learn. thanks for your reply to my question
[ Edited by albertnet3 в 15.9.10 00:15 ]

[ Edited by albertnet3 в 15.9.10 00:16 ]

[ Edited by albertnet3 в 15.9.10 00:32 ]

 den_po:
15.09.10, 06:10
 albertnet3, man, did you read my previous answer?



Добавлено 15.9.10 06:18

albertnet3, you know what? i hate stupid questions.
http://en.wikipedia.org/wiki/Ratio

 farid:
16.09.10, 11:17
 @denpo
please give me an example of this function =)
thanks in advance
Код: 
#pragma swi_number=0x362
__swi __arm int Alarm_GetCurrentTypeAndAlarmID( char* type, wchar_t* AlarmID );
#pragma swi_number=0x363
__swi __arm int Alarm_GetState( char* state, int AlarmID );
#pragma swi_number=0x364
__swi __arm int Alarm_GetTIME( TIME* AlarmTime, int AlarmID );
#pragma swi_number=0x365
__swi __arm int Alarm_GetWeekSettings( void* week, int AlarmID );

big respect to all mobilefree developer

 DuXeN0N:
16.09.10, 12:11
 farid, what don't you understand? they are simple

 blacklizard:
17.09.10, 04:50
 farid, maybe you need to read this.

http://www.cplusplus.com/doc/tutorial/pointers/


Добавлено 17.9.10 10:21

Код: 
wchar_t   ws[256],AlarmID;
char type,state; 
TIME AlarmTime;
 
  Alarm_GetCurrentTypeAndAlarmID(&type,&AlarmID );
  Alarm_GetState(&state,AlarmID );
  Alarm_GetTIME(&AlarmTime,AlarmID );
  snwprintf(ws,256,L"Type: %d\nAlarmId: %d\nAlarm State: %d\nAlarm Time: %d:%d",type,AlarmID,state,AlarmTime.hour,AlarmTime.min);
  MessageBox(EMPTY_SID,Str2ID(ws,0,SID_ANY_LEN), NOIMAGE, 1, 5000 , 0);


Прикрепленный к сообщению файл:

scr09-18-25.png scr09-18-25.png (40.96 kb; 166 hits) Скачать файл
scr09-18-33.png scr09-18-33.png (27.77 kb; 175 hits) Скачать файл

 farid:
17.09.10, 11:20
 DuXeN0N, sorry but im new at C programming :-) . i want to learning for new function. thx in advance

blacklizard, hmmm... thats i need. thx for your help. =) . big (r) specially for you
Патч:
;G502 SW-R1FA037
;Change Right Softkey in Standby to "GoTo Shortcut".
;Items: Inbox, Music player, Alarms, Calendar, Timer, Bluetooth (Turn On when BT is off/Turn Off when BT is On)
;Added icon on Item list (idea by madfish)
;Added Alarm State(Alarm: hour.min) at 2ndLine of Alarm item
;Added Date state(dd-mm-yyyy) at 2ndLine of Calendar item
;Added Bluetooth state(Turn on BT-Turn Off BT) at 2ndLine of Bluetooth item
;Improved code
;v 1.4
;(!) You must add new item to menu.ml (Goto_Shortcut_Id)
;(c) farid
;(r) blacklizard


http://supertrubka.org/newbb_plus/viewtopic.php?topic_id=3673&post_id=182290#182290

 MO_oC:
21.09.10, 08:02
 in MiniGPS,
get_CellData(&plmn_lac,&rat_ci,&CSReg);
currentLAC = plmn_lac.LAC;
currentCID = rat_ci.CI;

seems that currentLAC is wrong.
I get it like this.

currentLAC = (plmn_lac.LAC>>8)|((plmn_lac.LAC<<8)&0xFF00);

and it work.

 den_po:
21.09.10, 08:14
 MO_oC, it's a known bug
Страница 150 из 211: « 1 ... 146 147 148 149 [150] 151 152 153 154 ... 211 »

URL этой темы:
https://mobilefree.justdanpo.ru/newbb_plus/viewtopic.php?topic_id=2479&start=1490

© 2005-2018 supertrubka.org