protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); SetContentView(Resource.Layout.layoutAccount); var font = Typeface.CreateFromAsset(Assets, "Estedad.ttf"); accountbtngift = FindViewById <Button>(Resource.Id.accountbtngift); accountbtngift.Click += delegate { StartActivity(typeof(CustomActivity.Suprised_Activity)); }; accountbtnEventDay = FindViewById <Button>(Resource.Id.accountbtnEventDay); accountbtnEventDay.Click += delegate { StartActivity(typeof(CustomActivity.EventDay_Activity)); }; Accountbtnenterevent = FindViewById <Button>(Resource.Id.Accountbtnenterevent); Accountbtnenterevent.Typeface = font; Accountbtnenterevent.Click += delegate { StartActivity(typeof(EnterEvent)); }; Accounttxtviewgroup = FindViewById <TextView>(Resource.Id.Accounttxtviewgroup); Accounttxtviewgroup.Typeface = font; Accountimgbtnlogo = FindViewById <ImageButton>(Resource.Id.Accountimgbtnlogo); Accountimgbtnlogo.Click += delegate { StartActivity(typeof(MainActivity)); }; Accountbtnfilter = FindViewById <Button>(Resource.Id.Accountbtnfilter); Accountbtnfilter.Typeface = font; Accountbtnfilter.Click += delegate { Controller.Fragment.FilterMain fdlg = new Controller.Fragment.FilterMain(this); fdlg.Show(this.FragmentManager, "ebrahimfragmentfliterMainToFilterMain"); }; Accountbtnsearch = FindViewById <Button>(Resource.Id.Accountbtnsearch); Accountbtnsearch.Typeface = font; Accountbtndelete = FindViewById <Button>(Resource.Id.Accountbtndelete); Accountbtndelete.Click += delegate { Accountedtxtsearch.Text = string.Empty; }; Accountbtndelete.Typeface = font; Accountedtxtsearch = FindViewById <EditText>(Resource.Id.Accountedtxtsearch); Accountedtxtsearch.Typeface = font; Accountedtxtsearch.TextChanged += Accountedtxtsearch_TextChanged; AccountButtonEventMe = FindViewById <Button>(Resource.Id.AccountButtonEventMe); AccountButtonEventMe.Typeface = font; AccountButtonEventMe.Click += delegate { //رویدادهای من StartActivity(typeof(MyEventActivity.MyeventActivity)); }; FindViewById <ImageView>(Resource.Id.accountimgviewEventMe).Click += delegate { //رویداد های من StartActivity(typeof(MyEventActivity.MyeventActivity)); }; AccountButtonMark = FindViewById <Button>(Resource.Id.AccountButtonMark); ImageView im = FindViewById <ImageView>(Resource.Id.AccountImageviewMark); im.Click += delegate { //رویدادهای نشان شده Intent oi = new Intent(this, typeof(CustomActivity.MarkedEvent_Activity)); StartActivity(oi); }; AccountButtonMark.Click += delegate { Intent oi = new Intent(this, typeof(CustomActivity.MarkedEvent_Activity)); StartActivity(oi); }; AccountButtonMark.Typeface = font; accountbtnhesabmali = FindViewById <Button>(Resource.Id.accountbtnhesabmali); accountbtnhesabmali.Typeface = font; accountbtnhesabmali.Click += delegate { // حساب مالی Intent oi = new Intent(this, typeof(CustomActivity.Payed_Activity)); StartActivity(oi); }; ImageView hmali = FindViewById <ImageView>(Resource.Id.AccountImageviewMali); hmali.Click += delegate { // حساب مالی Intent oi = new Intent(this, typeof(CustomActivity.Payed_Activity)); StartActivity(oi); }; AccountButtonRule = FindViewById <Button>(Resource.Id.AccountButtonRule); AccountButtonRule.Typeface = font; AccountButtonRule.Click += delegate { Controller.Fragment.RuleFragment fdlg = new Controller.Fragment.RuleFragment(this); fdlg.Show(this.FragmentManager, "ebrahimfragmentrulefragment"); }; AccountImageviewRule = FindViewById <ImageView>(Resource.Id.AccountImageviewRule); AccountImageviewRule.Click += delegate { Controller.Fragment.RuleFragment fdlg = new Controller.Fragment.RuleFragment(this); fdlg.Show(this.FragmentManager, "ebrahimfragmentrulefragment"); }; AccountbuttonAboutUs = FindViewById <Button>(Resource.Id.AccountbuttonAboutUs); AccountbuttonAboutUs.Typeface = font; AccountbuttonAboutUs.Click += delegate { //درباره ما AboutUsFragment fdlg = new AboutUsFragment(this); fdlg.Show(this.FragmentManager, "ebrahimfragmentAccountShow"); }; ImageView Accountimageviewaboutus = FindViewById <ImageView>(Resource.Id.Accountimageviewaboutus); Accountimageviewaboutus.Click += delegate { //درباره ما AboutUsFragment fdlg = new AboutUsFragment(this); fdlg.Show(this.FragmentManager, "ebrahimfragmentAccountShow"); }; AccountbuttonContactMe = FindViewById <Button>(Resource.Id.AccountbuttonContactMe); AccountbuttonContactMe.Typeface = font; AccountbuttonContactMe.Click += delegate { //تماس با ایونتو TellEventoFragment fdlg = new TellEventoFragment(this); fdlg.Show(this.FragmentManager, "ebrahimTellEventoMananger"); }; ImageView AccountimageviewContactMe = FindViewById <ImageView>(Resource.Id.AccountimageviewContactMe); AccountimageviewContactMe.Click += delegate { //تماس با ایونتو TellEventoFragment fdlg = new TellEventoFragment(this); fdlg.Show(this.FragmentManager, "ebrahimTellEventoMananger"); }; accountbtncontact = FindViewById <Button>(Resource.Id.accountbtncontact); accountbtncontact.Typeface = font; accountbtncontact.Click += delegate { }; accountbtngift = FindViewById <Button>(Resource.Id.accountbtngift); accountbtngift.Typeface = font; accountbtnEventDay = FindViewById <Button>(Resource.Id.accountbtnEventDay); accountbtnEventDay.Typeface = font; accountbtngrouping = FindViewById <Button>(Resource.Id.accountbtngrouping); accountbtngrouping.Typeface = font; accountbtngrouping.Click += delegate { StartActivity(typeof(Grouping)); }; }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); SetContentView(Resource.Layout.layoutgroupevent); var font = Typeface.CreateFromAsset(Assets, "Estedad.ttf"); groupeventbtnperfect = FindViewById <Button>(Resource.Id.groupeventbtnperfect); groupeventbtnperfect.Typeface = font; groupeventbtnperfect.Click += delegate { //Android.Views.Animations.Animation animation = AnimationUtils.LoadAnimation(this, Resource.Animation.design_bottom_sheet_slide_out); //groupeventbtnperfect.StartAnimation(animation); StartActivity(typeof(Health_Activity)); // OverridePendingTransition(Resource.Animation.abc_fade_in, Resource.Animation.abc_fade_out); }; groupeventimgviewperfect = FindViewById <ImageView>(Resource.Id.groupeventimgviewperfect); groupeventimgviewperfect.Click += delegate { StartActivity(typeof(Health_Activity)); // OverridePendingTransition(Resource.Animation.abc_fade_in, Resource.Animation.abc_fade_out); }; groupeventbtnfood = FindViewById <Button>(Resource.Id.groupeventbtnfood); groupeventbtnfood.Typeface = font; groupeventbtnfood.Click += delegate { StartActivity(typeof(Food_Activity)); }; groupeventimgviewecook = FindViewById <ImageView>(Resource.Id.groupeventimgviewecook); groupeventimgviewecook.Click += delegate { StartActivity(typeof(Food_Activity)); }; groupeventbtnlearnclass = FindViewById <Button>(Resource.Id.groupeventbtnlearnclass); groupeventbtnlearnclass.Typeface = font; groupeventbtnlearnclass.Click += delegate { StartActivity(typeof(Classeduction_Activity)); }; groupeventimglearnclass = FindViewById <ImageView>(Resource.Id.groupeventimglearnclass); groupeventimglearnclass.Click += delegate { StartActivity(typeof(Classeduction_Activity)); }; groupeventimgviewfarhangi = FindViewById <ImageView>(Resource.Id.groupeventimgviewfarhangi); groupeventimgviewfarhangi.Click += delegate { StartActivity(typeof(Controller.activity.groupingactivity.CultrualartActivity)) ; }; groupeventimgviewtourist = FindViewById <ImageView>(Resource.Id.groupeventimgviewtourist); groupeventimgviewtourist.Click += delegate { StartActivity(typeof(Controller.activity.groupingactivity.tourismactivity)); }; groupeventimgviewsport = FindViewById <ImageView>(Resource.Id.groupeventimgviewsport); groupeventimgviewsport.Click += delegate { StartActivity(typeof(Controller.activity.groupingactivity.SportActivity)); }; groupeventimgviewelmi = FindViewById <ImageView>(Resource.Id.groupeventimgviewelmi); groupeventimgviewelmi.Click += delegate { StartActivity(typeof(Controller.activity.groupingactivity.AcademicActivity)); }; groupeventimgviewereligion = FindViewById <ImageView>(Resource.Id.groupeventimgviewereligion); groupeventimgviewereligion.Click += delegate { StartActivity(typeof(Controller.activity.groupingactivity.ReliguseActivity)); }; groupeventimgviewpeople = FindViewById <ImageView>(Resource.Id.groupeventimgviewpeople); groupeventimgviewpeople.Click += delegate { StartActivity(typeof(Controller.activity.groupingactivity.PeopleActivitycs)); }; groupeventbtnenterevent = FindViewById <Button>(Resource.Id.groupeventbtnenterevent); groupeventbtnenterevent.Typeface = font; groupeventbtnenterevent.Click += delegate { StartActivity(typeof(Controller.activity.EnterEvent)); }; //فروشگاه ها groupeventbtnstore = FindViewById <Button>(Resource.Id.groupeventbtnstore); groupeventbtnstore.Typeface = font; groupeventbtnstore.Click += delegate { StartActivity(typeof(store_activity)); }; groupeventimgstore = FindViewById <ImageView>(Resource.Id.groupeventimgbtnstore); groupeventimgstore.Click += delegate { StartActivity(typeof(store_activity)); }; //برنامه های تلوزیونی groupeventbtntelevision = FindViewById <Button>(Resource.Id.groupeventbtntelevision); groupeventbtntelevision.Typeface = font; groupeventbtntelevision.Click += delegate { StartActivity(typeof(televisionactivity)); }; groupeventimgtelevision = FindViewById <ImageView>(Resource.Id.groupeventimgtelevision); groupeventimgtelevision.Click += delegate { StartActivity(typeof(televisionactivity)); }; groupeventtxtviewgroup = FindViewById <TextView>(Resource.Id.groupeventtxtviewgroup); groupeventtxtviewgroup.Typeface = font; groupeventimgbtnlogo = FindViewById <ImageButton>(Resource.Id.groupeventimgbtnlogo); groupeventimgbtnlogo.Click += delegate { StartActivity(typeof(MainActivity)); }; groupeventbtnfilter = FindViewById <Button>(Resource.Id.groupeventbtnfilter); groupeventbtnfilter.Typeface = font; groupeventbtnfilter.Click += delegate { Controller.Fragment.FilterMain fdlg = new Controller.Fragment.FilterMain(this); fdlg.Show(this.FragmentManager, "ebrahimfragmentfliterMainToFilterMain"); }; groupeventbtnsearch = FindViewById <Button>(Resource.Id.groupeventbtnsearch); groupeventbtndelete = FindViewById <Button>(Resource.Id.groupeventbtndelete); groupeventbtndelete.Click += delegate { groupeventedtxtsearch.Text = ""; }; groupeventbtndelete.Typeface = font; groupeventedtxtsearch = FindViewById <EditText>(Resource.Id.groupeventedtxtsearch); groupeventedtxtsearch.TextChanged += Groupeventedtxtsearch_TextChanged; groupeventedtxtsearch.Typeface = font; groupeventbtntourism = FindViewById <Button>(Resource.Id.groupeventbtntourist); groupeventbtntourism.Typeface = font; groupeventbtntourism.Click += delegate { StartActivity(typeof(Controller.activity.groupingactivity.tourismactivity)); }; groupeventbtnfarhangi = FindViewById <Button>(Resource.Id.groupeventbtnfarhani); groupeventbtnfarhangi.Typeface = font; groupeventbtnfarhangi.Click += delegate { StartActivity(typeof(Controller.activity.groupingactivity.CultrualartActivity)); }; groupeventbtnelmi = FindViewById <Button>(Resource.Id.groupeventbtnelmi); groupeventbtnelmi.Typeface = font; groupeventbtnelmi.Click += delegate { //علمی و تخصصی StartActivity(typeof(Controller.activity.groupingactivity.AcademicActivity)); }; groupeventbtnsport = FindViewById <Button>(Resource.Id.groupeventbtnsport); groupeventbtnsport.Typeface = font; groupeventbtnsport.Click += delegate { StartActivity(typeof(Controller.activity.groupingactivity.SportActivity)); }; groupeventbtnmaromi = FindViewById <Button>(Resource.Id.groupeventbtnpeople); groupeventbtnmaromi.Typeface = font; groupeventbtnmaromi.Click += delegate { StartActivity(typeof(Controller.activity.groupingactivity.PeopleActivitycs)); }; groupeventbtnmazhabi = FindViewById <Button>(Resource.Id.groupeventbtnreligion); groupeventbtnmazhabi.Typeface = font; groupeventbtnmazhabi.Click += delegate { StartActivity(typeof(Controller.activity.groupingactivity.ReliguseActivity)); }; groupeventbtncontact = FindViewById <Button>(Resource.Id.groupeventbtncontact); groupeventbtncontact.Typeface = font; groupeventbtncontact.Click += delegate { StartActivity(typeof(Controller.activity.Account)); }; groupeventbtngift = FindViewById <Button>(Resource.Id.groupeventbtngift); groupeventbtngift.Typeface = font; groupeventbtngift.Click += delegate { StartActivity(typeof(CustomActivity.Suprised_Activity)); }; groupeventbtnEventDay = FindViewById <Button>(Resource.Id.groupeventbtnEventDay); groupeventbtnEventDay.Typeface = font; groupeventbtnEventDay.Click += delegate { StartActivity(typeof(CustomActivity.EventDay_Activity)); }; groupeventbtngrouping = FindViewById <Button>(Resource.Id.groupeventbtngrouping); groupeventbtngrouping.Typeface = font; }
protected async override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); SetContentView(Resource.Layout.activity_main); font = Typeface.CreateFromAsset(Assets, "Estedad.ttf"); btnenterevent = FindViewById <Button>(Resource.Id.mainbtnenterevent); btnenterevent.Typeface = font; btnenterevent.Click += delegate { Intent oi = new Intent(this, typeof(EnterEvent)); StartActivity(oi); }; maintxtviewgroup = FindViewById <TextView>(Resource.Id.maintxtviewgroup); maintxtviewgroup.Typeface = font; mainimgbtnlogo = FindViewById <ImageButton>(Resource.Id.mainimgbtnlogo); mainbtnfilter = FindViewById <Button>(Resource.Id.mainbtnfilter); mainbtnfilter.Typeface = font; mainbtnfilter.Click += delegate { Controller.Fragment.FilterMain fdlg = new Controller.Fragment.FilterMain(this); fdlg.Show(this.FragmentManager, "ebrahimfragmentfliterMainToFilterMain"); }; mainbtnsearch = FindViewById <Button>(Resource.Id.mainbtnsearch); mainbtndelete = FindViewById <Button>(Resource.Id.mainbtndelete); mainbtndelete.Click += Mainbtndelete_Click; mainedtxtsearch = FindViewById <EditText>(Resource.Id.mainedtxtsearch); mainedtxtsearch.Typeface = font; mainedtxtsearch.TextChanged += Mainedtxtsearch_TextChanged; mainlstevent = FindViewById <ListView>(Resource.Id.mainlstevent); //فراخوانی webapiو پر کردن لیست ها using (HttpClient client = new HttpClient()) { client.BaseAddress = new Uri(WebAddress.MyAddress); client.DefaultRequestHeaders.Accept.Clear(); client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json")); string json = JsonConvert.SerializeObject("", Formatting.Indented); var httpContent = new StringContent(json); HttpResponseMessage response = client.PostAsync("api/GetEventsItems", httpContent).Result; if (response.IsSuccessStatusCode) { response.EnsureSuccessStatusCode(); var responseJsonString = await response.Content.ReadAsStringAsync(); var result = JsonConvert.DeserializeObject(responseJsonString).ToString(); List <Event> objr = JsonConvert.DeserializeObject <List <Event> >(result); var SelectItem = objr.Where(u => u.Statusevent == Event.StatuseEvent.Published).ToList(); if (SelectItem != null) { MainShowEventAdapter t = new MainShowEventAdapter(this, SelectItem); mainlstevent.Adapter = t; ViewGroup headerView = (ViewGroup)LayoutInflater.Inflate(Resource.Layout.layoutMainHeaderListview, mainlstevent, false); ViewPager vpagerslider = headerView.FindViewById <ViewPager>(Resource.Id.Mainviewpagerslider); var images = SelectItem.Select(x => x.SliderImages).ToList(); vpagerslider.Adapter = new ImageAdapter(this, images); var dots = headerView.FindViewById <TabLayout>(Resource.Id.Maintablayoutdots); dots.SetupWithViewPager(vpagerslider, true); var timer = new System.Timers.Timer { Interval = 3000, Enabled = true }; int page = 0; timer.Elapsed += (sender, args) => { RunOnUiThread(() => { if (page <= vpagerslider.Adapter.Count) { page++; } else { page = 0; } vpagerslider.SetCurrentItem(page, true); }); }; mainlstevent.AddHeaderView(headerView); } } } //MainShowEventAdapter t = new MainShowEventAdapter(this, eventlist); //mainlstevent.Adapter = t; // mainlstevent.ItemClick += Mainlstevent_ItemClick; mainbtnContact = FindViewById <Button>(Resource.Id.mainbtnContact); mainbtnContact.Typeface = font; mainbtnContact.Click += delegate { //اطلاعات من Intent oi = new Intent(this, typeof(Account)); StartActivity(oi); }; mainbtngift = FindViewById <Button>(Resource.Id.mainbtngift); mainbtngift.Typeface = font; mainbtngift.Click += delegate { //پیشنهاد ویژه Intent oi = new Intent(this, typeof(CustomActivity.Suprised_Activity)); StartActivity(oi); }; mainbtnEventDay = FindViewById <Button>(Resource.Id.mainbtnEventDay); mainbtnEventDay.Click += delegate { //رویداد های روز Intent oi = new Intent(this, typeof(CustomActivity.EventDay_Activity)); StartActivity(oi); }; mainbtnEventDay.Typeface = font; mainbtngroupingGrouping = FindViewById <Button>(Resource.Id.mainbtngroupingGrouping); mainbtngroupingGrouping.Click += delegate { Intent oi = new Intent(this, typeof(Grouping)); StartActivity(oi); }; mainbtngroupingGrouping.Typeface = font; }