FarPoint.Web.Spread.NamedStyle fpstyle = new FarPoint.Web.Spread.NamedStyle();
FarPoint.Web.Spread.NamedStyle fpstyle1 = new FarPoint.Web.Spread.NamedStyle();
FarPoint.Web.Spread.NamedStyleCollection nsc = new FarPoint.Web.Spread.NamedStyleCollection();
FarPoint.Web.Spread.Model.DefaultSheetStyleModel model= new FarPoint.Web.Spread.Model.DefaultSheetStyleModel(10, 10);
private void Page_Load(object sender, System.EventArgs e)
{
if (IsPostBack)
{
return;
}
bool b;
object o;
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());
}
private void Button1_Click(object sender, System.EventArgs e)
{
System.Xml.XmlDocumentdoc = new System.Xml.XmlDocument();
doc.Load("C:\\Temp\\mymodel.xml");
System.Xml.XmlNodeReaderr = new System.Xml.XmlNodeReader(doc);
fpstyle.Deserialize(r);
r.Close();
}
private void Button2_Click(object sender, System.EventArgs e)
{
System.Xml.XmlTextWriter w = new System.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();
}
Dim fpstyle As New FarPoint.Web.Spread.NamedStyle()
Dim fpstyle1 As New FarPoint.Web.Spread.NamedStyle()
Dim nsc As New FarPoint.Web.Spread.NamedStyleCollection()
Dim model As New FarPoint.Web.Spread.Model.DefaultSheetStyleModel(10, 10)
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
If IsPostBack Then
Return
End If
Dim b As Boolean
Dim o As Object
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
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim doc As New System.Xml.XmlDocument()
doc.Load("C:\Temp\mymodel.xml")
Dimr As New System.Xml.XmlNodeReader(doc)
fpstyle.Deserialize(r)
r.Close()
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim w As New System.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()
End Sub