Browse Source

Remove TaskListOptions.xfrm fix Addin File

pull/18/head
PeterForstmeier 14 years ago
parent
commit
c42e4ca0c1
  1. 4
      src/Main/Base/Project/ICSharpCode.SharpDevelop.addin
  2. 10
      src/Main/Base/Project/ICSharpCode.SharpDevelop.csproj
  3. 126
      src/Main/Base/Project/Resources/TaskListOptions.xfrm
  4. 94
      src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/IDEOptions/TaskListOptions.cs
  5. 0
      src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/IDEOptions/TaskListOptionsl.xaml
  6. 0
      src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/IDEOptions/TaskListOptionsl.xaml.cs

4
src/Main/Base/Project/ICSharpCode.SharpDevelop.addin

@ -1186,10 +1186,6 @@ @@ -1186,10 +1186,6 @@
<OptionPanel id = "LoadSave"
label = "${res:Dialog.Options.IDEOptions.LoadSaveOptions.PanelName}"
class = "ICSharpCode.SharpDevelop.Gui.OptionPanels.LoadSaveOptions"/>
<!--
<OptionPanel id = "TaskListOptions"
label = "${res:Dialog.Options.IDEOptions.TaskListOptions.PanelName}"
class = "ICSharpCode.SharpDevelop.Gui.OptionPanels.TaskListOptions"/>-->
<OptionPanel id = "TaskListOptions"
label = "${res:Dialog.Options.IDEOptions.TaskListOptions.PanelName}"

10
src/Main/Base/Project/ICSharpCode.SharpDevelop.csproj

@ -249,8 +249,8 @@ @@ -249,8 +249,8 @@
<DependentUpon>SelectCulturePanel.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Compile Include="Src\Gui\Dialogs\OptionPanels\IDEOptions\TaskListXaml.xaml.cs">
<DependentUpon>TaskListXaml.xaml</DependentUpon>
<Compile Include="Src\Gui\Dialogs\OptionPanels\IDEOptions\TaskListOptionsl.xaml.cs">
<DependentUpon>TaskListOptionsl.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Compile Include="Src\Gui\Dialogs\OptionPanels\ProjectOptions\DebugOptions.xaml.cs">
@ -579,9 +579,6 @@ @@ -579,9 +579,6 @@
<Compile Include="Src\Internal\ConditionEvaluators\IsProcessRunningEvaluator.cs" />
<Compile Include="Src\Internal\Doozers\PadDoozer.cs" />
<Compile Include="Src\Gui\Pads\CompilerMessageView\MessageViewCategory.cs" />
<Compile Include="Src\Gui\Dialogs\OptionPanels\IDEOptions\TaskListOptions.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Src\Internal\ConditionEvaluators\ActiveContentExtensionEvaluator.cs" />
<Compile Include="Src\Gui\Workbench\ViewContentEventHandler.cs" />
<Compile Include="Src\Services\Debugger\IDebugger.cs" />
@ -702,7 +699,6 @@ @@ -702,7 +699,6 @@
<EmbeddedResource Include="Resources\NewFileDialog.xfrm" />
<EmbeddedResource Include="Resources\OutputWindowOptionsPanel.xfrm" />
<EmbeddedResource Include="Resources\SelectStylePanel.xfrm" />
<EmbeddedResource Include="Resources\TaskListOptions.xfrm" />
<EmbeddedResource Include="Resources\WordCountDialog.xfrm" />
<Compile Include="Src\Bookmarks\BookmarkBase.cs" />
<Compile Include="Src\Bookmarks\Commands\MenuCommands.cs" />
@ -878,7 +874,7 @@ @@ -878,7 +874,7 @@
</ItemGroup>
<ItemGroup>
<Page Include="Src\Bookmarks\Pad\Controls\ListViewPad.xaml" />
<Page Include="Src\Gui\Dialogs\OptionPanels\IDEOptions\TaskListXaml.xaml" />
<Page Include="Src\Gui\Dialogs\OptionPanels\IDEOptions\TaskListOptionsl.xaml" />
<Page Include="Src\Gui\Dialogs\OptionPanels\ProjectOptions\BuildEvents.xaml" />
<Page Include="Src\Gui\Dialogs\OptionPanels\ProjectOptions\DebugOptions.xaml" />
<Page Include="Src\Gui\Dialogs\OptionPanels\ProjectOptions\ProjectOptionPanel.xaml">

126
src/Main/Base/Project/Resources/TaskListOptions.xfrm

@ -1,126 +0,0 @@ @@ -1,126 +0,0 @@
<Components version="1.0">
<System.Windows.Forms.UserControl>
<Name value="MyUserControl" />
<DockPadding value="" />
<ClientSize value="{Width=280, Height=296}" />
<Controls>
<System.Windows.Forms.GroupBox>
<Name value="groupBox" />
<TabIndex value="0" />
<Location value="{X=4,Y=8}" />
<Anchor value="Top, Left, Right" />
<Size value="{Width=272, Height=188}" />
<Text value="${res:Dialog.Options.IDEOptions.TaskListOptions.CommentTagsGroupBox}" />
<Controls>
<System.Windows.Forms.Button>
<Name value="changeButton" />
<Location value="{X=128,Y=128}" />
<Text value="${res:Global.ChangeButtonText}" />
<TabIndex value="5" />
</System.Windows.Forms.Button>
<System.Windows.Forms.Button>
<Name value="addButton" />
<Location value="{X=128,Y=100}" />
<Text value="${res:Global.AddButtonText}" />
<TabIndex value="4" />
</System.Windows.Forms.Button>
<System.Windows.Forms.Button>
<Name value="removeButton" />
<Location value="{X=128,Y=156}" />
<Text value="${res:Global.RemoveButtonText}" />
<TabIndex value="6" />
</System.Windows.Forms.Button>
<System.Windows.Forms.Label>
<Name value="label2" />
<Text value="${res:Dialog.Options.IDEOptions.TaskListOptions.NameLabel}" />
<TextAlign value="BottomLeft" />
<Anchor value="Top, Left, Right" />
<TabIndex value="2" />
<Size value="{Width=136, Height=22}" />
<Location value="{X=128,Y=18}" />
</System.Windows.Forms.Label>
<System.Windows.Forms.TextBox>
<Name value="nameTextBox" />
<Anchor value="Top, Left, Right" />
<TabIndex value="3" />
<Location value="{X=128,Y=40}" />
<Size value="{Width=136, Height=21}" />
<Text value="" />
</System.Windows.Forms.TextBox>
<System.Windows.Forms.Label>
<Name value="label" />
<Text value="${res:Dialog.Options.IDEOptions.TaskListOptions.TokenListLabel}" />
<TextAlign value="BottomLeft" />
<TabIndex value="0" />
<Size value="{Width=112, Height=20}" />
<Location value="{X=8,Y=20}" />
</System.Windows.Forms.Label>
<System.Windows.Forms.ListView>
<Name value="taskListView" />
<MultiSelect value="False" />
<TabIndex value="1" />
<View value="Details" />
<Sorting value="Ascending" />
<FullRowSelect value="True" />
<Location value="{X=8,Y=40}" />
<Size value="{Width=112, Height=140}" />
<HeaderStyle value="None" />
<HideSelection value="False" />
<Columns>
<System.Windows.Forms.ColumnHeader>
<Width value="200" />
<Name value="columnHeader" />
<Text value="" />
</System.Windows.Forms.ColumnHeader>
</Columns>
</System.Windows.Forms.ListView>
</Controls>
</System.Windows.Forms.GroupBox>
</Controls>
</System.Windows.Forms.UserControl>
<System.Windows.Forms.ColumnHeader>
<Width value="70" />
<Name value="columnHeader3" />
<Text value="Template" />
</System.Windows.Forms.ColumnHeader>
<System.Windows.Forms.ColumnHeader>
<Width value="70" />
<Name value="columnHeader7" />
<Text value="${res:Dialog.Options.CodeTemplate.Template}" />
</System.Windows.Forms.ColumnHeader>
<System.Windows.Forms.ColumnHeader>
<Width value="140" />
<Name value="columnHeader6" />
<Text value="Description" />
</System.Windows.Forms.ColumnHeader>
<System.Windows.Forms.ColumnHeader>
<Width value="140" />
<Name value="columnHeader5" />
<Text value="${res:Dialog.Options.CodeTemplate.Description}" />
</System.Windows.Forms.ColumnHeader>
<System.Windows.Forms.ColumnHeader>
<Width value="140" />
<Name value="columnHeader4" />
<Text value="${res:Dialog.Options.CodeTemplate.Description}" />
</System.Windows.Forms.ColumnHeader>
<System.Windows.Forms.ColumnHeader>
<Width value="70" />
<Name value="columnHeader9" />
<Text value="${res:Dialog.Options.CodeTemplate.Template}" />
</System.Windows.Forms.ColumnHeader>
<System.Windows.Forms.ColumnHeader>
<Width value="140" />
<Name value="columnHeader8" />
<Text value="${res:Dialog.Options.CodeTemplate.Description}" />
</System.Windows.Forms.ColumnHeader>
<System.Windows.Forms.ColumnHeader>
<Width value="200" />
<Name value="columnHeader" />
<Text value="" />
</System.Windows.Forms.ColumnHeader>
<System.Windows.Forms.ColumnHeader>
<Width value="70" />
<Name value="columnHeader10" />
<Text value="${res:Dialog.Options.CodeTemplate.Template}" />
</System.Windows.Forms.ColumnHeader>
</Components>

94
src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/IDEOptions/TaskListOptions.cs

@ -1,94 +0,0 @@ @@ -1,94 +0,0 @@
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
using System;
using System.Collections.Generic;
using System.Windows.Forms;
using ICSharpCode.Core;
namespace ICSharpCode.SharpDevelop.Gui.OptionPanels
{
public class TaskListOptions : XmlFormsOptionPanel
{
const string taskListView = "taskListView";
const string nameTextBox = "nameTextBox";
const string changeButton = "changeButton";
const string removeButton = "removeButton";
const string addButton = "addButton";
ListView taskList;
public override void LoadPanelContents()
{
SetupFromXmlStream(this.GetType().Assembly.GetManifestResourceStream("Resources.TaskListOptions.xfrm"));
string[] tokens = ParserService.TaskListTokens;
taskList = (ListView)ControlDictionary[taskListView];
taskList.BeginUpdate();
foreach (string token in tokens) {
taskList.Items.Add(token);
}
taskList.EndUpdate();
taskList.SelectedIndexChanged += new EventHandler(TaskListViewSelectedIndexChanged);
ControlDictionary[changeButton].Click += new EventHandler(ChangeButtonClick);
ControlDictionary[removeButton].Click += new EventHandler(RemoveButtonClick);
ControlDictionary[addButton].Click += new EventHandler(AddButtonClick);
TaskListViewSelectedIndexChanged(this, EventArgs.Empty);
}
public override bool StorePanelContents()
{
List<string> tokens = new List<string>();
foreach (ListViewItem item in taskList.Items) {
string text = item.Text.Trim();
if (text.Length > 0) {
tokens.Add(text);
}
}
ParserService.TaskListTokens = tokens.ToArray();
return true;
}
void AddButtonClick(object sender, EventArgs e)
{
string newItemText = ControlDictionary[nameTextBox].Text;
foreach (ListViewItem item in ((ListView)ControlDictionary[taskListView]).Items) {
if (item.Text == newItemText) {
return;
}
}
((ListView)ControlDictionary[taskListView]).Items.Add(new ListViewItem(newItemText));
}
void ChangeButtonClick(object sender, EventArgs e)
{
((ListView)ControlDictionary[taskListView]).SelectedItems[0].Text = ControlDictionary[nameTextBox].Text;
}
void RemoveButtonClick(object sender, EventArgs e)
{
((ListView)ControlDictionary[taskListView]).Items.Remove(((ListView)ControlDictionary[taskListView]).SelectedItems[0]);
}
void TaskListViewSelectedIndexChanged(object sender, EventArgs e)
{
if (((ListView)ControlDictionary[taskListView]).SelectedItems.Count > 0) {
ControlDictionary[nameTextBox].Text = ((ListView)ControlDictionary[taskListView]).SelectedItems[0].Text;
ControlDictionary[changeButton].Enabled = true;
ControlDictionary[removeButton].Enabled = true;
} else {
ControlDictionary[nameTextBox].Text = String.Empty;
ControlDictionary[changeButton].Enabled = false;
ControlDictionary[removeButton].Enabled = false;
}
}
public TaskListOptions()
{
}
}
}

0
src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/IDEOptions/TaskListXaml.xaml → src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/IDEOptions/TaskListOptionsl.xaml

0
src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/IDEOptions/TaskListXaml.xaml.cs → src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/IDEOptions/TaskListOptionsl.xaml.cs

Loading…
Cancel
Save