@@ -76,14 +76,35 @@ static void Main()
7676
7777 private static void SetDependencyPaths ( string thispath )
7878 {
79- CarbonProfile . MainHashList = Path . Combine ( thispath , @"mainkeys\carbon.txt" ) ;
80- CarbonProfile . CustomHashList = Path . Combine ( thispath , @"userkeys\carbon.txt" ) ;
81- MostWantedProfile . MainHashList = Path . Combine ( thispath , @"mainkeys\mostwanted.txt" ) ;
82- MostWantedProfile . CustomHashList = Path . Combine ( thispath , @"userkeys\mostwanted.txt" ) ;
83- Underground2Profile . MainHashList = Path . Combine ( thispath , @"mainkeys\underground2.txt" ) ;
84- Underground2Profile . CustomHashList = Path . Combine ( thispath , @"userkeys\underground2.txt" ) ;
85- ProstreetProfile . MainHashList = Path . Combine ( thispath , @"mainkeys\prostreet.txt" ) ;
86- ProstreetProfile . CustomHashList = Path . Combine ( thispath , @"userkeys\prostreet.txt" ) ;
79+ var userdir = Path . Combine ( thispath , "userkeys" ) ;
80+ var mainc = Path . Combine ( thispath , @"mainkeys\carbon.txt" ) ;
81+ var userc = Path . Combine ( thispath , @"userkeys\carbon.txt" ) ;
82+ var mainmw = Path . Combine ( thispath , @"mainkeys\mostwanted.txt" ) ;
83+ var usermw = Path . Combine ( thispath , @"userkeys\mostwanted.txt" ) ;
84+ var mainps = Path . Combine ( thispath , @"mainkeys\prostreet.txt" ) ;
85+ var userps = Path . Combine ( thispath , @"userkeys\prostreet.txt" ) ;
86+ var mainug1 = Path . Combine ( thispath , @"mainkeys\underground1.txt" ) ;
87+ var userug1 = Path . Combine ( thispath , @"userkeys\underground1.txt" ) ;
88+ var mainug2 = Path . Combine ( thispath , @"mainkeys\underground2.txt" ) ;
89+ var userug2 = Path . Combine ( thispath , @"userkeys\underground2.txt" ) ;
90+
91+ CarbonProfile . MainHashList = mainc ;
92+ CarbonProfile . CustomHashList = userc ;
93+ MostWantedProfile . MainHashList = mainmw ;
94+ MostWantedProfile . CustomHashList = usermw ;
95+ ProstreetProfile . MainHashList = mainps ;
96+ ProstreetProfile . CustomHashList = userps ;
97+ Underground1Profile . MainHashList = mainug1 ;
98+ Underground1Profile . CustomHashList = userug1 ;
99+ Underground2Profile . MainHashList = mainug2 ;
100+ Underground2Profile . CustomHashList = userug2 ;
101+
102+ if ( ! Directory . Exists ( userdir ) ) Directory . CreateDirectory ( userdir ) ;
103+ if ( ! File . Exists ( userc ) ) { using var _ = File . Create ( userc ) ; }
104+ if ( ! File . Exists ( usermw ) ) { using var _ = File . Create ( usermw ) ; }
105+ if ( ! File . Exists ( userps ) ) { using var _ = File . Create ( userps ) ; }
106+ if ( ! File . Exists ( userug1 ) ) { using var _ = File . Create ( userug1 ) ; }
107+ if ( ! File . Exists ( userug2 ) ) { using var _ = File . Create ( userug2 ) ; }
87108 }
88109
89110 public static void ThreadExceptionHandler ( object sender , ThreadExceptionEventArgs e )
@@ -112,8 +133,8 @@ public static void ThreadExceptionHandler(object sender, ThreadExceptionEventArg
112133 if ( form is Editor editor )
113134 {
114135
115- editor . EmergencySaveDatabase ( ) ;
116- MessageBox . Show ( "Database backup up." , "Done" ) ;
136+ // editor.EmergencySaveDatabase();
137+ // MessageBox.Show("Database backup up.", "Done");
117138
118139 }
119140
0 commit comments