예제 #1
0
        private async void onShortcutKeyPressed(string action)
        {
            if (action == KeyboardBindings.BreakDebugger)
            {
                await BreakDebuggerForm.Show(_editor);

                return;
            }
            if (action == KeyboardBindings.FindObject)
            {
                await FindObjectForm.Show(_editor);

                return;
            }
            if (!_panel?.Visible ?? false)
            {
                return;
            }

            if (action == KeyboardBindings.Undo)
            {
                _inspector?.Inspector?.Undo();
            }
            else if (action == KeyboardBindings.Redo)
            {
                _inspector?.Inspector?.Redo();
            }
            else if (action == KeyboardBindings.Save)
            {
                string baseFolder = Path.GetDirectoryName(_editor.Project.AGSProjectPath);
                CSharpCodeGeneartor codeGeneartor = new CSharpCodeGeneartor(_editor.Project.Model);
                _editor.Project.Model.GenerateCode(baseFolder, codeGeneartor);
                _editor.Project.Model.Save(AGSEditor.Platform, _editor.Editor, baseFolder);
            }
        }
예제 #2
0
        private void onShortcutKeyPressed(string action)
        {
            if (!_panel?.Visible ?? false)
            {
                return;
            }

            if (action == KeyboardBindings.Undo)
            {
                _inspector?.Inspector?.Undo();
            }
            else if (action == KeyboardBindings.Redo)
            {
                _inspector?.Inspector?.Redo();
            }
            else if (action == KeyboardBindings.Save)
            {
                string baseFolder = Path.GetDirectoryName(_editor.Project.AGSProjectPath);
                CSharpCodeGeneartor codeGeneartor = new CSharpCodeGeneartor(_editor.Project.Model);
                _editor.Project.Model.GenerateCode(baseFolder, codeGeneartor);
                _editor.Project.Model.Save(baseFolder);
            }
        }