Beispiel #1
0
        public ZipCodeObjectMenu(Designer designer)
            : base(designer)
        {
            miShowMarkers                  = CreateMenuItem(Res.Get("ComponentMenu,ZipCodeObject,ShowMarkers"), new EventHandler(miShowMarkers_Click));
            miShowMarkers.BeginGroup       = true;
            miShowMarkers.AutoCheckOnClick = true;

            miShowGrid = CreateMenuItem(Res.Get("ComponentMenu,ZipCodeObject,ShowGrid"), new EventHandler(miShowGrid_Click));
            miShowGrid.AutoCheckOnClick = true;

            miCanGrow.Visible      = false;
            miCanShrink.Visible    = false;
            miGrowToBottom.Visible = false;
            int insertPos = Items.IndexOf(miGrowToBottom);

            Items.Insert(insertPos, miShowMarkers);
            Items.Insert(insertPos + 1, miShowGrid);

            ZipCodeObject zip = Designer.SelectedObjects[0] as ZipCodeObject;

            miShowMarkers.Enabled = !zip.HasRestriction(Restrictions.DontModify);
            miShowGrid.Enabled    = miShowMarkers.Enabled;
            miShowMarkers.Checked = zip.ShowMarkers;
            miShowGrid.Checked    = zip.ShowGrid;
        }
Beispiel #2
0
        /// <inheritdoc/>
        public override void Assign(Base source)
        {
            base.Assign(source);

            ZipCodeObject src = source as ZipCodeObject;

            SegmentWidth  = src.SegmentWidth;
            SegmentHeight = src.SegmentHeight;
            Spacing       = src.Spacing;
            SegmentCount  = src.SegmentCount;
            ShowMarkers   = src.ShowMarkers;
            ShowGrid      = src.ShowGrid;

            DataColumn = src.DataColumn;
            Expression = src.Expression;
            Text       = src.Text;
        }
Beispiel #3
0
        /// <inheritdoc/>
        public override void Serialize(FRWriter writer)
        {
            ZipCodeObject c = writer.DiffObject as ZipCodeObject;

            Border.SimpleBorder = true;
            base.Serialize(writer);

            if (FloatDiff(SegmentWidth, c.SegmentWidth))
            {
                writer.WriteFloat("SegmentWidth", SegmentWidth);
            }
            if (FloatDiff(SegmentHeight, c.SegmentHeight))
            {
                writer.WriteFloat("SegmentHeight", SegmentHeight);
            }
            if (FloatDiff(Spacing, c.Spacing))
            {
                writer.WriteFloat("Spacing", Spacing);
            }
            if (SegmentCount != c.SegmentCount)
            {
                writer.WriteInt("SegmentCount", SegmentCount);
            }
            if (ShowMarkers != c.ShowMarkers)
            {
                writer.WriteBool("ShowMarkers", ShowMarkers);
            }
            if (ShowGrid != c.ShowGrid)
            {
                writer.WriteBool("ShowGrid", ShowGrid);
            }

            if (DataColumn != c.DataColumn)
            {
                writer.WriteStr("DataColumn", DataColumn);
            }
            if (Expression != c.Expression)
            {
                writer.WriteStr("Expression", Expression);
            }
            if (Text != c.Text)
            {
                writer.WriteStr("Text", Text);
            }
        }