public grvOnClickListner(MusicView activity, WeClipInfo wcHolder, List <Audio> audioList, GridView gvMusic) { this.gvMusic = gvMusic; this.activity = activity; this.audioList = audioList; this.wcHolder = wcHolder; }
public grvOnClickListner(Activity activity, WeClipInfo wcHolder, List <Theme> themeList, GridView gvTheme) { this.gvTheme = gvTheme; this.activity = activity; this.themeList = themeList; this.wcHolder = wcHolder; }
public CreateWeClip(PostWeClip postWeClip, WeClipInfo wcHolder) { this.postWeClip = postWeClip; this.wcHolder = wcHolder; p = ProgressDialog.Show(postWeClip, "Please wait..", "Uploading data"); jResult = new JsonResult(); }
public GetAudioFile(MusicView activity, GridView gvMusic, WeClipInfo wcHolder) { this.activity = activity; this.gvMusic = gvMusic; this.wcHolder = wcHolder; audioList = new List <Audio>(); p = ProgressDialog.Show(activity, "Please wait", "Loading data"); }
public GetThemeFile(ThemeActivity activity, GridView gvTheme, WeClipInfo wcHolder) { this.activity = activity; this.gvTheme = gvTheme; this.wcHolder = wcHolder; themelist = new List <Theme>(); p = ProgressDialog.Show(activity, "Please wait", "Loading data"); }
protected override void OnCreate(Bundle savedInstanceState) { try { base.OnCreate(savedInstanceState); SetContentView(Resource.Layout.ThemeView); Window.SetSoftInputMode(SoftInput.StateAlwaysHidden); Toolbar toolbar = (Toolbar)FindViewById(Resource.Id.toolbar); TextView toolbar_title = (TextView)this.FindViewById(Resource.Id.toolbar_title); SetSupportActionBar(toolbar); if (Build.VERSION.SdkInt >= Android.OS.BuildVersionCodes.Lollipop) { Window.AddFlags(WindowManagerFlags.DrawsSystemBarBackgrounds); Window.SetStatusBarColor(new Android.Graphics.Color(Android.Support.V4.Content.ContextCompat.GetColor(this, Resource.Color.primaryDark))); } SupportActionBar.Title = ""; toolbar_title.Text = "Select theme"; imageViewNext = FindViewById <ImageView>(Resource.Id.ivSelectThemeNext); imageViewBack = FindViewById <ImageView>(Resource.Id.ivSelectThemeBack); //strEventData = this.Intent.GetStringExtra("strMusicView") ?? null; strEventData = this.Intent.GetStringExtra("strEventGalleryView") ?? null; if (!string.IsNullOrEmpty(strEventData)) { wcHolder = JsonConvert.DeserializeObject <WeClipInfo>(strEventData); gvTheme = FindViewById <GridView>(Resource.Id.gvTheme); gvTheme.ChoiceMode = ChoiceMode.Single; gvTheme.SetDrawSelectorOnTop(true); imageViewNext.Click += ImageViewNext_Click; imageViewBack.Click += ImageViewBack_Click; new GetThemeFile(this, gvTheme, wcHolder).Execute(); } else { AlertBox.Create("Error", "Error occured", this); return; } } catch (System.Exception ex) { new CrashReportAsync("Theme", "OnCreate", ex.Message + ex.StackTrace).Execute(); } }
protected override void OnCreate(Bundle savedInstanceState) { try { base.OnCreate(savedInstanceState); SetContentView(Resource.Layout.PostWeClip); Toolbar toolbar = (Toolbar)FindViewById(Resource.Id.toolbar); TextView toolbar_title = (TextView)this.FindViewById(Resource.Id.toolbar_title); SetSupportActionBar(toolbar); SupportActionBar.Title = ""; toolbar_title.Text = "Post WeClip"; if (Build.VERSION.SdkInt >= Android.OS.BuildVersionCodes.Lollipop) { Window.AddFlags(WindowManagerFlags.DrawsSystemBarBackgrounds); Window.SetStatusBarColor(new Android.Graphics.Color(Android.Support.V4.Content.ContextCompat.GetColor(this, Resource.Color.primaryDark))); } etWeClipTitle = FindViewById <EditText>(Resource.Id.etWeClipTitle); etWecliptag = FindViewById <EditText>(Resource.Id.etWeClipTags); ivCreateWeClip = FindViewById <ImageButton>(Resource.Id.ivPostWeClipCreate); ivPostWeClipBack = FindViewById <ImageButton>(Resource.Id.ivPostWeClipBack); strWeClipdata = this.Intent.GetStringExtra("strMusicView") ?? null; if (!string.IsNullOrEmpty(strWeClipdata)) { wcHolder = JsonConvert.DeserializeObject <WeClipInfo>(strWeClipdata); ivCreateWeClip.Click += IvCreateWeClip_Click; ivPostWeClipBack.Click += IvPostWeClipBack_Click; } else { AlertBox.Create("Error", "Error occured.", this); return; } } catch (Exception ex) { new CrashReportAsync("PostWeClip", "OnCreate", ex.Message + ex.StackTrace).Execute(); } }
private void IvNext_Click(object sender, EventArgs e) { try { if (IsDefaultEvent == false) { selectedItem = ListOfEventFiles.listOfEventFiles.Where(x => x.isSelected() == true).ToList(); } else { selectedItem = ListOfDefultEventFiles.listOfEventFiles.Where(x => x.isSelected() == true).ToList(); } selectedMedia = new List <ImageInfo>(); double totalduration = 0; var ImageSelected = (from x in selectedItem where x.IsVideo == false select x).Count(); var VideoSelected = (from x in selectedItem where x.IsVideo == true select x).Count(); foreach (var file in selectedItem) { if (file.IsVideo == false) { file.Duration = 0.05; } totalduration = totalduration + file.Duration; } if (selectedItem.Count < GlobalClass.MinNoOfSelectedFile) { AlertBox.Create("Error", "Please select atleast 3 files!", this); return; } if (totalduration > MaxVideoMinute) { Android.App.AlertDialog.Builder alertDialog = new Android.App.AlertDialog.Builder(this); alertDialog.SetMessage("Upgrade to WeClip Premium and create movies with even more photos."); alertDialog.SetPositiveButton("Go PREMIUM", (senderAlert, args) => { Intent intent1 = new Intent(this, typeof(PackageActivity)); StartActivity(intent1); }); alertDialog.SetNegativeButton("NO THANKS", (senderAlert, args) => { alertDialog.Dispose(); }); alertDialog.Show(); return; } if (ImageSelected > MaxImageForWeClip) { Android.App.AlertDialog.Builder alertDialog = new Android.App.AlertDialog.Builder(this); alertDialog.SetMessage("Upgrade to WeClip Premium and create movies with even more photos."); alertDialog.SetPositiveButton("Go PREMIUM", (senderAlert, args) => { Intent intent1 = new Intent(this, typeof(PackageActivity)); StartActivity(intent1); }); alertDialog.SetNegativeButton("NO THANKS", (senderAlert, args) => { alertDialog.Dispose(); }); alertDialog.Show(); return; } if (VideoSelected > MaxVideoForWeclip) { Android.App.AlertDialog.Builder alertDialog = new Android.App.AlertDialog.Builder(this); alertDialog.SetMessage("Upgrade to WeClip Premium and create movies with even more videos."); alertDialog.SetPositiveButton("Go PREMIUM", (senderAlert, args) => { Intent intent1 = new Intent(this, typeof(PackageActivity)); StartActivity(intent1); }); alertDialog.SetNegativeButton("NO THANKS", (senderAlert, args) => { alertDialog.Dispose(); }); alertDialog.Show(); return; } foreach (var data in selectedItem) { imageInfo = new ImageInfo(); imageInfo.IsVideo = data.IsVideo; imageInfo.Filename = data.FileName; selectedMedia.Add(imageInfo); } //WeClipInfo wc_holder = new WeClipInfo(); //wc_holder.MediaFile = selectedMedia; //wc_holder.EventID = EventID; //wc_holder.IsDefault = IsDefaultEvent; //var jasondata = JsonConvert.SerializeObject(wc_holder); //Intent intent = new Intent(this, typeof(MusicView)); //intent.PutExtra("strEventGalleryView", jasondata); //StartActivity(intent); //this.Finish(); WeClipInfo wc_holder = new WeClipInfo(); wc_holder.MediaFile = selectedMedia; wc_holder.EventID = EventID; wc_holder.IsDefault = IsDefaultEvent; var jasondata = JsonConvert.SerializeObject(wc_holder); Intent intent = new Intent(this, typeof(ThemeActivity)); intent.PutExtra("strEventGalleryView", jasondata); StartActivity(intent); this.Finish(); } catch (System.Exception ex) { new CrashReportAsync("EventGalleryView", "IvNext_Click", ex.Message + ex.StackTrace).Execute(); } }