File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -216,8 +216,11 @@ private void mouseClick(object sender, EventArgs e)
216216 {
217217 MethodInfo mi = typeof ( NotifyIcon ) . GetMethod ( "ShowContextMenu" , BindingFlags . Instance | BindingFlags . NonPublic ) ;
218218 mi . Invoke ( notifyIcon , null ) ;
219- Thread t = new Thread ( new ThreadStart ( startState ) ) ;
220- t . Start ( ) ;
219+ if ( IsPackaged ( ) )
220+ {
221+ Thread t = new Thread ( new ThreadStart ( startMenuState ) ) ;
222+ t . Start ( ) ;
223+ }
221224 } else if ( mouseEventArgs . Button == MouseButtons . Left & contextMenu . Items [ 0 ] . Enabled == true )
222225 {
223226 System . Diagnostics . Process . Start ( new ProcessStartInfo
@@ -228,12 +231,12 @@ private void mouseClick(object sender, EventArgs e)
228231 }
229232 else if ( mouseEventArgs . Button == MouseButtons . Right && IsPackaged ( ) )
230233 {
231- Thread t = new Thread ( new ThreadStart ( startState ) ) ;
234+ Thread t = new Thread ( new ThreadStart ( startMenuState ) ) ;
232235 t . Start ( ) ;
233236 }
234237 }
235238
236- private async void startState ( )
239+ private async void startMenuState ( )
237240 {
238241 if ( IsPackaged ( ) )
239242 {
You can’t perform that action at this time.
0 commit comments