private async void SaveAsFileCommand_Execute()
        {
            SaveFileDialog saveFileDialog = new SaveFileDialog();

            saveFileDialog.Filter = GenerateFilterForDialog(traceProviders);

            if (saveFileDialog.ShowDialog() == true)
            {
                IsEnabled = false;
                try
                {
                    if (File.Exists(saveFileDialog.FileName))
                    {
                        File.Delete(saveFileDialog.FileName);
                    }
                }
                catch
                {
                    MessageBox.Show((string)Manager <LanguageCultureInfo> .StaticInstance.GetResource("#FileError"),
                                    (string)Manager <LanguageCultureInfo> .StaticInstance.GetResource("#ErrorMsgBoxTitle"),
                                    MessageBoxButton.OK,
                                    MessageBoxImage.Error);
                }

                bool findedProvider = false;
                foreach (var el in traceProviders)
                {
                    if (el.CanWorkWithIt(saveFileDialog.FileName))
                    {
                        findedProvider = true;

                        try
                        {
                            currentTraceProvider = await el.SaveAsAsync(saveFileDialog.FileName, currentTraceProvider.Traces, currentTraceProvider.CanHeaders);

                            UpdateDataAndFiltersCommand.Execute();
                        }
                        catch (Exception e)
                        { MessageBox.Show(e.ToString(), (string)Manager <LanguageCultureInfo> .StaticInstance.GetResource("#ErrorMsgBoxTitle"), MessageBoxButton.OK, MessageBoxImage.Error); }

                        break;
                    }
                }


                if (!findedProvider)
                {
                    MessageBox.Show((string)Manager <LanguageCultureInfo> .StaticInstance.GetResource("#InvalidFileError"), (string)Manager <LanguageCultureInfo> .StaticInstance.GetResource("#ErrorMsgBoxTitle"), MessageBoxButton.OK, MessageBoxImage.Error);
                }
                IsEnabled = true;
            }
        }
        private void OpenFileCommand_Execute()
        {
            var prevStatus = FileIsOpened;

            FileIsOpened = FileState.Opening;
            OpenFileDialog openFileDialog = new OpenFileDialog();

            openFileDialog.Filter          = GenerateFilterForDialog(traceProviders);
            openFileDialog.CheckFileExists = true;
            openFileDialog.Multiselect     = false;


            IsEnabled = false;

            if (openFileDialog.ShowDialog() == true)
            {
                if (openFileDialog.FileName == currentTraceProvider?.TargetFile)
                {
                    MessageBox.Show((string)Manager <LanguageCultureInfo> .StaticInstance.GetResource("#FileError"), (string)Manager <LanguageCultureInfo> .StaticInstance.GetResource("#ErrorMsgBoxTitle"), MessageBoxButton.OK, MessageBoxImage.Warning);
                    FileIsOpened = prevStatus;
                    IsEnabled    = true;
                    return;
                }

                //reset data and closing connection
                ShowedData = null;
                currentTraceProvider?.CloseConnection();
                FileIsOpened = FileState.Closed;

                //find provider and load data
                bool findedProvider = false;
                foreach (var el in traceProviders)
                {
                    if (el.CanWorkWithIt(openFileDialog.FileName))
                    {
                        findedProvider = true;

                        try
                        {
                            currentTraceProvider?.CloseConnection();
                            el.TargetFile        = openFileDialog.FileName;
                            currentTraceProvider = el;
                            UpdateDataAndFiltersCommand.Execute();
                        }
                        catch (Exception e)
                        {
                            MessageBox.Show(e.ToString(), (string)Manager <LanguageCultureInfo> .StaticInstance.GetResource("#ErrorMsgBoxTitle"), MessageBoxButton.OK, MessageBoxImage.Error);
                            FileIsOpened = FileState.Closed;
                        }

                        break;
                    }
                }

                //if provider not founded
                if (!findedProvider)
                {
                    MessageBox.Show((string)Manager <LanguageCultureInfo> .StaticInstance.GetResource("#InvalidFileError"), (string)Manager <LanguageCultureInfo> .StaticInstance.GetResource("#ErrorMsgBoxTitle"), MessageBoxButton.OK, MessageBoxImage.Error);
                    IsEnabled = true;
                }
            }
            else
            {
                IsEnabled    = true;
                FileIsOpened = prevStatus;
            }
        }