Beispiel #1
0
        private void RecentFileClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            string logFileToLoad = ((Control)sender).Tag as string;

            if (!File.Exists(logFileToLoad))
            {
                DialogResult removeRslt = MessageBox.Show(
                    Resources.strMruFileCouldNotBeFound
                    , Application.ProductName
                    , MessageBoxButtons.YesNo
                    , MessageBoxIcon.Warning);

                if (removeRslt == DialogResult.Yes)
                {
                    MruManager.RemoveFile(logFileToLoad);
                }

                return;
            }

            mMainForm.LoadFileIntoLogger(logFileToLoad);
        }
Beispiel #2
0
        private void OnMruFileClick(object sender, EventArgs e)
        {
            string logFileToLoad = ((ToolStripMenuItem)sender).Tag as string;

            if (!File.Exists(logFileToLoad))
            {
                DialogResult removeRslt = MessageBox.Show(
                    Resources.strMruFileCouldNotBeFound
                    , Application.ProductName
                    , MessageBoxButtons.YesNo
                    , MessageBoxIcon.Warning);

                if (removeRslt == DialogResult.Yes)
                {
                    MruManager.RemoveFile(logFileToLoad);
                    RebuildMruList();
                }

                return;
            }

            LoadFileIntoLogger(logFileToLoad);
        }