آخرين پست هاي ارسالي انجمن ايران دلفي

تماشای رایگان فیلم ایرانی ، خارجی و کودک آکادمی دلفی
نمایش نتایج: از 1 به 66 از 66

موضوع: شروع پروژه بازی آنلاین - Delphi XE5 & Intaweb 14.0.32 & TMS Intraweb Component & SQL Server - علاقمندان به ما بپیوندند

Threaded View

  1. #20
    مدیر انجمن مجید آواتار ها
    تاریخ عضویت
    January 1970
    محل سکونت
    تهران
    نوشته ها
    167
    تشکر ها
    58
    تشکر شده 201 بار در 100 ارسال.

    پاسخ : شروع پروژه بازی آنلاین - Delphi XE5 & Intaweb 14.0.32 & TMS Intraweb Component & SQL Server - علاقمندان به ما بپیوندند

    فرم پروفایل کاربر (UserProfileForm) را باز کنید. فرم شما باید شبیه به تصویر زیر باشد.
    [برای مشاهده لینک ها شما باید عضو سایت باشید برای عضویت در سایت بر روی اینجا کلیک بکنید]


    کد OnCreate مربوط به UserProfileForm را مانند نمونه زیر وارد کنید :



    کد:
      procedure TUserProfileForm.IWAppFormCreate(Sender: TObject);
        var
          aUser: TUser;
        begin
          inherited;
          aUser                     := aUser.GetUserInfo('', UserSession.CurrentUserID);
          IWLabelUsername.Caption   := aUser.Username;
          IWLabelTotalPoint.Caption := IntToStr(aUser.TotalPoint);
          IWLabelEMail.Caption      := aUser.EMail;
          IWLabelPoint3.Caption     := IntToStr(aUser.UserProfile.Point3);
          IWLabelPoint4.Caption     := IntToStr(aUser.UserProfile.Point4);
          IWLabelPoint5.Caption     := IntToStr(aUser.UserProfile.Point5);
          IWLabelCount3.Caption     := IntToStr(aUser.UserProfile.Count3);
          IWLabelCount4.Caption     := IntToStr(aUser.UserProfile.Count4);
          IWLabelCount5.Caption     := IntToStr(aUser.UserProfile.Count5);
          aUser.Free;
        end;
    در انتها فایل کد UserProfileUnit.pas باید به شکل زیر باشد :


    کد:
    unit UserProfileUnit;
    
    interface
    
      uses
        WordGame_Namespace,
        Winapi.Windows,
        Winapi.Messages,
        System.SysUtils,
        System.Variants,
        System.Classes,
        Vcl.Graphics,
        Vcl.Controls,
        Vcl.Forms,
        Vcl.Dialogs,
        BaseUnit,
        IWVCLComponent,
        IWBaseLayoutComponent,
        IWBaseContainerLayout,
        IWContainerLayout,
        IWTemplateProcessorHTML,
        IWVCLBaseControl,
        IWBaseControl,
        IWBaseHTMLControl,
        IWControl,
        IWCompLabel;
    
      type
        TUserProfileForm = class(TBaseForm)
          IWLabelUsername: TIWLabel;
          IWLabelTotalPoint: TIWLabel;
          IWLabelEMail: TIWLabel;
          IWLabelPoint3: TIWLabel;
          IWLabelPoint4: TIWLabel;
          IWLabelPoint5: TIWLabel;
          IWLabelCount3: TIWLabel;
          IWLabelCount4: TIWLabel;
          IWLabelCount5: TIWLabel;
          procedure IWAppFormCreate(Sender: TObject);
          private
            { Private declarations }
          public
            { Public declarations }
        end;
    
      var
        UserProfileForm: TUserProfileForm;
    
    implementation
    
      uses
        ServerController,
        UserSessionUnit;
    {$R *.dfm}
    
      procedure TUserProfileForm.IWAppFormCreate(Sender: TObject);
        var
          aUser: TUser;
        begin
          inherited;
          aUser                     := aUser.GetUserInfo('', UserSession.CurrentUserID);
          IWLabelUsername.Caption   := aUser.Username;
          IWLabelTotalPoint.Caption := IntToStr(aUser.TotalPoint);
          IWLabelEMail.Caption      := aUser.EMail;
          IWLabelPoint3.Caption     := IntToStr(aUser.UserProfile.Point3);
          IWLabelPoint4.Caption     := IntToStr(aUser.UserProfile.Point4);
          IWLabelPoint5.Caption     := IntToStr(aUser.UserProfile.Point5);
          IWLabelCount3.Caption     := IntToStr(aUser.UserProfile.Count3);
          IWLabelCount4.Caption     := IntToStr(aUser.UserProfile.Count4);
          IWLabelCount5.Caption     := IntToStr(aUser.UserProfile.Count5);
          aUser.Free;
        end;
    
    end.

  2. 2 کاربر مقابل از مجید عزیز به خاطر این پست مفید تشکر کرده اند .

    admin (25 / June / 2015),meyti (05 / August / 2015)

موضوعات مشابه

  1. دانلود آخرین نسخه های IntraWeb
    توسط admin در انجمن برنامه نویسی تحت وب در دلفی
    پاسخ: 3
    آخرين نوشته: 25 / February / 2016, 03:27 PM
  2. پاسخ: 2
    آخرين نوشته: 15 / August / 2015, 02:30 AM
  3. طراحی سایت با Intraweb دلفی XE2
    توسط mosa در انجمن Embarcadero RAD Studio تحت وب
    پاسخ: 59
    آخرين نوشته: 19 / May / 2015, 01:51 PM
  4. دانلود یک پروژه ی ساده IntraWeb در دلفی 7
    توسط admin در انجمن دلفی 7 تحت وب
    پاسخ: 3
    آخرين نوشته: 19 / June / 2014, 09:36 PM
  5. قابلیت های جدید SQL Server 2014
    توسط admin در انجمن رادیو نیک آموز
    پاسخ: 0
    آخرين نوشته: 16 / February / 1970, 11:36 AM

علاقه مندي ها (Bookmarks)

علاقه مندي ها (Bookmarks)

مجوز های ارسال و ویرایش

  • شما نمیتوانید موضوع جدیدی ارسال کنید
  • شما امکان ارسال پاسخ را ندارید
  • شما نمیتوانید فایل پیوست کنید.
  • شما نمیتوانید پست های خود را ویرایش کنید
  •