Ejemplo n.º 1
0
        private void UpdateLocal()
        {
            var game = Game;

            if (game == null)
            {
                TaskDialogViewModel.ShowErrorMessage("No game loaded", "Local data cannot be written without an associated game.");
                return;
            }

            if (game.Script.Editor.ErrorsToolWindow.References.Count > 0)
            {
                game.Script.Editor.ErrorsToolWindow.IsVisible = true;
                TaskDialogViewModel.ShowErrorMessage("Errors exist in script", "Local data cannot be updated until errors are resolved.");
                return;
            }

            if (String.IsNullOrEmpty(game.RACacheDirectory))
            {
                TaskDialogViewModel.ShowErrorMessage("Could not identify emulator directory.", "Local data cannot be updated if the emulator directory for the game is not known.");
                return;
            }

            var dialog = new UpdateLocalViewModel(game);

            dialog.ShowDialog();
        }
Ejemplo n.º 2
0
        private void UpdateLocal()
        {
            var game = Game;

            if (game == null)
            {
                MessageBoxViewModel.ShowMessage("No game loaded");
                return;
            }

            if (game.Script.Editor.ErrorsToolWindow.References.Count > 0)
            {
                MessageBoxViewModel.ShowMessage("Cannot update while errors exist.");
                game.Script.Editor.ErrorsToolWindow.IsVisible = true;
                return;
            }

            if (String.IsNullOrEmpty(game.RACacheDirectory))
            {
                MessageBoxViewModel.ShowMessage("Could not identify local directory.");
                return;
            }

            var dialog = new UpdateLocalViewModel(game);

            dialog.ShowDialog();
        }