private void tlvwLocals_ItemBeforeEdit(object sender, TreeListViewBeforeEditEventArgs e) { if (ClientDebugManager.Instance.IsBreaked && e.SubItem != null && (e.Item != null && e.Item.Tag is LuaVariable)) { LuaVariable editedVar = e.Item.Tag as LuaVariable; TextBox editor = new TextBox(); editor.BorderStyle = BorderStyle.None; e.Editor = editor; e.DefaultValue = editedVar.Type == LuaTypes.LUA_TSTRING ? string.Format("\"{0}\"", editedVar.GetPrettyPrintValue()) : editedVar.GetPrettyPrintValue(); } }
private void solutionExplorerTreeView_ItemBeforeEdit(object sender, TreeListViewBeforeEditEventArgs e) { TextBox editor = new TextBox(); editor.Multiline = true; editor.WordWrap = false; editor.BorderStyle = BorderStyle.FixedSingle; e.Editor = editor; if (e.Item.Tag is ILuaEditDocumentSolution) { e.DefaultValue = Path.GetFileNameWithoutExtension((e.Item.Tag as ILuaEditDocumentSolution).FileName); } else { e.DefaultValue = e.Item.Text; } }