예제 #1
0
 public void ClearUploadedXml()
 {
     if (UseFileCache && uploaded)
     {
         xmlItem.Clear();
     }
 }
예제 #2
0
        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");
        }
예제 #3
0
        private void SaveSettings()
        {
            XmlItem root = Config.Root.FindItem("Preview").FindItem("Exports").FindItem(ClassName);

            using (FRWriter writer = new FRWriter(root))
            {
                root.Clear();
                writer.Write(this);
            }
        }
예제 #4
0
 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 + "\"";
     }
 }
예제 #5
0
 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]);
         }
     }
 }
예제 #6
0
        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);
        }
예제 #7
0
 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));
     }
 }
예제 #8
0
        private void Clear(int position)
        {
            if (position == -1)
            {
                rootItem.Clear();
            }
            else if (position < rootItem.Count)
            {
                rootItem.Items[position].Dispose();
            }

            LevelRoot();
        }
예제 #9
0
 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());
     }
 }
예제 #10
0
        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();
        }
예제 #11
0
        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());
                }
            }
        }
예제 #12
0
        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 + "\"";
            //}
        }