Exemplo n.º 1
0
        protected void SaveSymbols()
        {
            XmlSerializer xs = new XmlSerializer(typeof(Schema));
            TextWriter    tw = new StreamWriter(SchemaFilename);

            xs.Serialize(tw, Schema);
            tw.Close();
            MruMenu.AddFile(SchemaFilename);
        }
Exemplo n.º 2
0
        protected void LoadSymbols()
        {
            XmlSerializer xs = new XmlSerializer(typeof(Schema));
            StreamReader  sr = new StreamReader(SchemaFilename);

            Schema = (Schema)xs.Deserialize(sr);
            sr.Close();
            SymbolEditorController.IfNotNull(ctrl => ctrl.PopulateTree());
            PropertyGridController.IfNotNull(pgrid => pgrid.View.ShowObject(Schema));
            MruMenu.AddFile(SchemaFilename);
        }
Exemplo n.º 3
0
        public void LoadReceptors(object sender, EventArgs args)
        {
            OpenFileDialog ofd = new OpenFileDialog();

            ofd.Filter = "xml files (*.xml)|*.xml|All files (*.*)|*.*";
            DialogResult ret = ofd.ShowDialog();

            if (ret == DialogResult.OK)
            {
                LoadApplet(ofd.FileName);
                MruMenu.AddFile(ofd.FileName);
            }
        }
Exemplo n.º 4
0
        public void SaveReceptorsAs(object sender, EventArgs args)
        {
            SaveFileDialog sfd = new SaveFileDialog();

            sfd.Filter          = "xml files (*.xml)|*.xml|All files (*.*)|*.*";
            sfd.OverwritePrompt = true;
            DialogResult ret = sfd.ShowDialog();

            if (ret == DialogResult.OK)
            {
                SaveReceptorsInternal(sfd.FileName);
                MruMenu.AddFile(sfd.FileName);
            }
        }