コード例 #1
0
        private void SourceFileForm_FileClosed(object sender, FormClosedEventArgs e)
        {
            xdc.Forms.SourceFileForm f = sender as xdc.Forms.SourceFileForm;
            string localFilename       = _fileMgr.GetLocalFilename(f.getFilename());

            _fileMgr.Remove(localFilename);

            closeToolStripMenuItem.Enabled = _fileMgr.HasOpenFiles;
        }
コード例 #2
0
        private void closeToolStripMenuItem_Click(object sender, EventArgs e)
        {
            IDockContent content = this.dockPanel.ActiveDocument;

            if (content is xdc.Forms.SourceFileForm)
            {
                xdc.Forms.SourceFileForm form = (content as xdc.Forms.SourceFileForm);
                string localFilename          = _fileMgr.GetLocalFilename(form.getFilename());

                if (localFilename != "")
                {
                    _fileMgr.Remove(localFilename);
                }
            }

            if (!_fileMgr.HasOpenFiles)
            {
                closeToolStripMenuItem.Enabled = false;
            }
            content.DockHandler.Close();
        }