void RemoveImpl()
        {
            Context.Default.StopWords.Remove(_stopWordEntity);
            Context.Default.SaveChanges();

            GoBack.Execute(new { });
        }
        void Save()
        {
            _person.NominativeName       = NominativeName.Trim().ToLower();
            _person.NominativeSurname    = NominativeSurname.Trim().ToLower();
            _person.GenitiveName         = GenitiveName.Trim().ToLower();
            _person.GenitiveSurname      = GenitiveSurname.Trim().ToLower();
            _person.DativeName           = DativeName.Trim().ToLower();
            _person.DativeSurname        = DativeSurname.Trim().ToLower();
            _person.AccusativeName       = AccusativeName.Trim().ToLower();
            _person.AccusativeSurname    = AccusativeSurname.Trim().ToLower();
            _person.InstrumentalName     = InstrumentalName.Trim().ToLower();
            _person.InstrumentalSurname  = InstrumentalSurname.Trim().ToLower();
            _person.PrepositionalName    = PrepositionalName.Trim().ToLower();
            _person.PrepositionalSurname = PrepositionalSurname.Trim().ToLower();

            if (_isNew)
            {
                Context.Default.KnownPersons.Add(_person);
            }

            Tools.MergeKnownNameWithKnownPerson(_person);

            Context.Default.SaveChanges();

            GoBack.Execute(null);
        }
Пример #3
0
 public override void OnNavigating(object parameter)
 {
     base.OnNavigating(parameter);
     if ((parameter != null) && (parameter is Guid))
     {
         Guid guid = (Guid)parameter;
         if (guid != Guid.Empty)
         {
             _dataService.GetImage(guid, new Action <FullImage, Exception>((image, ex) =>
             {
                 _image = image;
                 if (_image != null)
                 {
                     ImageData = _image.FullImageData;
                     ImageName = _image._imageName;
                     CanSave   = false;
                 }
             }));
         }
         else
         {
             _image = new FullImage {
                 _id = guid
             };
         }
     }
     else
     {
         GoBack.Execute(null);
     }
 }
        void ReleaseDesignerOutlets()
        {
            if (BuGidelim != null)
            {
                BuGidelim.Dispose();
                BuGidelim = null;
            }

            if (GenerositySlider != null)
            {
                GenerositySlider.Dispose();
                GenerositySlider = null;
            }

            if (GoBack != null)
            {
                GoBack.Dispose();
                GoBack = null;
            }

            if (SubTotalTextField != null)
            {
                SubTotalTextField.Dispose();
                SubTotalTextField = null;
            }

            if (TipLabel != null)
            {
                TipLabel.Dispose();
                TipLabel = null;
            }
        }
Пример #5
0
    /// <summary>
    /// Inverse le sens de la direction
    /// </summary>
    public void ChangeDirection()
    {
        _gameManager.client.SetValue("TempsSeg", this.timeElpase);
        Debug.Log("Temps Segment = " + this.timeElpase);
        this.timeElpase = 0f;

        if (this.Direction == GoBack.Go)
        {
            Debug.Log("Back");
            this.Direction = GoBack.Back;
            int indiceToSend = 2 + (2 * this.GetCurrentTarget());
            _gameManager.client.CheckpointReached(indiceToSend + 1);
        }
        else
        {
            Debug.Log("Go");
            this.Direction = GoBack.Go;

            // Reset de la zone de validation d'une target après qu'elle ai été validé
            var targetScript = this.currentTarget.GetComponent <Target>();
            if (targetScript != null)
            {
                targetScript.SliderTime.value = 0;
            }

            PickATarget();
            int indiceToSend = 2 + (2 * this.GetCurrentTarget());
            _gameManager.client.CheckpointReached(indiceToSend);
        }
    }
            public HistoryInfo(AeroNavigationBar Owner)
            {
                this.Owner = Owner;

                this.Owner.GoBack +=
                    delegate
                {
                    if (GoBack.Count == 0)
                    {
                        throw new Exception("GoBack is empty");
                    }

                    GoBack.Pop()();
                };


                this.Owner.GoForward +=
                    delegate
                {
                    if (GoForward.Count == 0)
                    {
                        throw new Exception("GoForward is empty");
                    }

                    GoForward.Pop()();
                };

                this.Owner.ButtonGoForward.Enabled = false;
                this.Owner.ButtonGoBack.Enabled    = false;
            }
 public void GoBackBtnClick()
 {
     GoBack.Click();
     WaitSeconds(3);
     GoBack.Click();
     WaitSeconds(5);
 }
Пример #8
0
        private void SP_Breadcrumb_Tapped(object sender, TappedRoutedEventArgs e)
        {
            Hide();

            if (GoBack != null)
            {
                GoBack?.Invoke(sender, e);
            }
        }
Пример #9
0
 private async void Playback_MediaFailed()
 {
     await DispatchHelper.InvokeInUIThread(CoreDispatcherPriority.Normal, async() =>
     {
         if (Locator.PlaybackService.CurrentPlaybackMedia is StreamMedia)
         {
             await Locator.MediaLibrary.RemoveStreamFromCollectionAndDatabase(Locator.PlaybackService.CurrentPlaybackMedia as StreamMedia);
         }
         GoBack.Execute(null);
     });
 }
        public void OnGoBackClicked()
        {
            GoBackEventArgs args;
            string          message = "האם אתה בטוח שאתה רוצה לחזור?\nאם לא השינויים האחרונים לא נשמרו הם יאבדו";

            args = new GoBackEventArgs()
            {
                IsWorkDone = false, Message = message
            };
            GoBack?.Invoke(this, args);
        }
 private async void Playback_MediaFailed(object sender, EventArgs e)
 {
     await DispatchHelper.InvokeAsync(CoreDispatcherPriority.Normal, async() =>
     {
         if (CurrentMedia is StreamMedia)
         {
             await Locator.MediaLibrary.RemoveStreamFromCollectionAndDatabase(CurrentMedia as StreamMedia);
         }
         GoBack.Execute(null);
     });
 }
Пример #12
0
 private void EventsManager_ObjectChangedEvent(object sender, ObjectChangedEventArgs e)
 {
     if (e.ObjectChanged is Course && e.Type == ChangeType.Deleted)
     {
         if (e.ObjectChanged is Course && (e.ObjectChanged as Course).ID == SelectedCourse?.ID || SelectedCourse == null)
         {
             object o = new object();
             GoBack.Execute(o);
         }
     }
 }
Пример #13
0
        private void InitializeComponent()
        {
            AvaloniaXamlLoader.Load(this);

            PlayNowButton = this.FindControl <Button>("PlayNowButton");
            InstallButton = this.FindControl <Button>("InstallButton");
            BackButton    = this.FindControl <Button>("BackButton");

            PlayNowButton.Click += PlayNowButton_ClickAsync;
            InstallButton.Click += InstallButton_ClickAsync;
            BackButton.Click    += (a, b) => GoBack?.Invoke(this);
        }
        void RemoveImpl()
        {
            if (_isNew)
            {
                return;
            }

            Context.Default.KnownPersons.Remove(_person);
            Context.Default.SaveChanges();

            GoBack.Execute(new { });
        }
 private async void MediaPlaybackViewModel_InternetConnectionChanged(object sender, Model.Events.InternetConnectionChangedEventArgs e)
 {
     if (!e.IsConnected && IsPlaying && CurrentMedia is StreamMedia)
     {
         await DispatchHelper.InvokeAsync(CoreDispatcherPriority.Normal, async() =>
         {
             GoBack.Execute(null);
             var dialog = new MessageDialog(Strings.MediaCantBeRead.ToUpperFirstChar(), Strings.NoInternetConnection.ToUpperFirstChar());
             await dialog.ShowAsync();
         });
     }
 }
        public ActionResult NewBack(GoBack viewModel)
        {
            var back = new GoBack
            {
                BackId   = viewModel.BackId,
                BackName = viewModel.BackName
            };

            _dbContext.GoBack.Add(back);
            _dbContext.SaveChanges();
            return(RedirectToAction("Create", "Guitar"));
        }
        /// <summary>
        /// A function that triggers the event of a backward move
        /// </summary>
        public void OnGoBackClicked()
        {
            GoBackEventArgs args;
            string          message = null;

            if (!IsWorkDone)
            {
                message = "האם אתה בטוח שאתה רוצה לחזור?\nהנתונים שמילאת על החנות ילכו לאיבוד אם תחזור עכשיו";
            }
            args = new GoBackEventArgs()
            {
                IsWorkDone = this.IsWorkDone, Message = message
            };
            GoBack.Invoke(this, args);
        }
        /// <summary>
        /// A function that triggers the event of a backward move
        /// </summary>
        public void OnGoBackClicked()
        {
            GoBackEventArgs args;
            string          message = null;

            if (!IsWorkDone)
            {
                message = "האם אתה בטוח שאתה רוצה לחזור?\nלא שמרת את הביקורת שלך, כל מה שכתבת ילך לאיבוד";
            }
            args = new GoBackEventArgs()
            {
                IsWorkDone = this.IsWorkDone, Message = message
            };
            GoBack?.Invoke(this, args);
        }
        void AddNewImpl()
        {
            var stopWord = _stopWordEntity ?? new StopWord();

            stopWord.Pattern = StopWordText;

            if (stopWord.Id == 0)
            {
                Context.Default.StopWords.Add(stopWord);
            }

            Context.Default.SaveChanges();

            GoBack.Execute(new { });
        }
Пример #20
0
        /// <summary>
        /// A function that triggers the event of a backward move
        /// </summary>
        public void OnGoBackClicked()
        {
            GoBackEventArgs args;
            string          message = null;

            if (!IsWorkDone)
            {
                message = "לא שמרת את המוצר עדיין\nהאם את רוצה לחזור בכל זאת?";
            }
            args = new GoBackEventArgs()
            {
                IsWorkDone = this.IsWorkDone, Message = message
            };
            GoBack?.Invoke(this, args);
        }
Пример #21
0
        private void SP_Breadcrumb_Tapped(object sender, TappedRoutedEventArgs e)
        {
            Scheduler.Stop();

            Hide();

            if (GoBack != null)
            {
                GoBack?.Invoke(sender, e);
            }

            CTRL_NewDevices.Reset();
            CTRL_Telemetry.Reset();
            CTRL_Bulk.Reset();

            DevicesFromRunBooksToClean.Clear();
        }
Пример #22
0
 private void EventsManager_ObjectChangedEvent(object sender, ObjectChangedEventArgs e)
 {
     if (e.Type == ChangeType.Deleted)
     {
         if (e.ObjectChanged is Group || e.ObjectChanged is Course || e.ObjectChanged is Module || e.ObjectChanged is Student)
         {
             LoadData(Person);
         }
         if (e.ObjectChanged is Person)
         {
             if (Person.ID == (e.ObjectChanged as Person).ID)
             {
                 object o = new object();
                 GoBack.Execute(o);
             }
         }
     }
 }
        /// <summary>
        /// Handle events when the popup window closes
        /// </summary>
        private void OnIsOpenChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            // Popup window is closed
            if (!popupWindow.IsOpen)
            {
                // Pop-up is closing, so detach PopupInfo.PropertyChanged and MapApplication.Current.SelectedLayerChanged events
                PopupInfo.PropertyChanged -= PopupInfo_PropertyChanged;
                MapApplication.Current.SelectedLayerChanged -= Current_SelectedLayerChanged;

                // If the pop-up is closing and the temporary layer still exists, remove it from the map.
                if (temporaryLayer != null)
                {
                    if (MapApplication.Current.SelectedLayer == temporaryLayer)
                    {
                        HideFeatureDataGrid();
                    }

                    if (map.Layers.Contains(temporaryLayer))
                    {
                        map.Layers.Remove(temporaryLayer);
                    }

                    temporaryLayer = null;
                }


                Grid infoWindowGrid = Utils.FindChildOfType <Grid>(popupWindow, 3);
                if (infoWindowGrid.Children.Contains(indicator))
                {
                    infoWindowGrid.Children.Remove(indicator); // Remove the busy indicator from the pop-up window
                }
                if (CloseNoRecordsView.CanExecute(popupWindow))
                {
                    CloseNoRecordsView.Execute(popupWindow);
                }

                if (GoBack.CanExecute(popupWindow))
                {
                    GoBack.Execute(popupWindow);
                }

                _popupItemChanged = false;
            }
        }
Пример #24
0
        void ReleaseDesignerOutlets()
        {
            if (GoBack != null)
            {
                GoBack.Dispose();
                GoBack = null;
            }

            if (SendMessage != null)
            {
                SendMessage.Dispose();
                SendMessage = null;
            }

            if (Sub != null)
            {
                Sub.Dispose();
                Sub = null;
            }
        }
Пример #25
0
 /// <summary>
 /// Activate the backward event from this screen
 /// </summary>
 public void InvokeGoBack()
 {
     GoBack?.Invoke(this, null);
 }
Пример #26
0
    void Start()
    {
        if (this.Targets != null)
        {
            // Remplit la liste de choix restant avec l'entiereté des cible possible puisque l'exercice n'à pas encore commencé et que toutes les cibles peuvent donc être choisie
            this.targetsLeft = new List <GameObject>(this.Targets);

            // Calcul du centre du circuit
            // Il faut prendre le plus petit et le plus grand x,y et faire la moyenne
            int minX = int.MaxValue;
            int maxX = int.MinValue;
            int minY = int.MaxValue;
            int maxY = int.MinValue;
            foreach (var item in this.Targets)
            {
                var vectPos = item.transform.Find("Ending Point").position;

                if (vectPos.x > maxX)
                {
                    maxX = (int)vectPos.x;
                }
                if (vectPos.x < minX)
                {
                    minX = (int)vectPos.x;
                }

                if (vectPos.y > maxY)
                {
                    maxY = (int)vectPos.y;
                }
                if (vectPos.y < minY)
                {
                    minY = (int)vectPos.y;
                }
            }

            var vectCentre = Camera.main.WorldToScreenPoint(new Vector3((maxX + minX) / 2, (maxY + minY) / 2, 0f));
            _gameManager.client.SetValue("centreX", vectCentre.x);
            _gameManager.client.SetValue("centreY", vectCentre.y);

            this.rand = new System.Random();

            // Choix de la premiere cible random à afficher
            this.PickATarget();

            this.Direction = GoBack.Go;

            var ending = GameObject.Find("Ending Point");

            if (ending != null)
            {
                // Définit le point de rotation du player
                if (this.Player != null)
                {
                    // reconverti les world point en pixel pour les passer au player
                    var pixels = Camera.main.WorldToScreenPoint(ending.transform.position);
                    pixels.x = (pixels.x * 1920) / Camera.main.pixelRect.width;
                    pixels.y = Math.Abs(((pixels.y * 1080) / Camera.main.pixelRect.height) - 1080);
                    this.Player.GetComponent <PlayerControl>().PointToRotateTo = pixels;
                }
            }

            var path = this.GetAllSegments();
            _gameManager.client.SetTrajectory(path);

            _gameManager.SetGameState(GameState.Positioning);
        }
    }
Пример #27
0
 public Task OnGoBack() => GoBack.InvokeAsync(EventArgs.Empty);
 private void HandleNavigationBack(GoBack obj)
 {
     _navigation.GoBack();
 }
Пример #29
0
 private void OnBack(object sender, RoutedEventArgs e)
 {
     GoBack?.Invoke(this, EventArgs.Empty);
 }
 private void HandleNavigationBack(GoBack obj)
 {
     _navigation.GoBack();
 }
 public void ClickGoBack()
 {
     GoBack.Click();
 }