Exemplo n.º 1
0
            private static void RunMethod(Action action, string successfulMessage)
            {
                try {
                    action();

                    if (!string.IsNullOrEmpty(successfulMessage))
                    {
                        ShowMessageBox.Information(successfulMessage);
                    }
                }
                catch (Exception exception) {
                    ShowMessageBox.Error(exception.Message);
                }
            }