App: Fix auto selection of weighing mode
	
		
			
	
		
	
	
		
	
		
			All checks were successful
		
		
	
	
		
			
				
	
				Test / Run tests (push) Successful in 2m17s
				
			
		
		
	
	
				
					
				
			
		
			All checks were successful
		
		
	
	Test / Run tests (push) Successful in 2m17s
				
			This commit is contained in:
		@@ -115,16 +115,6 @@ namespace Elwig {
 | 
			
		||||
                BranchNum = branches.Count;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            if (Config.WeighingMode == null) {
 | 
			
		||||
                if (App.Client.IsMatzen || App.Client.IsWolkersdorf) {
 | 
			
		||||
                    Config.WeighingMode = WeighingMode.Net;
 | 
			
		||||
                } else if (App.Client.IsHaugsdorf || App.Client.IsSitzendorf) {
 | 
			
		||||
                    Config.WeighingMode = WeighingMode.Box;
 | 
			
		||||
                } else if (App.Client.IsBaden || App.Client.IsGrInzersdorf) {
 | 
			
		||||
                    Config.WeighingMode = WeighingMode.Gross;
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            Utils.RunBackground("Temp File Cleanup", () => {
 | 
			
		||||
                Utils.CleanupTempFiles();
 | 
			
		||||
                return Task.CompletedTask;
 | 
			
		||||
@@ -172,6 +162,16 @@ namespace Elwig {
 | 
			
		||||
                Shutdown();
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            if (Config.WeighingMode == null) {
 | 
			
		||||
                if (Client.IsMatzen || Client.IsWolkersdorf) {
 | 
			
		||||
                    Config.WeighingMode = WeighingMode.Net;
 | 
			
		||||
                } else if (Client.IsHaugsdorf || Client.IsSitzendorf) {
 | 
			
		||||
                    Config.WeighingMode = WeighingMode.Box;
 | 
			
		||||
                } else if (Client.IsBaden || Client.IsGrInzersdorf) {
 | 
			
		||||
                    Config.WeighingMode = WeighingMode.Gross;
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            base.OnStartup(evt);
 | 
			
		||||
 | 
			
		||||
            var window = new MainWindow();
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user