Remove some legacy code that was never enabled

This commit is contained in:
baldurk
2016-11-21 18:09:48 +01:00
parent c068a71903
commit 2385e67ba4
4 changed files with 12 additions and 119 deletions
-2
View File
@@ -174,7 +174,6 @@ namespace renderdocui.Code
public string LastCapturePath = "";
public string LastCaptureExe = "";
public List<string> RecentCaptureSettings = new List<string>();
public int CallstackLevelSkip = 0;
public string AdbExecutablePath = "";
// for historical reasons, this was named CaptureSavePath
@@ -321,7 +320,6 @@ namespace renderdocui.Code
public PersistantConfig()
{
CallstackLevelSkip = 0;
RecentLogFiles.Clear();
RecentCaptureSettings.Clear();
}
+10 -42
View File
@@ -28,21 +28,16 @@
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
TreelistView.TreeListColumn treeListColumn1 = ((TreelistView.TreeListColumn)(new TreelistView.TreeListColumn("EID", "EID")));
TreelistView.TreeListColumn treeListColumn2 = ((TreelistView.TreeListColumn)(new TreelistView.TreeListColumn("Call", "API Call")));
TreelistView.TreeListColumn treeListColumn3 = new TreelistView.TreeListColumn("EID", "EID");
TreelistView.TreeListColumn treeListColumn4 = new TreelistView.TreeListColumn("Call", "API Call");
this.apiEvents = new TreelistView.TreeListView();
this.callstacklabel = new System.Windows.Forms.Label();
this.callstackSkipLevelsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.callSkip = new System.Windows.Forms.ToolStripTextBox();
this.contextMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
this.panelSplitter = new renderdocui.Controls.DoubleClickSplitter();
this.callstack = new System.Windows.Forms.ListBox();
tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
tableLayoutPanel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.apiEvents)).BeginInit();
this.contextMenu.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.panelSplitter)).BeginInit();
this.panelSplitter.Panel1.SuspendLayout();
this.panelSplitter.Panel2.SuspendLayout();
@@ -67,14 +62,14 @@
// apiEvents
//
this.apiEvents.AlwaysDisplayVScroll = true;
treeListColumn1.AutoSizeMinSize = 50;
treeListColumn1.Width = 60;
treeListColumn2.AutoSize = true;
treeListColumn2.AutoSizeMinSize = 0;
treeListColumn2.Width = 50;
treeListColumn3.AutoSizeMinSize = 50;
treeListColumn3.Width = 60;
treeListColumn4.AutoSize = true;
treeListColumn4.AutoSizeMinSize = 0;
treeListColumn4.Width = 50;
this.apiEvents.Columns.AddRange(new TreelistView.TreeListColumn[] {
treeListColumn1,
treeListColumn2});
treeListColumn3,
treeListColumn4});
this.apiEvents.Cursor = System.Windows.Forms.Cursors.Arrow;
this.apiEvents.Dock = System.Windows.Forms.DockStyle.Fill;
this.apiEvents.Location = new System.Drawing.Point(3, 3);
@@ -83,7 +78,7 @@
this.apiEvents.Size = new System.Drawing.Size(286, 152);
this.apiEvents.TabIndex = 1;
this.apiEvents.Text = "API Calls";
this.apiEvents.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.treeView1_AfterSelect);
this.apiEvents.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.apiEvents_AfterSelect);
this.apiEvents.KeyDown += new System.Windows.Forms.KeyEventHandler(this.apiEvents_KeyDown);
//
// callstacklabel
@@ -99,29 +94,6 @@
this.callstacklabel.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
this.callstacklabel.DoubleClick += new System.EventHandler(this.callstacklabel_DoubleClick);
//
// callstackSkipLevelsToolStripMenuItem
//
this.callstackSkipLevelsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.callSkip});
this.callstackSkipLevelsToolStripMenuItem.Name = "callstackSkipLevelsToolStripMenuItem";
this.callstackSkipLevelsToolStripMenuItem.Size = new System.Drawing.Size(171, 22);
this.callstackSkipLevelsToolStripMenuItem.Text = "Callstack Skip Levels";
//
// callSkip
//
this.callSkip.Name = "callSkip";
this.callSkip.Size = new System.Drawing.Size(100, 21);
this.callSkip.Text = "0";
this.callSkip.ToolTipText = "Number of levels in the callstack to skip, from the bottom";
this.callSkip.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.callSkip_KeyPress);
//
// contextMenu
//
this.contextMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.callstackSkipLevelsToolStripMenuItem});
this.contextMenu.Name = "contextMenuStrip1";
this.contextMenu.Size = new System.Drawing.Size(172, 26);
//
// panelSplitter
//
this.panelSplitter.Collapsed = false;
@@ -170,7 +142,6 @@
tableLayoutPanel1.ResumeLayout(false);
tableLayoutPanel1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.apiEvents)).EndInit();
this.contextMenu.ResumeLayout(false);
this.panelSplitter.Panel1.ResumeLayout(false);
this.panelSplitter.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.panelSplitter)).EndInit();
@@ -183,9 +154,6 @@
private TreelistView.TreeListView apiEvents;
private System.Windows.Forms.ListBox callstack;
private System.Windows.Forms.ToolStripMenuItem callstackSkipLevelsToolStripMenuItem;
private System.Windows.Forms.ToolStripTextBox callSkip;
private System.Windows.Forms.ContextMenuStrip contextMenu;
private Controls.DoubleClickSplitter panelSplitter;
private System.Windows.Forms.Label callstacklabel;
+2 -72
View File
@@ -149,30 +149,6 @@ namespace renderdocui.Windows
return;
}
/*
String commonRoot = calls[0];
for (int i = 1; i < calls.Length - m_Core.Config.CallstackLevelSkip; i++)
{
int len = Math.Min(commonRoot.Length, calls[i].Length);
int commonLen = 0;
for (;commonLen < len; commonLen++)
{
if (commonRoot[commonLen] != calls[i][commonLen])
break;
}
if (commonLen == 0)
{
commonRoot = "";
break;
}
commonRoot = commonRoot.Substring(0, commonLen);
}
*/
callstack.Items.Clear();
if (calls.Length == 1 && calls[0].Length == 0)
@@ -181,15 +157,12 @@ namespace renderdocui.Windows
}
else
{
for (int i = 0; i < calls.Length - m_Core.Config.CallstackLevelSkip; i++)
{
//callstack.Items.Add(calls[i].Substring(commonRoot.Length));
for (int i = 0; i < calls.Length; i++)
callstack.Items.Add(calls[i]);
}
}
}
private void treeView1_AfterSelect(object sender, TreeViewEventArgs e)
private void apiEvents_AfterSelect(object sender, TreeViewEventArgs e)
{
if (IsDisposed || apiEvents.IsDisposed)
return;
@@ -226,49 +199,6 @@ namespace renderdocui.Windows
panelSplitter.Collapsed = true;
}
private void UpdateSettings()
{
bool changed = false;
if (int.TryParse(callSkip.Text, out m_Core.Config.CallstackLevelSkip))
{
if (m_Core.Config.CallstackLevelSkip < 0)
m_Core.Config.CallstackLevelSkip = 0;
callSkip.Text = m_Core.Config.CallstackLevelSkip.ToString();
changed = true;
}
if (changed)
FillCallstack();
}
private void callstack_MouseUp(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Right)
contextMenu.Show(callstack.PointToScreen(e.Location));
if (e.Button == MouseButtons.Left && contextMenu.Visible)
UpdateSettings();
}
private void callSkip_KeyPress(object sender, KeyPressEventArgs e)
{
if (e.KeyChar == '\r' || e.KeyChar == '\n')
{
UpdateSettings();
e.Handled = true;
}
}
private void dirSkip_KeyPress(object sender, KeyPressEventArgs e)
{
if (e.KeyChar == '\r' || e.KeyChar == '\n')
{
UpdateSettings();
e.Handled = true;
}
}
private void apiEvents_KeyDown(object sender, KeyEventArgs e)
{
if (!m_Core.LogLoaded) return;
-3
View File
@@ -120,7 +120,4 @@
<metadata name="tableLayoutPanel1.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="contextMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>