Example #1
0
    public void SelectModel (TEntityAction action)
    {
      if (action.NotNull ()) {
        //HeaderVisibilityProperty.Select (action.ModelAction.ExtensionDocumentModel.HeaderVisibility, action.ModelAction.ExtensionDocumentModel.FooterVisibility);
        //FooterVisibilityProperty.Select (action.ModelAction.ExtensionDocumentModel.HeaderVisibility, action.ModelAction.ExtensionDocumentModel.FooterVisibility);

        ColumnsProperty.Select (action.ModelAction.ExtensionGeometryModel.SizeCols);
        RowsProperty.Select (action.ModelAction.ExtensionGeometryModel.SizeRows);

        if (action.Id.NotEmpty ()) {
          bool locked = (action.ModelAction.ComponentStatusModel.Locked || action.ModelAction.ComponentStatusModel.Busy);

          var styleHorizontalString = action.ModelAction.ExtensionLayoutModel.StyleHorizontal;
          var styleVerticalString = action.ModelAction.ExtensionLayoutModel.StyleVertical;

          var styleInfoHorizontal = TStyleInfo.Create (TContentStyle.Mode.Horizontal);
          styleInfoHorizontal.Select (styleHorizontalString);

          var styleInfoVertical = TStyleInfo.Create (TContentStyle.Mode.Vertical);
          styleInfoVertical.Select (styleVerticalString);

          StyleHorizontalProperty.Select (styleInfoHorizontal, locked);
          StyleVerticalProperty.Select (styleInfoVertical, locked);

          if (locked) {
            ColumnsProperty.Lock ();
            RowsProperty.Lock ();
          }
        }

        // DO NOT CHANGE THIS ORDER
        ImagePositionProperty.Select (action.ModelAction.ExtensionGeometryModel.PositionImage);

        m_LayoutModel.CopyFrom (action.ModelAction.ExtensionLayoutModel);
        m_ImageModel.CopyFrom (action.ModelAction.ExtensionImageModel);
        //m_DocumentModel.CopyFrom (action.ModelAction.ExtensionDocumentModel);
        m_GeometryModel.CopyFrom (action.ModelAction.ExtensionGeometryModel);
        m_TextModel.CopyFrom (action.ModelAction.ExtensionTextModel);

        DateProperty.TheDate = m_TextModel.Date;

        SelectionProperty.SelectModel (action);
      }
    }
Example #2
0
 public void LockInt4 ()
 {
   ColumnsProperty.Lock ();
   RowsProperty.Lock ();
 }