private void StartLuancher() { IO.DeleteFile(Updater.PathToFileUpdate); Dispatcher.BeginInvoke(DispatcherPriority.Normal, (Invoker) delegate { Logger.ActivateMetrica(); MainWindow = new MainWindow(); MainWindow.Show(); }); }