[READ-ONLY] Mirror of https://github.com/jackmawer/ServoUtility. Servo Utility, formally WhiteRose, is a cross-platform .NET library to build FreeSO update and launcher utilities.
0

Configure Feed

Select the types of activity you want to include in your feed.

Take care of redundancy

* Move "not found" messages to a variable
* Check if isGui is true ontop of default (literally), just in case the
update utility can switch between console or graphical interfaces

Tomas (Oct 13, 2016, 8:52 PM EDT) 3bc11987 38e364e9

+8 -4
+8 -4
WhiteRose/FSO.cs
··· 90 90 { 91 91 var isGUI = Properties.Settings.Default.isGUI; 92 92 var fso = Properties.Settings.Default.Client; 93 + var notFound = fso + " not found"; 93 94 var fsoProcess = new Process(); 94 95 95 96 if (File.Exists(fso)) ··· 104 105 switch (isGUI) 105 106 { 106 107 case false: 107 - Console.WriteLine(fso + " not found."); 108 + Console.WriteLine(notFound); 108 109 break; 110 + case true: 109 111 default: 110 - MessageBox.Show(fso + " not found."); 112 + MessageBox.Show(notFound); 111 113 break; 112 114 } 113 115 ··· 127 129 { 128 130 var isGUI = Properties.Settings.Default.isGUI; 129 131 var ide = Properties.Settings.Default.IDE; 132 + var notFound = ide + " not found"; 130 133 var fsoProcess = new Process(); 131 134 132 135 if (File.Exists(ide)) ··· 141 144 switch (isGUI) 142 145 { 143 146 case false: 144 - Console.WriteLine(ide + " not found."); 147 + Console.WriteLine(notFound); 145 148 break; 149 + case true: 146 150 default: 147 - MessageBox.Show(ide + " not found."); 151 + MessageBox.Show(notFound); 148 152 break; 149 153 } 150 154 }