public WootracerControls(WootracerOptions wootracerOptions) { InitializeComponent(); _Parent = wootracerOptions; CreateGUI(); }
public MainWindow() { InitializeComponent(); DataContext = this; _SettingsLocation = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + "\\WooFractal\\Settings.xml"; _AppSettings = AppSettings.Load(_SettingsLocation); _WootracerOptions = _AppSettings._WootracerOptions; // initialise post process settings _PostProcess = new PostProcess(); // starting camera settings _WootracerOptions = new WootracerOptions(); InitialiseCamera(); // initialise the scene InitialiseScene(); // initialise the script objects InitialiseScript(); InitialiseTestScene(); ShaderScript.ReadDistanceSchema(); BuildFractalList(); BuildOptionsList(); BuildColourList(); // FractalSettings fractalSettings = LoadFractal("scratch"); // _FractalIterations = fractalSettings._FractalIterations; // _FractalColours = fractalSettings._FractalColours; // _RenderOptions = fractalSettings._RenderOptions; }
public void Save(string filename, Camera camera, WootracerOptions wootracerOptions) { _WootracerOptions = wootracerOptions; using (StreamWriter sw = new StreamWriter(filename)) { try { _CameraFrom = camera._Position; _CameraTo = camera._Target; _FOV = camera._FOV; _ApertureSize = camera._ApertureSize; _Spherical = camera._Spherical; _Stereographic = camera._Stereographic; XmlSerializer xmls = new XmlSerializer(typeof(AppSettings)); xmls.Serialize(sw, this); sw.Close(); } catch (Exception /*e*/) { // lets not get overexcited... } } }