public void Load() { var f = new FileStream(_path, FileMode.Open); props = (OptionsStruct)(new BinaryFormatter()).Deserialize(f); f.Close(); }
public OptionsManager(ComboBox res, ComboBox dest, ComboBox inf, ComboBox outf) { props = new OptionsStruct(); _res = res; _dest = dest; _inf = inf; _outf = outf; if (File.Exists(_path)) { Load(); } else { props.resolution = ResolutionsEnum.p720; props.density = 1; props.pxlFmtIn = PixelFormat.YUV420P; props.pxlFmtOut = PixelFormat.YUV420P; Flush(); } UpdateUI(); Flush(); }
public OptionsUI() { if (File.Exists(_path)) { Load(); } else { props = new OptionsStruct(0); Save(); } // UpdateUI(); // Flush(); }