Пример #1
0
        /// <summary>
        /// Event for adding a signature
        /// </summary>
        partial void AddSignature(MonoTouch.UIKit.UIButton sender2)
        {
            var signatureController = new SignatureController();

            signatureController.Dismissed += (sender, e) => controller.ReloadConfirmation();
            signatureController.PresentFromRect(Frame, Superview, UIPopoverArrowDirection.Up, true);
        }
Пример #2
0
 partial void getFilesAtPathAsync(MonoTouch.UIKit.UIButton sender)
 {
     //calling async web service
     gateway.GetAsync <FilesResponse>(txtPath.Text,
                                      r => InvokeOnMainThread(() => txtResults.Text = r.Dump()),
                                      null);
 }
        partial void employeeSignoutButton_TouchUpInside(MonoTouch.UIKit.UIButton sender)
        {
            var signut = Storyboard.InstantiateViewController("EmployeeListSignoutViewController") as EmployeeListSignoutViewController;

            signut.timekeeperdetails(this, Timekeepernumbr.ToString(), Workdte.ToString(), TimekeeperName.ToString());
            NavigationController.PushViewController(signut, true);
        }
		void ReleaseDesignerOutlets ()
		{
			if (backButton != null) {
				backButton.Dispose ();
				backButton = null;
			}
		}
        /// <summary>
        /// Event when complete is pressed
        /// </summary>
        partial void Complete(MonoTouch.UIKit.UIButton sender2)
        {
            //Check if they signed
            if (assignmentViewModel.Signature == null)
            {
                new UIAlertView(string.Empty, "Signature is required.", null, "Ok").Show();
                return;
            }

            alertView            = new UIAlertView("Complete?", "Are you sure?", null, "Yes", "No");
            alertView.Dismissed += (sender, e) => {
                alertView.Dispose();
                alertView = null;

                if (e.ButtonIndex == 0)
                {
                    completeButton.Enabled = false;
                    assignment.Status      = AssignmentStatus.Complete;
                    assignmentViewModel
                    .SaveAssignmentAsync(assignment)
                    .ContinueWith(_ => {
                        BeginInvokeOnMainThread(() => {
                            tableView.ReloadData();

                            var detailsController = controller.ParentViewController as AssignmentDetailsController;
                            detailsController.UpdateAssignment();

                            var menuController = detailsController.ParentViewController.ChildViewControllers[1] as MenuController;
                            menuController.UpdateAssignment();
                        });
                    });
                }
            };
            alertView.Show();
        }
        partial void OnGoTouchUpInside(MonoTouch.UIKit.UIButton sender)
        {
            List <AsciiPageSize> sizes = new List <AsciiPageSize>
            {
                new AsciiPageSize("micro", 320, 240),
                new AsciiPageSize("tiny", 480, 360),
                new AsciiPageSize("small", 640, 480),
                new AsciiPageSize("medium", 800, 600),
                new AsciiPageSize("large", 1024, 768),
                new AsciiPageSize("extra large", 1280, 1024),
                new AsciiPageSize("super large", 1600, 1200)
            };
            var sizesArr    = from thisSize in sizes select thisSize.Name;
            var actionSheet = new UIActionSheet("Select size", null, "Cancel", null, sizesArr.ToArray())
            {
                Style = UIActionSheetStyle.Default
            };

            actionSheet.Clicked += delegate(object actionSheetSender, UIButtonEventArgs args)
            {
                var index = args.ButtonIndex;
                Console.WriteLine("Clicked on item {0}", index);
                if (index < sizes.Count)
                {
                    actionSheet.DismissWithClickedButtonIndex(sizes.Count, true);
                    CreateAsciiArt(sizes[index]);
                }
            };

            actionSheet.ShowInView(View);
        }
		void ReleaseDesignerOutlets ()
		{
			if (monkeyButton != null) {
				monkeyButton.Dispose ();
				monkeyButton = null;
			}
		}
Пример #8
0
        partial void OnUploadTouchUpInside(MonoTouch.UIKit.UIButton sender)
        {
            var dests = new List <IUIInfo>(new IUIInfo[]
            {
                new EmailSharer(this),
                new TwitterSharer(this),
                new PhotoAlbumUploader(this),
                new FileSharingUploader(this),
                new FacebookSharer(this)
            });
            var destsArr    = from thisDest in dests select thisDest.Name;
            var actionSheet = new UIActionSheet("Share to", null, "Cancel", null, destsArr.ToArray())
            {
                Style = UIActionSheetStyle.Default
            };

            actionSheet.Clicked += delegate(object actionSheetSender, UIButtonEventArgs args)
            {
                var index = args.ButtonIndex;
                Console.WriteLine("Clicked on item {0}", index);
                if (index < dests.Count)
                {
                    actionSheet.DismissWithClickedButtonIndex(dests.Count, true);
                    Share(dests[index]);
                }
            };

            actionSheet.ShowInView(View);
        }
 void ReleaseDesignerOutlets()
 {
     if (backButton != null)
     {
         backButton.Dispose();
         backButton = null;
     }
 }
        /// <summary>
        /// Event when the active assignment is clicked
        /// </summary>
        partial void ActiveAssignmentSelected(MonoTouch.UIKit.UIButton sender)
        {
            var menuViewModel = ServiceContainer.Resolve <MenuViewModel>();

            menuViewModel.MenuIndex = SectionIndex.Summary;
            assignmentViewModel.SelectedAssignment = assignmentViewModel.ActiveAssignment;
            PerformSegue("AssignmentDetails", this);
        }
Пример #11
0
 void ReleaseDesignerOutlets()
 {
     if (monkeyButton != null)
     {
         monkeyButton.Dispose();
         monkeyButton = null;
     }
 }
Пример #12
0
        /// <summary>
        /// Event when the "add photo" button is clicked
        /// </summary>
        partial void AddPhoto(MonoTouch.UIKit.UIButton sender)
        {
            photoViewModel.SelectedPhoto = new Photo {
                AssignmentId = assignmentViewModel.SelectedAssignment.Id, Date = DateTime.Now
            };

            photoSheet.ShowFrom(addPhoto.Frame, addPhoto.Superview, true);
        }
Пример #13
0
        partial void changePicture(MonoTouch.UIKit.UIButton sender)
        {
            Console.WriteLine("changePicture called in MonoTouch");

            _changePictureSheet = new UIActionSheet(
                "Change Picture",
                new ChangePictureActionSheetDelegate(this), "Cancel",
                null, "Image 1", "Image 2");

            _changePictureSheet.ShowInView(imageView);
        }
Пример #14
0
        partial void getFilesAtPath(MonoTouch.UIKit.UIButton sender)
        {
            //calling sync web service
            var response = gateway.Get <FilesResponse>(txtPath.Text);

            txtResults.Text = response.Dump();

            var alertView = new UIAlertView("Alert", "getFiles Sync: " + txtPath.Text, null, "Cancel");

            alertView.Show();
        }
 partial void OnUpdateItemButtonTapped(MonoTouch.UIKit.UIButton sender)
 {
     if (null == this.CreatedItemPath)
     {
         AlertHelper.ShowLocalizedAlertWithOkOption("Message", "Create item at first");
     }
     else
     {
         this.SendUpdateRequest();
     }
 }
Пример #16
0
        /// <summary>
        /// Event when accept button is clicked
        /// </summary>
        partial void Accept(MonoTouch.UIKit.UIButton sender)
        {
            if (assignmentViewModel.ActiveAssignment == null)
            {
                assignmentViewModel.SelectedAssignment.Status = AssignmentStatus.Active;
            }
            else
            {
                assignmentViewModel.SelectedAssignment.Status = AssignmentStatus.Hold;
            }

            SaveAssignment();
        }
 void ReleaseDesignerOutlets()
 {
     if (CallButton != null) {
         CallButton.Dispose ();
         CallButton = null;
     }
     if (PHoneWordText != null) {
         PHoneWordText.Dispose ();
         PHoneWordText = null;
     }
     if (TranslateButton != null) {
         TranslateButton.Dispose ();
         TranslateButton = null;
     }
 }
        /// <summary>
        /// Event when record button is pressed
        /// </summary>
        partial void Record(MonoTouch.UIKit.UIButton sender)
        {
            record.Enabled = false;
            Task task;

            if (assignmentViewModel.Recording)
            {
                task = assignmentViewModel.PauseAsync();
            }
            else
            {
                task = assignmentViewModel.RecordAsync();
            }
            task.ContinueWith(_ => BeginInvokeOnMainThread(() => record.Enabled = true));
        }
        /// <summary>
        /// Event when the decline button is clicked
        /// </summary>
        partial void Decline(MonoTouch.UIKit.UIButton sender2)
        {
            alertView            = new UIAlertView("Decline Assignment", "Are you sure?", null, "Yes", "No");
            alertView.Dismissed += (sender, e) => {
                if (e.ButtonIndex == 0)
                {
                    assignment.Status = AssignmentStatus.Declined;

                    SaveAssignment();
                }

                alertView.Dispose();
                alertView = null;
            };
            alertView.Show();
        }
Пример #20
0
        partial void buttonClick(MonoTouch.UIKit.UIButton sender)
        {
            var logger        = new ListLogger();
            var platformTests = new TinyIoC.Tests.PlatformTestSuite.PlatformTests(logger);
            int run;
            int passed;
            int failed;

            platformTests.RunTests(out run, out passed, out failed);
            this.results.Text = "";
            foreach (var item in logger.LogEntries)
            {
                this.results.Text += item + "\n";
            }
            using (var alert = new UIAlertView("TinyIoC", String.Format("{0} tests run. {1} passed, {2} failed.", run, passed, failed), null, "OK", null)) {
                alert.Show();
            }
        }
Пример #21
0
        partial void OnExecuteCommand(MonoTouch.UIKit.UIButton sender)
        {
            if (ExecuteCommand != null)
            {
                // go back to main screen to show results
                navigationController.SelectedIndex = 0;

                // identify button
                string cmd = mCommands[sender.Title(UIControlState.Normal)];

                // get parameters for button
                string param1 = string.Empty;
                string param2 = string.Empty;
                GetParameters(cmd, out param1, out param2);

                ExecuteCommand(this, new CommandItemExecuteInfo(cmd, param1, param2));
            }
        }
        partial void Login(MonoTouch.UIKit.UIButton sender)
        {
            //Dismiss the keyboard
            username.ResignFirstResponder();
            password.ResignFirstResponder();

            loginViewModel
            .LoginAsync()
            .ContinueWith(_ =>
                          BeginInvokeOnMainThread(() => {
                if (tabController == null)
                {
                    tabController = Storyboard.InstantiateViewController <TabController>();
                }

                Theme.TransitionController(tabController);
            }));
        }
Пример #23
0
        /// <summary>
        /// Event when the delete photo buttton is pressed
        /// </summary>
        partial void DeletePhoto(MonoTouch.UIKit.UIButton sender2)
        {
            alertView            = new UIAlertView("Delete?", "Are you sure?", null, "Yes", "No");
            alertView.Dismissed += (sender, e) => {
                if (e.ButtonIndex == 0)
                {
                    photoViewModel
                    .DeletePhotoAsync(assignmentViewModel.SelectedAssignment, photoViewModel.SelectedPhoto)
                    .ContinueWith(_ => {
                        BeginInvokeOnMainThread(() => DismissViewController(true, null));
                    });
                }

                alertView.Dispose();
                alertView = null;
            };
            alertView.Show();
        }
 void ReleaseDesignerOutlets()
 {
     if (CallButton != null)
     {
         CallButton.Dispose();
         CallButton = null;
     }
     if (PhoneNumberText != null)
     {
         PhoneNumberText.Dispose();
         PhoneNumberText = null;
     }
     if (TranslateButton != null)
     {
         TranslateButton.Dispose();
         TranslateButton = null;
     }
 }
Пример #25
0
        partial void ShowIfReachable(MonoTouch.UIKit.UIButton sender)
        {
            // You can validate if Beeblex Service is Available
            // Using the Booblean Property BBXIAPTransaction.CanValidateTransactions
            // ie. This will return false is no Network is Availabe

            UIAlertView alert;

            if (BBXIAPTransaction.CanValidateTransactions)
            {
                alert = new UIAlertView("Success", "Beeblex Service is Available", null, "Ok, Thanks!", null);
                alert.Show();
            }
            else
            {
                alert = new UIAlertView("Failure", "Beeblex Service is Unavailable", null, "Aww, Okay!", null);
                alert.Show();
            }
        }
Пример #26
0
        partial void ShowApiKey(MonoTouch.UIKit.UIButton sender)
        {
            // You can make sure BBXBeeblex has your API Key
            // by checking it's ApiKey Property

            UIAlertView alert;
            BBXBeeblex  beeblex = BBXBeeblex.SharedInstance;

            if (beeblex.ApiKey != null)
            {
                alert = new UIAlertView("Here is it:", beeblex.ApiKey, null, "Ok, Thanks!", null);
                alert.Show();
            }
            else
            {
                alert = new UIAlertView("Failure", "Did you provide your API Key to BBXBeeblex?", null, "Ok", null);
                alert.Show();
            }
        }
 partial void showPicker(MonoTouch.UIKit.UIButton sender)
 {
     Console.Error.WriteLine("# Select Contacts pushed!");
     using (p = new ABPeoplePickerNavigationController()) {
         p.SelectPerson += (o, e) => {
             Console.Error.WriteLine("# select Person: {0}", e.Person);
             toString.Text   = e.Person.ToString();
             firstName.Text  = e.Person.FirstName;
             lastName.Text   = e.Person.LastName;
             property.Text   = "";
             identifier.Text = "";
             e.Continue      = selectProperty.On;
             if (!e.Continue)
             {
                 DismissModalViewControllerAnimated(true);
             }
         };
         p.PerformAction += (o, e) => {
             Console.Error.WriteLine("# perform action; person={0}", e.Person);
             toString.Text   = e.Person.ToString();
             firstName.Text  = e.Person.FirstName;
             lastName.Text   = e.Person.LastName;
             property.Text   = e.Property.ToString();
             identifier.Text = e.Identifier.HasValue ? e.Identifier.ToString() : "";
             e.Continue      = performAction.On;
             if (!e.Continue)
             {
                 DismissModalViewControllerAnimated(true);
             }
         };
         p.Cancelled += (o, e) => {
             Console.Error.WriteLine("# select Person cancelled.");
             toString.Text   = "Cancelled";
             firstName.Text  = "";
             lastName.Text   = "";
             property.Text   = "";
             identifier.Text = "";
             DismissModalViewControllerAnimated(true);
         };
         PresentModalViewController(p, true);
     }
 }
Пример #28
0
        // FBSample logic
        // Handles the user clicking the Announce button by creating an Open Graph Action
        partial void announce(MonoTouch.UIKit.UIButton sender)
        {
            // if we don't have permission to announce, let's first address that
            if (!FBSession.ActiveSession.Permissions.Contains("publish_actions"))
            {
                FBSession.ActiveSession.ReauthorizeWithPublishPermissions(new string[] { "publish_actions" }, FBSessionDefaultAudience.Friends, (FBSession session, NSError error) =>
                {
                    if (error == null)
                    {
                        this.announce(sender);
                    }
                });
            }
            else
            {
                announceButton.Enabled = false;
                activityIndicator.StartAnimating();
                this.View.UserInteractionEnabled = false;

                PostOpenGraphAction();
            }
        }
Пример #29
0
        partial void CameraShutterDidPress(MonoTouch.UIKit.UIButton sender)
        {
            if (!captureSession.Running)
            {
                return;
            }

            UserInterfaceEnabled = false;

            PerformBrackedCaptureWithCompletionHandler((image) => {
                imageViewController = new ImageViewController(image)
                {
                    ImageViewControllerDidFinish = ImageViewControllerDidFinish,
                    Title = "Bracket Viewer Title"
                };

                navigationImageViewController = new UINavigationController(imageViewController)
                {
                    ModalTransitionStyle = UIModalTransitionStyle.CoverVertical
                };

                PresentViewController(navigationImageViewController, true, null);
            });
        }
 void ReleaseDesignerOutlets()
 {
     if (BannerLabel_iPhone != null)
     {
         BannerLabel_iPhone.Dispose();
         BannerLabel_iPhone = null;
     }
     if (BannerLabel_iPad != null) {
         BannerLabel_iPad.Dispose ();
         BannerLabel_iPad = null;
     }
     if (CustomerCityText_iPad != null) {
         CustomerCityText_iPad.Dispose ();
         CustomerCityText_iPad = null;
     }
     if (CustomerCityText_iPhone != null) {
         CustomerCityText_iPhone.Dispose ();
         CustomerCityText_iPhone = null;
     }
     if (CustomerIdText_iPad != null) {
         CustomerIdText_iPad.Dispose ();
         CustomerIdText_iPad = null;
     }
     if (CustomerIdText_iPhone != null) {
         CustomerIdText_iPhone.Dispose ();
         CustomerIdText_iPhone = null;
     }
     if (CustomerNameText_iPad != null) {
         CustomerNameText_iPad.Dispose ();
         CustomerNameText_iPad = null;
     }
     if (CustomerNameText_iPhone != null) {
         CustomerNameText_iPhone.Dispose ();
         CustomerNameText_iPhone = null;
     }
     if (NewCustomerButton_iPad != null) {
         NewCustomerButton_iPad.Dispose ();
         NewCustomerButton_iPad = null;
     }
     if (NewCustomerButton_iPhone != null) {
         NewCustomerButton_iPhone.Dispose ();
         NewCustomerButton_iPhone = null;
     }
 }
Пример #31
0
        /// <summary>
        /// Event when decline button is clicked
        /// </summary>
        partial void Decline(MonoTouch.UIKit.UIButton sender)
        {
            assignmentViewModel.SelectedAssignment.Status = AssignmentStatus.Declined;

            SaveAssignment();
        }
 partial void AddPhoto(MonoTouch.UIKit.UIButton sender);
Пример #33
0
 partial void ActiveAssignmentSelected(MonoTouch.UIKit.UIButton sender);
Пример #34
0
 partial void Record(MonoTouch.UIKit.UIButton sender);