private void ChannelAndStationView() { TreeBuilder.CreateTree(m_configDataBase, m_PNavigator.cn_TreeView, TreeBuilderTreeViewType.StationsAndChannels); channelsAndStationsToolStripMenuItem1.Checked = true; channelsToolStripMenuItem.Checked = false; stationsToolStripMenuItem.Checked = false; channelToolStripMenuItem.Checked = false; stationToolStripMenuItem.Checked = false; channelsAndStationsToolStripMenuItem.Checked = true; }
public ConfigTreeView(ComunicationNet configDataBase, ConfigIOHandler fileread, ConfigIOHandler filesave, ConfigIOHandler fileclear, bool AdvanceMenu) { LicenseManager.IsValid(this.GetType(), this, out License lic); m_license = lic as LicenseFile; if (m_license == null) { MessageBox.Show(CAS.Lib.CodeProtect.Properties.Resources.Tx_LicNoFileErr, CAS.Lib.CodeProtect.Properties.Resources.Tx_LicCap, MessageBoxButtons.OK, MessageBoxIcon.Hand); } else { if (m_license.FailureReason != string.Empty) { ScrollableMessageBox.Instance.Show(m_license.FailureReason, CAS.Lib.CodeProtect.Properties.Resources.Tx_LicCap, MessageBoxButtons.OK, MessageBoxIcon.Hand); } else { m_DemoVer = false; } } if (m_DemoVer) { MessageBox.Show (CAS.Lib.CodeProtect.Properties.Resources.Tx_LicDemoModeInfo, CAS.Lib.CodeProtect.Properties.Resources.Tx_LicCap, MessageBoxButtons.OK, MessageBoxIcon.Information); this.m_FileSave = new ConfigIOHandler(ConfigurationManagement.SaveDemoProc); } else { m_UAPackage = m_license.Product.ShortName.ToLower().Contains("ua"); this.m_FileSave = filesave; } m_configDataBase = configDataBase; this.m_FileRead = fileread; this.m_FileClear = fileclear; // // Required for Windows Form Designer support // InitializeComponent(); //navigation and search toolstrip initialisation this.backForwardTreViewToolStrip1.TreeView = m_PNavigator.cn_TreeView; this.searchTreeViewToolStrip1.TreeView = m_PNavigator.cn_TreeView; //other TreeBuilder.CreateTree(m_configDataBase, m_PNavigator.cn_TreeView); IntTreeViewCheckBoxes(); #if UNDOREDO tlog = new RTLib.DataBase.UndoRedo.UndoRedoMenager(); tlog.SourceDataSet = (DataSet)m_configDataBase; tlog.RedoUndoOperationAdding += new RTLib.DataBase.UndoRedo.UndoRedoMenager.OperationDlgt(OnRedoUndoOperationAdding); tlog.RedoUndoOperationAdded += new RTLib.DataBase.UndoRedo.UndoRedoMenager.OperationDlgt(OnRedoUndoOperationAdded); foreach (DataTable dt in m_configDataBase.Tables) { dt.ColumnChanging += new DataColumnChangeEventHandler(OnColumnChanging); dt.RowChanging += new DataRowChangeEventHandler(OnRowChanging); } #else undoCtrlZToolStripMenuItem.Enabled = false; redoCtrlYToolStripMenuItem.Enabled = false; #endif foreach (DataTable dt in m_configDataBase.Tables) { dt.RowChanged += new DataRowChangeEventHandler(configDataBaseDataTable_Changed); } m_PNavigator.cn_TreeView.AfterSelect += new TreeViewEventHandler(cn_TreeView_AfterSelect); m_PNavigator.cn_TreeView.KeyDown += new KeyEventHandler(cn_TreeView_KeyDown); m_PNavigator.cn_TreeView.MouseDown += new MouseEventHandler(cn_TreeView_MouseDown); tsbUndo.Enabled = false; tsbRedo.Enabled = false; saveToolStripButton.Enabled = false; saveToolStripMenuItem.Enabled = false; ActionBase.SetCommonBusControl = cm_commonBusControl; if (!AdvanceMenu) { toolsToolStripMenuItem_Tools.Enabled = false; toolsToolStripMenuItem_Tools.Visible = false; } }
public void Refresh(ComunicationNet myConfig) { myConfig.AcceptChanges(); TreeBuilder.CreateTree(myConfig, cn_TreeView); base.Refresh(); }