mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 10:00:40 +00:00
Add an editor dialog for ordered lists of items (text or paths)
This commit is contained in:
+20
@@ -220,6 +220,16 @@ namespace renderdocui.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap down_arrow {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("down_arrow", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
@@ -580,6 +590,16 @@ namespace renderdocui.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap up_arrow {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("up_arrow", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
|
||||
@@ -286,4 +286,10 @@
|
||||
<data name="page_white_code" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\page_white_code.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="down_arrow" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\down_arrow.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="up_arrow" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\up_arrow.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
</root>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 444 B |
Binary file not shown.
|
After Width: | Height: | Size: 437 B |
@@ -0,0 +1,199 @@
|
||||
namespace renderdocui.Windows.Dialogs
|
||||
{
|
||||
partial class OrderedListEditor
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
this.items = new System.Windows.Forms.DataGridView();
|
||||
this.number = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.name = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.browse = new System.Windows.Forms.DataGridViewImageColumn();
|
||||
this.moveup = new System.Windows.Forms.DataGridViewImageColumn();
|
||||
this.movedown = new System.Windows.Forms.DataGridViewImageColumn();
|
||||
this.itemFolderBrowser = new System.Windows.Forms.FolderBrowserDialog();
|
||||
this.itemFileBrowser = new System.Windows.Forms.OpenFileDialog();
|
||||
this.cancel = new System.Windows.Forms.Button();
|
||||
this.ok = new System.Windows.Forms.Button();
|
||||
((System.ComponentModel.ISupportInitialize)(this.items)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// items
|
||||
//
|
||||
this.items.AllowUserToResizeColumns = false;
|
||||
this.items.AllowUserToResizeRows = false;
|
||||
this.items.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.items.BackgroundColor = System.Drawing.SystemColors.Window;
|
||||
dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
|
||||
dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control;
|
||||
dataGridViewCellStyle1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText;
|
||||
dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight;
|
||||
dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
|
||||
dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.items.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1;
|
||||
this.items.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
this.items.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
|
||||
this.number,
|
||||
this.name,
|
||||
this.browse,
|
||||
this.moveup,
|
||||
this.movedown});
|
||||
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
|
||||
dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Window;
|
||||
dataGridViewCellStyle2.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.ControlText;
|
||||
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
|
||||
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
|
||||
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
|
||||
this.items.DefaultCellStyle = dataGridViewCellStyle2;
|
||||
this.items.Location = new System.Drawing.Point(12, 12);
|
||||
this.items.MultiSelect = false;
|
||||
this.items.Name = "items";
|
||||
dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
|
||||
dataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Control;
|
||||
dataGridViewCellStyle3.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
dataGridViewCellStyle3.ForeColor = System.Drawing.SystemColors.WindowText;
|
||||
dataGridViewCellStyle3.SelectionBackColor = System.Drawing.SystemColors.Highlight;
|
||||
dataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
|
||||
dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.items.RowHeadersDefaultCellStyle = dataGridViewCellStyle3;
|
||||
this.items.RowHeadersVisible = false;
|
||||
this.items.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
|
||||
this.items.Size = new System.Drawing.Size(464, 326);
|
||||
this.items.TabIndex = 5;
|
||||
this.items.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.items_CellContentClick);
|
||||
this.items.CellFormatting += new System.Windows.Forms.DataGridViewCellFormattingEventHandler(this.items_CellFormatting);
|
||||
this.items.CellMouseMove += new System.Windows.Forms.DataGridViewCellMouseEventHandler(this.items_CellMouseMove);
|
||||
//
|
||||
// number
|
||||
//
|
||||
this.number.HeaderText = "#";
|
||||
this.number.MinimumWidth = 10;
|
||||
this.number.Name = "number";
|
||||
this.number.ReadOnly = true;
|
||||
this.number.Width = 32;
|
||||
//
|
||||
// name
|
||||
//
|
||||
this.name.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
|
||||
this.name.HeaderText = "Item name (changed at runtime)";
|
||||
this.name.Name = "name";
|
||||
//
|
||||
// browse
|
||||
//
|
||||
this.browse.HeaderText = "";
|
||||
this.browse.Image = global::renderdocui.Properties.Resources.folder_page;
|
||||
this.browse.MinimumWidth = 15;
|
||||
this.browse.Name = "browse";
|
||||
this.browse.ReadOnly = true;
|
||||
this.browse.Resizable = System.Windows.Forms.DataGridViewTriState.False;
|
||||
this.browse.Width = 32;
|
||||
//
|
||||
// moveup
|
||||
//
|
||||
this.moveup.HeaderText = "";
|
||||
this.moveup.Image = global::renderdocui.Properties.Resources.up_arrow;
|
||||
this.moveup.MinimumWidth = 15;
|
||||
this.moveup.Name = "moveup";
|
||||
this.moveup.ReadOnly = true;
|
||||
this.moveup.Resizable = System.Windows.Forms.DataGridViewTriState.False;
|
||||
this.moveup.Width = 32;
|
||||
//
|
||||
// movedown
|
||||
//
|
||||
this.movedown.HeaderText = "";
|
||||
this.movedown.Image = global::renderdocui.Properties.Resources.down_arrow;
|
||||
this.movedown.MinimumWidth = 15;
|
||||
this.movedown.Name = "movedown";
|
||||
this.movedown.ReadOnly = true;
|
||||
this.movedown.Resizable = System.Windows.Forms.DataGridViewTriState.False;
|
||||
this.movedown.Width = 32;
|
||||
//
|
||||
// itemFolderBrowser
|
||||
//
|
||||
this.itemFolderBrowser.RootFolder = System.Environment.SpecialFolder.MyComputer;
|
||||
//
|
||||
// cancel
|
||||
//
|
||||
this.cancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.cancel.Location = new System.Drawing.Point(401, 344);
|
||||
this.cancel.Name = "cancel";
|
||||
this.cancel.Size = new System.Drawing.Size(75, 23);
|
||||
this.cancel.TabIndex = 6;
|
||||
this.cancel.Text = "Cancel";
|
||||
this.cancel.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// ok
|
||||
//
|
||||
this.ok.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.ok.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||
this.ok.Location = new System.Drawing.Point(320, 344);
|
||||
this.ok.Name = "ok";
|
||||
this.ok.Size = new System.Drawing.Size(75, 23);
|
||||
this.ok.TabIndex = 7;
|
||||
this.ok.Text = "OK";
|
||||
this.ok.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// OrderedListEditor
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(488, 379);
|
||||
this.Controls.Add(this.ok);
|
||||
this.Controls.Add(this.cancel);
|
||||
this.Controls.Add(this.items);
|
||||
this.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
|
||||
this.Name = "OrderedListEditor";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "Window Title (changed at runtime)";
|
||||
((System.ComponentModel.ISupportInitialize)(this.items)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.DataGridView items;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn number;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn name;
|
||||
private System.Windows.Forms.DataGridViewImageColumn browse;
|
||||
private System.Windows.Forms.DataGridViewImageColumn moveup;
|
||||
private System.Windows.Forms.DataGridViewImageColumn movedown;
|
||||
private System.Windows.Forms.FolderBrowserDialog itemFolderBrowser;
|
||||
private System.Windows.Forms.OpenFileDialog itemFileBrowser;
|
||||
private System.Windows.Forms.Button cancel;
|
||||
private System.Windows.Forms.Button ok;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,245 @@
|
||||
/******************************************************************************
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2015-2016 Baldur Karlsson
|
||||
* Copyright (c) 2014 Crytek
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
******************************************************************************/
|
||||
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using renderdocui.Code;
|
||||
using renderdoc;
|
||||
|
||||
namespace renderdocui.Windows.Dialogs
|
||||
{
|
||||
// this window lists the remote hosts the user has configured, and queries for any open connections
|
||||
// on any of them that indicate an application with renderdoc hooks that's running.
|
||||
public partial class OrderedListEditor : Form
|
||||
{
|
||||
public enum Browsing
|
||||
{
|
||||
None,
|
||||
Folder,
|
||||
File,
|
||||
};
|
||||
|
||||
private Browsing browseMode = Browsing.Folder;
|
||||
|
||||
public OrderedListEditor(Core core, string windowName, string itemName, Browsing browse)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
Icon = global::renderdocui.Properties.Resources.icon;
|
||||
|
||||
items.Font = core.Config.PreferredFont;
|
||||
|
||||
Text = windowName;
|
||||
items.Columns[1].HeaderText = itemName;
|
||||
|
||||
if (browse == Browsing.None)
|
||||
items.Columns.RemoveAt(BrowserColumnIndex);
|
||||
|
||||
browseMode = browse;
|
||||
}
|
||||
|
||||
private void SetItem(int row, String text)
|
||||
{
|
||||
items.Rows[row].SetValues(new object[] { null, text, null, null, null });
|
||||
}
|
||||
|
||||
public void AddItem(String text)
|
||||
{
|
||||
items.Rows.Add();
|
||||
SetItem(items.RowCount - 2, text);
|
||||
}
|
||||
|
||||
public string[] GetItems()
|
||||
{
|
||||
string[] ret = new string[items.RowCount - 1];
|
||||
|
||||
for (int i = 0; i < items.RowCount - 1; i++)
|
||||
ret[i] = items.Rows[i].Cells[1].Value.ToString();
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
private int ItemNumberColumnIndex
|
||||
{
|
||||
get
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
private int ItemNameColumnIndex
|
||||
{
|
||||
get
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
private int FirstButtonColumnIndex
|
||||
{
|
||||
get
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
|
||||
private int BrowserColumnIndex
|
||||
{
|
||||
get
|
||||
{
|
||||
return browseMode == Browsing.None ? -1 : 2;
|
||||
}
|
||||
}
|
||||
|
||||
private int MoveUpColumnIndex
|
||||
{
|
||||
get
|
||||
{
|
||||
return browseMode == Browsing.None ? 2 : 3;
|
||||
}
|
||||
}
|
||||
|
||||
private int MoveDownColumnIndex
|
||||
{
|
||||
get
|
||||
{
|
||||
return browseMode == Browsing.None ? 3 : 4;
|
||||
}
|
||||
}
|
||||
|
||||
private bool IsClickableCell(int row, int column)
|
||||
{
|
||||
if (column < FirstButtonColumnIndex)
|
||||
return false;
|
||||
|
||||
if (column == MoveUpColumnIndex && row == 0)
|
||||
return false;
|
||||
|
||||
if (column == MoveDownColumnIndex && row >= items.RowCount - 2)
|
||||
return false;
|
||||
|
||||
if (column != BrowserColumnIndex && row == items.RowCount - 1)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private void items_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e)
|
||||
{
|
||||
if (e.ColumnIndex == ItemNumberColumnIndex)
|
||||
{
|
||||
e.Value = e.RowIndex + 1;
|
||||
return;
|
||||
}
|
||||
else if (e.ColumnIndex == BrowserColumnIndex)
|
||||
{
|
||||
e.Value = global::renderdocui.Properties.Resources.folder_page;
|
||||
return;
|
||||
}
|
||||
else if (e.ColumnIndex == MoveUpColumnIndex)
|
||||
{
|
||||
if (IsClickableCell(e.RowIndex, e.ColumnIndex))
|
||||
{
|
||||
e.Value = global::renderdocui.Properties.Resources.up_arrow;
|
||||
return;
|
||||
}
|
||||
}
|
||||
else if (e.ColumnIndex == MoveDownColumnIndex)
|
||||
{
|
||||
if(IsClickableCell(e.RowIndex, e.ColumnIndex))
|
||||
{
|
||||
e.Value = global::renderdocui.Properties.Resources.down_arrow;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (e.ColumnIndex >= FirstButtonColumnIndex)
|
||||
e.Value = new Bitmap(1, 1);
|
||||
}
|
||||
|
||||
private void items_CellMouseMove(object sender, DataGridViewCellMouseEventArgs e)
|
||||
{
|
||||
if (IsClickableCell(e.RowIndex, e.ColumnIndex))
|
||||
items.Cursor = Cursors.Hand;
|
||||
else
|
||||
items.Cursor = Cursors.Default;
|
||||
}
|
||||
|
||||
private void items_CellContentClick(object sender, DataGridViewCellEventArgs e)
|
||||
{
|
||||
if (e.ColumnIndex == BrowserColumnIndex)
|
||||
{
|
||||
if(browseMode == Browsing.Folder)
|
||||
{
|
||||
var res = itemFolderBrowser.ShowDialog();
|
||||
|
||||
if (res == DialogResult.Yes || res == DialogResult.OK)
|
||||
{
|
||||
if (items.Rows[e.RowIndex].IsNewRow)
|
||||
AddItem(itemFolderBrowser.SelectedPath);
|
||||
else
|
||||
SetItem(e.RowIndex, itemFolderBrowser.SelectedPath);
|
||||
}
|
||||
}
|
||||
else if (browseMode == Browsing.File)
|
||||
{
|
||||
var res = itemFileBrowser.ShowDialog();
|
||||
|
||||
if (res == DialogResult.Yes || res == DialogResult.OK)
|
||||
{
|
||||
if (items.Rows[e.RowIndex].IsNewRow)
|
||||
AddItem(itemFileBrowser.FileName);
|
||||
else
|
||||
SetItem(e.RowIndex, itemFileBrowser.FileName);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (e.ColumnIndex == MoveUpColumnIndex && e.RowIndex > 0 && e.RowIndex < items.RowCount - 1)
|
||||
{
|
||||
var row = items.Rows[e.RowIndex];
|
||||
items.Rows.RemoveAt(e.RowIndex);
|
||||
items.Rows.Insert(e.RowIndex - 1, row);
|
||||
items.ClearSelection();
|
||||
row.Selected = true;
|
||||
}
|
||||
else if (e.ColumnIndex == MoveDownColumnIndex && e.RowIndex < items.RowCount - 2)
|
||||
{
|
||||
var row = items.Rows[e.RowIndex];
|
||||
items.Rows.RemoveAt(e.RowIndex);
|
||||
items.Rows.Insert(e.RowIndex + 1, row);
|
||||
items.ClearSelection();
|
||||
row.Selected = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,141 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="number.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="name.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="browse.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="moveup.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="movedown.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="itemFolderBrowser.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="itemFileBrowser.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>161, 17</value>
|
||||
</metadata>
|
||||
</root>
|
||||
@@ -241,6 +241,12 @@
|
||||
<Compile Include="Windows\Dialogs\RemoteHostSelect.Designer.cs">
|
||||
<DependentUpon>RemoteHostSelect.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Windows\Dialogs\OrderedListEditor.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Windows\Dialogs\OrderedListEditor.Designer.cs">
|
||||
<DependentUpon>OrderedListEditor.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Windows\Dialogs\ReplayHostManager.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
@@ -394,6 +400,9 @@
|
||||
<EmbeddedResource Include="Windows\Dialogs\PythonShell.resx">
|
||||
<DependentUpon>PythonShell.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Windows\Dialogs\OrderedListEditor.resx">
|
||||
<DependentUpon>OrderedListEditor.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Windows\Dialogs\RemoteHostSelect.resx">
|
||||
<DependentUpon>RemoteHostSelect.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
@@ -512,6 +521,7 @@
|
||||
<Visible>false</Visible>
|
||||
</Content>
|
||||
<Content Include="Controls\TreeListView\README.txt" />
|
||||
<None Include="Resources\up_arrow.png" />
|
||||
<None Include="Resources\wireframe_mesh.png" />
|
||||
<None Include="Resources\zoom.png" />
|
||||
<None Include="Resources\wand.png" />
|
||||
@@ -541,6 +551,7 @@
|
||||
<None Include="Resources\folder_page.png" />
|
||||
<EmbeddedResource Include="Resources\glsl.xml" />
|
||||
<None Include="Resources\page_white_code.png" />
|
||||
<None Include="Resources\down_arrow.png" />
|
||||
<Content Include="Resources\RightArrow_Green_16x16.png" />
|
||||
<Content Include="Resources\icon.ico" />
|
||||
<None Include="Resources\page_white_delete.png" />
|
||||
|
||||
Reference in New Issue
Block a user