Overload | Description |
---|---|
Equals | Determines whether another object is a reference to this object. |
Overload | Description |
---|---|
Equals | Determines whether another object is a reference to this object. |
FarPoint.Web.Spread.NamedStylefpstyle=newFarPoint.Web.Spread.NamedStyle(); FarPoint.Web.Spread.NamedStylefpstyle1=newFarPoint.Web.Spread.NamedStyle(); FarPoint.Web.Spread.NamedStyleCollectionnsc=newFarPoint.Web.Spread.NamedStyleCollection(); FarPoint.Web.Spread.Model.DefaultSheetStyleModelmodel=newFarPoint.Web.Spread.Model.DefaultSheetStyleModel(10,10); privatevoidPage_Load(objectsender,System.EventArgse) { if(IsPostBack) { return; } boolb; objecto; FpSpread1.NamedStyles.Add(fpstyle); FpSpread1.NamedStyles.Add(fpstyle1); nsc=FpSpread1.NamedStyles; fpstyle.BackColor=Color.Yellow; o=fpstyle; fpstyle1=fpstyle; b=fpstyle1.Equals(o); model.SetDirectInfo(0,0,fpstyle); model.NamedStyles=nsc; FpSpread1.ActiveSheetView.ColumnCount=model.ColumnCount; FpSpread1.ActiveSheetView.RowCount=model.RowCount; FpSpread1.ActiveSheetView.StyleModel=model; ListBox1.Items.Add(b.ToString()); } privatevoidButton1_Click(objectsender,System.EventArgse) { System.Xml.XmlDocumentdoc=newSystem.Xml.XmlDocument(); doc.Load("C:\\Temp\\mymodel.xml"); System.Xml.XmlNodeReaderr=newSystem.Xml.XmlNodeReader(doc); fpstyle.Deserialize(r); r.Close(); } privatevoidButton2_Click(objectsender,System.EventArgse) { System.Xml.XmlTextWriterw=newSystem.Xml.XmlTextWriter("C:\\Temp\\mymodel.xml",System.Text.Encoding.UTF8); w.Formatting=System.Xml.Formatting.Indented; w.WriteStartElement("ol"); w.WriteStartElement("li"); fpstyle.Serialize(w); w.WriteEndElement(); w.Flush(); w.Close(); }
DimfpstyleAsNewFarPoint.Web.Spread.NamedStyle() Dimfpstyle1AsNewFarPoint.Web.Spread.NamedStyle() DimnscAsNewFarPoint.Web.Spread.NamedStyleCollection() DimmodelAsNewFarPoint.Web.Spread.Model.DefaultSheetStyleModel(10,10) PrivateSubPage_Load(ByValsenderAsSystem.Object,ByValeAsSystem.EventArgs)HandlesMyBase.Load If(IsPostBack)Then Return EndIf DimbAsBoolean DimoAsObject FpSpread1.NamedStyles.Add(fpstyle) FpSpread1.NamedStyles.Add(fpstyle1) nsc=FpSpread1.NamedStyles fpstyle.BackColor=Color.Yellow o=fpstyle fpstyle1=fpstyle b=fpstyle1.Equals(o) model.SetDirectInfo(0,0,fpstyle) model.NamedStyles=nsc FpSpread1.ActiveSheetView.ColumnCount=model.ColumnCount FpSpread1.ActiveSheetView.RowCount=model.RowCount FpSpread1.ActiveSheetView.StyleModel=model EndSub PrivateSubButton1_Click(ByValsenderAsSystem.Object,ByValeAsSystem.EventArgs)HandlesButton1.Click DimdocAsNewSystem.Xml.XmlDocument() doc.Load("C:\Temp\mymodel.xml") DimrAsNewSystem.Xml.XmlNodeReader(doc) fpstyle.Deserialize(r) r.Close() EndSub PrivateSubButton2_Click(ByValsenderAsSystem.Object,ByValeAsSystem.EventArgs)HandlesButton2.Click DimwAsNewSystem.Xml.XmlTextWriter("C:\Temp\mymodel.xml",System.Text.Encoding.UTF8) w.Formatting=System.Xml.Formatting.Indented w.WriteStartElement("ol") w.WriteStartElement("li") fpstyle.Serialize(w) w.WriteEndElement() w.Flush() w.Close() EndSub