Ejemplo n.º 1
0
        }                                          // not used here


        void Initialize(bool bInit)
        {
            if (bInit)
            {
                _fontFamily          = _doc.Font;
                _color               = _doc.Color;
                _fontSize            = _doc.FontSize;
                _horizontalAlignment = _doc.HorizontalAlignment;
                _verticalAlignment   = _doc.VerticalAlignment;
                _automaticAlignment  = _doc.AutomaticAlignment;

                _xOffset = _doc.XOffset;
                _yOffset = _doc.YOffset;
                _currentLabelStyleInstance = _doc.LabelFormat;
                _backgroundStyle           = _doc.BackgroundStyle;
            }

            if (null != View)
            {
                View.Font_Initialize(_fontFamily);

                View.Color_Initialize(_color);
                View.FontSize_Initialize(_fontSize);
                View.HorizontalAlignment_Initialize(System.Enum.GetNames(typeof(System.Drawing.StringAlignment)), System.Enum.GetName(typeof(System.Drawing.StringAlignment), _horizontalAlignment));
                View.VerticalAlignment_Initialize(System.Enum.GetNames(typeof(System.Drawing.StringAlignment)), System.Enum.GetName(typeof(System.Drawing.StringAlignment), _verticalAlignment));
                View.AutomaticAlignment_Initialize(this._automaticAlignment);
                View.Rotation = (float)_doc.Rotation;
                View.XOffset_Initialize(Serialization.NumberConversion.ToString(_xOffset * 100));
                View.YOffset_Initialize(Serialization.NumberConversion.ToString(_yOffset * 100));
                View.Background = _backgroundStyle;
                InitializeLabelStyle();
            }
        }
Ejemplo n.º 2
0
        void InitializeLabelStyle()
        {
            _labelTypes = Altaxo.Main.Services.ReflectionService.GetNonAbstractSubclassesOf(typeof(Altaxo.Graph.Gdi.LabelFormatting.ILabelFormatting));

            _currentLabelStyleInstance = _doc.LabelFormat;

            string[] names = new string[_labelTypes.Length];

            for (int i = 0; i < _labelTypes.Length; ++i)
            {
                names[i] = _labelTypes[i].Name;
                if (_labelTypes[i] == _currentLabelStyleInstance.GetType())
                {
                    this._currentLabelStyle = i;
                }
            }

            View.LabelStyle_Initialize(names, _currentLabelStyleInstance.GetType().Name);
        }
    public void EhView_LabelStyleChanged(int newValue)
    {
      _currentLabelStyle = newValue;
      _currentLabelStyleInstance = (Altaxo.Graph.Gdi.LabelFormatting.ILabelFormatting)Activator.CreateInstance(this._labelTypes[newValue]);

    }
    void InitializeLabelStyle()
    {
      _labelTypes = Altaxo.Main.Services.ReflectionService.GetNonAbstractSubclassesOf(typeof(Altaxo.Graph.Gdi.LabelFormatting.ILabelFormatting));

      _currentLabelStyleInstance = _doc.LabelFormat;

      string[] names = new string[_labelTypes.Length];

      for(int i=0;i<_labelTypes.Length;++i)
      {
        names[i] = _labelTypes[i].Name;
        if(_labelTypes[i]==_currentLabelStyleInstance.GetType())
          this._currentLabelStyle = i;
      }

      View.LabelStyle_Initialize(names,_currentLabelStyleInstance.GetType().Name);
    }
    public UseDocument UseDocumentCopy { set { } } // not used here


    void Initialize(bool bInit)
    {
      if(bInit)
      {
        _fontFamily  = _doc.Font;
        _color = _doc.Color;
        _fontSize = _doc.FontSize;
        _horizontalAlignment = _doc.HorizontalAlignment;
        _verticalAlignment = _doc.VerticalAlignment;
        _automaticAlignment = _doc.AutomaticAlignment;
        
        _xOffset      = _doc.XOffset;
        _yOffset      = _doc.YOffset;
        _currentLabelStyleInstance = _doc.LabelFormat;
        _backgroundStyle = _doc.BackgroundStyle;
      }

      if(null!=View)
      {
        View.Font_Initialize(_fontFamily);
      
        View.Color_Initialize(_color);
        View.FontSize_Initialize(_fontSize);
        View.HorizontalAlignment_Initialize(System.Enum.GetNames(typeof(System.Drawing.StringAlignment)),System.Enum.GetName(typeof(System.Drawing.StringAlignment),_horizontalAlignment));
        View.VerticalAlignment_Initialize(System.Enum.GetNames(typeof(System.Drawing.StringAlignment)),System.Enum.GetName(typeof(System.Drawing.StringAlignment),_verticalAlignment));
        View.AutomaticAlignment_Initialize(this._automaticAlignment);
        View.Rotation = (float)_doc.Rotation;
        View.XOffset_Initialize(Serialization.NumberConversion.ToString(_xOffset*100));
        View.YOffset_Initialize(Serialization.NumberConversion.ToString(_yOffset*100));
        View.Background = _backgroundStyle;
        InitializeLabelStyle();
      }
    }
Ejemplo n.º 6
0
 public void EhView_LabelStyleChanged(int newValue)
 {
     _currentLabelStyle         = newValue;
     _currentLabelStyleInstance = (Altaxo.Graph.Gdi.LabelFormatting.ILabelFormatting)Activator.CreateInstance(this._labelTypes[newValue]);
 }