亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? uaccessoriesmenu.pas

?? FMA is a free1 powerful phone editing tool allowing users to easily manage all of the personal data
?? PAS
?? 第 1 頁 / 共 2 頁
字號:
unit uAccessoriesMenu;

{
*******************************************************************************
* Descriptions: Accessories Menu for Ericsson Phone Implementation
* $Source: /cvsroot/fma/fma/uAccessoriesMenu.pas,v $
* $Locker:  $
*
* Todo:
*
* Change Log:
* $Log: uAccessoriesMenu.pas,v $
*
*******************************************************************************
}

{$WARN SYMBOL_PLATFORM OFF}

interface

uses
  ComObj, ActiveX, MobileAgent_TLB, StdVcl, Classes, TntClasses, SysUtils, TntSysUtils, TntSystem, uThreadSafe;

const
  DLG_OPTION      = $01;
  DLG_MSGBOX      = $02;
  DLG_YESNO       = $03;
  DLG_ONOFF       = $04;
  DLG_PERCENT     = $05;
  DLG_INPUTSTR    = $06;
  DLG_INPUTINT    = $07;
  DLG_INFORMATION = $08;
  DLG_FEEDBACK    = $09;
  DLG_SUBMENU     = $0a;
  DLG_LIST_1      = $0b;
  DLG_LIST_N      = $0c;
  DLG_INPUTERR    = $80;

type
  TAccessoriesMenu = class(TAutoObject, IAccessoriesMenu)
  private
    FTitle: WideString;
    FMenuList: TTntStrings;
    FMenuListOptions: TStrings;
    FUIOpen: Boolean;
    function UseSEcommands: Boolean;
  protected
    { Protected declarations }
    procedure Init; safecall;
    procedure Clear; safecall;
    procedure AddItem(const Caption, Event: WideString); safecall;
    procedure AddItemEx(const Caption: WideString; Disabled, Selected, CanDelete: WordBool; ImgIndex: Integer; const Event: WideString); safecall;
    procedure Set_MenuType(Value: Integer); safecall;
    procedure Set_Title(const Value: WideString); safecall;
    procedure Set_Selected(Value: Integer); safecall;
    procedure Update; safecall;
    procedure Set_Back(const Value: WideString); safecall;
    procedure ClearMenu; safecall;
    procedure Set_NextState(Value: Integer); safecall;
    procedure DlgOption; safecall;
    procedure DlgMsgBox(const Msg: WideString; TimeoutS: Integer); safecall;
    procedure DlgYesNo(const Msg, Event: WideString; TimeoutS: Integer); safecall;
    procedure DlgOnOff(const Title, Event: WideString; Default: Integer); safecall;
    procedure DlgPercent(const Title, Event: WideString; Steps, Pos: Integer); safecall;
    procedure DlgInputStr(const Title, Prompt: WideString; MaxLen: Integer;
      const DefaultStr: WideString; const Event: WideString); safecall;
    procedure DlgInputInt(const Title, Prompt: WideString; MinVal, MaxVal,
      DefaultVal: Integer; const event: WideString); safecall;
    procedure DlgInformation(const Title, Msg: WideString); safecall;
    procedure DlgFeedback(const Title, event: WideString); safecall;
  public
    FSelected: Integer;
    FBack: String;
    FEventList: TTntStrings;
    FNextState: Integer;
    FGeneralEvent: String;
    FType: Integer;
    FPercentSteps: Integer;
    FPercentPos: Integer;
    FMenuEntryEvent: String;
    FInputMax: Integer;
    FInputMin: Integer;
    property SessionOpened: boolean read FUIOpen;
    procedure OpenUI; safecall;
    procedure CloseUI; safecall;
    procedure Initialize; override;
    destructor Destroy; override;
  end;

implementation

uses
  gnugettext, gnugettexthelpers, cUnicodeCodecs,
  ComServ, Unit1, uLogger;

{*******************************************************************************
Init() [Called on connect. Initialises FUIOpen property and inserts
        FMA into (Settings/)Connectivity/Accessories menu]
*******************************************************************************}
procedure TAccessoriesMenu.Init;
var
  sl: TTntStringList;
  i: Integer;
begin
  FUIOpen:=False;
  if Form1.FConnected then begin
    if UseSEcommands then begin
      Form1.TxAndWait('AT*SEAM="FMA",13'); // do not localize
      sl := TTntStringList.Create;
      try
        sl.Text := ThreadSafe.RxBuffer.Text;
        for i := 0 to sl.Count - 1 do
          if pos('*SEAM:', sl[i]) = 1 then // do not localize
            FMenuEntryEvent:='*SEAAI'+Copy(sl[i],6,MaxInt);
      finally
        sl.free
      end;
    end
    else begin
      FMenuEntryEvent:='';
      Form1.ScheduleTxAndWait('AT*EAM="FMA"'); // do not localize
    end;
  end;
  Log.AddCommunicationMessage('AccessoriesMenu.Init: Event="'+FMenuEntryEvent+'"'); // do not localize debug
  Clear;
end;

{*******************************************************************************
Clear() [Clear all properties of the menu: Menu items, Abort command, Title,
         and sets Index of selected item and NextState to 1.
*******************************************************************************}
procedure TAccessoriesMenu.Clear;
begin
  Log.AddScriptMessage('AccessoriesMenu.Clear', lsDebug); // do not localize debug
  ClearMenu;
  FTitle := '';
  FSelected := 1;
  FNextState := 1;
end;

{*******************************************************************************
AddItem(
  WideString Caption  [Text to be inserted into item],
  WideString  Event   [Command to be executed on item select])
*******************************************************************************}
procedure TAccessoriesMenu.AddItem(const Caption, Event: WideString);
begin
  FMenuList.Add(Caption);
  FMenuListOptions.Add('0,0,0,0');
  FEventList.Add(Event);
end;

procedure TAccessoriesMenu.AddItemEx(const Caption: WideString; Disabled, Selected, CanDelete: WordBool; ImgIndex: Integer; const Event: WideString);
var
  s: string;
begin
  if Disabled and (not UseSEcommands) then Exit;
  FMenuList.Add(Caption);
  s := IntToStr(ImgIndex) + ',';
  if Disabled then
    s := s + '1,'
  else
    s := s + '0,';
  if Selected then
    s := s + '1,'
  else
    s := s + '0,';
  if CanDelete then
    s := s + '1'
  else
    s := s + '0';
  FMenuListOptions.Add(s);
  FEventList.Add(Event);
end;

procedure TAccessoriesMenu.Set_MenuType(Value: Integer);
begin
  if Value <= DLG_LIST_N then
    FType := Value;
end;

{*******************************************************************************
Set_Title(
  WideString Value  [Text to be displayed as menu title])
*******************************************************************************}
procedure TAccessoriesMenu.Set_Title(const Value: WideString);
begin
  FTitle := Value;
end;

{*******************************************************************************
Set_Selected(
  Integer Value [Index of item to be preselected on menu update])
*******************************************************************************}
procedure TAccessoriesMenu.Set_Selected(Value: Integer);
begin
  FSelected := Value;
end;

{*******************************************************************************
Update() [Shows the menu on the phone]
*******************************************************************************}
procedure TAccessoriesMenu.Update;
var
  Com: String;
  Buf, TempBuf: String;
  ComLen, ComCount: Integer;
  W: WideString;
  i: Integer;
begin
  { AT*EASM=<title>,<next_state>,<selected_item>,<number_of_menu_items>[,<menu_item>[,<menu_item>, ...]][,<final_flag>] }

  // Prepare start of AT command
  OpenUI;
  if FType and $0f < DLG_SUBMENU then
    FType := DLG_SUBMENU;
  Log.AddScriptMessage('AccessoriesMenu.Update', lsDebug); // do not localize debug

  if UseSEcommands then begin
    Com := 'AT*SELIST="' + WideStringToUTF8String(FTitle) + '",'; // do not localize
    if FType = DLG_LIST_1 then
      Com := Com + '1,'
    else if FType = DLG_LIST_N then
      Com := Com + '2,'
    else
      Com := Com + '3,';
    If FSelected>0 Then
      Com := Com + IntToStr(FSelected-1) + ',' // do not localize
    else
      Com := Com + '0,';  // do not localize
  end
  else
    Com := 'AT*EASM="' + WideStringToUTF8String(Copy(FTitle,1,15)) + '",' + IntToStr(FNextState) + ',' + IntToStr(FSelected) + ','; // do not localize
  ComLen := Length(Com);

  // Reset all flags and buffers
  ComCount := 0;
  Buf := '';
  TempBuf := '';

  // Build menu
  for i := 0 to FMenuList.Count - 1 do begin
    // Add menu item
    W := FMenuList.Strings[i];
    repeat
      TempBuf := WideStringToUTF8String(W);
      if Length(TempBuf) <= 200 then break; // normally break in first test
      // Remove last char in W. In next iteration this will remove last UTF-8 encoded char in TempBuf (from 1 to 3 bytes)
      SetLength(W, Length(W)-1);
    until false;
    if UseSEcommands then
      TempBuf := ',"' + TempBuf + '",' + FMenuListOptions[i]
    else
      TempBuf := ',"' + TempBuf + '"';

    // Check if AT command is not too long
    if ((ComLen + Length(Buf) + Length(TempBuf)) > 200) and not UseSEcommands then begin
      // It is too long, set final_flag to 0, we will continue
      Buf := Com + IntToStr(ComCount) + Buf + ',0';
      // Send AT command
      Form1.TxAndWait(Buf);

      // Store last item to buffer
      Buf := TempBuf;
      ComCount := 1;
    end
    else begin
      // Add menu item and increase counter of items in one command
      Buf := Buf + TempBuf;
      Inc(ComCount);
    end;
  end;

  // Send rest of menu to phone with final_flag set to 1
  if UseSEcommands then
    Buf := Com + IntToStr(ComCount) + ',1,1' + Buf 
  else
    Buf := Com + IntToStr(ComCount) + Buf + ',1'; 
  Form1.TxAndWait(Buf);
end;

{*******************************************************************************
Set_Back(
  WideString Value  [Command to be executed on menu abort])
*******************************************************************************}
procedure TAccessoriesMenu.Set_Back(const Value: WideString);
begin
  FBack := Value;
end;

{*******************************************************************************
ClearMenu() [Clears menu items and abort command]
*******************************************************************************}
procedure TAccessoriesMenu.ClearMenu;
begin
  Log.AddScriptMessage('AccessoriesMenu.ClearMenu', lsDebug); // do not localize debug
  FType := DLG_SUBMENU;
  FMenuList.Clear;
  FMenuListOptions.Clear;
  FEventList.Clear;
  FBack := '';
end;

{*******************************************************************************
Set_NextState(

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩高清一级片| 在线免费观看日韩欧美| 97国产精品videossex| 欧美精选一区二区| 国产精品久久夜| 国产一区二区中文字幕| 欧美一区二区三区视频在线| 136国产福利精品导航| 国产真实乱子伦精品视频| 欧美人与z0zoxxxx视频| 亚洲精品免费在线| 白白色亚洲国产精品| 欧美精品一区二区三区一线天视频 | 在线观看www91| 日本一区二区三区电影| 国产精品一区二区x88av| 日韩三级精品电影久久久| 亚洲第四色夜色| 在线观看www91| 一区二区三区高清| 91黄色免费网站| 亚洲视频 欧洲视频| 99久久777色| 1024成人网色www| 91免费观看国产| 中文字幕一区三区| 91小视频在线免费看| 亚洲欧洲av另类| 日本高清不卡视频| 夜夜精品浪潮av一区二区三区| 色综合久久久久综合体| 亚洲欧美日韩国产综合| 色94色欧美sute亚洲线路一ni | 成人午夜免费电影| 国产精品久久久久久亚洲伦| 国产成人av影院| 亚洲欧洲一区二区在线播放| 99久久久久久| 亚洲五码中文字幕| 欧美一区二区免费视频| 国产呦萝稀缺另类资源| 国产午夜亚洲精品理论片色戒 | 激情成人午夜视频| 久久精品视频在线看| 成人深夜在线观看| 亚洲人精品一区| 在线播放视频一区| 久久精品国产免费看久久精品| 日韩情涩欧美日韩视频| 国产在线精品国自产拍免费| 国产婷婷一区二区| 91传媒视频在线播放| 日韩电影一区二区三区四区| 久久综合九色综合97婷婷| 成人激情图片网| 亚洲一区二区视频| 精品成人佐山爱一区二区| 99久久精品国产精品久久| 亚洲国产一区二区在线播放| 欧美成人综合网站| 99精品国产热久久91蜜凸| 日韩高清在线观看| 国产精品不卡一区| 欧美精品99久久久**| 国产成a人亚洲精| 亚洲国产精品尤物yw在线观看| 精品免费国产一区二区三区四区| 成人黄色小视频| www.亚洲激情.com| 日韩av高清在线观看| 国产欧美日韩三区| 欧美午夜电影网| 国内成+人亚洲+欧美+综合在线| 国产精品久久免费看| 555夜色666亚洲国产免| 不卡一区在线观看| 久久av资源网| 亚洲国产精品视频| 国产精品久久久久久久久免费相片| 欧美酷刑日本凌虐凌虐| 成人免费视频视频| 久久精品国产99国产精品| 亚洲狠狠丁香婷婷综合久久久| 久久众筹精品私拍模特| 在线播放日韩导航| 91成人免费网站| 成人国产精品免费观看动漫 | 亚洲一区在线视频| 国产欧美日韩另类一区| 欧美变态tickle挠乳网站| 91国产免费观看| www.欧美亚洲| 国产成人综合在线播放| 91视频你懂的| 国产精品主播直播| 精品一区二区在线观看| 亚洲高清视频的网址| 亚洲色图在线视频| 国产精品蜜臀在线观看| 国产亚洲一区二区三区四区| 欧美xxxxx牲另类人与| 91精品国产综合久久久久久漫画| 在线免费观看一区| 欧美中文字幕亚洲一区二区va在线| 成人性视频网站| 春色校园综合激情亚洲| 国产成人综合在线观看| 国产精品一区二区免费不卡| 国产做a爰片久久毛片| 激情欧美一区二区三区在线观看| 免费在线观看日韩欧美| 久久99九九99精品| 国内精品在线播放| 国产在线播放一区二区三区| 国内不卡的二区三区中文字幕| 久久电影网电视剧免费观看| 久久99久久久久| 久久99九九99精品| 国产成人综合亚洲网站| caoporen国产精品视频| 色一情一伦一子一伦一区| 在线一区二区三区四区五区| 精品视频资源站| 欧美一区二区三区小说| 久久亚洲私人国产精品va媚药| 久久九九久久九九| 国产精品久久二区二区| 亚洲美女视频在线观看| 亚洲电影一级片| 精品一区二区久久久| 国产成人精品免费网站| 一本一本久久a久久精品综合麻豆| 91成人国产精品| 日韩欧美国产午夜精品| 久久精品一级爱片| 玉米视频成人免费看| 免费日韩伦理电影| 国产电影一区二区三区| 91成人看片片| 精品久久国产老人久久综合| 青草av.久久免费一区| 韩国v欧美v亚洲v日本v| 一本到三区不卡视频| 欧美一区二区成人6969| 久久精品视频一区| 亚洲一区电影777| 国产精品综合av一区二区国产馆| 91香蕉国产在线观看软件| 日韩一区二区三免费高清| 中文字幕一区在线观看视频| 日韩电影免费在线| 成人精品国产一区二区4080| 精品视频1区2区3区| 欧美国产欧美综合| 免费在线一区观看| 色婷婷综合久久久中文一区二区| 欧美一区二区网站| 亚洲欧美日韩电影| 国产在线看一区| 日本韩国一区二区三区视频| 久久综合久久99| 日韩精品乱码免费| 99riav久久精品riav| 欧美成人福利视频| 婷婷久久综合九色国产成人| 成人激情免费视频| 久久综合九色综合欧美98| 丝袜美腿一区二区三区| 色狠狠一区二区三区香蕉| 国产亚洲欧洲一区高清在线观看| 日韩制服丝袜av| 91福利精品视频| 亚洲人快播电影网| 成人av电影观看| 国产亚洲欧美一级| 狠狠狠色丁香婷婷综合激情| 7777精品伊人久久久大香线蕉完整版| 国产精品国产三级国产普通话三级| 久久成人久久鬼色| 在线不卡中文字幕播放| 亚洲电影一级片| 欧美日韩综合在线免费观看| 亚洲人成网站影音先锋播放| 成人激情小说乱人伦| 中文字幕欧美激情一区| 国产综合一区二区| 精品国产一区久久| 久久99久久99| 久久综合视频网| 国内不卡的二区三区中文字幕| 欧美一区二区在线看| 日韩二区在线观看| 日韩一区二区三区电影| 蜜桃av噜噜一区| 精品久久久久久综合日本欧美| 免费在线看成人av| 欧美精品一区二区三区久久久| 激情五月播播久久久精品| 26uuu精品一区二区三区四区在线 26uuu精品一区二区在线观看 | 久久一日本道色综合|