public SearchSource (VCLogs controller)
                : base(controller)
            {
                Console.WriteLine("SearchSource Constructor");

            }
        private void BuildViewController()
        {
            if (OfflineDataSection != null)
                OfflineDataSection.Clear();

            Reachability.ReachabilityChanged += (object sender, EventArgs e) =>  { UpdateSettings (); };

            onlineElement = new BooleanElement(LocalString.GetString("Online"), Application._user.NetworkStatus != DataAccessLayer.NetworkState.Disconnected);
            onlineElement.ValueChanged +=  onlineElement_ValueChanged;

            urlElement = new StringElement( "Server URL",DataAccessLayer.Utilities.ServerIP);

            // Upload Element
            offlineTasks = BusinessLayer.Task.HasNewOfflineTasks();
            string UploadLabel = "";
            if (offlineTasks != 0)
                UploadLabel = "  (" + LocalString.GetString("UnsynchronizedData_") + " " + offlineTasks.ToString() + ")";
            uploadDataElement = new ImageStringElement(LocalString.GetString("UploadData") + UploadLabel,UIImage.FromFile("Images/ic_action_upload.png"));
            uploadDataElement.Tapped += delegate()
                {
                    UploadData();
                };

            clearofflineDataElement = new ImageStringElement(LocalString.GetString("ClearOfflineData"),UIImage.FromFile("Images/ic_action_ClearOfflineData.png"));
            clearofflineDataElement.Tapped += delegate
                {
                    ClearSQLiteData();

                };

            changeOfflinePasswordElement = new ImageStringElement(LocalString.GetString("ChangeOfflinePassword"),UIImage.FromFile("Images/ic_action_OfflinePassword.png"));
            changeOfflinePasswordElement.Tapped += delegate
                {
                    // Create a VCSelectAnsprechpartnern dialog
                    vcChangeOfflinePassword = Storyboard.InstantiateViewController<VCChangeOfflinePasswordAlt>();
                    vcChangeOfflinePassword.VCSettings = this;
                    vcChangeOfflinePassword.ModalPresentationStyle = UIModalPresentationStyle.FormSheet;

                    PresentViewController(vcChangeOfflinePassword, true, null);

                };
            gunThemeElement = new BooleanElement("Plus Theme",Application.GunTheme);
            gunThemeElement.ValueChanged += (object sender, EventArgs e) => {
                if (gunThemeElement.Value == true)
                    BusinessLayer.User.SetGunTheme(1);
                else
                    BusinessLayer.User.SetGunTheme(0);
            };
            SaveNothingElement = new RadioElement (LocalString.GetString("SaveNothing"), "LoginDateiSpeichern");
            SaveNothingElement.Tapped += delegate
                {
                    BusinessLayer.User.SetLoginSaveOption("0");
                    Application._user.SaveOnlineUserData();
                };
            SaveMandantElement = new RadioElement (LocalString.GetString("SaveNameMandant"), "LoginDateiSpeichern");
            SaveMandantElement.Tapped += delegate
                {
                    BusinessLayer.User.SetLoginSaveOption("1");
                    Application._user.SaveOnlineUserData();
                };
            SaveAllElement = new RadioElement (LocalString.GetString("SaveAll"), "LoginDateiSpeichern");
            SaveAllElement.Tapped += delegate
                {
                    BusinessLayer.User.SetLoginSaveOption("2");
                    Application._user.SaveOnlineUserData();
                };
            logElement = new ImageStringElement("Logs",UIImage.FromFile("Images/ic_action_Log.png"));
            logElement.Tapped += delegate
                {
                    // Create a VCSelectAnsprechpartnern dialog
                    vcLog = Storyboard.InstantiateViewController<VCLogs>();
                    List<BusinessLayer.Log> logs = BusinessLayer.Log.GetLogs();
                    vcLog._logs = logs;
                    PresentViewController(vcLog, true, null);

                };
            LicenseElement = new StringElement(Application.licenseKey.rec.ValueData.ToString().Split(new String[]{"-<>-"},StringSplitOptions.RemoveEmptyEntries)[0]);

            NetworkSection = new Section(LocalString.GetString("NetworkConnectivity"))
                {
                    urlElement,onlineElement
                };

            OfflineDataSection = new Section(LocalString.GetString("OfflineData"))
                {
                    changeOfflinePasswordElement ,uploadDataElement,clearofflineDataElement 

                };
            AppearenceSection = new Section(LocalString.GetString("Appearence"))
                {
                    gunThemeElement
                };
            LogSection = new Section("Logs")
                {
                    logElement
                };
            SecuritySection = new Section(LocalString.GetString("Security"))
                {
                    new RootElement(LocalString.GetString("LoginDateiSpeichern"), new RadioGroup("LoginDateiSpeichern", Convert.ToInt32(BusinessLayer.User.GetLoginSaveOption())))
                    {
                        new Section()
                        {
                            SaveNothingElement, SaveMandantElement, SaveAllElement
                        }
                    }
                };

            LicenseSection = new Section("Device ID")
                {
                    LicenseElement
                };
            taskElement = new RootElement ("TestRootElement"){NetworkSection,OfflineDataSection , AppearenceSection, SecuritySection, LogSection ,LicenseSection

            };


            this.Root.Add(taskElement);
            //            onlineElement.GetActiveCell().SelectionStyle = UITableViewCellSelectionStyle.None;

            Console.WriteLine("First Constr");

        }
 public TableSource ( VCLogs parent)
 {
     _logs = parent._logs;
     _parent = parent;
 }