public void ClearUploadedXml() { if (UseFileCache && uploaded) { xmlItem.Clear(); } }
private void Done() { // update label parameters and report page layout XmlItem labelParameters = lbxLabels.SelectedItem as XmlItem; SetReportPageLayout(labelParameters, FReport.Pages[0] as ReportPage); // save user-defined labels to config file XmlItem customManufacturer = FLabels.Root[FLabels.Root.Count - 1]; XmlItem configLabels = Config.Root.FindItem("LabelWizard"); configLabels.Clear(); for (int i = 0; i < customManufacturer.Count; i++) { XmlItem addItem = configLabels.Add(); addItem.Name = "CustomLabel"; addItem.Text = customManufacturer[i].Text; } // write last used items configLabels.SetProp("Manufacturer", SelectedManufacturer); configLabels.SetProp("Label", SelectedLabelName); // tell the designer to reflect changes FReport.Designer.SetModified(null, "ChangeReport"); }
private void SaveSettings() { XmlItem root = Config.Root.FindItem("Preview").FindItem("Exports").FindItem(ClassName); using (FRWriter writer = new FRWriter(root)) { root.Clear(); writer.Write(this); } }
public void Save(XmlItem rootItem) { rootItem.Clear(); for (int i = 0; i < FNames.Count; i++) { XmlItem xi = rootItem.Add(); xi.Name = FNames.Keys[i]; xi.Text = "name=\"" + FNames.Values[i].SourceName + "\""; } }
public void Save(XmlItem rootItem) { rootItem.Clear(); for (int i = 0; i < pages.Count; i++) { using (FRWriter writer = new FRWriter(rootItem.Add())) { writer.Write(pages[i]); } } }
public ReportPage GetPage(int pageIndex) { if (UseFileCache && FUploaded) { FPreparedPages.TempFile.Position = FTempFilePosition; XmlReader reader = new XmlReader(FPreparedPages.TempFile); reader.Read(FXmlItem); } ReportPage page = ReadObject(null, FXmlItem, true) as ReportPage; page.SetReport(FPreparedPages.Report); new PreparedPagePosprocessor().Postprocess(page); if (UseFileCache && FUploaded) { FXmlItem.Clear(); } return(page); }
public void Save(XmlItem rootItem) { rootItem.Clear(); foreach (BookmarkItem item in FItems) { XmlItem xi = rootItem.Add(); xi.Name = "item"; xi.SetProp("Name", Converter.ToXml(item.Name)); xi.SetProp("Page", item.PageNo.ToString()); xi.SetProp("Offset", Converter.ToString(item.OffsetY)); } }
private void Clear(int position) { if (position == -1) { rootItem.Clear(); } else if (position < rootItem.Count) { rootItem.Items[position].Dispose(); } LevelRoot(); }
private void UpdateUnlimitedPage(Base obj, XmlItem item) { item.Clear(); using (FRWriter writer = new FRWriter(item)) { writer.SerializeTo = SerializeTo.Preview; writer.SaveChildren = false; writer.BlobStore = preparedPages.BlobStore; writer.Write(obj); } foreach (Base child in obj.ChildObjects) { UpdateUnlimitedPage(child, item.Add()); } }
private void Done() { if (DialogResult == DialogResult.OK) { Connection.Name = tbConnName.Text; // enable items that we have checked in the table tree foreach (TreeNode tableNode in tvTables.Nodes) { TableDataSource table = tableNode.Tag as TableDataSource; if (table != null) { table.Enabled = tableNode.Checked; foreach (TreeNode colNode in tableNode.Nodes) { Column column = colNode.Tag as Column; if (column != null) { column.Enabled = colNode.Checked; } } } } // create relations if any Connection.CreateRelations(); XmlItem root = Config.Root.FindItem("Designer").FindItem("LastConnections"); using (FRWriter writer = new FRWriter(root)) { root.Clear(); writer.Write(FConnections); } } if (ApplicationConnectionMode) { // in this mode, we don't have to store connection string in the report Connection.ConnectionString = ""; } if (DialogResult == DialogResult.OK || EditMode) { FConnections.Remove(Connection); } FConnections.Dispose(); }
public override void Done(DialogResult result) { if (result == DialogResult.OK) { FDesigner.UIStyle = (UIStyle)cbxUIStyle.SelectedIndex; Config.UIStyle = FDesigner.UIStyle; XmlItem pluginsItem = Config.Root.FindItem("Plugins"); pluginsItem.Clear(); foreach (object item in lbPlugins.Items) { XmlItem xi = pluginsItem.Add(); xi.Name = "Plugin"; xi.SetProp("Name", item.ToString()); } } }
public void Save(XmlItem rootItem) { rootItem.Clear(); foreach (KeyValuePair <string, DictionaryItem> pair in names) { XmlItem xi = rootItem.Add(); xi.Name = pair.Key; xi.ClearProps(); xi.SetProp("name", pair.Value.SourceName); //xi.Text = String.Concat("name=\"", pair.Value.SourceName, "\""); } //for (int i = 0; i < FNames.Count; i++) //{ // XmlItem xi = rootItem.Add(); // xi.Name = FNames.Keys[i]; // xi.Text = "name=\"" + FNames.Values[i].SourceName + "\""; //} }