public OptionsWindow([NotNull] ApplicationConfiguration configuration) : this() { if (configuration == null) throw new ArgumentNullException("configuration"); m_configuration = configuration; LoadSettings(); }
public void Save(ApplicationConfiguration configuration) { if (configuration == null) throw new ArgumentNullException("configuration"); try { using (var fs = File.Open(Paths.SettingsFile, FileMode.Create)) { Serializer.Write(configuration, fs); } } catch (Exception ex) { s_logger.Warn(ex, "An error occurred during saving application configuration."); } }
private void InitializeApplication() { m_tabPages = new List<IEditorTabPage> { new ImageEditorTabPage(m_definitions, m_resourcePackManager) { Dock = DockStyle.Fill }, new StringEditorTabPage { Dock = DockStyle.Fill }, new PatchesTabPage(m_patchManager) { Dock = DockStyle.Fill }, new ResourcePacksTabPage(m_resourcePackManager) { Dock = DockStyle.Fill } }; m_definitions = m_firmwareDefinitionManager.Load(); m_configuration = m_configurationManager.Load(); m_mruFirmwares = new MruList<string>(m_configuration.MostRecentlyUsed); m_patchManager.InitializeStorage(m_definitions); InitializeApplicationWindow(); InitializeOpenWithSpecifiedDefinitionMenu(); InitializeMruMenu(); InitializeTabPages(); InitializeUpdatesChecking(); }
public void Initialize(IEditorTabPageHost host, ApplicationConfiguration configuration) { m_configuration = configuration; GridSizeUpDown.Value = m_configuration.GridSize; ShowGridCheckBox.Checked = m_configuration.ShowGid; ImagePixelGrid.BlockSize = m_configuration.GridSize; ImagePixelGrid.SingleMouseButtonMode = configuration.ImageEditorMouseMode == ImageEditorMouseMode.LeftSetUnset; }
public void Initialize(IEditorTabPageHost host, ApplicationConfiguration configuration) { m_host = host; m_configuration = configuration; }
public void Initialize(IEditorTabPageHost host, ApplicationConfiguration configuration) { m_allResourcePacks = m_resourcePackManager.LoadAll(); }