private void OpenFile(bool addTab)
        {
            DialogResult openDialogResult = openFileDialog.ShowDialog();

            if (openDialogResult == DialogResult.OK)
            {
                var opened = radDock.GetWindow <DocumentWindow>(SavedLogsLoader.SavedLogsKeyOf(openFileDialog.FileName));
                if (opened != null)
                {
                    radDock.ActiveWindow = opened;
                    return;
                }

                if (addTab)
                {
                    AddNewTab();
                }

                LoadGrid(radDock.ActiveWindow, openFileDialog.FileName, true);
                RadPageControl page = radDock.ActiveWindow.Controls["RadPageControl"] as RadPageControl;

                if (page != null)
                {
                    lblLinesCount.Text = Resources.statusbar_lines + page.LinesCount;
                }
            }
        }
        private void LoadGrid(DockWindow document, string filePath, bool autoRefreshEnabled)
        {
            RadPageControl page = document.Controls["RadPageControl"] as RadPageControl;

            if (page == null)
            {
                return;
            }
            page.AutoRefreshEnabled = autoRefreshEnabled;
            page.FilePath           = filePath;
            page.LoadGrid();
            lblFileName.Text = page.FilePath;

            if (SavedLogsLoader.SavedLogsContains(filePath))
            {
                radDock.ActiveWindow.Text = SavedLogsLoader.SavedLogsKeyOf(filePath);
            }
            else if (!radDock.ActiveWindow.Text.Contains(Resources.UnsavedFileIndicator))
            {
                radDock.ActiveWindow.Text += Resources.UnsavedFileIndicator;
            }

            document.Name = document.Text;
        }