/// <summary> /// Sauvegarde les settings /// </summary> private void SaveSettings() { //Création de la VO VO_EditorSettings settings = new VO_EditorSettings(); settings.ActivateZoomWithWheel = chkActivateZoomWithWheel.Checked; settings.AnimationFrequency = (int)ddpAnimationDefaultFrequency.SelectedValue; settings.GamesFolder = txtGameFolder.Text; settings.HighlightningBrush = colorChooseHighlightningBrush.SelectedVOColor; settings.HighlightningColor = colorChooseHighlightningColor.SelectedVOColor; settings.MessageDuration = Convert.ToInt32(ddpMessageDuration.Value); settings.MessageFontSize = Convert.ToInt32(ddpMessageFontSize.SelectedValue); settings.SelectedHotSpotColor = colorSelectedHotSpotColor.SelectedVOColor; settings.SelectionCoords = colorSelectionCoords.SelectedVOColor; settings.StagePadding = Convert.ToInt32(ddpStagePadding.Value); settings.ShowAnimationsWhileMasking = chkShowAnimations.Checked; settings.ShowCharactersWhileMasking = chkShowCharacters.Checked; settings.TransparentBlockSize = (int)ddpTransparentBlockSize.SelectedItem; settings.TransparentColor1 = colorTransparentBlockColor1.SelectedVOColor; settings.TransparentColor2 = colorTransparentBlockColor2.SelectedVOColor; settings.VectorPointsSize = Convert.ToInt32(ddpVectorPointsSize.Value); settings.ViewerPath = txtViewerPath.Text; EditorSettings.Instance.SaveSettings(settings); }
/// <summary> /// Save config file /// </summary> /// <param name="settings"></param> public void SaveSettings(VO_EditorSettings settings) { UpdateValue(EditorConstants.CONFIG_KEY_ACTIVATEZOOMWITHWHEEL, settings.ActivateZoomWithWheel.ToString()); UpdateValue(EditorConstants.CONFIG_KEY_ANIMATIONFREQUENCY, settings.AnimationFrequency.ToString()); UpdateValue(EditorConstants.CONFIG_KEY_GAMEFOLDER, settings.GamesFolder.ToString()); UpdateValue(EditorConstants.CONFIG_KEY_HIGHLIGHTNINGCOLOR, settings.HighlightningColor); UpdateValue(EditorConstants.CONFIG_KEY_HIGHLIGHTNINGBRUSHCOLOR, settings.HighlightningBrush); UpdateValue(EditorConstants.CONFIG_KEY_MESSAGEDURATION, settings.MessageDuration.ToString()); UpdateValue(EditorConstants.CONFIG_KEY_MESSAGEFONTSIZE, settings.MessageFontSize.ToString()); UpdateValue(EditorConstants.CONFIG_KEY_SELECTEDCOORDSPOTCOLOR, settings.SelectionCoords); UpdateValue(EditorConstants.CONFIG_KEY_SELECTEDHOTSPOTCOLOR, settings.SelectedHotSpotColor); UpdateValue(EditorConstants.CONFIG_KEY_SHOWANIMWHILEMASKING, settings.ShowAnimationsWhileMasking.ToString()); UpdateValue(EditorConstants.CONFIG_KEY_SHOWCHARWHILEMASKING, settings.ShowCharactersWhileMasking.ToString()); UpdateValue(EditorConstants.CONFIG_KEY_STAGEPADDING, settings.StagePadding.ToString()); UpdateValue(EditorConstants.CONFIG_KEY_TRANSPARENTBLOCKSIZE, settings.TransparentBlockSize.ToString()); UpdateValue(EditorConstants.CONFIG_KEY_TRANSPARENTCOLOR1, settings.TransparentColor1); UpdateValue(EditorConstants.CONFIG_KEY_TRANSPARENTCOLOR2, settings.TransparentColor2); UpdateValue(EditorConstants.CONFIG_KEY_VECTORPOINTSSIZE, settings.VectorPointsSize.ToString()); UpdateValue(EditorConstants.CONFIG_KEY_VIEWERPATH, settings.ViewerPath); UpdateValue(EditorConstants.CONFIG_KEY_VSYNC, settings.VSync.ToString()); }