Example #1
0
        private void 새로만들기ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            InputBoxDialog inputBox = new InputBoxDialog();

            inputBox.SetDescription("새로 만들 자기소개서 이름을 입력하세요.");
            if (inputBox.ShowDialog() == DialogResult.OK)
            {
                string name = inputBox.GetResult();
                if (name.Any((char i) => System.IO.Path.GetInvalidFileNameChars().Contains(i)))
                {
                    MessageBox.Show("잘못된 이름입니다.", "오류", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    return;
                }
                else if (selfIntroductionManager.GetSelfIntroductionNames().Contains(name))
                {
                    MessageBox.Show("이미 존재하는 이름입니다.", "오류", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    return;
                }

                selfIntroductionManager.SaveSelfIntroduction(name, null);
                refreshSelfIntroductionToolStrip();

                SelfIntroductionDialog dialog = new SelfIntroductionDialog(name, selfIntroductionManager);
                dialog.OnFileRenamedOrDeleted += OnSelfIntroductionFileChanged;
                dialog.MdiParent = this;
                dialog.Show();
            }
        }
Example #2
0
        public MainForm()
        {
            InitializeComponent();
            this.IsMdiContainer     = true;
            resumeManager           = new ResumeManager();
            selfIntroductionManager = new SelfIntroductionManager();
            resumeForm       = null;
            memoForm         = null;
            this.WindowState = FormWindowState.Maximized;

            if (selfIntroductionManager.GetSelfIntroductionNames().Length == 0)
            {
                selfIntroductionManager.SaveSelfIntroduction("기본", null);
            }

            refreshSelfIntroductionToolStrip();
        }