/// <summary>
        /// Constructs a new Network Properties page
        /// </summary>
        public PenPropertiesPage(PenStateModel psm, DrawingAttributes atts, bool isPen)
        {
            this.DrawingAttributes = atts;
            this.psm = psm;
            this.isPen = isPen;

            this.SuspendLayout();

            this.Name = "PenPropertiesPage";
            this.ClientSize = new Size(510, 238);
            this.FormBorderStyle = FormBorderStyle.FixedDialog;
            this.Font = ViewerStateModel.FormFont;
            this.Text = Strings.Pen;

            // Add the controls
            this.Controls.Add(new PenTypeGroupBox(this, new Point(5, 8), new Size(174, 64), 0));
            this.Controls.Add(new PenShapeGroupBox(this, new Point(5, 72), new Size(174, 64), 1));
            this.Controls.Add(new PenColorGroupBox(this, new Point(5, 136), new Size(174, 48), 2));
            this.Controls.Add(new TipPropertiesGroupBox(this, new Point(184, 8), new Size(160, 176), 3));
            this.Controls.Add(new ScribbleGroupBox(this, new Point(352, 8), new Size(144, 224), 4));
            this.Controls.Add(new UndoChangesButton(this, new Point(185, 200), new Size(154, 23), 5));
            this.Controls.Add(new OKButton(this, new Point(16, 200), new Size(96, 23), 6));

            this.FireDrawingAttributesChanged(this);

            this.ResumeLayout();
        }
Beispiel #2
0
        public void UpdateValues(object model)
        {
            // Make sure both objects exist and aren't the same
            if (model != null &&
                model is PenStateModel &&
                model != this)
            {
                PenStateModel m = (PenStateModel)model;

                using (Synchronizer.Lock(this.SyncRoot))
                {
                    using (Synchronizer.Lock(m.SyncRoot))
                    {
                        if (this.m_PenRasterOperation != m.m_PenRasterOperation)
                        {
                            this.m_PenRasterOperation = m.m_PenRasterOperation;
                        }
                        if (this.m_PenTip != m.m_PenTip)
                        {
                            this.m_PenTip = m.m_PenTip;
                        }
                        if (this.m_PenColor != m.m_PenColor)
                        {
                            this.m_PenColor = m.m_PenColor;
                        }
                        if (this.m_PenWidth != m.m_PenWidth)
                        {
                            this.m_PenWidth = m.m_PenWidth;
                        }
                        if (this.m_PenHeight != m.m_PenHeight)
                        {
                            this.m_PenHeight = m.m_PenHeight;
                        }
                        if (this.m_HLRasterOperation != m.m_HLRasterOperation)
                        {
                            this.m_HLRasterOperation = m.m_HLRasterOperation;
                        }
                        if (this.m_HLTip != m.m_HLTip)
                        {
                            this.m_HLTip = m.m_HLTip;
                        }
                        if (this.m_HLColor != m.m_HLColor)
                        {
                            this.m_HLColor = m.m_HLColor;
                        }
                        if (this.m_HLWidth != m.m_HLWidth)
                        {
                            this.m_HLWidth = m.m_HLWidth;
                        }
                        if (this.m_HLHeight != m.m_HLHeight)
                        {
                            this.m_HLHeight = m.m_HLHeight;
                        }
                    }
                }
            }
        }
 public PresenterModel()
 {
     this.m_Stylus = null;
     this.m_CurrentResult = null;
     this.m_Network = new NetworkModel();
     this.m_VersionExchange = new VersionExchangeModel();
     /// Note: We currently assume that the ParticipantModel Guid will be different for each application invocation.
     /// (In particular TCP reconnection relies on this assumption.)  If we need an identifer that persists across
     /// sessions, we'd need to create a new identifier for this.
     ParticipantId = Guid.NewGuid();
     this.m_Participant = new ParticipantModel(ParticipantId, System.Windows.Forms.SystemInformation.UserName);
     this.m_Workspace = new WorkspaceModel();
     this.m_Undo = new UndoModel();
     this.m_ViewerState = new ViewerStateModel();
     this.m_PenState = new PenStateModel();
     TheInstance = this;
 }
Beispiel #4
0
        public object Clone()
        {
            PenStateModel clonemodel = new PenStateModel();

            clonemodel.m_PenRasterOperation = this.m_PenRasterOperation;
            clonemodel.m_PenTip             = this.m_PenTip;
            clonemodel.m_PenColor           = this.m_PenColor;
            clonemodel.m_PenWidth           = this.m_PenWidth;
            clonemodel.m_PenHeight          = this.m_PenHeight;
            clonemodel.m_HLRasterOperation  = this.m_HLRasterOperation;
            clonemodel.m_HLTip    = this.m_HLTip;
            clonemodel.m_HLColor  = this.m_HLColor;
            clonemodel.m_HLWidth  = this.m_HLWidth;
            clonemodel.m_HLHeight = this.m_HLHeight;

            return(clonemodel);
        }
        public object Clone()
        {
            PenStateModel clonemodel = new PenStateModel();

            clonemodel.m_PenRasterOperation = this.m_PenRasterOperation;
            clonemodel.m_PenTip = this.m_PenTip;
            clonemodel.m_PenColor = this.m_PenColor;
            clonemodel.m_PenWidth = this.m_PenWidth;
            clonemodel.m_PenHeight = this.m_PenHeight;
            clonemodel.m_HLRasterOperation = this.m_HLRasterOperation;
            clonemodel.m_HLTip = this.m_HLTip;
            clonemodel.m_HLColor = this.m_HLColor;
            clonemodel.m_HLWidth = this.m_HLWidth;
            clonemodel.m_HLHeight = this.m_HLHeight;

            return clonemodel;
        }