Esempio n. 1
0
        public GroupPropertiesCtrl(IMapDefinition map, IMapLayerGroup group)
            : this()
        {
            _init = true;
            try
            {
                _mdf = map;
                _el = group;
                group.PropertyChanged += new PropertyChangedEventHandler(OnGroupChanged);
                string currentName = group.Name;
                txtName.Text = currentName;
                //TextBoxBinder.BindText(txtName, group, "Name");
                /*
                IMapDefinition mdf = group.Parent;
                string currentName = group.Name;
                txtName.Text = currentName;
                txtName.TextChanged += (s, e) =>
                {
                    string newName = txtName.Text;
                    group.Name = newName;
                    mdf.UpdateDynamicGroupName(currentName, newName);
                    System.Diagnostics.Debug.WriteLine(string.Format("Updated group name {0} -> {1}", currentName, newName));
                    currentName = newName;
                };*/

                TextBoxBinder.BindText(txtLegendLabel, group, "LegendLabel");
            }
            finally
            {
                _init = false;
            }
        }
        public GroupPropertiesCtrl(ITileSetDefinition map, IBaseMapGroup group)
            : this()
        {
            _init = true;
            try
            {
                _mdf = map;
                _el  = group;
                group.PropertyChanged += WeakEventHandler.Wrap <PropertyChangedEventHandler>(OnGroupChanged, (eh) => group.PropertyChanged -= eh);

                txtName.Text = group.Name;
                TextBoxBinder.BindText(txtLegendLabel, group, nameof(group.LegendLabel));
            }
            finally
            {
                _init = false;
            }
        }
Esempio n. 3
0
        public GroupPropertiesCtrl(IMapDefinition map, IBaseMapGroup group)
            : this()
        {
            _init = true;
            try
            {
                _mdf = map;
                _el = group;
                group.PropertyChanged += new PropertyChangedEventHandler(OnGroupChanged);

                txtName.Text = group.Name;
                TextBoxBinder.BindText(txtLegendLabel, group, "LegendLabel");
            }
            finally
            {
                _init = false;
            }
        }