Exemple #1
0
            public void GetObjectData(object obj, System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
            {
                info.SetType(this.GetType());
                WorksheetView s = (WorksheetView)obj;

                info.AddValue("Location", s.Location);
                info.AddValue("Size", s.Size);
                info.AddValue("Controller", s.m_Ctrl);
            }
Exemple #2
0
            public object GetRealObject(object parent)
            {
                // We create the view firstly without controller to have the creation finished
                // before the controler is set
                // otherwise we will have callbacks to not initialized variables
                WorksheetView frm = new WorksheetView();

                frm.Location = m_Location;
                frm.Size     = m_Size;
                frm.Dock     = DockStyle.Fill;

                ((IWorksheetController)m_Controller).View = frm;

                if (m_Controller is System.Runtime.Serialization.IDeserializationCallback)
                {
                    DeserializationFinisher finisher = new DeserializationFinisher(frm);
                    ((System.Runtime.Serialization.IDeserializationCallback)m_Controller).OnDeserialization(finisher);
                }
                return(frm);
            }
      public object GetRealObject(object parent)
      {
        // We create the view firstly without controller to have the creation finished
        // before the controler is set
        // otherwise we will have callbacks to not initialized variables
        WorksheetView frm = new WorksheetView();
        frm.Location = m_Location;
        frm.Size = m_Size;
        frm.Dock = DockStyle.Fill;

        ((IWorksheetController)m_Controller).View = frm;

        if(m_Controller is System.Runtime.Serialization.IDeserializationCallback)
        {
          DeserializationFinisher finisher = new DeserializationFinisher(frm);
          ((System.Runtime.Serialization.IDeserializationCallback)m_Controller).OnDeserialization(finisher);
        }
        return frm;
      }