public TableSourceSearch(ViewController_Stock owner, string sSearchType)
 {
     //this.models = models;
     //this.modelsSearch = this.models;
     this.owner       = owner;
     search           = owner.searchDisplayController;
     this.sSearchType = sSearchType;
 }
        public void callStock(string sSelectedName)
        {
            UINavigationController ctrl = new UINavigationController();

            if (sSelectedName == "Home Screen")
            {
                ViewController_Home controller = this.Storyboard.InstantiateViewController("ViewController_Home") as ViewController_Home;
                ctrl.PushViewController(controller, true);
            }
            else if (sSelectedName == "Chat")
            {
                ViewController_ChatList controller = this.Storyboard.InstantiateViewController("ViewController_ChatList") as ViewController_ChatList;
                ctrl.PushViewController(controller, true);
            }
            else
            {
                ViewController_Stock controller = this.Storyboard.InstantiateViewController("ViewController_Stock_menu") as ViewController_Stock;
                ctrl.PushViewController(controller, true);
            }

            window.RootViewController = ctrl;
            window.MakeKeyAndVisible();
        }
Beispiel #3
0
        //UINavigationController navController;
        public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
        {
            window = new UIWindow(UIScreen.MainScreen.Bounds);

            var storyboard = UIStoryboard.FromName("Main", null);

            NSUserDefaults.StandardUserDefaults.SetBool(false, "LoggedIn");


            if (NSUserDefaults.StandardUserDefaults.BoolForKey("LoggedIn") == false)
            {
                NSUserDefaults.StandardUserDefaults.SetString("", "CompletedStep");

                if (NSUserDefaults.StandardUserDefaults.StringForKey("CompletedStep") == null || NSUserDefaults.StandardUserDefaults.StringForKey("CompletedStep") == "")
                {
                    //ViewController_Ins_Agree controller = storyboard.InstantiateViewController("ViewController_Ins_Agree") as ViewController_Ins_Agree;
                    ViewController_Ins_Register controller = storyboard.InstantiateViewController("ViewController_Ins_RegisterWhole") as ViewController_Ins_Register;
                    //ViewController_Chat controller = storyboard.InstantiateViewController("ViewController_Chat") as ViewController_Chat;
                    //ViewController_Ins_Types controller = storyboard.InstantiateViewController("ViewController_Ins_Types_WW") as ViewController_Ins_Types;

                    window.RootViewController = controller;
                    window.MakeKeyAndVisible();
                }

                else if (NSUserDefaults.StandardUserDefaults.StringForKey("CompletedStep") == "Agree")
                {
                    ViewController_Ins_Types controller = storyboard.InstantiateViewController("ViewController_Ins_Types") as ViewController_Ins_Types;
                    window.RootViewController = controller;
                    window.MakeKeyAndVisible();
                }

                else if (NSUserDefaults.StandardUserDefaults.StringForKey("CompletedStep").ToString() == "Types")
                {
                    ViewController_Ins_Contact controller = storyboard.InstantiateViewController("ViewController_Ins_Contact") as ViewController_Ins_Contact;
                    window.RootViewController = controller;
                    window.MakeKeyAndVisible();
                }
                else if (NSUserDefaults.StandardUserDefaults.StringForKey("CompletedStep").ToString() == "Contact")
                {
                    //ViewController_Ins_OTP controller = storyboard.InstantiateViewController("ViewController_Ins_OTP") as ViewController_Ins_OTP;
                    ViewController_Ins_Contact controller = storyboard.InstantiateViewController("ViewController_Ins_Contact") as ViewController_Ins_Contact;
                    window.RootViewController = controller;
                    window.MakeKeyAndVisible();
                }
                else if (NSUserDefaults.StandardUserDefaults.StringForKey("CompletedStep").ToString() == "OTP")
                {
                    ViewController_Ins_Details controller = storyboard.InstantiateViewController("ViewController_Ins_Details") as ViewController_Ins_Details;
                    window.RootViewController = controller;
                    window.MakeKeyAndVisible();
                }
                else if (NSUserDefaults.StandardUserDefaults.StringForKey("CompletedStep").ToString() == "Details")
                {
                    ViewController_Ins_Register controller = storyboard.InstantiateViewController("ViewController_Ins_Register") as ViewController_Ins_Register;
                    window.RootViewController = controller;
                    window.MakeKeyAndVisible();
                }
                else if (NSUserDefaults.StandardUserDefaults.StringForKey("CompletedStep").ToString() == "CompanyRegistered")
                {
                    ViewController_Ins_Types controller = storyboard.InstantiateViewController("ViewController_Ins_Types_WW") as ViewController_Ins_Types;
                    window.RootViewController = controller;
                    window.MakeKeyAndVisible();
                }

                else
                {
                    ViewController_Ins_Agree controller = storyboard.InstantiateViewController("ViewController_Ins_Agree") as ViewController_Ins_Agree;
                    window.RootViewController = controller;
                    window.MakeKeyAndVisible();
                }
            }
            else
            {
                //UINavigationController ctrl = new UINavigationController();
                //ViewController_Home controller = storyboard.InstantiateViewController("ViewController_Home") as ViewController_Home;
                //ctrl.PushViewController(controller, true);
                //window.RootViewController = ctrl;
                //window.MakeKeyAndVisible();

                //UINavigationController ctrl = new UINavigationController();
                //ViewController_Home controller = storyboard.InstantiateViewController("ViewController_Home") as ViewController_Home;
                ViewController_Stock controller = storyboard.InstantiateViewController("ViewController_Stock_menu") as ViewController_Stock;
                //	ctrl.PushViewController(controller, true);
                window.RootViewController = controller;                //ctrl;
                window.MakeKeyAndVisible();
            }
            return(true);
        }