anchor.diff:  
   end;
   
  +destructor TAppsWindow.Destroy;
  +begin
  +  FDlgBuilder.CppDestroy;
  +  FIcons.Free;
  +  Shell_NotifyIcon(NIM_DELETE, @FTrayData);
  +  inherited;
  +end;
  +
  +procedure TAppsWindow.AddIcon(AIcon: TIconInfo);
  +begin
  +  FIcons.Add(AIcon);
  +end;
  +
  +procedure TAppsWindow.AddItemToLastPage;
  +var
  +  LTileLayout: CTileLayoutUI;
  +  LVerticalLayout: CVerticalLayoutUI;
  +  LTitle: CLabelUI;
  +  LItem: TIconInfo;
  +  LButton: CButtonUI;
  +  LLastIndex: Integer;
  +begin
  +  LTileLayout := CTileLayoutUI(FindControl(kIconsList));
  +  if LTileLayout <> nil then
  +  begin
  +    // ÿҳ
  +    if LTileLayout.GetCount >= PAGE_MAX_CHIND then Exit;
  +    LLastIndex := FIcons.Count - 1;
  +    LItem := FIcons[LLastIndex];
  +    if not FDlgBuilder.GetMarkup.IsValid then
  +      LVerticalLayout := CVerticalLayoutUI(FDlgBuilder.Create('buttonitem.xml', '', nil, PaintManagerUI))
  +    else
  +      LVerticalLayout := CVerticalLayoutUI(FDlgBuilder.Create(nil, PaintManagerUI));
  +    if LVerticalLayout = nil then Exit;
  +    LVerticalLayout.Tag := LLastIndex;
  +    LButton := CButtonUI(PaintManagerUI.FindSubControlByName(LVerticalLayout, kitemopenappbtn));
  +    if LButton <> nil then
  +    begin
  +      LButton.Tag := LLastIndex;
  +      LButton.NormalImage := LItem.IconPath;
  +      LButton.BkImage :=  LItem.IconPath;
  +    end;
  +    LTitle := CLabelUI(PaintManagerUI.FindSubControlByName(LVerticalLayout, kitemtitle));
  +    if LTitle <> nil then
  +      LTitle.Text := LItem.Text;
  +    LTileLayout.AddAt(LVerticalLayout, LTileLayout.GetCount - 1);
  +    // ǰҳѾˣƳӰť
  +    if LTileLayout.GetCount > PAGE_MAX_CHIND then
  +      LTileLayout.RemoveAt(LTileLayout.GetCount - 1);
  +  end;
  +end;
  +
  +procedure TAppsWindow.btnaddappClick(var Msg: TNotifyUI);
  +begin
  +  AddIcon(TIconInfo.Create('' + (FIcons.Count - 1).ToString, 'xiaoshuo.png'));
  +  ReInitRadios;
  +  AddItemToLastPage;
  +end;
  +
  +procedure TAppsWindow.btnopenappClick(var Msg: TNotifyUI);
  +begin
  +
  +end;
  +
  +procedure TAppsWindow.btnSearchClick(var Msg: TNotifyUI);
  +var
  +  LEdit: CRichEditUI;
  +begin
  +  LEdit := CRichEditUI(FindControl(kSearchedt));
  +  if LEdit <> nil then
  +  begin
  +    if LEdit.Text.Equals(kSearchEditTextHint) or LEdit.Text.IsEmpty then
  +      MessageBox(0, '', '', 0)
  +    else
  +      MessageBox(0, PChar(LEdit.Text), nil, 0);
  +  end;
  +end;
  +
  +procedure TAppsWindow.closebtnClick(var Msg: TNotifyUI);
  +begin
  +  DuiApplication.Terminate;
  +end;
  +
   function TAppsWindow.CreateAddItemButton: CVerticalLayoutUI;
   var
  -  LButton: CButtonUI;
     LDlgBuilder: CDialogBuilder;
   begin
     LDlgBuilder := CDialogBuilder.CppCreate;
     try
  -    if not LDlgBuilder.GetMarkup.IsValid then
  -      Result := CVerticalLayoutUI(LDlgBuilder.Create('buttonitemadd.xml', '', nil, PaintManagerUI))
  -    else Result := CVerticalLayoutUI(LDlgBuilder.Create(nil, PaintManagerUI));
  -    if Result <> nil then
  -      LButton := CButtonUI(PaintManagerUI.FindSubControlByName(Result, kbtnaddapp));
  +    Result := CVerticalLayoutUI(LDlgBuilder.Create('buttonitemadd.xml', '', nil, PaintManagerUI));
     finally
       LDlgBuilder.CppDestroy;
     end;
  
positive.code:     constructor Create(AText, AIconPath: string);
    end;
  
    TAppsWindow = class(TDuiWindowImplBase)
    private
      FDlgBuilder: CDialogBuilder;
      FInitOK: Boolean;
      FIcons: TList<TIconInfo>;
      FTrayData: TNotifyIconData;
      FIsMouseHover: Boolean;
      FIsNcMouseEnter: Boolean; // û취Ӹж
      procedure ReInitRadios;
      procedure CreateRadioButton(const AName: string);
      procedure ShowPage(AIndex: Integer);
      procedure AddIcon(AIcon: TIconInfo);
      procedure InitRadios;
      function CreateAddItemButton: CVerticalLayoutUI;
    protected
      procedure DoNotify(var Msg: TNotifyUI); override;
      procedure DoHandleMessage(var Msg: TMessage; var bHandled: BOOL); override;
  
negative.code: end;
  
  
  function TAppsWindow.GetRadionSelectedIndex(ATabDock: CHorizontalLayoutUI): Integer;
  var
    I: Integer;
  begin
    Result := -1;
    for I := 0 to ATabDock.GetCount - 1 do
      if COptionUI(ATabDock.GetItemAt(I)).Selected then
      begin
        Result := I;
        Break;
      end;
  end;
  
  procedure TAppsWindow.InitEvents;
  begin
    FEvents.Add('openmycomputer', openmycomputer);
    FEvents.Add('openbrowser', openbrowser);
    FEvents.Add('openyule', openyule);
    FEvents.Add('openappmarket', openappmarket);
    FEvents.Add(kbtnSearch, btnSearchClick);
    FEvents.Add(kclosebtn, closebtnClick);
    FEvents.Add(kminbtn, minbtnClick);
    FEvents.Add(kbtnopenapp, btnopenappClick);
    FEvents.Add(kbtnaddapp, btnaddappClick);
  end;
  
  procedure TAppsWindow.InitRadios;
  var
    I: Integer;
  