public void SaveToFile(string FileName)
        {
            FlowDiagramXML fdx = new FlowDiagramXML(this);
            XmlSerializer  ser = new XmlSerializer(typeof(FlowDiagramXML));
            Stream         sw  = new FileStream(FileName, FileMode.Create);

            ser.Serialize(sw, fdx);
            sw.Flush();
            sw.Close();
            sw.Dispose();
        }
        public void LoadFromFile(string FileName)
        {
            XmlSerializer  ser = new XmlSerializer(typeof(FlowDiagramXML));
            Stream         sw  = new FileStream(FileName, FileMode.Open);
            FlowDiagramXML fdx = (FlowDiagramXML)ser.Deserialize(sw);

            sw.Close();
            sw.Dispose();
            this.flowComponents.Clear();
            this.pnlMain.Controls.Clear();
            this.FlowConnectors.Clear();
            RebuildUI(fdx.FlowTree);
        }