Exemple #1
0
 public EditorOptionPage(EditorTabManager editorTabManager, UiSettings uiSettings, EditorSettings editorSettings)
 {
     this.editorTabManager = editorTabManager;
     this.uiSettings = uiSettings;
     this.editorSettings = editorSettings;
     InitializeComponent();
 }
Exemple #2
0
        private void GetSettings()
        {
            _ignoreRefresh = true;
            EditorSettings settings = _symbolizer.EditorSettings;

            tccColorRange.Initialize(new ColorRangeEventArgs(settings.StartColor, settings.EndColor, settings.HueShift, settings.HueSatLight, settings.UseColorRange));
            UpdateTable();
            cmbInterval.SelectedItem = settings.IntervalMethod;
            UpdateStatistics(false);
            nudCategoryCount.Value           = _newScheme.EditorSettings.NumBreaks;
            cmbIntervalSnapping.SelectedItem = settings.IntervalSnapMethod;
            nudSigFig.Value          = settings.IntervalRoundingDigits;
            angLightDirection.Angle  = (int)_symbolizer.ShadedRelief.LightDirection;
            dbxElevationFactor.Value = _symbolizer.ShadedRelief.ElevationFactor;
            chkHillshade.Checked     = _symbolizer.ShadedRelief.IsUsed;
            colorNoData.Color        = _symbolizer.NoDataColor;
            opacityNoData.Value      = _symbolizer.NoDataColor.GetOpacity();
            sldSchemeOpacity.Value   = _symbolizer.Opacity;
            _ignoreRefresh           = false;
        }
Exemple #3
0
        /// <summary>
        /// Initializes the editor
        /// </summary>
        private void InitializeEditor()
        {
            // events
            Move       += editorViewport.OnEditorMoves;
            Activated  += editorViewport.OnEditorGotFocus;
            Deactivate += editorViewport.OnEditorLostFocus;
            Disposed   += EditorForm_Dispose;

            editorViewport.OnViewportFocus      += OnViewportFocus;
            textureSelector.ApplyButton.Click   += OnApplySelectedTexture;
            textureSelector.ReplaceButton.Click += OnReplaceSelectedTexture;

            creationButtonsPanel.OnCreationButtonPressed = HandleGeometryBarItems;
            solidProperties.OnPropertiesChanged          = OnSolidPropertiesChanged;
            textureProperties.OnPropertiesChanged        = OnTexturePropertiesChanged;
            textureProperties.OnJustify = OnTexturePropertiesJustifyClicked;

            // initialization
            EditorSettings    = new EditorSettings();
            RubberBand        = new RubberBand();
            Selection         = new MapObjectGroup();
            CopyBoard         = new MapObjectGroup();
            CurrentTool       = new SolidManipulationTool();
            defaultMapSaver   = new RuneMapExporter();
            defaultMapLoader  = new RuneMapImporter();
            TextureCollection = new TextureCollection(EditorSettings.TextureFolder);

            if (!DesignMode)
            {
                EditorSettings.Load();
                SetupSolidFactory();
                solidProperties.UpdateProperties(Selection);
                editorViewport.SetController(this);
                textureSelector.TextureCollection = TextureCollection;
                CurrentTool.Initialize(this);

                Rotate = GeneralUtility.CreateCursor(Resources.rotate, 16, 16);
                NewDocument();
            }
        }
Exemple #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ViewModelFactory"/> class.
 /// </summary>
 /// <param name="settings">The settings for the application.</param>
 /// <param name="providers">The providers used to open/save files.</param>
 /// <param name="contentPlugIns">The plugins used for content.</param>
 /// <param name="toolPlugIns">The plugins used for application tools.</param>
 /// <param name="projectManager">The application project manager.</param>
 /// <param name="viewModelInjection">The common services for the application.</param>
 /// <param name="clipboardService">The application clipboard service.</param>
 /// <param name="dirLocatorService">The directory locator service.</param>
 /// <param name="fileScanService">The file scanning service used to scan content files for content plugin associations.</param>
 /// <param name="folderBrowser">The file system folder browser service.</param>
 /// <exception cref="ArgumentNullException">Thrown when any parameter is <b>null</b>.</exception>
 public ViewModelFactory(EditorSettings settings,
                         FileSystemProviders providers,
                         ContentPlugInService contentPlugIns,
                         ToolPlugInService toolPlugIns,
                         ProjectManager projectManager,
                         IViewModelInjection viewModelInjection,
                         ClipboardService clipboardService,
                         DirectoryLocateService dirLocatorService,
                         FileScanService fileScanService,
                         IEditorFileSystemFolderBrowseService folderBrowser)
 {
     Settings            = settings ?? throw new ArgumentNullException(nameof(settings));
     FileSystemProviders = providers ?? throw new ArgumentNullException(nameof(providers));
     ContentPlugIns      = contentPlugIns ?? throw new ArgumentNullException(nameof(contentPlugIns));
     ToolPlugIns         = toolPlugIns ?? throw new ArgumentNullException(nameof(toolPlugIns));
     _projectManager     = projectManager ?? throw new ArgumentNullException(nameof(projectManager));
     _viewModelInjection = viewModelInjection ?? throw new ArgumentNullException(nameof(viewModelInjection));
     _clipboard          = clipboardService ?? throw new ArgumentNullException(nameof(clipboardService));
     _dirLocator         = dirLocatorService ?? throw new ArgumentNullException(nameof(dirLocatorService));
     _fileScanService    = fileScanService ?? throw new ArgumentNullException(nameof(fileScanService));
     _folderBrowser      = folderBrowser ?? throw new ArgumentNullException(nameof(folderBrowser));
 }
Exemple #5
0
 public BuildSettingsExportCollection(IAssetExporter assetExporter, VirtualSerializedFile virtualFile, BuildSettings asset) :
     base(assetExporter, asset)
 {
     EditorBuildSettings = EditorBuildSettings.CreateVirtualInstance(virtualFile);
     EditorSettings      = EditorSettings.CreateVirtualInstance(virtualFile);
     if (!NavMeshProjectSettings.IsReadNavMeshProjectSettings(asset.File.Version))
     {
         NavMeshProjectSettings = NavMeshProjectSettings.CreateVirtualInstance(virtualFile);
     }
     if (!NetworkManager.IsReadNetworkManager(asset.File.Version))
     {
         NetworkManager = NetworkManager.CreateVirtualInstance(virtualFile);
     }
     if (!Physics2DSettings.IsReadPhysics2DSettings(asset.File.Version))
     {
         Physics2DSettings = Physics2DSettings.CreateVirtualInstance(virtualFile);
     }
     if (!UnityConnectSettings.IsReadUnityConnectSettings(asset.File.Version))
     {
         UnityConnectSettings = UnityConnectSettings.CreateVirtualInstance(virtualFile);
     }
 }
Exemple #6
0
    public bool Setup(Animator animator, EditorSettings editorSettings, float deltaTime,
                      NativeArray <MuscleHandle> headMuscles, NativeArray <MuscleHandle> spineMuscles)
    {
        if (!editorSettings.HasValidData())
        {
            return(false);
        }

        m_SkeletonHandle = animator.BindStreamTransform(editorSettings.bankTransform);

        m_HeadLeftRightMuscles  = headMuscles;
        m_SpineLeftRightMuscles = spineMuscles;

        m_HeadLeftRightMuscles[0] = new MuscleHandle(HeadDof.NeckLeftRight);
        m_HeadLeftRightMuscles[1] = new MuscleHandle(HeadDof.HeadLeftRight);

        m_SpineLeftRightMuscles[0] = new MuscleHandle(BodyDof.SpineLeftRight);
        m_SpineLeftRightMuscles[1] = new MuscleHandle(BodyDof.ChestLeftRight);
        m_SpineLeftRightMuscles[2] = new MuscleHandle(BodyDof.UpperChestLeftRight);


        return(true);
    }
        protected void Btn_Save_Click(object sender, EventArgs e)
        {
            SPWeb rootWeb    = SPContext.Current.Site.RootWeb;
            SPWeb currentWeb = SPContext.Current.Web;

            foreach (ListItem item in cbl_Common.Items)
            {
                if (settings.Common.ContainsKey(item.Value))
                {
                    settings.Common[item.Value] = item.Selected;
                }
                else
                {
                    settings.Common.Add(item.Value, item.Selected);
                }
            }

            foreach (ListItem item in cbl_Extra.Items)
            {
                if (settings.Extra.ContainsKey(item.Value))
                {
                    settings.Extra[item.Value] = item.Selected;
                }
                else
                {
                    settings.Extra.Add(item.Value, item.Selected);
                }
            }

            settings = settings.Save();

            var eventArgsJavaScript = String.Format("{{Message:'{0}',controlIDs:window.frameElement.dialogArgs}}", "The Properties have been updated.");

            ((EnhancedLayoutsPage)Page).EndOperation(ModalDialogResult.OK, eventArgsJavaScript);
            Context.Response.Flush();
            Context.Response.End();
        }
Exemple #8
0
 public DefaultEditorSettingsManager(ForegroundDispatcher foregroundDispatcher)
 {
     _foregroundDispatcher = foregroundDispatcher;
     _settings             = EditorSettings.Default;
 }
Exemple #9
0
 public void UpdateOptions(EditorSettings editorSettings)
 {
     EditorSettings = editorSettings;
 }
 public BuildSettingsExportCollection(IAssetExporter assetExporter, VirtualSerializedFile virtualFile, BuildSettings asset) :
     base(assetExporter, asset)
 {
     EditorBuildSettings = EditorBuildSettings.CreateVirtualInstance(virtualFile);
     EditorSettings      = EditorSettings.CreateVirtualInstance(virtualFile);
 }
Exemple #11
0
        public override void EnablePlugin()
        {
            base.EnablePlugin();

            if (Instance != null)
            {
                throw new InvalidOperationException();
            }
            Instance = this;

            var editorInterface   = GetEditorInterface();
            var editorBaseControl = editorInterface.GetBaseControl();

            editorSettings = editorInterface.GetEditorSettings();

            errorDialog = new AcceptDialog();
            editorBaseControl.AddChild(errorDialog);

            BottomPanel = new BottomPanel();

            bottomPanelBtn = AddControlToBottomPanel(BottomPanel, "Mono".TTR());

            AddChild(new HotReloadAssemblyWatcher {
                Name = "HotReloadAssemblyWatcher"
            });

            menuPopup = new PopupMenu();
            menuPopup.Hide();
            menuPopup.SetAsToplevel(true);

            AddToolSubmenuItem("Mono", menuPopup);

            // TODO: Remove or edit this info dialog once Mono support is no longer in alpha
            {
                menuPopup.AddItem("About C# support".TTR(), (int)MenuOptions.AboutCSharp);
                aboutDialog = new AcceptDialog();
                editorBaseControl.AddChild(aboutDialog);
                aboutDialog.WindowTitle = "Important: C# support is not feature-complete";

                // We don't use DialogText as the default AcceptDialog Label doesn't play well with the TextureRect and CheckBox
                // we'll add. Instead we add containers and a new autowrapped Label inside.

                // Main VBoxContainer (icon + label on top, checkbox at bottom)
                var aboutVBox = new VBoxContainer();
                aboutDialog.AddChild(aboutVBox);

                // HBoxContainer for icon + label
                var aboutHBox = new HBoxContainer();
                aboutVBox.AddChild(aboutHBox);

                var aboutIcon = new TextureRect();
                aboutIcon.Texture = aboutIcon.GetIcon("NodeWarning", "EditorIcons");
                aboutHBox.AddChild(aboutIcon);

                var aboutLabel = new Label();
                aboutHBox.AddChild(aboutLabel);
                aboutLabel.RectMinSize       = new Vector2(600, 150) * EditorScale;
                aboutLabel.SizeFlagsVertical = (int)Control.SizeFlags.ExpandFill;
                aboutLabel.Autowrap          = true;
                aboutLabel.Text =
                    "C# support in Godot Engine is in late alpha stage and, while already usable, " +
                    "it is not meant for use in production.\n\n" +
                    "Projects can be exported to Linux, macOS, Windows and Android, but not yet to iOS, HTML5 or UWP. " +
                    "Bugs and usability issues will be addressed gradually over future releases, " +
                    "potentially including compatibility breaking changes as new features are implemented for a better overall C# experience.\n\n" +
                    "If you experience issues with this Mono build, please report them on Godot's issue tracker with details about your system, MSBuild version, IDE, etc.:\n\n" +
                    "        https://github.com/godotengine/godot/issues\n\n" +
                    "Your critical feedback at this stage will play a great role in shaping the C# support in future releases, so thank you!";

                EditorDef("mono/editor/show_info_on_start", true);

                // CheckBox in main container
                aboutDialogCheckBox = new CheckBox {
                    Text = "Show this warning when starting the editor"
                };
                aboutDialogCheckBox.Connect("toggled", this, nameof(_ToggleAboutDialogOnStart));
                aboutVBox.AddChild(aboutDialogCheckBox);
            }

            if (File.Exists(GodotSharpDirs.ProjectSlnPath) && File.Exists(GodotSharpDirs.ProjectCsProjPath))
            {
                // Make sure the existing project has Api assembly references configured correctly
                CsProjOperations.FixApiHintPath(GodotSharpDirs.ProjectCsProjPath);
            }
            else
            {
                bottomPanelBtn.Hide();
                menuPopup.AddItem("Create C# solution".TTR(), (int)MenuOptions.CreateSln);
            }

            menuPopup.Connect("id_pressed", this, nameof(_MenuOptionPressed));

            var buildButton = new ToolButton
            {
                Text        = "Build",
                HintTooltip = "Build solution",
                FocusMode   = Control.FocusModeEnum.None
            };

            buildButton.Connect("pressed", this, nameof(_BuildSolutionPressed));
            AddControlToContainer(CustomControlContainer.Toolbar, buildButton);

            // External editor settings
            EditorDef("mono/editor/external_editor", ExternalEditorId.None);

            string settingsHintStr = "Disabled";

            if (OS.IsWindows)
            {
                settingsHintStr += $",MonoDevelop:{(int)ExternalEditorId.MonoDevelop}" +
                                   $",Visual Studio Code:{(int)ExternalEditorId.VsCode}" +
                                   $",JetBrains Rider:{(int)ExternalEditorId.Rider}";
            }
            else if (OS.IsOSX)
            {
                settingsHintStr += $",Visual Studio:{(int)ExternalEditorId.VisualStudioForMac}" +
                                   $",MonoDevelop:{(int)ExternalEditorId.MonoDevelop}" +
                                   $",Visual Studio Code:{(int)ExternalEditorId.VsCode}" +
                                   $",JetBrains Rider:{(int)ExternalEditorId.Rider}";
            }
            else if (OS.IsUnixLike())
            {
                settingsHintStr += $",MonoDevelop:{(int)ExternalEditorId.MonoDevelop}" +
                                   $",Visual Studio Code:{(int)ExternalEditorId.VsCode}" +
                                   $",JetBrains Rider:{(int)ExternalEditorId.Rider}";
            }

            editorSettings.AddPropertyInfo(new Godot.Collections.Dictionary
            {
                ["type"]        = Variant.Type.Int,
                ["name"]        = "mono/editor/external_editor",
                ["hint"]        = PropertyHint.Enum,
                ["hint_string"] = settingsHintStr
            });

            // Export plugin
            var exportPlugin = new ExportPlugin();

            AddExportPlugin(exportPlugin);
            exportPlugin.RegisterExportSettings();
            exportPluginWeak = WeakRef(exportPlugin);

            BuildManager.Initialize();
            RiderPathManager.Initialize();

            GodotIdeManager = new GodotIdeManager();
            AddChild(GodotIdeManager);
        }
 public NetworkConnectivitySettings()
 {
     Android = new AndroidSettings();
     Editor  = new EditorSettings();
 }
Exemple #13
0
        public override void EnablePlugin()
        {
            base.EnablePlugin();

            if (Instance != null)
            {
                throw new InvalidOperationException();
            }
            Instance = this;

            var editorInterface   = GetEditorInterface();
            var editorBaseControl = editorInterface.GetBaseControl();

            editorSettings = editorInterface.GetEditorSettings();

            errorDialog = new AcceptDialog();
            editorBaseControl.AddChild(errorDialog);

            BottomPanel = new BottomPanel();

            bottomPanelBtn = AddControlToBottomPanel(BottomPanel, "Mono".TTR());

            AddChild(new HotReloadAssemblyWatcher {
                Name = "HotReloadAssemblyWatcher"
            });

            menuPopup = new PopupMenu();
            menuPopup.Hide();

            AddToolSubmenuItem("Mono", menuPopup);

            // TODO: Remove or edit this info dialog once Mono support is no longer in alpha
            {
                menuPopup.AddItem("About C# support".TTR(), (int)MenuOptions.AboutCSharp);
                aboutDialog = new AcceptDialog();
                editorBaseControl.AddChild(aboutDialog);
                aboutDialog.Title = "Important: C# support is not feature-complete";

                // We don't use DialogText as the default AcceptDialog Label doesn't play well with the TextureRect and CheckBox
                // we'll add. Instead we add containers and a new autowrapped Label inside.

                // Main VBoxContainer (icon + label on top, checkbox at bottom)
                var aboutVBox = new VBoxContainer();
                aboutDialog.AddChild(aboutVBox);

                // HBoxContainer for icon + label
                var aboutHBox = new HBoxContainer();
                aboutVBox.AddChild(aboutHBox);

                var aboutIcon = new TextureRect();
                aboutIcon.Texture = aboutIcon.GetThemeIcon("NodeWarning", "EditorIcons");
                aboutHBox.AddChild(aboutIcon);

                var aboutLabel = new Label();
                aboutHBox.AddChild(aboutLabel);
                aboutLabel.RectMinSize       = new Vector2(600, 150) * EditorScale;
                aboutLabel.SizeFlagsVertical = (int)Control.SizeFlags.ExpandFill;
                aboutLabel.Autowrap          = true;
                aboutLabel.Text =
                    "C# support in Godot Engine is in late alpha stage and, while already usable, " +
                    "it is not meant for use in production.\n\n" +
                    "Projects can be exported to Linux, macOS, Windows, Android, iOS and HTML5, but not yet to UWP. " +
                    "Bugs and usability issues will be addressed gradually over future releases, " +
                    "potentially including compatibility breaking changes as new features are implemented for a better overall C# experience.\n\n" +
                    "If you experience issues with this Mono build, please report them on Godot's issue tracker with details about your system, MSBuild version, IDE, etc.:\n\n" +
                    "        https://github.com/godotengine/godot/issues\n\n" +
                    "Your critical feedback at this stage will play a great role in shaping the C# support in future releases, so thank you!";

                EditorDef("mono/editor/show_info_on_start", true);

                // CheckBox in main container
                aboutDialogCheckBox = new CheckBox {
                    Text = "Show this warning when starting the editor"
                };
                aboutDialogCheckBox.Toggled += enabled =>
                {
                    bool showOnStart = (bool)editorSettings.GetSetting("mono/editor/show_info_on_start");
                    if (showOnStart != enabled)
                    {
                        editorSettings.SetSetting("mono/editor/show_info_on_start", enabled);
                    }
                };
                aboutVBox.AddChild(aboutDialogCheckBox);
            }

            if (File.Exists(GodotSharpDirs.ProjectSlnPath) && File.Exists(GodotSharpDirs.ProjectCsProjPath))
            {
                try
                {
                    // Migrate solution from old configuration names to: Debug, ExportDebug and ExportRelease
                    DotNetSolution.MigrateFromOldConfigNames(GodotSharpDirs.ProjectSlnPath);

                    var msbuildProject = ProjectUtils.Open(GodotSharpDirs.ProjectCsProjPath)
                                         ?? throw new Exception("Cannot open C# project");

                    // NOTE: The order in which changes are made to the project is important

                    // Migrate csproj from old configuration names to: Debug, ExportDebug and ExportRelease
                    ProjectUtils.MigrateFromOldConfigNames(msbuildProject);

                    // Apply the other fixes only after configurations have been migrated

                    // Make sure the existing project has the ProjectTypeGuids property (for VisualStudio)
                    ProjectUtils.EnsureHasProjectTypeGuids(msbuildProject);

                    // Make sure the existing project has Api assembly references configured correctly
                    ProjectUtils.FixApiHintPath(msbuildProject);

                    // Make sure the existing project references the Microsoft.NETFramework.ReferenceAssemblies nuget package
                    ProjectUtils.EnsureHasNugetNetFrameworkRefAssemblies(msbuildProject);

                    if (msbuildProject.HasUnsavedChanges)
                    {
                        // Save a copy of the project before replacing it
                        FileUtils.SaveBackupCopy(GodotSharpDirs.ProjectCsProjPath);

                        msbuildProject.Save();
                    }
                }
                catch (Exception e)
                {
                    GD.PushError(e.ToString());
                }
            }
            else
            {
                bottomPanelBtn.Hide();
                menuPopup.AddItem("Create C# solution".TTR(), (int)MenuOptions.CreateSln);
            }

            menuPopup.IdPressed += _MenuOptionPressed;

            var buildButton = new Button
            {
                Text        = "Build",
                HintTooltip = "Build solution",
                FocusMode   = Control.FocusModeEnum.None
            };

            buildButton.PressedSignal += _BuildSolutionPressed;
            AddControlToContainer(CustomControlContainer.Toolbar, buildButton);

            // External editor settings
            EditorDef("mono/editor/external_editor", ExternalEditorId.None);

            string settingsHintStr = "Disabled";

            if (OS.IsWindows)
            {
                settingsHintStr += $",Visual Studio:{(int)ExternalEditorId.VisualStudio}" +
                                   $",MonoDevelop:{(int)ExternalEditorId.MonoDevelop}" +
                                   $",Visual Studio Code:{(int)ExternalEditorId.VsCode}" +
                                   $",JetBrains Rider:{(int)ExternalEditorId.Rider}";
            }
            else if (OS.IsOSX)
            {
                settingsHintStr += $",Visual Studio:{(int)ExternalEditorId.VisualStudioForMac}" +
                                   $",MonoDevelop:{(int)ExternalEditorId.MonoDevelop}" +
                                   $",Visual Studio Code:{(int)ExternalEditorId.VsCode}" +
                                   $",JetBrains Rider:{(int)ExternalEditorId.Rider}";
            }
            else if (OS.IsUnixLike)
            {
                settingsHintStr += $",MonoDevelop:{(int)ExternalEditorId.MonoDevelop}" +
                                   $",Visual Studio Code:{(int)ExternalEditorId.VsCode}" +
                                   $",JetBrains Rider:{(int)ExternalEditorId.Rider}";
            }

            editorSettings.AddPropertyInfo(new Godot.Collections.Dictionary
            {
                ["type"]        = Variant.Type.Int,
                ["name"]        = "mono/editor/external_editor",
                ["hint"]        = PropertyHint.Enum,
                ["hint_string"] = settingsHintStr
            });

            // Export plugin
            var exportPlugin = new ExportPlugin();

            AddExportPlugin(exportPlugin);
            exportPlugin.RegisterExportSettings();
            exportPluginWeak = WeakRef(exportPlugin);

            BuildManager.Initialize();
            RiderPathManager.Initialize();

            GodotIdeManager = new GodotIdeManager();
            AddChild(GodotIdeManager);
        }
 public abstract void Update(EditorSettings updateSettings);
Exemple #15
0
        /// <summary>
        /// Set options and load all settings in db store
        /// </summary>
        /// <param name="connectionString">Connection string to db store settings</param>
        /// <param name="contentRootPath">Thư mục root host web</param>
        public DbSetting(string connectionString, string contentRootPath)
        {
            _connectionString = connectionString;

            #region Khởi tạo common settings

            CommonSettings _commonSetting = new CommonSettings()
            {
                CmsPageSize             = 10,
                EncryptionKey           = Guid.NewGuid().ToString(),
                ParentToChildString     = " > ",
                DocumentWebsite         = "https://philoi.net",
                IsSystemInstalled       = false,
                ApplicationVersion      = "1.0.0",
                EmailSignature          = "<br /> plcms",
                AdminEmailsSystemNotify = "*****@*****.**",
            };
            _common = JsonSerializer.Deserialize <CommonSettings>(GetSettingsOfCreateIfNotExist(JsonSerializer.Serialize(_commonSetting), CommonSettingPath, "Thiết lập common settings cho hệ thống."));

            #endregion Khởi tạo common settings

            #region Khởi tạo upload settings

            UploadSettings _uploadSettings = new UploadSettings()
            {
                DomainImgPath          = "/uploaded/images/",
                UploadImgPath          = Path.Combine(contentRootPath, "wwwroot\\uploaded\\images"),
                ImageAllowedExtensions = "bmp,gif,jpeg,jpg,png,ico",
                ImageMaxSize           = 10485760, //10mb
                ImgResizeList          = "",       //100,250*300,500

                DomainVideoPath        = "/uploaded/videos/",
                UploadVideoPath        = Path.Combine(contentRootPath, "wwwroot\\uploaded\\videos"),
                VideoAllowedExtensions = "mp4,flv,avi,mpc,mpeg,mpg",
                VideoMaxSize           = 104857600, //100mb

                DomainFilePath        = "/uploaded/files/",
                UploadFilePath        = Path.Combine(contentRootPath, "wwwroot\\uploaded\\files"),
                FileAllowedExtensions = "7z,doc,docx,gz,gzip,ods,odt,pdf,ppt,pptx,pxd,qt,rar,rtf,swf,tar,tgz,tif,tiff,txt,vsd,xls,xlsx,zip",
                FileMaxSize           = 104857600, //10mb

                DomainAudioPath        = "/uploaded/audios/",
                UploadAudioPath        = Path.Combine(contentRootPath, "wwwroot\\uploaded\\audios"),
                AudioAllowedExtensions = "mp3,mov,mid,wav,wma,wmv",
                AudioMaxSize           = 104857600, //10mb

                DefaultImageFrameRate = "790x390"
            };
            _upload = JsonSerializer.Deserialize <UploadSettings>(GetSettingsOfCreateIfNotExist(JsonSerializer.Serialize(_uploadSettings), UploadSettingPath, "Thiết lập upload cho hệ thống."));

            #endregion Khởi tạo upload settings

            #region Khởi tạo url settings

            UrlSettings urlSettings = new UrlSettings()
            {
                CmsDomain        = "https://cms.philoi.net/",
                WebDomain        = "https://philoi.net/",
                MobileDomain     = "https://philoi.net/",
                ApiDomain        = "https://qpi.philoi.net/",
                FileNotFoundPage = "/notfound.html",
                ErrorPage        = "/error.html",
                AccessDeniedPage = "/accessdenied.html",
                SupportSite      = "",

                LoginPage           = "/Login",
                LogoutPage          = "/Logout",
                PasswordChangerPage = "/ChangePassword",
                ForgotPasswordPage  = "/ForgotPassword",
                RegisterPage        = "/Register",
                UserActivePage      = "/UserActive",
            };
            _url = JsonSerializer.Deserialize <UrlSettings>(GetSettingsOfCreateIfNotExist(JsonSerializer.Serialize(urlSettings), UrlSettingPath, "Thiết lập url cho hệ thống."));

            #endregion Khởi tạo url settings

            #region Khởi tạo editor settings

            EditorSettings _editorSetting = new EditorSettings()
            {
                BaseDir = Path.Combine(contentRootPath, "wwwroot\\uploaded\\editor"),
                BaseUrl = "/uploaded/editor",
                FileAllowedExtensions  = "7z,aiff,asf,avi,bmp,csv,doc,docx,fla,flv,gif,gz,gzip,jpeg,jpg,mid,mov,mp3,mp4,mpc,mpeg,mpg,ods,odt,pdf,png,ppt,pptx,pxd,qt,ram,rar,rm,rmi,rmvb,rtf,sdc,sitd,swf,sxc,sxw,tar,tgz,tif,tiff,txt,vsd,wav,wma,wmv,xls,xlsx,zip",
                FileMaxSize            = 10485760, //10mb
                FlashAllowedExtensions = "swf,flv",
                FlashMaxSize           = 10485760, //10mb
                ImageAllowedExtensions = "bmp,gif,jpeg,jpg,png",
                ImageMaxSize           = 10485760, //10mb
                ImageHeightMax         = 1200,
                ImageWidthMax          = 1600,
                ThumbnailsEnable       = true
            };
            _editor = JsonSerializer.Deserialize <EditorSettings>(GetSettingsOfCreateIfNotExist(JsonSerializer.Serialize(_editorSetting), EditorSettingPath, "Thiết lập editor cho hệ thống."));

            #endregion Khởi tạo editor settings

            #region Khởi tạo seo settings

            SeoSettings _seoSettings = new SeoSettings()
            {
                PageTitleSeparator      = " | ",
                AllowUnicodeCharsInUrls = false,
                SiteNameIsFist          = false,
                EnableSocialNetworking  = false,
                FacebookLink            = "#",
                TwitterLink             = "#",
                GoogleLink           = "#",
                YoutubeLink          = "#",
                Rss                  = "/rss",
                FacebookLikeButton   = true,
                GoogleAddOneButton   = true,
                TwitterButton        = true,
                FacebookShareButton  = true,
                GoogleShareButton    = true,
                TwitterShareButton   = true,
                AllShareButton       = true,
                EnableTagCloud       = true,
                SearchByGoogle       = false,
                SiteLogoName         = "logo.png",
                SiteIconName         = "favicon.ico",
                SiteImageName        = "siteimage.jpg",
                GmapUrl              = "https://www.google.com/maps/ms?msa=0&amp;msid=214530300839439902003.0004f957442204ea3ea14&amp;hl=vi&amp;ie=UTF8&amp;t=m&amp;z=13&amp;output=embed",
                FooterHtmlAdditional = "",
                HeaderHtmlAdditional = "<meta property=\"fb:admins\" content=\"100003131310461\">" +
                                       "<meta name=\"geo.placename\" content=\"Ha Noi, Viet Nam\" />" +
                                       "<meta name=\"geo.region\" content=\"VN-HN\" />" +
                                       "<meta name=\"geo.position\" content=\"21.030624;105.782431\" />",
                GoogleServiceAccountJson = "",
                GoogleAnalyticViewId     = ""
            };
            _seo = JsonSerializer.Deserialize <SeoSettings>(GetSettingsOfCreateIfNotExist(JsonSerializer.Serialize(_seoSettings), SeoSettingPath, "Thiết lập ceo cho hệ thống."));

            #endregion Khởi tạo seo settings

            #region Khởi tạo captcha settings

            CaptchaSettings _captchaSetting = new CaptchaSettings()
            {
                Enabled                = false,
                ShowOnLoginPage        = true,
                ShowOnRegistrationPage = true,
                SecretKey              = "6LczFUAUAAAAANwZ5p5_J941EhemD76_RuW-PX9k",
                Theme   = "white",
                Type    = "image",
                Size    = "normal",
                SiteKey = "6LczFUAUAAAAAGiO0bgV1DLASbFPbYjT-62ZFYO_",
                ShowOnForgotPasswordPage = true,
            };
            _captcha = JsonSerializer.Deserialize <CaptchaSettings>(GetSettingsOfCreateIfNotExist(JsonSerializer.Serialize(_captchaSetting), CaptchaSettingPath, "Thiết lập captcha cho hệ thống."));

            #endregion Khởi tạo captcha settings

            #region Khởi tạo user settings

            UserSettings _userSettings = new UserSettings()
            {
                AvatarResizeList              = "",
                UploadAvatarPath              = Path.Combine(contentRootPath, "wwwroot\\uploaded\\avatar"),
                DomainAvatarPath              = "/uploaded/avatar/",
                NewTimeInSeconds              = 60 * 60 * 24 * 7,
                AvatarImageAllowedExtensions  = "bmp,gif,jpeg,jpg,png",
                AvatarImageMaxSize            = 10485760, //10mb
                UserIsActiveOnRegister        = false,
                RegisterIsEnable              = true,
                RecoveryPasswordLinkEnableDay = 7,
                EmailListGiveUserCreated      = "*****@*****.**",
                EmailListGiveContatsCreated   = "*****@*****.**",
                FacebookApplicationId         = "638979723189534",
                FacebookApplicationSecret     = "",
                GoogleClientId         = "",
                GoogleClientSecret     = "",
                TwitterConsumerKey     = "",
                TwitterConsumerSecret  = "",
                IsLoginByFacebook      = false,
                IsLoginByGoogle        = false,
                IsLoginByTwitter       = false,
                IsLoginMicrosoft       = false,
                LockoutOnFailure       = false,
                MicrosoftClientId      = "",
                MicrosoftClientSecret  = "",
                DefaultLockoutTimeSpan = 1800,
                MaxFailedLoginAttempts = 10,
                DefaultAvatarFrameRate = "790x390"
            };
            _user = JsonSerializer.Deserialize <UserSettings>(GetSettingsOfCreateIfNotExist(JsonSerializer.Serialize(_userSettings), UserSettingPath, "Thiết lập user cho hệ thống."));

            #endregion Khởi tạo user settings
        }
 protected override void OnInit(EventArgs e)
 {
     base.OnInit(e);
     settings = new EditorSettings();
     settings = settings.Load();
 }
Exemple #17
0
 public DefaultEditorSettingsManager(ProjectSnapshotManagerDispatcher projectSnapshotManagerDispatcher)
 {
     _projectSnapshotManagerDispatcher = projectSnapshotManagerDispatcher;
     _settings = EditorSettings.Default;
 }
Exemple #18
0
 public EditorSettingView(EditorSettings settings)
 {
     InitializeComponent();
     DataContext = new EditorSettingViewModel(settings);
 }
Exemple #19
0
        private static void AlohaEditor(Page page)
        {
            if (SPContext.Current.FormContext.FormMode == SPControlMode.Edit)
            {
                CssRegistration.Register("/_layouts/Hemrika/Editor/css/aloha.css");
                CssRegistration.Register("http://code.jquery.com/ui/1.9.2/themes/base/jquery-ui.css");
                if (!page.ClientScript.IsClientScriptIncludeRegistered("HTML5Editor"))
                {
                    /*
                     * HtmlGenericControl jqueryUi = new HtmlGenericControl("script");
                     * jqueryUi.Attributes["type"] = "text/javascript";
                     * jqueryUi.Attributes["src"] = "http://code.jquery.com/ui/1.9.2/jquery-ui.min.js";
                     *
                     * page.Header.Controls.Add(jqueryUi);
                     */

                    HtmlGenericControl require = new HtmlGenericControl("script");
                    require.Attributes["type"] = "text/javascript";
                    require.Attributes["src"]  = "/_layouts/Hemrika/Editor/lib/require.js";
                    //require.Attributes["async"]
                    //require.Attributes["defer"]
                    page.Header.Controls.Add(require);

                    HtmlGenericControl aloha = new HtmlGenericControl("script");
                    aloha.Attributes["type"] = "text/javascript";
                    aloha.Attributes["src"]  = "/_layouts/Hemrika/Editor/lib/aloha.js";
                    EditorSettings settings = new EditorSettings();
                    settings = settings.Load();

                    StringBuilder plugins = new StringBuilder();

                    foreach (DictionaryEntry entry in settings.Common)
                    {
                        bool used = bool.Parse(entry.Value.ToString());
                        if (used)
                        {
                            plugins.Append("common/" + entry.Key.ToString().ToLower() + ",");
                        }
                    }

                    foreach (DictionaryEntry entry in settings.Extra)
                    {
                        bool used = bool.Parse(entry.Value.ToString());
                        if (used)
                        {
                            plugins.Append("extra/" + entry.Key.ToString().ToLower() + ",");
                        }
                    }

                    if (plugins.Length > 0)
                    {
                        plugins = plugins.Remove(plugins.Length - 1, 1);

                        //aloha.Attributes["data-aloha-plugins"] = "common/ui,common/format,common/highlighteditables,common/link";
                        aloha.Attributes["data-aloha-plugins"] = plugins.ToString();// "common/ui,common/format,common/table,common/list,common/link,common/summery,common/highlighteditables,common/undo,common/contenthandler,common/paste,common/characterpicker,common/commands,common/block,common/horizontalruler,common/align,common/dom-to-xhtml,extra/formatlesspaste,extra/toc,extra/headerids,extra/listenforcer,extra/metaview,extra/linkbrowser,extra/cite,extra/htmlsource";
                        page.Header.Controls.Add(aloha);
                        //Page.ClientScript.RegisterClientScriptInclude(typeof(EnhancedLayoutsPage), "HTML5Editor", "");

                        HtmlGenericControl config = new HtmlGenericControl("script");
                        config.Attributes["type"] = "text/javascript";
                        config.Attributes["src"]  = "/_layouts/Hemrika/Content/AlohaConfiguration.aspx";

                        page.Header.Controls.Add(config);

                        ScriptManager.RegisterOnSubmitStatement(page, page.GetType(), "HTML5Editor", "HTML5Editor();");
                    }
                }
            }
        }
Exemple #20
0
 /// <summary>
 /// Initializes a new instance of the <see cref="EditorFileOpenDialogService"/> class.
 /// </summary>
 /// <param name="settings">The application settings.</param>
 /// <param name="providers">The providers used for opening/saving files.</param>
 public EditorFileOpenDialogService(EditorSettings settings, IFileSystemProviders providers)
 {
     Settings  = settings;
     Providers = providers;
 }
 public NetworkConnectivitySettings()
 {
     Android		= new AndroidSettings();
     Editor		= new EditorSettings();
 }
Exemple #22
0
 public static bool IsExternalEditorSetToRider(EditorSettings editorSettings)
 {
     return(editorSettings.HasSetting(EditorPathSettingName) &&
            IsRider((string)editorSettings.GetSetting(EditorPathSettingName)));
 }
Exemple #23
0
        public override void _EnablePlugin()
        {
            base._EnablePlugin();

            if (Instance != null)
            {
                throw new InvalidOperationException();
            }
            Instance = this;

            var editorInterface   = GetEditorInterface();
            var editorBaseControl = editorInterface.GetBaseControl();

            _editorSettings = editorInterface.GetEditorSettings();

            _errorDialog = new AcceptDialog();
            editorBaseControl.AddChild(_errorDialog);

            MSBuildPanel    = new MSBuildPanel();
            _bottomPanelBtn = AddControlToBottomPanel(MSBuildPanel, "MSBuild".TTR());

            AddChild(new HotReloadAssemblyWatcher {
                Name = "HotReloadAssemblyWatcher"
            });

            _menuPopup = new PopupMenu();
            _menuPopup.Hide();

            AddToolSubmenuItem("C#", _menuPopup);

            var buildSolutionShortcut = (Shortcut)EditorShortcut("mono/build_solution");

            _toolBarBuildButton = new Button
            {
                Text              = "Build",
                HintTooltip       = "Build Solution".TTR(),
                FocusMode         = Control.FocusModeEnum.None,
                Shortcut          = buildSolutionShortcut,
                ShortcutInTooltip = true
            };
            _toolBarBuildButton.PressedSignal += BuildSolutionPressed;
            AddControlToContainer(CustomControlContainer.Toolbar, _toolBarBuildButton);

            if (File.Exists(GodotSharpDirs.ProjectSlnPath) && File.Exists(GodotSharpDirs.ProjectCsProjPath))
            {
                ApplyNecessaryChangesToSolution();
            }
            else
            {
                _bottomPanelBtn.Hide();
                _toolBarBuildButton.Hide();
                _menuPopup.AddItem("Create C# solution".TTR(), (int)MenuOptions.CreateSln);
            }

            _menuPopup.IdPressed += _MenuOptionPressed;

            // External editor settings
            EditorDef("mono/editor/external_editor", ExternalEditorId.None);

            string settingsHintStr = "Disabled";

            if (OS.IsWindows)
            {
                settingsHintStr += $",Visual Studio:{(int)ExternalEditorId.VisualStudio}" +
                                   $",MonoDevelop:{(int)ExternalEditorId.MonoDevelop}" +
                                   $",Visual Studio Code:{(int)ExternalEditorId.VsCode}" +
                                   $",JetBrains Rider:{(int)ExternalEditorId.Rider}";
            }
            else if (OS.IsMacOS)
            {
                settingsHintStr += $",Visual Studio:{(int)ExternalEditorId.VisualStudioForMac}" +
                                   $",MonoDevelop:{(int)ExternalEditorId.MonoDevelop}" +
                                   $",Visual Studio Code:{(int)ExternalEditorId.VsCode}" +
                                   $",JetBrains Rider:{(int)ExternalEditorId.Rider}";
            }
            else if (OS.IsUnixLike)
            {
                settingsHintStr += $",MonoDevelop:{(int)ExternalEditorId.MonoDevelop}" +
                                   $",Visual Studio Code:{(int)ExternalEditorId.VsCode}" +
                                   $",JetBrains Rider:{(int)ExternalEditorId.Rider}";
            }

            _editorSettings.AddPropertyInfo(new Godot.Collections.Dictionary
            {
                ["type"]        = Variant.Type.Int,
                ["name"]        = "mono/editor/external_editor",
                ["hint"]        = PropertyHint.Enum,
                ["hint_string"] = settingsHintStr
            });

            // Export plugin
            var exportPlugin = new ExportPlugin();

            AddExportPlugin(exportPlugin);
            exportPlugin.RegisterExportSettings();
            _exportPluginWeak = WeakRef(exportPlugin);

            try
            {
                // At startup we make sure NuGet.Config files have our Godot NuGet fallback folder included
                NuGetUtils.AddFallbackFolderToUserNuGetConfigs(NuGetUtils.GodotFallbackFolderName, NuGetUtils.GodotFallbackFolderPath);
            }
            catch (Exception e)
            {
                GD.PushError("Failed to add Godot NuGet Offline Packages to NuGet.Config: " + e.Message);
            }

            BuildManager.Initialize();
            RiderPathManager.Initialize();

            GodotIdeManager = new GodotIdeManager();
            AddChild(GodotIdeManager);
        }
 private void PopulateListBox(ListBox listBox, EditorSettings settings)
 {
     listBox.ItemsSource = settings.ColorOptions;
 }
Exemple #25
0
        bool OnGUISetMeshShadowReceiver()
        {
            MeshShadowReceiver receiver = null;

            if (0 < m_projectorManager.receivers.Count)
            {
                receiver = m_projectorManager.receivers[0] as MeshShadowReceiver;
            }
            MeshShadowReceiver newReceiver = EditorGUILayout.ObjectField("Mesh Shadow Receiver", receiver, typeof(MeshShadowReceiver), true) as MeshShadowReceiver;

            if (receiver != newReceiver)
            {
                Undo.RecordObject(m_projectorManager, "Easy Setup: Select Shadow Receiver");
                if (receiver != null)
                {
                    m_projectorManager.RemoveReceiver(receiver);
                }
                if (newReceiver != null)
                {
                    m_projectorManager.AddReceiver(newReceiver);
                }
                EditorUtility.SetDirty(m_projectorManager);
                receiver = newReceiver;
            }
            EditorGUILayout.BeginHorizontal();
            GUILayout.FlexibleSpace();
            if (GUILayout.Button("Create a New Shadow Receiver"))
            {
                GameObject go = new GameObject("Shadow Receiver");
                newReceiver = go.AddComponent <MeshShadowReceiver>();
                EditorSettings editorSettings = EditorSettings.GetSettings(UnityEditor.MonoScript.FromScriptableObject(this));
                Renderer       renderer       = newReceiver.GetComponent <Renderer>();
                renderer.sharedMaterial = editorSettings.m_defaultReceiverMaterial;
#if (UNITY_4_3 || UNITY_4_4 || UNITY_4_5 || UNITY_4_6 || UNITY_4_7) // support Unity 4.3 or later
                renderer.castShadows = false;
#else
                renderer.shadowCastingMode    = UnityEngine.Rendering.ShadowCastingMode.Off;
                renderer.reflectionProbeUsage = UnityEngine.Rendering.ReflectionProbeUsage.Off;
#endif
                renderer.useLightProbes = false;
                renderer.receiveShadows = false;
                newReceiver.hasNormals  = true;
                go.transform.parent     = m_projectorManager.transform;
                Undo.RegisterCreatedObjectUndo(go, "Easy Setup: Create Shadow Receiver");
                Undo.RecordObject(m_projectorManager, "Easy Setup: Create Shadow Receiver");
                if (receiver != null)
                {
                    m_projectorManager.RemoveReceiver(receiver);
                }
                if (newReceiver != null)
                {
                    m_projectorManager.AddReceiver(newReceiver);
                }
                EditorUtility.SetDirty(m_projectorManager);
                receiver = newReceiver;
            }
            EditorGUILayout.EndHorizontal();
            GUILayout.TextArea("Mesh Shadow Receiver is necessary for casting shadows on the environment mesh surface. " +
                               "If the environment is flat or doesn't have high curvature points, you don't need Mesh Shadow Receiver. " +
                               "Instead, shadows can be casted on an infinite plane or a tangent plane at a point where raycast hits.");
            m_isAbleToGoNext = true;
            return(true);
        }
Exemple #26
0
 /// <summary>
 /// Save settings
 /// </summary>
 public static void Save()
 {
     EditorSettings.Save();
 }
        public override void EnablePlugin()
        {
            base.EnablePlugin();

            if (Instance != null)
            {
                throw new InvalidOperationException();
            }
            Instance = this;

            var editorInterface   = GetEditorInterface();
            var editorBaseControl = editorInterface.GetBaseControl();

            _editorSettings = editorInterface.GetEditorSettings();

            _errorDialog = new AcceptDialog();
            editorBaseControl.AddChild(_errorDialog);

            MSBuildPanel    = new MSBuildPanel();
            _bottomPanelBtn = AddControlToBottomPanel(MSBuildPanel, "MSBuild".TTR());

            AddChild(new HotReloadAssemblyWatcher {
                Name = "HotReloadAssemblyWatcher"
            });

            _menuPopup = new PopupMenu();
            _menuPopup.Hide();
            _menuPopup.SetAsToplevel(true);

            AddToolSubmenuItem("C#", _menuPopup);

            var buildSolutionShortcut = (ShortCut)EditorShortcut("mono/build_solution");

            _toolBarButton = new ToolButton
            {
                Text              = "Build",
                HintTooltip       = "Build Solution".TTR(),
                FocusMode         = Control.FocusModeEnum.None,
                Shortcut          = buildSolutionShortcut,
                ShortcutInTooltip = true
            };
            _toolBarButton.Connect("pressed", this, nameof(BuildSolutionPressed));
            AddControlToContainer(CustomControlContainer.Toolbar, _toolBarButton);

            if (File.Exists(GodotSharpDirs.ProjectSlnPath) && File.Exists(GodotSharpDirs.ProjectCsProjPath))
            {
                ApplyNecessaryChangesToSolution();
            }
            else
            {
                _bottomPanelBtn.Hide();
                _toolBarButton.Hide();
                _menuPopup.AddItem("Create C# solution".TTR(), (int)MenuOptions.CreateSln);
            }

            _menuPopup.Connect("id_pressed", this, nameof(_MenuOptionPressed));

            // External editor settings
            EditorDef("mono/editor/external_editor", ExternalEditorId.None);

            string settingsHintStr = "Disabled";

            if (OS.IsWindows)
            {
                settingsHintStr += $",Visual Studio:{(int)ExternalEditorId.VisualStudio}" +
                                   $",MonoDevelop:{(int)ExternalEditorId.MonoDevelop}" +
                                   $",Visual Studio Code:{(int)ExternalEditorId.VsCode}" +
                                   $",JetBrains Rider:{(int)ExternalEditorId.Rider}";
            }
            else if (OS.IsOSX)
            {
                settingsHintStr += $",Visual Studio:{(int)ExternalEditorId.VisualStudioForMac}" +
                                   $",MonoDevelop:{(int)ExternalEditorId.MonoDevelop}" +
                                   $",Visual Studio Code:{(int)ExternalEditorId.VsCode}" +
                                   $",JetBrains Rider:{(int)ExternalEditorId.Rider}";
            }
            else if (OS.IsUnixLike)
            {
                settingsHintStr += $",MonoDevelop:{(int)ExternalEditorId.MonoDevelop}" +
                                   $",Visual Studio Code:{(int)ExternalEditorId.VsCode}" +
                                   $",JetBrains Rider:{(int)ExternalEditorId.Rider}";
            }

            _editorSettings.AddPropertyInfo(new Godot.Collections.Dictionary
            {
                ["type"]        = Variant.Type.Int,
                ["name"]        = "mono/editor/external_editor",
                ["hint"]        = PropertyHint.Enum,
                ["hint_string"] = settingsHintStr
            });

            // Export plugin
            var exportPlugin = new ExportPlugin();

            AddExportPlugin(exportPlugin);
            exportPlugin.RegisterExportSettings();
            _exportPluginWeak = WeakRef(exportPlugin);

            BuildManager.Initialize();
            RiderPathManager.Initialize();

            GodotIdeManager = new GodotIdeManager();
            AddChild(GodotIdeManager);
        }
        public static void setupAssist(int lastUndoneSetupStep, ref Dictionary <string, string> settings)
        {
            switch (lastUndoneSetupStep)
            {
            case 0:
                frmSetupFrame WelcomeForm = new frmSetupFrame();
                WelcomeForm.AutoSize      = true;
                WelcomeForm.StartPosition = FormStartPosition.CenterScreen;
                WelcomeForm.Text          = "Einrichtung: Schritt 1 von 3 || Willkommen";

                Welcome w = new Welcome();
                w.Dock = DockStyle.Fill;
                WelcomeForm.panel.Controls.Add(w);
                WelcomeForm.CancelButton = w.btnCancel;
                if (WelcomeForm.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                {
                    settings = DataManager.LoadSettings();
                    settings["lastUndoneSetupStep"] = "1";
                    DataManager.SaveSettings(settings);
                    frmSetupFrame BaseData = new frmSetupFrame();
                    BaseData.Text          = "Einrichtung: Schritt 2 von 3 || Stammdaten eintragen";
                    BaseData.AutoSize      = true;
                    BaseData.StartPosition = FormStartPosition.CenterScreen;

                    EditorBaseData bde = new EditorBaseData();
                    bde.Dock = DockStyle.Fill;
                    BaseData.AcceptButton = bde.btnSave;

                    BaseData.panel.Controls.Add(bde);
                    if (BaseData.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                    {
                        settings = DataManager.LoadSettings();
                        settings["lastUndoneSetupStep"] = "2";
                        DataManager.SaveSettings(settings);
                        frmSetupFrame SetupPreferences = new frmSetupFrame();
                        SetupPreferences.Text          = "Einrichtung: Schritt 3 von 3 || Grundeinstellungen";
                        SetupPreferences.StartPosition = FormStartPosition.CenterScreen;
                        SetupPreferences.AutoSize      = true;
                        SetupPreferences.Size          = new System.Drawing.Size(0, 0);


                        EditorSettings bs = new EditorSettings();
                        bs.Dock = DockStyle.Fill;
                        SetupPreferences.AcceptButton = bs.btnSave;
                        SetupPreferences.CancelButton = bs.btnCancel;

                        SetupPreferences.panel.Controls.Add(bs);
                        if (SetupPreferences.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                        {
                            settings = DataManager.LoadSettings();
                            settings["lastUndoneSetupStep"] = "3";
                            DataManager.SaveSettings(settings);
                            frmSetupFrame FirstHelp = new frmSetupFrame();
                        }    //FirstHelp.Show();
                        else
                        {
                            Environment.Exit(0);
                        }
                    }
                    else
                    {
                        Environment.Exit(0);
                    }
                }
                else
                {
                    Environment.Exit(0);
                }
                break;

            case 1:
                frmSetupFrame BaseData1 = new frmSetupFrame();
                BaseData1.Text          = "Einrichtung: Schritt 2 von 3 || Stammdaten eintragen";
                BaseData1.AutoSize      = true;
                BaseData1.StartPosition = FormStartPosition.CenterScreen;

                EditorBaseData bde1 = new EditorBaseData();
                bde1.Dock = DockStyle.Fill;
                BaseData1.AcceptButton = bde1.btnSave;

                BaseData1.panel.Controls.Add(bde1);
                if (BaseData1.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                {
                    frmSetupFrame SetupPreferences = new frmSetupFrame();
                    SetupPreferences.Text          = "Einrichtung: Schritt 3 von 3 || Grundeinstellungen";
                    SetupPreferences.StartPosition = FormStartPosition.CenterScreen;
                    SetupPreferences.AutoSize      = true;
                    SetupPreferences.Size          = new System.Drawing.Size(0, 0);


                    EditorSettings bs = new EditorSettings();
                    bs.Dock = DockStyle.Fill;
                    SetupPreferences.AcceptButton = bs.btnSave;
                    SetupPreferences.CancelButton = bs.btnCancel;

                    SetupPreferences.panel.Controls.Add(bs);
                    settings = DataManager.LoadSettings();
                    settings["lastUndoneSetupStep"] = "2";
                    DataManager.SaveSettings(settings);
                    if (SetupPreferences.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                    {
                        settings = DataManager.LoadSettings();
                        settings["lastUndoneSetupStep"] = "3";
                        DataManager.SaveSettings(settings);
                    }    //FirstHelp.Show();

                    else
                    {
                        Environment.Exit(0);
                    }
                }
                else
                {
                    Environment.Exit(0);
                }
                break;

            case 2:
                frmSetupFrame SetupPreferences2 = new frmSetupFrame();
                SetupPreferences2.Text          = "Einrichtung: Schritt 3 von 3 || Grundeinstellungen";
                SetupPreferences2.StartPosition = FormStartPosition.CenterScreen;
                SetupPreferences2.AutoSize      = true;
                SetupPreferences2.Size          = new System.Drawing.Size(0, 0);

                EditorSettings bs2 = new EditorSettings();
                bs2.Dock = DockStyle.Fill;
                SetupPreferences2.AcceptButton = bs2.btnSave;
                SetupPreferences2.CancelButton = bs2.btnCancel;

                SetupPreferences2.panel.Controls.Add(bs2);
                if (SetupPreferences2.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                {
                    settings = DataManager.LoadSettings();
                    settings["lastUndoneSetupStep"] = "1";
                    DataManager.SaveSettings(settings);
                }    //FirstHelp.Show();
                else
                {
                    Environment.Exit(0);
                }
                break;

            case 3:
                break;

            default:
                Environment.Exit(0);
                break;
            }
        }
Exemple #29
0
 public VisualStudioParserOptionsFeature(EditorSettings settings)
 {
     _settings = settings;
 }
 public SqlPreviewHandler(ICSharpCode.AvalonEdit.TextEditor editor, EditorSettings settings)
 {
     _editor   = editor;
     _settings = settings;
 }