Start() public method

public Start ( ) : void
return void
Exemplo n.º 1
0
        public override void ViewDidLoad()
        {
            DependencyContainer.Inject(this);

            this.HideBackButtonText();

            if (ShouldScrollVertically)
            {
                this.MakeScrollable(BackgroundColor);
            }

            ViewModel = CreateViewModel();
            ViewModel.AlertHandler       = this;
            ViewModel.KeyboardHandler    = this;
            ViewModel.ProgressHUDHandler = this;
            ViewModel.WebHandler         = this;

            View.BackgroundColor = BackgroundColor;

            SetupViewModelBindings();
            SetupViewModelActions();
            SetupControls();
            StyleControls();

            ViewModel.Start();

            base.ViewDidLoad();
        }
Exemplo n.º 2
0
 public void Start()
 {
     viewModel.Start();
     view.graph = ControllerUtil.FindGraphByName(viewModel.graph, viewModel.main);
     ViewUtil.SetupAudio(viewModel.main, viewModel.sounds);
     ControllerUtil.SetupButtons(this, viewModel.buttons);
 }
Exemplo n.º 3
0
 public override void OnResume()
 {
     if (!loaded)
     {
         ViewModel.Start();
     }
     base.OnResume();
 }
Exemplo n.º 4
0
        private async void Current_Resuming(object sender, object e)
        {
            if (Frame.CurrentSourcePageType == typeof(MainPage))
            {
                RegisterOrientationEventHandlers();

                await InitializeCameraAsync();

                ViewModel.Dispatcher = this.Dispatcher;
                ViewModel.Start();
            }
        }
Exemplo n.º 5
0
        protected override async void OnNavigatedTo(NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);

            RegisterOrientationEventHandlers();

            await InitListOfDevices();

            await InitializeCameraAsync();

            ViewModel.Dispatcher = this.Dispatcher;
            ViewModel.Start();

            ViewModel.PropertyChanged += ViewModel_PropertyChanged;
        }
 internal void Connect(string ip, int port)
 {
     try
     {
         vm.Connect(ip, port);
         if (vm.IsConnected())
         {
             System.Diagnostics.Debug.WriteLine("Client is connected successfully!");
             vm.Start();
         }
     }
     catch (Exception e)
     {
         Console.WriteLine(e.Message);
     }
 }
Exemplo n.º 7
0
        protected override void OnStart()
        {
            base.OnStart();
            if (ViewModel != null)
            {
                ViewModel.Start();

                _subscription.Disposable = ObserveCurrentViewState();

                if (_locateUserOnStart)
                {
                    // this happens ONLY when returning from a ride
                    ViewModel.AutomaticLocateMeAtPickup.ExecuteIfPossible();
                    _locateUserOnStart = false;
                }
            }
        }
Exemplo n.º 8
0
 private void ConnectButtonClick(object sender, RoutedEventArgs e)
 {
     if (!(vm.IsConnected()))
     {
         string stringPort = PortFromUser.Text;
         string stringIP   = IPFromUser.Text;
         if (String.IsNullOrEmpty(stringIP))
         {
             stringIP = "127.0.0.1";
         }
         if (String.IsNullOrEmpty(stringPort))
         {
             stringPort = "5402";
         }
         vm.Connect(stringIP, int.Parse(stringPort));
         if (vm.IsConnected())
         {
             vm.Start();
         }
     }
 }
        async void AppHub_Loaded(object sender, RoutedEventArgs e)
        {
            m_Timer.Tick += (s, args) =>
            {
                m_Timer.Stop();
                MyBottomAppBar.IsOpen = false;
            };
            m_Timer.Start();

            GridViewOut.ItemsSource = cvs.View.CollectionGroups;
            await ViewModel.Start();


            // are we enabling advertising?
            if (!AppHubViewModel.Strings.AdInclude)
            {
                this.MyPurchaseButton.Visibility = Visibility.Collapsed;
            }
            else
            {
                ViewModel.PropertyChanged += (s, args) =>
                {
                    if (!new string[] { "Longitude", "Latitude" }.Contains(args.PropertyName))
                    {
                        return;
                    }
                    UpdateAds();
                };
                this.ViewModel.Feeds.CollectionChanged += (s, args) =>
                {
                    foreach (var item in this.ViewModel.Feeds)
                    {
                        item.Articles.CollectionChanged -= Articles_CollectionChanged;
                        item.Articles.CollectionChanged += Articles_CollectionChanged;
                    }
                    UpdateAds();
                };
                UpdateAds();
            }
        }
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);

            this.SizeChanged        -= OnSizeChanged;
            this.OrientationChanged -= CompassView_OrientationChanged;

            this.SizeChanged        += OnSizeChanged;
            this.OrientationChanged += CompassView_OrientationChanged;

            var model = new CompassRoseViewModel(new DeviceCompass(), new IsolatedSettings(), new MessageService());

            model.UiAction = (uiAction => this.Dispatcher.BeginInvoke(uiAction));

            this.DataContext = model;

            BuildLocalizedApplicationBar();
            ViewModel.Initialize();
            ViewModel.Start();

            // On hibernante we need to update layout since SizeChanged does not fire
            Render(LayoutRoot.ActualHeight);
        }
Exemplo n.º 11
0
 public override void OnResume()
 {
     ViewModel.Start();
     base.OnResume();
 }
Exemplo n.º 12
0
 public void Execute(object parameter)
 {
     ViewModel.Start(OnExecute);
 }
Exemplo n.º 13
0
        protected override void OnStart()
        {
            base.OnStart();

            ViewModel.Start();
        }