Exemplo n.º 1
0
        /// <summary>
        /// Constructs a list of tables that can be clicked to view.
        /// </summary>
        /// <param name="fileManager">FileManager dependency.</param>
        /// <param name="excelTableForm">Parents control of tables..</param>
        public TablesLoaded(FileManager fileManager, TableEditorForm excelTableForm)
        {
            _InitializeComponent();

            _fileManager = fileManager;
            _excelTableForm = excelTableForm;

            if (_fileManager == null || _fileManager.DataFiles.Count == 0) return;
            _loadedTables_ListBox.DataSource = new BindingSource { DataSource = _fileManager.DataFiles }; // new BindingSource(_fileManager.DataFiles, null); // fix for .net know issue
            _loadedTables_ListBox.DoubleClick += _loadedTables_ListBox_MouseDoubleClick;
            _loadedTables_ListBox.Format += _loadedTables_ListBox_Format;
        }
Exemplo n.º 2
0
        private void _OpenExcelTableEditor()
        {
            if (_excelTableForm == null || _excelTableForm.IsDisposed)
            {
                _excelTableForm = new TableEditorForm(_fileManager)
                {
                    MdiParent = this,
                    Text      = "Table Editor [" + _fileManager.ClientVersion + "]"
                };
            }

            _excelTableForm.Show();
            _excelTableForm.Focus();
        }
Exemplo n.º 3
0
        private void _OpenExcelTableEditorTCv4()
        {
            if (!Config.LoadTCv4DataFiles)
            {
                return;
            }

            if (_excelTableFormTCv4 == null || _excelTableFormTCv4.IsDisposed)
            {
                _excelTableFormTCv4 = new TableEditorForm(_fileManagerTCv4)
                {
                    MdiParent = this,
                    Text      = "Table Editor [" + _fileManagerTCv4.ClientVersion + "]"
                };
            }

            _excelTableFormTCv4.Show();
            _excelTableFormTCv4.Focus();
        }
Exemplo n.º 4
0
        /// <summary>
        /// Creates a mew tab control for the clicked table.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void _loadedTables_ListBox_MouseDoubleClick(object sender, EventArgs e)
        {
            KeyValuePair<String, DataFile> item = (KeyValuePair<String, DataFile>)_loadedTables_ListBox.SelectedItem;

            if (_excelTableForm == null || _excelTableForm.IsDisposed)
            {
                _excelTableForm = new TableEditorForm(_fileManager);
            }

            bool isOpen = _excelTableForm.IsTabOpen(item.Key);
            if (isOpen)
            {
                _excelTableForm.FocusTabPage(item.Key);
            }
            else
            {
                _excelTableForm.CreateTab(item.Key);
                _excelTableForm.FocusTabPage(item.Key);
            }

            _excelTableForm.Show();
        }
Exemplo n.º 5
0
        private void _OpenExcelTableEditor()
        {
            if (_excelTableForm == null || _excelTableForm.IsDisposed)
            {
                _excelTableForm = new TableEditorForm(_fileManager)
                {
                    MdiParent = this,
                    Text = "Table Editor [" + _fileManager.ClientVersion + "]"
                };
            }

            _excelTableForm.Show();
            _excelTableForm.Focus();
        }
Exemplo n.º 6
0
        private void _OpenExcelTableEditorTCv4()
        {
            if (!Config.LoadTCv4DataFiles) return;

            if (_excelTableFormTCv4 == null || _excelTableFormTCv4.IsDisposed)
            {
                _excelTableFormTCv4 = new TableEditorForm(_fileManagerTCv4)
                {
                    MdiParent = this,
                    Text = "Table Editor [" + _fileManagerTCv4.ClientVersion + "]"
                };
            }

            _excelTableFormTCv4.Show();
            _excelTableFormTCv4.Focus();
        }