Пример #1
0
        public frm_main(bool minimode)
        {
            InitializeComponent();
            mini = new miniNotice();
            if (minimode)
            {
                minimize();
            }
            if (System.IO.File.Exists(Application.StartupPath + "/config.xml"))
            {
                System.Xml.Serialization.XmlSerializer xser = new System.Xml.Serialization.XmlSerializer(typeof(xConfig));
                System.Xml.XmlReader xrea = System.Xml.XmlReader.Create(Application.StartupPath + "/config.xml");
                xConfig c = (xConfig)xser.Deserialize(xrea);
                xrea.Close();
                c.ToRealConfig();
            }
            else if (System.IO.File.Exists(Application.UserAppDataPath + "/config.xml"))
            {
                System.Xml.Serialization.XmlSerializer xser = new System.Xml.Serialization.XmlSerializer(typeof(xConfig));
                System.Xml.XmlReader xrea = System.Xml.XmlReader.Create(Application.UserAppDataPath + "/config.xml");
                xConfig c = (xConfig)xser.Deserialize(xrea);
                xrea.Close();
                c.ToRealConfig();
            }

            UpdateSyncList();
        }