protected virtual void updateContextStatusBar(GISATreeNode node) { if (!(MasterPanel.isContextPanel(this))) { return; } if (node == null || node.NivelRow.RowState == DataRowState.Detached) { ((frmMain)TopLevelControl).StatusBarPanelHint.Text = string.Empty; } else { GISADataset.RelacaoHierarquicaRow rhRow = ((GISATreeNode)node).RelacaoHierarquicaRow; GISADataset.TipoNivelRelacionadoRow tnrRow = TipoNivelRelacionado.GetTipoNivelRelacionadoFromRelacaoHierarquica(rhRow); ArrayList pathEstrut = ControloNivelList.GetCodigoCompletoCaminhoUnico(node); if (pathEstrut.Count == 0) { ((frmMain)TopLevelControl).StatusBarPanelHint.Text = string.Format(" {0}: {1}", tnrRow.Designacao, node.NivelRow.Codigo); } else { ((frmMain)TopLevelControl).StatusBarPanelHint.Text = string.Format(" {0}: {1}", tnrRow.Designacao, Nivel.buildPath(pathEstrut)); } } }
protected virtual void updateContextStatusBar(ListViewItem listViewItem) { if (!(MasterPanel.isContextPanel(this))) { return; } if (listViewItem == null || (listViewItem != null && listViewItem.ListView == null) || ((GISADataset.NivelRow)listViewItem.Tag).RowState == DataRowState.Detached) { ((frmMain)TopLevelControl).StatusBarPanelHint.Text = string.Empty; } else { // prever a situação onde, concorrentemente, outro utilizador fez cut/paste do nível em(questão) // mudando assim, o caminho actual do mesmo if (GisaDataSetHelper.GetInstance().RelacaoHierarquica.Select(string.Format("ID={0} AND IDUpper={1}", ((GISADataset.NivelRow)listViewItem.Tag).ID, this.nivelNavigator1.ContextBreadCrumbsPathID)).Length > 0) { GISADataset.RelacaoHierarquicaRow rhRow = (GISADataset.RelacaoHierarquicaRow)(GisaDataSetHelper.GetInstance().RelacaoHierarquica.Select(string.Format("ID={0} AND IDUpper={1}", ((GISADataset.NivelRow)listViewItem.Tag).ID, this.nivelNavigator1.ContextBreadCrumbsPathID))[0]); GISADataset.TipoNivelRelacionadoRow tnrRow = TipoNivelRelacionado.GetTipoNivelRelacionadoFromRelacaoHierarquica(rhRow); ArrayList pathEstrut = ControloNivelList.GetCodigoCompletoCaminhoUnico(this.nivelNavigator1.SelectedNode); ArrayList pathDoc = this.nivelNavigator1.GetCodigoCompletoCaminhoUnico(listViewItem); if (pathDoc.Count == 0 && pathEstrut.Count == 0) { ((frmMain)TopLevelControl).StatusBarPanelHint.Text = string.Format(" {0}", tnrRow.Designacao); } else { ((frmMain)TopLevelControl).StatusBarPanelHint.Text = string.Format(" {0}: {1}/{2}", tnrRow.Designacao, Nivel.buildPath(pathEstrut), Nivel.buildPath(pathDoc)); } } else { ((frmMain)TopLevelControl).StatusBarPanelHint.Text = string.Empty; } } }
private void updateContextStatusBar() { if (!(MasterPanel.isContextPanel(this)) || ((frmMain)TopLevelControl).isSuportPanel) { return; } if (CurrentContext.GrupoArquivo == null) { ((frmMain)TopLevelControl).StatusBarPanelHint.Text = ""; } else { if (CurrentContext.GrupoArquivo.RowState == DataRowState.Detached) { ((frmMain)TopLevelControl).StatusBarPanelHint.Text = string.Empty; } else { ((frmMain)TopLevelControl).StatusBarPanelHint.Text = " " + CurrentContext.GrupoArquivo.GetNivelDesignadoRows()[0].Designacao; } } }
private void updateContextStatusBar() { if (!(MasterPanel.isContextPanel(this)) || ((frmMain)TopLevelControl).isSuportPanel) { return; } if (CurrentContext.Movimento == null) { ((frmMain)TopLevelControl).StatusBarPanelHint.Text = ""; } else { if (CurrentContext.Movimento.RowState == DataRowState.Detached) { ((frmMain)TopLevelControl).StatusBarPanelHint.Text = string.Empty; } else { ((frmMain)TopLevelControl).StatusBarPanelHint.Text = " " + this.NomeMovimento + ": " + CurrentContext.Movimento.MovimentoEntidadeRow.Entidade; } } }