Esempio n. 1
0
        protected void ClearPropertyChanged(BaseCellView nativeCell)
        {
            if (nativeCell.Cell is not CellBase formsCell)
            {
                return;
            }
            Shared.sv.SettingsView?parentElement = formsCell.Parent;

            formsCell.PropertyChanged -= nativeCell.CellPropertyChanged;
            if (parentElement is null)
            {
                return;
            }
            parentElement.PropertyChanged -= nativeCell.ParentPropertyChanged;
            if (formsCell.Section != null)
            {
                formsCell.Section.PropertyChanged -= nativeCell.SectionPropertyChanged;
            }
        }
Esempio n. 2
0
        protected void SetUpPropertyChanged(BaseCellView nativeCell)
        {
            if (nativeCell.Cell is not CellBase formsCell)
            {
                return;
            }
            Shared.sv.SettingsView?parentElement = formsCell.Parent;

            formsCell.PropertyChanged += nativeCell.CellPropertyChanged;

            if (parentElement is null)
            {
                return;
            }
            parentElement.PropertyChanged += nativeCell.ParentPropertyChanged;
            Section section = parentElement.Model.GetSectionFromCell(formsCell);

            if (section is null)
            {
                return;
            }
            formsCell.Section = section;
            formsCell.Section.PropertyChanged += nativeCell.SectionPropertyChanged;
        }