public override void Bind(IEditorService service)
        {
            cmbBgColor.ResetColors();
            service.RegisterCustomNotifier(this);
            _layout = (IPrintLayout)service.GetEditedResource();

            //ColorComboBox requires custom databinding
            cmbBgColor.CurrentColor = _layout.PageProperties.BackgroundColor;
            cmbBgColor.SelectedIndexChanged += (sender, e) =>
            {
                _layout.PageProperties.BackgroundColor = cmbBgColor.CurrentColor;
            };
            _layout.LayoutProperties.PropertyChanged += (sender, e) =>
            {
                OnResourceChanged();
            };

            CheckBoxBinder.BindChecked(chkCustomLogos, _layout.LayoutProperties, "ShowCustomLogos");
            CheckBoxBinder.BindChecked(chkCustomText, _layout.LayoutProperties, "ShowCustomText");
            CheckBoxBinder.BindChecked(chkDateTime, _layout.LayoutProperties, "ShowDateTime");
            CheckBoxBinder.BindChecked(chkLegend, _layout.LayoutProperties, "ShowLegend");
            CheckBoxBinder.BindChecked(chkNorthArrow, _layout.LayoutProperties, "ShowNorthArrow");
            CheckBoxBinder.BindChecked(chkScaleBar, _layout.LayoutProperties, "ShowScaleBar");
            CheckBoxBinder.BindChecked(chkTitle, _layout.LayoutProperties, "ShowTitle");
            CheckBoxBinder.BindChecked(chkURL, _layout.LayoutProperties, "ShowURL");
        }
Beispiel #2
0
        public override void Bind(IEditorService service)
        {
            cmbBgColor.ResetColors();
            service.RegisterCustomNotifier(this);
            _layout = (IPrintLayout)service.GetEditedResource();

            //ColorComboBox requires custom databinding
            cmbBgColor.CurrentColor          = _layout.PageProperties.BackgroundColor;
            cmbBgColor.SelectedIndexChanged += (sender, e) =>
            {
                _layout.PageProperties.BackgroundColor = cmbBgColor.CurrentColor;
            };
            _layout.LayoutProperties.PropertyChanged += (sender, e) =>
            {
                OnResourceChanged();
            };

            CheckBoxBinder.BindChecked(chkCustomLogos, _layout.LayoutProperties, "ShowCustomLogos");
            CheckBoxBinder.BindChecked(chkCustomText, _layout.LayoutProperties, "ShowCustomText");
            CheckBoxBinder.BindChecked(chkDateTime, _layout.LayoutProperties, "ShowDateTime");
            CheckBoxBinder.BindChecked(chkLegend, _layout.LayoutProperties, "ShowLegend");
            CheckBoxBinder.BindChecked(chkNorthArrow, _layout.LayoutProperties, "ShowNorthArrow");
            CheckBoxBinder.BindChecked(chkScaleBar, _layout.LayoutProperties, "ShowScaleBar");
            CheckBoxBinder.BindChecked(chkTitle, _layout.LayoutProperties, "ShowTitle");
            CheckBoxBinder.BindChecked(chkURL, _layout.LayoutProperties, "ShowURL");
        }
Beispiel #3
0
        public override void Bind(IEditorService service)
        {
            service.RegisterCustomNotifier(this);
            _layout = (IPrintLayout)service.GetEditedResource();
            _conn   = service.CurrentConnection;

            foreach (var logo in _layout.CustomLogos)
            {
                _logos.Add(logo);
                AddLogoToListView(logo);
            }
            _logos.ListChanged += new ListChangedEventHandler(OnLogoListChanged);
        }
        public override void Bind(IEditorService service)
        {
            service.RegisterCustomNotifier(this);
            _layout = (IPrintLayout)service.GetEditedResource();
            _conn = _layout.CurrentConnection;

            foreach (var logo in _layout.CustomLogos)
            {
                _logos.Add(logo);
                AddLogoToListView(logo);
            }
            _logos.ListChanged += new ListChangedEventHandler(OnLogoListChanged);
        }
        public override void Bind(IEditorService service)
        {
            service.RegisterCustomNotifier(this);
            _layout = (IPrintLayout)service.GetEditedResource();
            //Init current defined text
            foreach (var txt in _layout.CustomText)
            {
                if (txt.Value == null && txt.Font == null && txt.Position == null)
                    continue;

                _texts.Add(txt);
            }
            //Now wire change listeners
            _texts.ListChanged += new ListChangedEventHandler(OnTextListChanged);
        }
        public override void Bind(IEditorService service)
        {
            service.RegisterCustomNotifier(this);
            _layout = (IPrintLayout)service.GetEditedResource();
            //Init current defined text
            foreach (var txt in _layout.CustomText)
            {
                if (txt.Value == null && txt.Font == null && txt.Position == null)
                {
                    continue;
                }

                _texts.Add(txt);
            }
            //Now wire change listeners
            _texts.ListChanged += new ListChangedEventHandler(OnTextListChanged);
        }