public static void ProcesArguments(string[] arguments) { RegistryManager.GetRegistryProfileSettings(); if (arguments != null && arguments.Length > 0) { foreach (var arg in arguments) { if (!string.IsNullOrEmpty(arg)) { if (arg.ToLower() == "verbose=true" || RegistryManager.RegistryProfile.VerboseMode) { DAL.ApplicationSettings.Settings.VerboseMode = true; DAL.Managers.LoggingManager.Start(); } if (arg.ToLower().EndsWith(".apf")) { DroppedProjectFiles.Add(arg); UserProfileManager.UserProfile.AddRecentOpenedFile(new Controls.NewGui.SplashControl.UnlicensedControl.RecentFiles.RecentOpenedFile() { FileName = new FileInfo(arg).Name, FullPath = arg, AccessedDateTime = DateTime.Now }); UserProfileManager.Save(); } else if (arg.ToLower().EndsWith(".stl") || arg.ToLower().EndsWith(".3mf")) { DroppedSTLFiles.Add(arg); UserProfileManager.UserProfile.AddRecentOpenedFile(new Controls.NewGui.SplashControl.UnlicensedControl.RecentFiles.RecentOpenedFile() { FileName = new FileInfo(arg).Name, FullPath = arg, AccessedDateTime = DateTime.Now }); UserProfileManager.Save(); } } } } }
private static void _cleanupTimer_Elapsed(object sender, ElapsedEventArgs e) { _cleanupTimer.Stop(); UserProfileManager.CleanupCachedFiles(); _cleanupTimer.Start(); }