예제 #1
0
파일: FormMain.cs 프로젝트: minskowl/MY
        /// <summary>
        /// Adds the file.
        /// </summary>
        /// <param name="filePath">The file path.</param>
        void IFileTabControl.AddFile(string filePath)
        {
            var dummyDoc = new FileWindow
            {
                Text = Path.GetFileName(filePath)
            };

            dummyDoc.Show(dockPanel);
            try
            {
                dummyDoc.FileName = filePath;
            }
            catch (Exception exception)
            {
                dummyDoc.Close();
                MessageBoxEx.Show(this, "Error open file " + filePath, exception.Message);
            }
        }