예제 #1
0
        public WinLircSettingsDlg()
        {
            InitializeComponent();

            if (File.Exists("Settings.dat"))
            {
                FileStream fs;
                appSettings = (Settings)(new BinaryFormatter()).Deserialize(fs = File.Open("Settings.dat", FileMode.Open));
                fs.Close();
            }
            else
            {
                MessageBox.Show("Settngs file doesn't exists. Creating a new one");
                appSettings = new Settings();
            }

            rtmpURI.Text = appSettings.RtmpAddress;
            epgURI.Text = appSettings.EpgAddress;
            wlCm.Text = appSettings.Chan;
            wlFs.Text = appSettings.Full;
            wlNc.Text = appSettings.Next;
            wlPc.Text = appSettings.Prev;
            wlPort.Text = appSettings.Port;
            wlURI.Text = appSettings.Addr;
        }
예제 #2
0
 private void loadSettings()
 {
     if (File.Exists("Settings.dat")) {
         FileStream fs;
         AppSettings = (Settings.Settings)(new BinaryFormatter()).Deserialize(fs = File.Open("Settings.dat", FileMode.Open));
         fs.Close();
     }
     else MessageBox.Show("Settngs file doesn't exists");
 }