public ManageRunController(IRunService runService, IUserService userService, IPlayerService playerService, IConsumableService consumableService) { this.runService = runService; this.userService = userService; this.playerService = playerService; this.consumableService = consumableService; }
public CurrentSkierViewModel(IRunService runService, IRaceService raceService) { _runService = runService; _raceService = raceService; _stopWatch = new Stopwatch(); _dispatcherTimer = new DispatcherTimer(); }
private static void RunTable(object sender, ExecutedRoutedEventArgs e) { if (UIContext.Database != null) { BackgroundWorker worker = new BackgroundWorker(); MainWindow mainWindow = (MainWindow)sender; mainWindow.loadingAnimation.Visibility = Visibility.Visible; worker.DoWork += delegate(object s, DoWorkEventArgs args) { object[] data = args.Argument as object[]; IRunService runService = ObjectLocator.GetInstance <IRunService>(); ObfuscationResult result = runService.ObfuscateTable(UIContext.Database.ConnectionString, data[0] as Table); args.Result = result; }; worker.RunWorkerCompleted += delegate(object s, RunWorkerCompletedEventArgs args) { mainWindow.loadingAnimation.Visibility = Visibility.Collapsed; ObfuscationResult result = args.Result as ObfuscationResult; MessageBox.Show(mainWindow, string.Format("Finished table obfuscation in {0}", result.TimeElapsed), "Table Obfuscation Finished", MessageBoxButton.OK, MessageBoxImage.Information); IReportService reportService = ObjectLocator.GetInstance <IReportService>(); //string path = Path.GetDirectoryName(Assembly.GetExecutingAssembly().GetName().CodeBase); //path = path.Replace("file:\\", ""); string path = Environment.GetFolderPath(Environment.SpecialFolder.Personal); path = path + "\\Dafuscator"; if (Directory.Exists(path) == false) { Directory.CreateDirectory(path); } path = path + string.Format("\\TableObfuscationReport_{0}_{1}_{2}-{3}_{4}.txt", DateTime.Now.Month, DateTime.Now.Day, DateTime.Now.Year, DateTime.Now.Hour, DateTime.Now.Minute); reportService.GenerateReportForObfucsationResult(result, path); }; worker.RunWorkerAsync(new object[] { mainWindow.ColumnsGrid.SelectedTable }); } else { MessageBox.Show("There is no open database project, cannot obfuscate database.", "Error Saving", MessageBoxButton.OK, MessageBoxImage.Exclamation); } }
private static void PerformTask(Options options) { if (!String.IsNullOrEmpty(options.ProjectFile)) { IDatabaseProjectService databaseProjectService = ObjectLocator.GetInstance <IDatabaseProjectService>(); IEventAggregator eventAggregator = ObjectLocator.GetInstance <IEventAggregator>(); Console.WriteLine(string.Format("Loading the Dafuscator project: {0}", options.ProjectFile)); Database db = databaseProjectService.GetDatabaseProject(options.ProjectFile); ConnectionString connetionString; if (!String.IsNullOrEmpty(options.ConnectionString)) { connetionString = new ConnectionString(options.ConnectionString); } else { connetionString = db.ConnectionString; } db.ConnectionString = connetionString; eventAggregator.AddListener <StatusUpdateEvent>(e => Console.WriteLine(string.Format("{0}: {1}", DateTime.Now, e.Message))); if (!String.IsNullOrEmpty(options.ExportFile)) { Console.WriteLine(string.Format("Started exporting the Dafuscator project to {0}", options.ExportFile)); IExportService exportService = ObjectLocator.GetInstance <IExportService>(); exportService.ExportTables(db.Tables, options.ExportFile, connetionString); Console.WriteLine("Finished exporting the Dafuscator project."); } else { Console.WriteLine(string.Format("Started the obfuscation of the {0} database.", db.ConnectionString.DatabaseName)); IRunService runService = ObjectLocator.GetInstance <IRunService>(); IReportService reportService = ObjectLocator.GetInstance <IReportService>(); ObfuscationResult result = runService.ObfuscateDatabase(db); string path = Environment.GetFolderPath(Environment.SpecialFolder.Personal); path = path + "\\Dafuscator"; if (Directory.Exists(path) == false) { Directory.CreateDirectory(path); } path = path + string.Format("\\DatabaseObfuscationReport_{0}_{1}_{2}-{3}_{4}.txt", DateTime.Now.Month, DateTime.Now.Day, DateTime.Now.Year, DateTime.Now.Hour, DateTime.Now.Minute); reportService.GenerateReportForObfucsationResult(result, path); Console.WriteLine("Finished the obfuscation process in {0}", result.TimeElapsed); } } }
public ControlRaceViewModel(IMvxNavigationService navigationService, IMvxMessenger messenger, IRunService runService, IRaceService raceService) { _navigationService = navigationService; _runService = runService; _raceService = raceService; _messenger = messenger; }
public CreateRaceViewModel(IMvxNavigationService navigationService, IDialogService dialogService, IMvxMessenger messenger, ILocationService locationService, ISkierService skierService, IRaceService raceService, IRunService runService) { _navigationService = navigationService; _dialogService = dialogService; _locationService = locationService; _skierService = skierService; _raceService = raceService; _runService = runService; Messenger = messenger; }
public FenesterService ( IScreenRepository screenRepository, IDesktopRepository desktopRepository, IWindowRepository windowRepository, IScreenOsService screenOsService, IWindowOsServiceSync windowOsService, IKeyService keyService, IRunService runService ) { ScreenRepository = screenRepository; DesktopRepository = desktopRepository; WindowRepository = windowRepository; ScreenOsService = screenOsService; WindowOsService = windowOsService; KeyService = keyService; }
public CurrentResultViewModel(IRaceService raceService, IRunService runService) { _raceService = raceService; _runService = runService; }
public ContainerProcessHandler(IContainerService containerService, IRunService runService, ILogger logger) { this.containerService = containerService; this.runService = runService; this.logger = logger; }
public RunProgram(IRunService runService, IEnrollmentObjectService enrollmentService) { _runService = runService; _enrollmentService = enrollmentService; }
public RacesController(ILogger <RacesController> logger, IRaceService raceService, IRunService runService) { _logger = logger; _raceService = raceService; _runService = runService; }
public ServiceMenuItem(String name, IRunService runService) { _name = name; _runService = runService; }
public MatchController(IMatchService matchService, IUserService userService, IRunService runService) { this.matchService = matchService; this.userService = userService; this.runService = runService; }
public RunsController(ILogger <RunsController> logger, IRunService runService) { _logger = logger; _runService = runService; }
public RunsController(IRunService runService, IMapper mapper) : base(runService) { RunService = runService; Mapper = mapper; }
public RunController(IRunService _repo) { _runRepo = _repo; }
public RunProgram(IRunService runService) { _runService = runService; }
public RunController(IRunService _repo) { _context = _repo; }