private void EditRule(Node node) { if (node.Tag is Rule) { var rule = (Rule)node.Tag; if (string.IsNullOrEmpty(rule.Script)) { var ruleEditor = new RuleEditor(rule, false); ruleEditor.Location = Location; ruleEditor.ShowDialog(); if (ruleEditor.Save) { node.Tag = rule; node.Text = rule.Name; } } else { var scriptEditor = new ScriptEditor(rule); scriptEditor.Location = Location; scriptEditor.ShowDialog(); if (scriptEditor.Save) { node.Tag = rule; node.Text = rule.Name; } } } }
void Awake() { if (instance == null) { instance = this; } }
if (evArgs.ZoomType == ZoomToFileZoomType.ZoomToCharacterPosition) { editor.GoToLineOfCharacterPosition(evArgs.ZoomPosition, evArgs.SelectLine); } else if (evArgs.ZoomType != ZoomToFileZoomType.DoNotMoveCursor) { if (evArgs.ZoomToText != null) { evArgs.ZoomPosition = editor.GetLineNumberForText(evArgs.ZoomToText); } editor.GoToLine(evArgs.ZoomPosition, evArgs.SelectLine, evArgs.ZoomToLineAfterOpeningBrace); if (evArgs.IsDebugExecutionPoint) { editor.SetExecutionPointMarker(evArgs.ZoomPosition); if (evArgs.ErrorMessage != null) { editor.SetErrorMessagePopup(evArgs.ErrorMessage); } } } } } }
private ScriptEditor CreateOrShowEditorForScript(string scriptName, bool activateEditor) { Script chosenItem; if (!scriptName.Contains(".")) { scriptName += ".asc"; } var scriptEditor = GetScriptEditor(scriptName, out chosenItem); if (chosenItem == null) { return(null); } _lastActivated = scriptEditor; ContentDocument document = _editors[chosenItem]; document.TreeNodeID = GetNodeID(chosenItem); _guiController.AddOrShowPane(document); if (activateEditor) { // Hideous hack -- we need to allow the current message to // finish processing before setting the focus to the // script window, or it will fail _timerActivateWindow = true; _timer.Start(); } return(_lastActivated); }
public override Form CreateForm(object value) { string scriptName = (string)value; script = null; wasGenerated = false; // Open the script this property is referencing. if (scriptName.Length > 0) { script = EditorControl.World.GetScript(scriptName); } // If it is null, create a new hidden script. if (script == null) { script = EditorControl.GenerateInternalScript(); wasGenerated = true; if (PropertyGrid.PropertyObject is IEventObject) { ObjectEvent e = ((IEventObject)PropertyGrid.PropertyObject).Events.GetEvent(property.Name); if (e != null) { script.Parameters = e.Parameters; } } } // Open the scrpit editor form. ScriptEditor form = new ScriptEditor(script, EditorControl); return(form); }
private void ScriptEditorMenuItem_Click(object sender, EventArgs e) { var Form = new ScriptEditor(); Form.Show(this); Form.Activate(); }
// Update is called once per frame void Interact() { GameObject ui = GameObject.Find("UI").transform.GetChild(0).gameObject; // epic ui.SetActive(!ui.activeSelf); GameObject edo = ui.transform.GetChild(0).GetChild(0).GetChild(0).gameObject; ScriptEditor editor = edo.GetComponent <ScriptEditor>(); editor.calback = this; CodeSystem d = GetComponentInChildren <CodeSystem>(); editor.editable = !d.DoNotEdit; if (!ui.activeSelf) { d.CurrentScript = editor.stringToEdit; } else { editor.stringToEdit = d.CurrentScript; } Debug.Log("Interact/UI"); }
private void OnRunScript(object sender, RoutedEventArgs e) { ScriptEditor ctl = new ScriptEditor(); Window win = new Window(); win.Title = "Script Editor"; win.Content = ctl; win.Show(); //OpenFileDialog diag = new OpenFileDialog(); //diag.Title = "DMX Commander: Select script to run"; //diag.Filter = "DMX Script files (*.DMXCommand)|*.DMXCommand|All Files (*.*)|*.*"; //diag.DefaultExt = ".DMXCommand"; //diag.CheckFileExists = true; //bool success = true; //if (diag.ShowDialog() == true) //{ // success = ScriptEngine.Current.Run(diag.FileName); // if (success) // { // MessageBox.Show("Script run complete.", "DMX Commander", MessageBoxButton.OK, MessageBoxImage.Information); // } // else // { // MessageBox.Show("Script run failed:\r\n\r\n" + ScriptEngine.Current.ErrorListing, "DMX Commander", MessageBoxButton.OK, MessageBoxImage.Error); // } //} }
// Button: Edit Code. private void buttonEditCode_Click(object sender, EventArgs e) { // Create a custom script if it is null. if (objectEvent.CustomScript == null) { objectEvent.CustomScript = new Script(); if (objectEvent.Event != null) { objectEvent.CustomScript.Parameters = objectEvent.Event.Parameters; objectEvent.CustomScript.Code = "// Parameters = ("; for (int i = 0; i < objectEvent.CustomScript.Parameters.Count; i++) { if (i > 0) { objectEvent.CustomScript.Code += ", "; } objectEvent.CustomScript.Code += objectEvent.CustomScript.Parameters[i].Type + " " + objectEvent.CustomScript.Parameters[i].Name; } objectEvent.CustomScript.Code += ")\n"; } } // Open the script editor. using (ScriptEditor form = new ScriptEditor(objectEvent.CustomScript, EditorControl)) { if (form.ShowDialog(EditorControl.EditorForm) == DialogResult.OK) { } } }
private void UpdateScriptWindowTitle(ScriptEditor editor) { string newTitle = editor.Script.FileName + (editor.IsModified ? " *" : ""); _editors[editor.Script].Name = newTitle; _guiController.DocumentTitlesChanged(); }
protected void ZoomToCorrectPositionInScript(ScriptEditor editor, ZoomToFileEventArgs evArgs) { if (editor == null) { return; } if (evArgs.ZoomType == ZoomToFileZoomType.ZoomToCharacterPosition) { editor.GoToLineOfCharacterPosition(evArgs.ZoomPosition, evArgs.SelectLine); } else if (evArgs.ZoomType != ZoomToFileZoomType.DoNotMoveCursor) { if (evArgs.ZoomToText != null) { evArgs.ZoomPosition = editor.GetLineNumberForText(evArgs.ZoomToText); } editor.GoToLine(evArgs.ZoomPosition, evArgs.SelectLine, evArgs.ZoomToLineAfterOpeningBrace); if (evArgs.IsDebugExecutionPoint) { editor.SetExecutionPointMarker(evArgs.ZoomPosition); if (evArgs.ErrorMessage != null) { editor.SetErrorMessagePopup(evArgs.ErrorMessage); } } } }
// // private void ScriptE_Click(object sender, EventArgs e) { ScriptEditor sc = new ScriptEditor(); sc.Show(); Hide(); }
private void newScriptBt_Click(object sender, EventArgs e) { ScriptEditor childForm = new ScriptEditor(); childForm.MdiParent = this; childForm.Text = "Script"; childForm.Show(); }
public static void openScriptEditor() { if (editor) { editor.Close(); } editor = EditorWindow.GetWindow <ScriptEditor>(); }
private void ShowNewForm(object sender, EventArgs e) { ScriptEditor childForm = new ScriptEditor(); childForm.MdiParent = this; childForm.Text = "Window " + childFormNumber++; childForm.Show(); }
public override void Open(EditorControl editorControl) { using (ScriptEditor form = new ScriptEditor(script, editorControl)) { if (form.ShowDialog(editorControl.EditorForm) == DialogResult.OK) { editorControl.RefreshWorldTreeView(); } } }
public FindAllUsages(ScintillaWrapper scintilla, ScriptEditor editor, Script script, AGSEditor agsEditor) { this._scriptEditor = editor; this._scintilla = scintilla; this._script = script; this._agsEditor = agsEditor; this._results = new List<ScriptTokenReference>(); }
public static void ClearHighlightLine() { for (int i = 0; i < ScriptEditor.LinesCount; i++) { ScriptEditor[i].BackgroundBrush = ScriptEditor.BackBrush; } ScriptEditor.Invalidate(); }
public CScriptEditorViewModel() : base("Scripting") { BitmapImage bi = new BitmapImage(new Uri("pack://application:,,,/Resources/Images/Tabs/outliner.png")); IconSource = bi; Content = new ScriptEditor(); }
public FindAllUsages(ScintillaWrapper scintilla, ScriptEditor editor, Script script, AGSEditor agsEditor) { this._scriptEditor = editor; this._scintilla = scintilla; this._script = script; this._agsEditor = agsEditor; this._results = new List <ScriptTokenReference>(); }
private static void SetHighlightLine(int iline, Color background) { for (int i = 0; i < ScriptEditor.LinesCount; i++) { ScriptEditor[i].BackgroundBrush = ScriptEditor.BackBrush; } ScriptEditor[iline].BackgroundBrush = new SolidBrush(background); ScriptEditor.Invalidate(); }
protected override ContentDocument GetDocument(ScriptEditor editor) { ContentDocument document; if (!_editors.TryGetValue(editor.Script, out document)) { return(null); } return(document); }
public static bool AddToScript(string command) { if (Recording) { ScriptEditor?.AppendText(command + Environment.NewLine); return(true); } return(false); }
private IScriptEditor GetScriptEditor(string fileName, bool showEditor) { Script script; ScriptEditor editor = GetScriptEditor(fileName, out script); if ((showEditor) && (editor != null)) { _guiController.AddOrShowPane(_editors[script]); } return(editor); }
protected void ScriptEditor_DockStateChanged(object sender, EventArgs e) { DockingContainer container = (DockingContainer)sender; ScriptEditor editor = (ScriptEditor)container.Panel; if (container.DockState == DockingState.Hidden) { return; } container.InitScriptIfNeeded <ScriptEditor>(ReInitializeScriptEditor, editor); }
public static void ShowFileNewDialog( object sender, ScriptEditor.Model.NewScriptUserInterfaceArgs args ) { // provide for new command scripts or standard python scripts FileNewForm frm = new FileNewForm(); if ( frm.ShowDialog() == DialogResult.OK ) { args.CreateScript = true; args.FileName = frm.GetFilePath(); args.Script = frm.GetScriptString(); } }
protected void UpdateScriptWindowTitle(ScriptEditor editor) { string newTitle = editor.Script.FileName + (editor.IsModified ? " *" : ""); ContentDocument document = GetDocument(editor); if (document != null && document.Name != newTitle) { document.Name = newTitle; document.Control.DockingContainer.Text = newTitle; _guiController.DocumentTitlesChanged(); } }
public void ShowScriptEditorWindow() { try { ScriptEditor editor = new ScriptEditor(); editor.Show(ExcelWin32Window.ActivateWin); } catch (Exception e) { ShowErrorDialog(e); } }
private static void OnCreate() { //最もよくわかっていない部分 この順番じゃないとダメっぽい ScriptEditor editor = GetWindow <ScriptEditor>(); editor.position = new Rect(100, 100, 1050, 510);//サイズ変更 variableEditor = GetWindow <VariableEditor>(typeof(ScriptEditor)); editor.Focus(); variableEditor.Initialize(); InitializeSceneNames(); }
private static void ActiveScriptStatementExecuted(ASTNode statement) { if (statement != null) { var lineNum = statement.LineNumber; SetHighlightLine(lineNum, HighlightType.Execeution); // Scrolls to relevant line, per this suggestion: https://github.com/PavelTorgashov/FastColoredTextBox/issues/115 ScriptEditor.Selection.Start = new Place(0, lineNum); ScriptEditor.DoSelectionVisible(); } }
private IScriptEditor GetScriptEditor(string fileName, bool showEditor) { Script script; ScriptEditor editor = GetScriptEditor(fileName, out script); if ((showEditor) && (editor != null)) { ContentDocument document = _editors[script]; document.TreeNodeID = GetNodeID(script); _guiController.AddOrShowPane(document); } return(editor); }
public String GetScriptSelection() { if (_scriptsTabControl.HasItems) { ContentPresenter cp = _scriptsTabControl.Template.FindName("PART_SelectedContentHost", _scriptsTabControl) as ContentPresenter; ScriptEditor editor = _scriptsTabControl.ContentTemplate.FindName("_editor", cp) as ScriptEditor; return(editor.SelectedText); } else { return(null); } }
private void EditMenu_Click(object sender, EventArgs e) { if (ScriptEditor == null || RuntimeScript == null || KeyObject == null) { return; } if (!Dialog.ShowDialog(RuntimeScript, KeyObject) && (RuntimeScript == null || RuntimeScript.RuntimeName == null)) { KeyObject?.Scripts?.RemoveScriptByRuntimeScript(RuntimeScript); } ScriptEditor.RefreshView(); }
public static void openScriptEditor() { if (editor) editor.Close(); editor = EditorWindow.GetWindow<ScriptEditor>(); }
private void InitializeComponent() { this.components = new System.ComponentModel.Container(); this.sourceToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripSeparator(); this.exportToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.replaceToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.portToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.ctxSubActions = new System.Windows.Forms.ContextMenuStrip(this.components); this.renameToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.Source = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); this.add = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripMenuItem3 = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripMenuItem4 = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripMenuItem7 = new System.Windows.Forms.ToolStripMenuItem(); this.subtract = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripMenuItem5 = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripMenuItem6 = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripMenuItem8 = new System.Windows.Forms.ToolStripMenuItem(); this.removeAllToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.addCustomAmountToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.dlgOpen = new System.Windows.Forms.OpenFileDialog(); this.dlgSave = new System.Windows.Forms.SaveFileDialog(); this.ActionEditor = new System.Windows.Forms.Panel(); this.scriptEditor1 = new Ikarus.NewScriptEditor(); this.scriptEditor2 = new Ikarus.UI.ScriptEditor(); this.button1 = new System.Windows.Forms.Button(); this.ActionFlagsPanel = new System.Windows.Forms.Panel(); this.SubActionFlagsPanel = new System.Windows.Forms.Panel(); this.chkUnk = new System.Windows.Forms.CheckBox(); this.chkLoop = new System.Windows.Forms.CheckBox(); this.chkFixedTrans = new System.Windows.Forms.CheckBox(); this.chkFixedRot = new System.Windows.Forms.CheckBox(); this.chkFixedScale = new System.Windows.Forms.CheckBox(); this.chkMovesChar = new System.Windows.Forms.CheckBox(); this.chkTransOutStart = new System.Windows.Forms.CheckBox(); this.inTransTime = new System.Windows.Forms.NumericInputBox(); this.chkNoOutTrans = new System.Windows.Forms.CheckBox(); this.label1 = new System.Windows.Forms.Label(); this.panel2 = new System.Windows.Forms.Panel(); this.lblActionName = new System.Windows.Forms.Label(); this.comboActionEntry = new System.Windows.Forms.ComboBox(); this.flagsToggle = new System.Windows.Forms.Button(); this.spltEventMod = new System.Windows.Forms.Splitter(); this.eventModifier = new System.Windows.Forms.EventModifier(); this.ctxSubActions.SuspendLayout(); this.ActionEditor.SuspendLayout(); this.SubActionFlagsPanel.SuspendLayout(); this.panel2.SuspendLayout(); this.SuspendLayout(); // // sourceToolStripMenuItem // this.sourceToolStripMenuItem.Name = "sourceToolStripMenuItem"; this.sourceToolStripMenuItem.Size = new System.Drawing.Size(32, 19); // // toolStripMenuItem1 // this.toolStripMenuItem1.Name = "toolStripMenuItem1"; this.toolStripMenuItem1.Size = new System.Drawing.Size(6, 6); // // exportToolStripMenuItem // this.exportToolStripMenuItem.Name = "exportToolStripMenuItem"; this.exportToolStripMenuItem.Size = new System.Drawing.Size(32, 19); // // replaceToolStripMenuItem // this.replaceToolStripMenuItem.Name = "replaceToolStripMenuItem"; this.replaceToolStripMenuItem.Size = new System.Drawing.Size(32, 19); // // portToolStripMenuItem // this.portToolStripMenuItem.Name = "portToolStripMenuItem"; this.portToolStripMenuItem.Size = new System.Drawing.Size(32, 19); // // ctxSubActions // this.ctxSubActions.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.renameToolStripMenuItem}); this.ctxSubActions.Name = "ctxBox"; this.ctxSubActions.Size = new System.Drawing.Size(118, 26); this.ctxSubActions.Text = "Subaction"; // // renameToolStripMenuItem // this.renameToolStripMenuItem.Name = "renameToolStripMenuItem"; this.renameToolStripMenuItem.Size = new System.Drawing.Size(117, 22); this.renameToolStripMenuItem.Text = "Rename"; this.renameToolStripMenuItem.Click += new System.EventHandler(this.renameToolStripMenuItem_Click); // // Source // this.Source.Name = "Source"; this.Source.Size = new System.Drawing.Size(32, 19); // // toolStripSeparator1 // this.toolStripSeparator1.Name = "toolStripSeparator1"; this.toolStripSeparator1.Size = new System.Drawing.Size(6, 6); // // add // this.add.Name = "add"; this.add.Size = new System.Drawing.Size(32, 19); // // toolStripMenuItem3 // this.toolStripMenuItem3.Name = "toolStripMenuItem3"; this.toolStripMenuItem3.Size = new System.Drawing.Size(32, 19); // // toolStripMenuItem4 // this.toolStripMenuItem4.Name = "toolStripMenuItem4"; this.toolStripMenuItem4.Size = new System.Drawing.Size(32, 19); // // toolStripMenuItem7 // this.toolStripMenuItem7.Name = "toolStripMenuItem7"; this.toolStripMenuItem7.Size = new System.Drawing.Size(32, 19); // // subtract // this.subtract.Name = "subtract"; this.subtract.Size = new System.Drawing.Size(32, 19); // // toolStripMenuItem5 // this.toolStripMenuItem5.Name = "toolStripMenuItem5"; this.toolStripMenuItem5.Size = new System.Drawing.Size(32, 19); // // toolStripMenuItem6 // this.toolStripMenuItem6.Name = "toolStripMenuItem6"; this.toolStripMenuItem6.Size = new System.Drawing.Size(32, 19); // // toolStripMenuItem8 // this.toolStripMenuItem8.Name = "toolStripMenuItem8"; this.toolStripMenuItem8.Size = new System.Drawing.Size(32, 19); // // removeAllToolStripMenuItem // this.removeAllToolStripMenuItem.Name = "removeAllToolStripMenuItem"; this.removeAllToolStripMenuItem.Size = new System.Drawing.Size(32, 19); // // addCustomAmountToolStripMenuItem // this.addCustomAmountToolStripMenuItem.Name = "addCustomAmountToolStripMenuItem"; this.addCustomAmountToolStripMenuItem.Size = new System.Drawing.Size(32, 19); // // ActionEditor // this.ActionEditor.Controls.Add(this.scriptEditor1); this.ActionEditor.Controls.Add(this.scriptEditor2); this.ActionEditor.Controls.Add(this.button1); this.ActionEditor.Controls.Add(this.ActionFlagsPanel); this.ActionEditor.Controls.Add(this.SubActionFlagsPanel); this.ActionEditor.Controls.Add(this.panel2); this.ActionEditor.Dock = System.Windows.Forms.DockStyle.Fill; this.ActionEditor.Location = new System.Drawing.Point(0, 0); this.ActionEditor.Name = "ActionEditor"; this.ActionEditor.Size = new System.Drawing.Size(229, 355); this.ActionEditor.TabIndex = 26; // // scriptEditor1 // this.scriptEditor1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.scriptEditor1.Dock = System.Windows.Forms.DockStyle.Fill; this.scriptEditor1.Location = new System.Drawing.Point(0, 21); this.scriptEditor1.Name = "scriptEditor1"; this.scriptEditor1.Size = new System.Drawing.Size(229, 310); this.scriptEditor1.TabIndex = 0; // // scriptEditor2 // this.scriptEditor2.Dock = System.Windows.Forms.DockStyle.Fill; this.scriptEditor2.Location = new System.Drawing.Point(0, 21); this.scriptEditor2.Name = "scriptEditor2"; this.scriptEditor2.Padding = new System.Windows.Forms.Padding(1); this.scriptEditor2.Size = new System.Drawing.Size(229, 310); this.scriptEditor2.TabIndex = 37; this.scriptEditor2.Visible = false; // // button1 // this.button1.Dock = System.Windows.Forms.DockStyle.Bottom; this.button1.Location = new System.Drawing.Point(0, 331); this.button1.Name = "button1"; this.button1.Size = new System.Drawing.Size(229, 24); this.button1.TabIndex = 38; this.button1.Text = "Switch Editor"; this.button1.UseVisualStyleBackColor = true; this.button1.Click += new System.EventHandler(this.button1_Click); // // ActionFlagsPanel // this.ActionFlagsPanel.Location = new System.Drawing.Point(0, 168); this.ActionFlagsPanel.Margin = new System.Windows.Forms.Padding(0); this.ActionFlagsPanel.Name = "ActionFlagsPanel"; this.ActionFlagsPanel.Size = new System.Drawing.Size(201, 147); this.ActionFlagsPanel.TabIndex = 37; this.ActionFlagsPanel.Visible = false; // // SubActionFlagsPanel // this.SubActionFlagsPanel.Controls.Add(this.chkUnk); this.SubActionFlagsPanel.Controls.Add(this.chkLoop); this.SubActionFlagsPanel.Controls.Add(this.chkFixedTrans); this.SubActionFlagsPanel.Controls.Add(this.chkFixedRot); this.SubActionFlagsPanel.Controls.Add(this.chkFixedScale); this.SubActionFlagsPanel.Controls.Add(this.chkMovesChar); this.SubActionFlagsPanel.Controls.Add(this.chkTransOutStart); this.SubActionFlagsPanel.Controls.Add(this.inTransTime); this.SubActionFlagsPanel.Controls.Add(this.chkNoOutTrans); this.SubActionFlagsPanel.Controls.Add(this.label1); this.SubActionFlagsPanel.Location = new System.Drawing.Point(0, 21); this.SubActionFlagsPanel.Margin = new System.Windows.Forms.Padding(0); this.SubActionFlagsPanel.Name = "SubActionFlagsPanel"; this.SubActionFlagsPanel.Size = new System.Drawing.Size(201, 147); this.SubActionFlagsPanel.TabIndex = 27; this.SubActionFlagsPanel.Visible = false; // // chkUnk // this.chkUnk.AutoSize = true; this.chkUnk.Location = new System.Drawing.Point(63, 125); this.chkUnk.Name = "chkUnk"; this.chkUnk.Size = new System.Drawing.Size(72, 17); this.chkUnk.TabIndex = 36; this.chkUnk.Text = "Unknown"; this.chkUnk.UseVisualStyleBackColor = true; this.chkUnk.CheckedChanged += new System.EventHandler(this.chkUnk_CheckedChanged); // // chkLoop // this.chkLoop.AutoSize = true; this.chkLoop.Location = new System.Drawing.Point(7, 125); this.chkLoop.Name = "chkLoop"; this.chkLoop.Size = new System.Drawing.Size(50, 17); this.chkLoop.TabIndex = 35; this.chkLoop.Text = "Loop"; this.chkLoop.UseVisualStyleBackColor = true; this.chkLoop.CheckedChanged += new System.EventHandler(this.chkLoop_CheckedChanged); // // chkFixedTrans // this.chkFixedTrans.AutoSize = true; this.chkFixedTrans.Location = new System.Drawing.Point(7, 108); this.chkFixedTrans.Name = "chkFixedTrans"; this.chkFixedTrans.Size = new System.Drawing.Size(106, 17); this.chkFixedTrans.TabIndex = 34; this.chkFixedTrans.Text = "Fixed Translation"; this.chkFixedTrans.UseVisualStyleBackColor = true; this.chkFixedTrans.CheckedChanged += new System.EventHandler(this.chkFixedTrans_CheckedChanged); // // chkFixedRot // this.chkFixedRot.AutoSize = true; this.chkFixedRot.Location = new System.Drawing.Point(7, 91); this.chkFixedRot.Name = "chkFixedRot"; this.chkFixedRot.Size = new System.Drawing.Size(94, 17); this.chkFixedRot.TabIndex = 33; this.chkFixedRot.Text = "Fixed Rotation"; this.chkFixedRot.UseVisualStyleBackColor = true; this.chkFixedRot.CheckedChanged += new System.EventHandler(this.chkFixedRot_CheckedChanged); // // chkFixedScale // this.chkFixedScale.AutoSize = true; this.chkFixedScale.Location = new System.Drawing.Point(7, 74); this.chkFixedScale.Name = "chkFixedScale"; this.chkFixedScale.Size = new System.Drawing.Size(81, 17); this.chkFixedScale.TabIndex = 32; this.chkFixedScale.Text = "Fixed Scale"; this.chkFixedScale.UseVisualStyleBackColor = true; this.chkFixedScale.CheckedChanged += new System.EventHandler(this.chkFixedScale_CheckedChanged); // // chkMovesChar // this.chkMovesChar.AutoSize = true; this.chkMovesChar.Location = new System.Drawing.Point(7, 57); this.chkMovesChar.Name = "chkMovesChar"; this.chkMovesChar.Size = new System.Drawing.Size(107, 17); this.chkMovesChar.TabIndex = 31; this.chkMovesChar.Text = "Moves Character"; this.chkMovesChar.UseVisualStyleBackColor = true; this.chkMovesChar.CheckedChanged += new System.EventHandler(this.chkMovesChar_CheckedChanged); // // chkTransOutStart // this.chkTransOutStart.AutoSize = true; this.chkTransOutStart.Location = new System.Drawing.Point(7, 40); this.chkTransOutStart.Name = "chkTransOutStart"; this.chkTransOutStart.Size = new System.Drawing.Size(143, 17); this.chkTransOutStart.TabIndex = 30; this.chkTransOutStart.Text = "Transition Out From Start"; this.chkTransOutStart.UseVisualStyleBackColor = true; this.chkTransOutStart.CheckedChanged += new System.EventHandler(this.chkTransOutStart_CheckedChanged); // // inTransTime // this.inTransTime.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.inTransTime.Integral = false; this.inTransTime.Location = new System.Drawing.Point(107, 4); this.inTransTime.MaximumValue = 3.402823E+38F; this.inTransTime.MinimumValue = -3.402823E+38F; this.inTransTime.Name = "inTransTime"; this.inTransTime.Size = new System.Drawing.Size(89, 20); this.inTransTime.TabIndex = 29; this.inTransTime.Text = "0"; this.inTransTime.ValueChanged += new System.EventHandler(this.inTransTime_ValueChanged); // // chkNoOutTrans // this.chkNoOutTrans.AutoSize = true; this.chkNoOutTrans.Location = new System.Drawing.Point(7, 24); this.chkNoOutTrans.Name = "chkNoOutTrans"; this.chkNoOutTrans.Size = new System.Drawing.Size(109, 17); this.chkNoOutTrans.TabIndex = 2; this.chkNoOutTrans.Text = "No Out Transition"; this.chkNoOutTrans.UseVisualStyleBackColor = true; this.chkNoOutTrans.CheckedChanged += new System.EventHandler(this.chkNoOutTrans_CheckedChanged); // // label1 // this.label1.AutoSize = true; this.label1.Location = new System.Drawing.Point(3, 7); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(100, 13); this.label1.TabIndex = 1; this.label1.Text = "In Translation Time:"; // // panel2 // this.panel2.Controls.Add(this.lblActionName); this.panel2.Controls.Add(this.comboActionEntry); this.panel2.Controls.Add(this.flagsToggle); this.panel2.Dock = System.Windows.Forms.DockStyle.Top; this.panel2.Location = new System.Drawing.Point(0, 0); this.panel2.Margin = new System.Windows.Forms.Padding(0); this.panel2.Name = "panel2"; this.panel2.Size = new System.Drawing.Size(229, 21); this.panel2.TabIndex = 37; // // lblActionName // this.lblActionName.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.lblActionName.Dock = System.Windows.Forms.DockStyle.Fill; this.lblActionName.Location = new System.Drawing.Point(114, 0); this.lblActionName.Name = "lblActionName"; this.lblActionName.Size = new System.Drawing.Size(115, 21); this.lblActionName.TabIndex = 2; this.lblActionName.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; // // comboActionEntry // this.comboActionEntry.Dock = System.Windows.Forms.DockStyle.Left; this.comboActionEntry.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.comboActionEntry.FormattingEnabled = true; this.comboActionEntry.Items.AddRange(new object[] { "Main", "GFX", "SFX", "Other"}); this.comboActionEntry.Location = new System.Drawing.Point(60, 0); this.comboActionEntry.Name = "comboActionEntry"; this.comboActionEntry.Size = new System.Drawing.Size(54, 21); this.comboActionEntry.TabIndex = 1; this.comboActionEntry.SelectedIndexChanged += new System.EventHandler(this.comboBox1_SelectedIndexChanged); // // flagsToggle // this.flagsToggle.Cursor = System.Windows.Forms.Cursors.Default; this.flagsToggle.Dock = System.Windows.Forms.DockStyle.Left; this.flagsToggle.Location = new System.Drawing.Point(0, 0); this.flagsToggle.Name = "flagsToggle"; this.flagsToggle.Size = new System.Drawing.Size(60, 21); this.flagsToggle.TabIndex = 0; this.flagsToggle.Text = "[+] Flags"; this.flagsToggle.UseVisualStyleBackColor = true; this.flagsToggle.Click += new System.EventHandler(this.flagsToggle_Click); // // spltEventMod // this.spltEventMod.Dock = System.Windows.Forms.DockStyle.Bottom; this.spltEventMod.Location = new System.Drawing.Point(0, 355); this.spltEventMod.Name = "spltEventMod"; this.spltEventMod.Size = new System.Drawing.Size(229, 3); this.spltEventMod.TabIndex = 26; this.spltEventMod.TabStop = false; this.spltEventMod.Visible = false; // // eventModifier // this.eventModifier.AutoSize = true; this.eventModifier.Dock = System.Windows.Forms.DockStyle.Bottom; this.eventModifier.Location = new System.Drawing.Point(0, 358); this.eventModifier.Name = "eventModifier"; this.eventModifier.Size = new System.Drawing.Size(229, 257); this.eventModifier.TabIndex = 37; this.eventModifier.Visible = false; // // ScriptPanel // this.Controls.Add(this.ActionEditor); this.Controls.Add(this.spltEventMod); this.Controls.Add(this.eventModifier); this.MinimumSize = new System.Drawing.Size(185, 0); this.Name = "ScriptPanel"; this.Size = new System.Drawing.Size(229, 615); this.ctxSubActions.ResumeLayout(false); this.ActionEditor.ResumeLayout(false); this.SubActionFlagsPanel.ResumeLayout(false); this.SubActionFlagsPanel.PerformLayout(); this.panel2.ResumeLayout(false); this.ResumeLayout(false); this.PerformLayout(); }
private void InitDockLayout( ) { _dockPanel = new DockPanel( ); _dockPanel.Dock = DockStyle.Fill; _dockPanel.BackColor = System.Drawing.Color.DarkGray; _dockPanel.ActiveDocumentChanged += new EventHandler( _dockPanel_ActiveDocumentChanged ); Controls.Add( _dockPanel ); _dockPanel.BringToFront( ); _assets = new AssetsBrowserWindow( this ); _properties = new PropertiesDock( ); _layers = new LayersDock( ); _tools = new ToolsDock( ); _scriptEditor = new ScriptEditor( ); }
/// <summary> /// Initialize plugin. /// </summary> public void Initialize() { setFilePath(); CheckDefaultWindowSetting(); // Load plugins LoadPlugins(); SetRecentProject(); // Create Windows m_statusDialog = new GridJobStatusDialog(m_env.JobManager); SetDockContent(m_statusDialog); m_scriptEditor = new ScriptEditor(m_env); m_scriptEditor.Name = "ScriptEditor"; m_scriptEditor.Text = MessageResources.NameScriptEditor; m_scriptEditor.TabText = MessageResources.NameScriptEditor; SetDockContent(m_scriptEditor); m_title = this.Text; m_env.ReportManager.StatusUpdated += new StatusUpdatedEventHandler(ReportManager_StatusUpdated); m_env.ReportManager.ProgressValueUpdated += new ProgressReportEventHandler(ReportManager_ProgressValueUpdated); m_env.ActionManager.UndoStatusChanged += new UndoStatusChangedEvent(ActionManager_UndoStatusChanged); }
private void CreateEditorForScript(Script chosenItem) { chosenItem.LoadFromDisk(); ScriptEditor newEditor = new ScriptEditor(chosenItem, _agsEditor); newEditor.IsModifiedChanged += new EventHandler(ScriptEditor_IsModifiedChanged); _editors.Add(chosenItem, new ContentDocument(newEditor, chosenItem.FileName, this, null)); _editors[chosenItem].PanelClosed += _panelClosedHandler; _editors[chosenItem].ToolbarCommands = newEditor.ToolbarIcons; _editors[chosenItem].MainMenu = newEditor.ExtraMenu; if (!chosenItem.IsHeader) { _editors[chosenItem].SelectedPropertyGridObject = chosenItem; } }
private ScriptEditor CreateOrShowEditorForScript(string scriptName, bool activateEditor) { Script chosenItem; var scriptEditor = GetScriptEditor(scriptName, out chosenItem); if (chosenItem == null) { return null; } _lastActivated = scriptEditor; _guiController.AddOrShowPane(_editors[chosenItem]); if (activateEditor) { // Hideous hack -- we need to allow the current message to // finish processing before setting the focus to the // script window, or it will fail _timerActivateWindow = true; _timer.Start(); } return _lastActivated; }
private ContentDocument GetScriptEditor(UnloadedRoom selectedRoom) { if ((_roomScriptEditors.ContainsKey(selectedRoom.Number)) && (!_roomScriptEditors[selectedRoom.Number].Visible)) { DisposePane(_roomScriptEditors[selectedRoom.Number]); _roomScriptEditors.Remove(selectedRoom.Number); } if (!_roomScriptEditors.ContainsKey(selectedRoom.Number)) { if (selectedRoom.Script == null) { selectedRoom.LoadScript(); } ScriptEditor scriptEditor = new ScriptEditor(selectedRoom.Script, _agsEditor); scriptEditor.RoomNumber = selectedRoom.Number; scriptEditor.IsModifiedChanged += new EventHandler(ScriptEditor_IsModifiedChanged); if ((_loadedRoom != null) && (_loadedRoom.Number == selectedRoom.Number)) { scriptEditor.Room = _loadedRoom; } _roomScriptEditors.Add(selectedRoom.Number, new ContentDocument(scriptEditor, selectedRoom.Script.FileName, this)); _roomScriptEditors[selectedRoom.Number].ToolbarCommands = scriptEditor.ToolbarIcons; _roomScriptEditors[selectedRoom.Number].MainMenu = scriptEditor.ExtraMenu; } return _roomScriptEditors[selectedRoom.Number]; }