-
Notifications
You must be signed in to change notification settings - Fork 204
/
PopupGettingStarted.cs
561 lines (517 loc) · 22.9 KB
/
PopupGettingStarted.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
#region Copyright Syncfusion Inc. 2001-2024.
// Copyright Syncfusion Inc. 2001-2024. All rights reserved.
// Use of this code is subject to the terms of our license.
// A copy of the current license can be obtained at any time by e-mailing
// [email protected]. Any infringement will be prosecuted under
// applicable laws.
#endregion
using System;
using Syncfusion.SfDataGrid;
using UIKit;
using System.Globalization;
using CoreGraphics;
using Syncfusion.iOS.PopupLayout;
using System.Linq;
using System.Reflection;
using Foundation;
using System.Threading;
using System.Timers;
using CoreAnimation;
using System.Threading.Tasks;
namespace SampleBrowser
{
public class PopupGettingStarted : SampleView
{
#region Fields
SfDataGrid SfGrid;
int clickCount = 0;
UIView mainView;
SfPopupLayout sfPopUp;
UIView backgroundView;
UIImageView imageView;
UIImageView img;
UITapGestureRecognizer tapGesture;
SwipingViewModel viewModel;
DetailView detailView;
UIButton nextButton;
UILabel col1;
UILabel col2;
UILabel col3;
UILabel col4;
UITextField orderIDText;
UITextField customerIDText;
UITextField employeeIDText;
UITextField nameText;
private int swipedRowindex;
private bool canCollapseVisibilty = false;
private bool IsUndoClicked { get; set; }
#endregion
static bool UserInterfaceIdiomIsPhone
{
get { return UIDevice.CurrentDevice.UserInterfaceIdiom == UIUserInterfaceIdiom.Phone; }
}
public PopupGettingStarted()
{
mainView = new UIView();
CreatePopup();
this.CreateDataGrid();
this.nextButton = new UIButton();
nextButton.SetTitle("Next", UIControlState.Normal);
nextButton.SetTitleColor(UIColor.White, UIControlState.Normal);
nextButton.VerticalAlignment = UIControlContentVerticalAlignment.Center;
nextButton.BackgroundColor = UIColor.Clear;
nextButton.TouchDown += NextButton_TouchDown;
sfPopUp.Content = mainView;
sfPopUp.PopupView.BackgroundColor = UIColor.Clear;
mainView.AddSubview(SfGrid);
this.AddSubview(sfPopUp);
this.AddSubview(nextButton);
tapGesture = new UITapGestureRecognizer() { NumberOfTapsRequired = 1 };
tapGesture.AddTarget(() => { BackgroundViewPressed(tapGesture); });
}
public override void LayoutSubviews()
{
base.LayoutSubviews();
this.SfGrid.Frame = new CGRect(mainView.Frame.Left, mainView.Frame.Top, mainView.Frame.Width, mainView.Frame.Height );
this.sfPopUp.Frame = new CGRect(0, 0, this.Frame.Width , this.Frame.Height);
this.nextButton.Frame = new CGRect(this.Frame.Width - 100, this.Frame.Height- 60, 100, 30);
detailView.Frame = new CGRect(10, this.SfGrid.Frame.Top + 100, SfGrid.Frame.Width - 20, 200);
col1.Frame = new CGRect(detailView.Frame.Right * 0.15, detailView.Frame.Top + 20, detailView.Frame.Right / 2, 20);
col2.Frame = new CGRect(detailView.Frame.Right * 0.15, col1.Frame.Bottom + 10, detailView.Frame.Right / 2, 20);
col3.Frame = new CGRect(detailView.Frame.Right * 0.15, col2.Frame.Bottom + 10, detailView.Frame.Right / 2, 20);
col4.Frame = new CGRect(detailView.Frame.Right * 0.15, col3.Frame.Bottom + 10, detailView.Frame.Right / 2, 20);
orderIDText.Frame = new CGRect(col1.Frame.Right, detailView.Frame.Top + 20, detailView.Frame.Right, 20);
customerIDText.Frame = new CGRect(col2.Frame.Right, orderIDText.Frame.Bottom + 10, detailView.Frame.Right, 20);
employeeIDText.Frame = new CGRect(col3.Frame.Right, customerIDText.Frame.Bottom + 10, detailView.Frame.Right, 20);
nameText.Frame = new CGRect(col4.Frame.Right, employeeIDText.Frame.Bottom + 10, detailView.Frame.Right, 20);
var navigationBar = (((mainView.Superview as UIView).Window.RootViewController)as UINavigationController).NavigationBar;
}
void NextButton_TouchDown(object sender, EventArgs e)
{
clickCount++;
sfPopUp.IsOpen = false;
if (imageView == null)
{
imageView = new UIImageView();
}
if (clickCount == 1)
{
imageView = null;
imageView = new UIImageView();
UIView hostingView = new UIView();
imageView.Image = UIImage.FromFile("Images/Popup_ResizingIllustration.png");
sfPopUp.PopupView.Frame = new CGRect(1, this.Frame.Y, this.Frame.Width, 130);
hostingView.Frame = new CGRect(0, 0, 160, 130);
imageView.Frame = new CGRect(this.SfGrid.RowColumnIndexToPoint(new Syncfusion.GridCommon.ScrollAxis.RowColumnIndex(0, 2)).X, 0, 130, 130);
imageView.Center = new CGPoint(this.SfGrid.RowColumnIndexToPoint(new Syncfusion.GridCommon.ScrollAxis.RowColumnIndex(0, 2)).X, this.Frame.Y);
hostingView.AddSubview(imageView);
sfPopUp.PopupView.ContentView = hostingView;
sfPopUp.IsOpen = true;
}
else if (clickCount == 2)
{
imageView = null;
imageView = new UIImageView();
imageView.Image = UIImage.FromFile("Images/Popup_EditIllustration.png");
sfPopUp.PopupView.ContentView = imageView;
var point = this.SfGrid.RowColumnIndexToPoint(new Syncfusion.GridCommon.ScrollAxis.RowColumnIndex(4, 2));
sfPopUp.PopupView.Frame = new CGRect(point.X, point.Y, 150, 150);
sfPopUp.IsOpen = true;
}
else if (clickCount == 3)
{
imageView = null;
UIView hostingView = new UIView();
imageView = new UIImageView();
imageView.StopAnimating();
imageView.Image = UIImage.FromFile("Images/Popup_SwipeIllustration.png");
var point = this.SfGrid.RowColumnIndexToPoint(new Syncfusion.GridCommon.ScrollAxis.RowColumnIndex(4, 0));
sfPopUp.PopupView.Frame = new CGRect(point.X, point.Y - 10, 300, 150);
hostingView.Frame = new CGRect(0, sfPopUp.PopupView.Frame.Top, 300, 150);
imageView.Frame = new CGRect(point.X, 0, 200, 150);
hostingView.AddSubview(imageView);
sfPopUp.PopupView.ContentView = hostingView;
sfPopUp.IsOpen = true;
}
else if (clickCount == 4)
{
UIView view = new UIView();
imageView = null;
imageView = new UIImageView();
imageView.Image = UIImage.FromFile("Images/Popup_DragAndDropIllustration.png");
imageView.Frame = new CGRect(0, 0, 200, 100);
var point = this.SfGrid.RowColumnIndexToPoint(new Syncfusion.GridCommon.ScrollAxis.RowColumnIndex(4, 0));
view.AddSubview(imageView);
img = new UIImageView();
img.Image = UIImage.FromFile("Images/Popup_HandSymbol.png");
img.Frame = new CGRect(10, 0, 20, 20);
view.AddSubview(img);
sfPopUp.PopupView.ContentView = view;
sfPopUp.PopupView.Frame = new CGRect(point.X + 10, point.Y + 5, 200, 100);
nextButton.SetTitle("Ok,Got It", UIControlState.Normal);
sfPopUp.IsOpen = true;
}
else if (clickCount > 4)
{
backgroundView.RemoveFromSuperview();
nextButton.RemoveFromSuperview();
}
}
private void CreateDataGrid()
{
col1 = new UILabel();
col1.Text = "Order ID";
col2 = new UILabel();
col2.Text = "Customer ID";
col3 = new UILabel();
col3.Text = "Employee ID";
col4 = new UILabel();
col4.Text = "Name";
orderIDText = new UITextField();
orderIDText.AllowsEditingTextAttributes = true;
orderIDText.ShouldReturn += (textField) =>
{
orderIDText.ResignFirstResponder();
return true;
};
customerIDText = new UITextField();
customerIDText.ShouldReturn += (textField) =>
{
customerIDText.ResignFirstResponder();
return true;
};
employeeIDText = new UITextField();
employeeIDText.ShouldReturn += (textField) =>
{
employeeIDText.ResignFirstResponder();
return true;
};
nameText = new UITextField();
nameText.ShouldReturn += (textField) =>
{
nameText.ResignFirstResponder();
return true;
};
orderIDText.Hidden = true;
customerIDText.Hidden = true;
employeeIDText.Hidden = true;
nameText.Hidden = true;
col1.Hidden = true;
col2.Hidden = true;
col3.Hidden = true;
col4.Hidden = true;
this.detailView = new DetailView();
this.detailView.Hidden = true;
this.SfGrid = new SfDataGrid();
this.SfGrid.GridLoaded += SfGrid_GridLoaded;
this.SfGrid.AllowDraggingRow = true;
this.SfGrid.AllowEditing = true;
this.SfGrid.AllowResizingColumn = true;
this.viewModel = new SwipingViewModel();
this.SfGrid.ItemsSource = viewModel.OrdersInfo;
this.SfGrid.AutoGenerateColumns = false;
this.SfGrid.GridStyle = new CustomStyles();
this.SfGrid.ShowRowHeader = false;
this.SfGrid.HeaderRowHeight = 45;
this.SfGrid.RowHeight = 45;
this.SfGrid.ColumnSizer = ColumnSizer.Star;
this.SfGrid.SelectionMode = SelectionMode.Single;
this.SfGrid.NavigationMode = NavigationMode.Cell;
this.SfGrid.EditTapAction = TapAction.OnDoubleTap;
UIButton leftSwipeViewText = new UIButton();
leftSwipeViewText.SetTitle("Delete", UIControlState.Normal);
leftSwipeViewText.SetTitleColor(UIColor.White, UIControlState.Normal);
leftSwipeViewText.VerticalAlignment = UIControlContentVerticalAlignment.Center;
leftSwipeViewText.BackgroundColor = UIColor.FromRGB(220, 89, 95);
leftSwipeViewText.TouchDown += LeftSwipeViewButton_TouchDown;
leftSwipeViewText.Frame = new CGRect(56, 0, 60, 45);
UIButton leftSwipeViewButton = new UIButton();
leftSwipeViewButton.SetImage(UIImage.FromFile("Images/Popup_Delete.png"), UIControlState.Normal);
leftSwipeViewButton.BackgroundColor = UIColor.FromRGB(220, 89, 95);
leftSwipeViewButton.HorizontalAlignment = UIControlContentHorizontalAlignment.Center;
leftSwipeViewButton.TouchDown += LeftSwipeViewButton_TouchDown;
leftSwipeViewButton.Frame = new CGRect(16, 10, 24, 24);
CustomSwipeView leftSwipeView = new CustomSwipeView();
leftSwipeView.AddSubview(leftSwipeViewButton);
leftSwipeView.AddSubview(leftSwipeViewText);
leftSwipeView.Frame = new CGRect(0, 0, 120, 44);
leftSwipeView.BackgroundColor = UIColor.FromRGB(220, 89, 95);
this.SfGrid.AllowSwiping = true;
this.SfGrid.LeftSwipeView = leftSwipeView;
this.SfGrid.SwipeEnded += SfGrid_SwipeEnded;
this.SfGrid.SwipeStarted += SfGrid_SwipeStarted;
GridTextColumn CustomerID = new GridTextColumn();
CustomerID.MappingName = "CustomerID";
CustomerID.HeaderText = "Customer ID";
GridTextColumn OrderID = new GridTextColumn();
OrderID.MappingName = "OrderID";
OrderID.HeaderText = "Order ID";
GridTextColumn EmployeeID = new GridTextColumn();
EmployeeID.MappingName = "EmployeeID";
EmployeeID.HeaderText = "Employee ID";
GridTextColumn Name = new GridTextColumn();
Name.MappingName = "FirstName";
Name.HeaderText = "Name";
this.SfGrid.Columns.Add(OrderID);
this.SfGrid.Columns.Add(CustomerID);
this.SfGrid.Columns.Add(EmployeeID);
this.SfGrid.Columns.Add(Name);
}
void LeftSwipeViewButton_TouchDown (object sender, EventArgs e)
{
viewModel.OrdersInfo.RemoveAt(swipedRowindex - 1);
}
void SfGrid_SwipeStarted(object sender, SwipeStartedEventArgs e)
{
SfGrid.MaxSwipeOffset = 120;
}
private void initializeTextFields()
{
if (swipedRowindex > 0)
{
var swipedRowData = this.viewModel.OrdersInfo[this.swipedRowindex - 1];
orderIDText.Text = swipedRowData.OrderID;
this.customerIDText.Text = swipedRowData.CustomerID;
this.employeeIDText.Text = swipedRowData.EmployeeID;
this.nameText.Text = swipedRowData.FirstName;
}
}
private void SfGrid_SwipeEnded(object sender, SwipeEndedEventArgs e)
{
swipedRowindex = e.RowIndex;
initializeTextFields();
}
private void SfGrid_GridLoaded(object sender, GridLoadedEventArgs e)
{
// Fix for popup is not shown in OnBoardHelps sample opening.
// Popup is not shown initially, Since we have set PopupView Hidden property to false from WillMoveToWindow override for collapsing the view visibility when goes to other window.
canCollapseVisibilty = true;
sfPopUp.PopupView.Frame = new CGRect(this.Frame.Width - 25, this.Frame.Y, 150, 100);
sfPopUp.Show();
}
private void CreatePopup()
{
sfPopUp = new SfPopupLayout();
sfPopUp.StaysOpen = true;
sfPopUp.PopupView.AnimationMode = AnimationMode.None;
sfPopUp.PopupView.PopupStyle.BorderThickness = 0;
sfPopUp.PopupView.PopupStyle.BorderColor = UIColor.Clear;
sfPopUp.PopupView.ShowFooter = false;
sfPopUp.PopupView.ShowHeader = false;
sfPopUp.Opened += SfPopUp_PopupOpened;
sfPopUp.Closed += SfPopUp_PopupClosed;
sfPopUp.BackgroundColor = UIColor.Clear;
imageView = new UIImageView();
imageView.Image = UIImage.FromFile("Images/Popup_InfoNotification.png");
sfPopUp.PopupView.ContentView = imageView;
}
public override void WillMoveToWindow(UIWindow window)
{
//This method is called by the runtime when navigate one window to another window.
base.WillMoveToWindow(window);
if (this.Window != null && (this.Window.RootViewController as UINavigationController).TopViewController is SampleBrowser.HomeViewController)
return;
if (sfPopUp.PopupView != null && canCollapseVisibilty)
{
if (window == null && sfPopUp.IsOpen)
//Setting PopupView Visibility when navigate one window to another window.
sfPopUp.PopupView.Hidden = true;
else
sfPopUp.PopupView.Hidden = false;
}
}
private void SfPopUp_PopupClosed(object sender, EventArgs e)
{
//if (clickCount == 5)
//backgroundView.RemoveFromSuperview();
}
private void SfPopUp_PopupOpened(object sender, EventArgs e)
{
AddBackgroundView();
if (clickCount == 0)
{
Action moveUpDown = () =>
{
var ypos = this.Frame.Y + 16;
imageView.Center = new CGPoint(imageView.Center.X, ypos);
};
UIView.Animate(1, 0, UIViewAnimationOptions.CurveEaseInOut | UIViewAnimationOptions.Autoreverse | UIViewAnimationOptions.Repeat, moveUpDown, () => { });
}
else if (clickCount == 1)
{
Action moveLeftRight = () =>
{
var xpos = imageView.Center.X + 60;
var ypos = sfPopUp.PopupView.Center.Y;
imageView.Center = new CGPoint(xpos, imageView.Center.Y);
};
UIView.Animate(2, 0, UIViewAnimationOptions.CurveEaseInOut | UIViewAnimationOptions.Repeat | UIViewAnimationOptions.Repeat, moveLeftRight, () => { });
}
else if (clickCount == 2)
{
imageView.Alpha = 0.0f;
Action setOpacity = () =>
{
imageView.Alpha = 1.0f;
};
UIView.Animate(0.25, 0, UIViewAnimationOptions.CurveEaseInOut , setOpacity ,async () =>
{
imageView.Alpha = 0.0f;
await Task.Delay(200);
imageView.Alpha = 1.0f;
await Task.Delay(1000);
LoopAnimate();
});
}
else if (clickCount == 3)
{
Action moveLeftRight = () =>
{
var xpos = sfPopUp.PopupView.Center.X + 60;
var ypos = imageView.Center.Y;
imageView.Center = new CGPoint(xpos, ypos);
};
UIView.Animate(2, 0, UIViewAnimationOptions.CurveEaseInOut | UIViewAnimationOptions.Repeat, moveLeftRight, () => { });
}
else if (clickCount == 4)
{
CGPoint fromPt = new CGPoint(img.Center.X + 10, img.Center.Y + 10);
img.Layer.Position = new CGPoint(img.Center.X + 70, img.Center.Y + 70);
CGPath path = new CGPath();
path.AddLines(new CGPoint[] { fromPt, new CGPoint(30, 20),new CGPoint(40, 25), new CGPoint(50, 30), new CGPoint(60, 40),new CGPoint(70, 50),new CGPoint(80, 60), new CGPoint(80,70) });
CAKeyFrameAnimation animPosition = (CAKeyFrameAnimation)CAKeyFrameAnimation.FromKeyPath("position");
animPosition.Path = path;
animPosition.RepeatCount = int.MaxValue;
animPosition.Duration = 1.25;
img.Layer.AddAnimation(animPosition, "position");
}
}
private void LoopAnimate()
{
if (clickCount > 2)
return;
else
{
imageView.Alpha = 0.0f;
Action setOpacity = () =>
{
imageView.Alpha = 1.0f;
};
UIView.Animate(0.25, 0, UIViewAnimationOptions.CurveEaseInOut, setOpacity, async () =>
{
imageView.Alpha = 0.0f;
await Task.Delay(200);
imageView.Alpha = 1.0f;
await Task.Delay(1000);
LoopAnimate();
});
}
}
private void AddBackgroundView()
{
if (mainView.Subviews.FirstOrDefault(x => x.Tag == 100) == null)
{
backgroundView = new UIView();
backgroundView.Tag = 100;
backgroundView.BackgroundColor = UIColor.Black;
backgroundView.Alpha = 0.82f;
backgroundView.AddGestureRecognizer(tapGesture);
this.mainView.AddSubview(backgroundView);
backgroundView.Frame = new CGRect(0, 0, this.Frame.Width, this.Frame.Height);
}
}
private void BackgroundViewPressed(UITapGestureRecognizer tapGesture)
{
clickCount++;
sfPopUp.IsOpen = false;
if (imageView == null)
{
imageView = new UIImageView();
}
if (clickCount == 1)
{
imageView = null;
imageView = new UIImageView();
UIView hostingView = new UIView();
imageView.Image = UIImage.FromFile("Images/Popup_ResizingIllustration.png");
sfPopUp.PopupView.Frame = new CGRect(1, this.Frame.Y, this.Frame.Width, 130);
hostingView.Frame = new CGRect(0, 0, 160, 130);
imageView.Frame = new CGRect(this.SfGrid.RowColumnIndexToPoint(new Syncfusion.GridCommon.ScrollAxis.RowColumnIndex(0, 2)).X, 0, 130, 130);
imageView.Center = new CGPoint(this.SfGrid.RowColumnIndexToPoint(new Syncfusion.GridCommon.ScrollAxis.RowColumnIndex(0, 2)).X, this.Frame.Y);
hostingView.AddSubview(imageView);
sfPopUp.PopupView.ContentView = hostingView;
sfPopUp.IsOpen = true;
}
else if (clickCount == 2)
{
imageView = null;
imageView = new UIImageView();
imageView.Image = UIImage.FromFile("Images/Popup_EditIllustration.png");
sfPopUp.PopupView.ContentView = imageView;
var point = this.SfGrid.RowColumnIndexToPoint(new Syncfusion.GridCommon.ScrollAxis.RowColumnIndex(4, 2));
sfPopUp.PopupView.Frame = new CGRect(point.X, point.Y, 150, 150);
sfPopUp.IsOpen = true;
}
else if (clickCount == 3)
{
imageView = null;
UIView hostingView = new UIView();
imageView = new UIImageView();
imageView.StopAnimating();
imageView.Image = UIImage.FromFile("Images/Popup_SwipeIllustration.png");
var point = this.SfGrid.RowColumnIndexToPoint(new Syncfusion.GridCommon.ScrollAxis.RowColumnIndex(4, 0));
sfPopUp.PopupView.Frame = new CGRect(point.X, point.Y - 10, 300, 150);
hostingView.Frame = new CGRect(0, sfPopUp.PopupView.Frame.Top, 300, 150);
imageView.Frame = new CGRect(point.X, 0, 200, 150);
hostingView.AddSubview(imageView);
sfPopUp.PopupView.ContentView = hostingView;
sfPopUp.IsOpen = true;
}
else if (clickCount == 4)
{
UIView view = new UIView();
imageView = null;
imageView = new UIImageView();
imageView.Image = UIImage.FromFile("Images/Popup_DragAndDropIllustration.png");
imageView.Frame = new CGRect(0, 0, 200, 100);
var point = this.SfGrid.RowColumnIndexToPoint(new Syncfusion.GridCommon.ScrollAxis.RowColumnIndex(4, 0));
view.AddSubview(imageView);
img = new UIImageView();
img.Image = UIImage.FromFile("Images/Popup_HandSymbol.png");
img.Frame = new CGRect(10, 0, 20, 20);
view.AddSubview(img);
sfPopUp.PopupView.ContentView = view;
sfPopUp.PopupView.Frame = new CGRect(point.X + 10, point.Y + 5, 200, 100);
nextButton.SetTitle("Ok,Got It", UIControlState.Normal);
sfPopUp.IsOpen = true;
}
else if (clickCount > 4)
{
backgroundView.RemoveFromSuperview();
nextButton.RemoveFromSuperview();
}
}
protected override void Dispose(bool disposing)
{
//sfPopUp.DismissPopup(true);
if (backgroundView != null)
{
mainView.WillRemoveSubview(backgroundView);
mainView.SendSubviewToBack(backgroundView);
sfPopUp.RemoveFromSuperview();
backgroundView.BackgroundColor = UIColor.Brown;
backgroundView.UserInteractionEnabled = false;
backgroundView.Frame = new CGRect(0, 0, 0, 0);
backgroundView.RemoveFromSuperview();
nextButton.RemoveFromSuperview();
backgroundView = null;
}
base.Dispose(disposing);
if (SfGrid != null)
SfGrid.Dispose();
if (sfPopUp != null)
sfPopUp.Dispose();
mainView = null;
}
}
}