Esempio n. 1
0
        /// <summary>
        /// This method is invoked when the application has loaded and is ready to run. In this 
        /// method you should instantiate the window, load the UI into it and then make the window
        /// visible.
        /// </summary>
        /// <remarks>
        /// You have 5 seconds to return from this method, or iOS will terminate your application.
        /// </remarks>
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            m_Window = new UIWindow (UIScreen.MainScreen.Bounds);
            m_RootController = new EmployeeTableViewController ("EmployeeTableViewController", null);
            m_NavigationController = new UINavigationController (m_RootController);
            m_Window.RootViewController = m_NavigationController;

            // make the window visible
            m_Window.MakeKeyAndVisible ();

            BeginDownloading ();
            return true;
        }
            public UITableViewSourceEx(EmployeeTableViewController controller)
            {
                m_Controller = controller;

                // Listen for changes to the Apps collection so the TableView can be updated
                m_Controller.m_arrEmployee.CollectionChanged += HandleEmployeeCollectionChanged;

                // Initialise DownloadTask with an empty and complete task
                m_DownloadTask = Task.Factory.StartNew(() => { });

                // Load the Placeholder image so it's ready to be used immediately
                m_imgDefaultAvatar = UIImage.FromFile("Images/dafault_avatar.png");
                m_imgPhone = UIImage.FromFile("Images/btn_call.png");
                m_imgSMS = UIImage.FromFile("Images/btn_chat.png");
                m_imgEmail = UIImage.FromFile("Images/btn_mail.png");

                // If either a download fails or the image we download is corrupt, ignore the problem.
                TaskScheduler.UnobservedTaskException += delegate(object sender, UnobservedTaskExceptionEventArgs e) {
                    e.SetObserved();
                };
            }