Ejemplo n.º 1
0
		public void CopyFrom(GridStyle from)
		{
			if (object.ReferenceEquals(this, from))
				return;

			this.MajorPen = from._majorPen == null ? null : (PenX)(from._majorPen.Clone());
			this.MinorPen = from._minorPen == null ? null : (PenX)(from._minorPen.Clone());
			this._showGrid = from._showGrid;
			this._showMinor = from._showMinor;
			this._showZeroOnly = from._showZeroOnly;
		}
Ejemplo n.º 2
0
		public GridStyle(GridStyle from)
		{
			CopyFrom(from);
		}
 public XYGridStyleController(GridStyle doc)
 {
   if (!InitializeDocument(doc))
     throw new ApplicationException("Programming error");
 }
    public bool InitializeDocument(params object[] args)
    {
      if (args.Length == 0 || (args[0]!=null && !(args[0] is GridStyle)))
        return false;

      bool isVirgin = null == _doc;
      _doc = (GridStyle)args[0];
      _tempdoc = _doc;

      if(_useDocument == UseDocument.Copy && null!=_doc)
      {
        _tempdoc = (GridStyle)_doc.Clone();
      }
      if (null == _doc)
      {
        _doc = _tempdoc = new GridStyle();
        _tempdoc.ShowGrid = false;
        _useDocument = UseDocument.Directly;
      }

      Initialize(true);
      return true;
    }
Ejemplo n.º 5
0
 public void CopyFrom(GridStyle from)
 {
   this.MajorPen = from._majorPen == null ? null : (PenX)(from._majorPen.Clone());
   this.MinorPen = from._minorPen == null ? null : (PenX)(from._minorPen.Clone());
   this._showGrid = from._showGrid;
   this._showMinor = from._showMinor;
   this._showZeroOnly = from._showZeroOnly;
 }