Пример #1
0
        public OptionsForm(ref Options options, ref LoopThread loopThread, MainForm mainForm)
        {
            InitializeComponent();

            _options = options;
            _loopThread = loopThread;
            _mainForm = mainForm;
            OptionsFormVisibleChanged(null, null);
        }
Пример #2
0
 public static Options LoadFromFile(MainForm mainForm)
 {
     try
     {
         var file = new FileStream("VitalInfo.settings", FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
         var serializer = new XmlSerializer(typeof(Options));
         var options = (Options) serializer.Deserialize(file);
         file.Close();
         mainForm.LogLine("Loaded settings from file.");
         return options;
     }
     catch (Exception)
     {
         return new Options();
     }
 }
Пример #3
0
 public Listener(ref Options options, MainForm mainForm)
 {
     _options = options;
     _mainForm = mainForm;
 }
Пример #4
0
 public LoopThread(ref Options options, MainForm mainForm)
 {
     _options = options;
     _mainForm = mainForm;
 }