diff --git a/data/resources/image/BitmapResources/BitmapResources-data/Icons.16x16.OK.png b/data/resources/image/BitmapResources/BitmapResources-data/Icons.16x16.OK.png new file mode 100644 index 0000000000..4d06e30f2d Binary files /dev/null and b/data/resources/image/BitmapResources/BitmapResources-data/Icons.16x16.OK.png differ diff --git a/data/resources/image/BitmapResources/BitmapResources.res b/data/resources/image/BitmapResources/BitmapResources.res index e41345fe57..080bc68d8e 100644 --- a/data/resources/image/BitmapResources/BitmapResources.res +++ b/data/resources/image/BitmapResources/BitmapResources.res @@ -56,6 +56,7 @@ Icons.16x16.ClosedResourceFolder = ProjectBrowserIcons\Property Icons.16x16.ArrowLeftRight = BitmapResources-data\Icons.16x16.ArrowLeftRight.png Icons.16x16.ArrowDown = BitmapResources-data\Icons.16x16.ArrowDown.png Icons.16x16.ArrowUp = BitmapResources-data\Icons.16x16.ArrowUp.png +Icons.16x16.OK = BitmapResources-data\Icons.16x16.OK.png Icons.16x16.Debug.Start = DebuggerIcons\Icons.16x16.Debug.Start.png Icons.16x16.Debug.StartWithoutDebugging = DebuggerIcons\Icons.16x16.Debug.StartWithoutDebugging.png diff --git a/src/AddIns/BackendBindings/Boo/Boo.InterpreterAddIn/Project/Boo.Interpreter.addin b/src/AddIns/BackendBindings/Boo/Boo.InterpreterAddIn/Project/Boo.Interpreter.addin index 9aace14733..6215b9a41d 100644 --- a/src/AddIns/BackendBindings/Boo/Boo.InterpreterAddIn/Project/Boo.Interpreter.addin +++ b/src/AddIns/BackendBindings/Boo/Boo.InterpreterAddIn/Project/Boo.Interpreter.addin @@ -1,9 +1,12 @@ - + description = "Interactive interpreter for boo"> + + + + diff --git a/src/AddIns/BackendBindings/Boo/Boo.InterpreterAddIn/Project/InteractiveInterpreterControl.boo b/src/AddIns/BackendBindings/Boo/Boo.InterpreterAddIn/Project/InteractiveInterpreterControl.boo index 4196576841..40042d973f 100644 --- a/src/AddIns/BackendBindings/Boo/Boo.InterpreterAddIn/Project/InteractiveInterpreterControl.boo +++ b/src/AddIns/BackendBindings/Boo/Boo.InterpreterAddIn/Project/InteractiveInterpreterControl.boo @@ -121,7 +121,7 @@ class InteractiveInterpreterControl(TextEditorControl): private def SingleLineInputState(): code = ConsumeCurrentLine() - if code[-1:] in ":", "\\": + if code[-1:] in (":", "\\"): _state = InputState.Block _block.GetStringBuilder().Length = 0 _block.WriteLine(code) @@ -218,7 +218,7 @@ class InteractiveInterpreterControl(TextEditorControl): CtrlSpaceComplete() return true - if key in Keys.Home, Keys.Shift|Keys.Home, Keys.Control|Keys.Home: + if key in (Keys.Home, Keys.Shift|Keys.Home, Keys.Control|Keys.Home): MoveCaretToOffset(GetLastLineSegment().Offset + 4) return true @@ -226,7 +226,7 @@ class InteractiveInterpreterControl(TextEditorControl): ClearLine() return true - if key in Keys.Back, Keys.Left: + if key in (Keys.Back, Keys.Left): if self.CaretColumn < 5: return true else: diff --git a/src/AddIns/BackendBindings/Boo/Boo.InterpreterAddIn/Project/InterpreterWrapper.boo b/src/AddIns/BackendBindings/Boo/Boo.InterpreterAddIn/Project/InterpreterWrapper.boo index 72d55b13fa..d9550ca13d 100644 --- a/src/AddIns/BackendBindings/Boo/Boo.InterpreterAddIn/Project/InterpreterWrapper.boo +++ b/src/AddIns/BackendBindings/Boo/Boo.InterpreterAddIn/Project/InterpreterWrapper.boo @@ -17,11 +17,14 @@ class InterpreterWrapper: _interpreter = Boo.Lang.Interpreter.InteractiveInterpreter( RememberLastValue: true, Print: self.OnPrintLine) - _interpreter.SetValue("cls", { Cleared() }) + _interpreter.SetValue("cls", RaiseClear) event LinePrinted as callable(string) event Cleared as MethodInvoker + private def RaiseClear(): + Cleared() + private def OnPrintLine(text as string): LinePrinted(text) diff --git a/src/AddIns/BackendBindings/Boo/BooBinding/Project/BooBinding.addin b/src/AddIns/BackendBindings/Boo/BooBinding/Project/BooBinding.addin index cd7fb1d54d..f1fbb649e6 100644 --- a/src/AddIns/BackendBindings/Boo/BooBinding/Project/BooBinding.addin +++ b/src/AddIns/BackendBindings/Boo/BooBinding/Project/BooBinding.addin @@ -1,8 +1,8 @@ - + description = "Backing binding for Boo"> diff --git a/src/AddIns/BackendBindings/ILAsmBinding/Project/ILAsmBinding.addin b/src/AddIns/BackendBindings/ILAsmBinding/Project/ILAsmBinding.addin index b5d65ad8ba..dd57bc6392 100644 --- a/src/AddIns/BackendBindings/ILAsmBinding/Project/ILAsmBinding.addin +++ b/src/AddIns/BackendBindings/ILAsmBinding/Project/ILAsmBinding.addin @@ -1,8 +1,8 @@ - + description = "Backing binding for IL Assembler"> diff --git a/src/AddIns/BackendBindings/VBNetBinding/Project/VBNetBinding.addin b/src/AddIns/BackendBindings/VBNetBinding/Project/VBNetBinding.addin index 851261b4ad..36b92c5159 100644 --- a/src/AddIns/BackendBindings/VBNetBinding/Project/VBNetBinding.addin +++ b/src/AddIns/BackendBindings/VBNetBinding/Project/VBNetBinding.addin @@ -2,7 +2,7 @@ author = "Mike Krueger, Markus Palme" copyright = "GPL" url = "http://www.icsharpcode.net" - description = "SharpDevelop VB.NET language binding"> + description = "Backing binding for VB.NET"> diff --git a/src/AddIns/Misc/AddInManager/Project/Configuration/AssemblyInfo.cs b/src/AddIns/Misc/AddInManager/Project/Configuration/AssemblyInfo.cs index 233d442aae..8bc8c6c94b 100644 --- a/src/AddIns/Misc/AddInManager/Project/Configuration/AssemblyInfo.cs +++ b/src/AddIns/Misc/AddInManager/Project/Configuration/AssemblyInfo.cs @@ -31,4 +31,3 @@ using System.Runtime.CompilerServices; // numbers with the '*' character (the default): [assembly: AssemblyVersion("2.0.0.1")] - diff --git a/src/AddIns/Misc/AddInManager/Project/Src/AddInControl.cs b/src/AddIns/Misc/AddInManager/Project/Src/AddInControl.cs index a4f7bd3f1c..99701f7fef 100644 --- a/src/AddIns/Misc/AddInManager/Project/Src/AddInControl.cs +++ b/src/AddIns/Misc/AddInManager/Project/Src/AddInControl.cs @@ -1,9 +1,9 @@ -/* - * Created by SharpDevelop. - * User: Daniel Grunwald - * Date: 26.11.2005 - * Time: 15:54 - */ +// +// 2002-2005 AlphaSierraPapa +// GNU General Public License +// +// $Revision$ +// using System; using System.ComponentModel; @@ -14,9 +14,6 @@ using ICSharpCode.Core; namespace ICSharpCode.AddInManager { - /// - /// Description of AddInControl. - /// public class AddInControl : Control { AddIn addIn; @@ -34,6 +31,7 @@ namespace ICSharpCode.AddInManager this.Size = new Size(100, 40); this.SetStyle(ControlStyles.Selectable, true); this.SetStyle(ControlStyles.UserPaint, true); + this.SetStyle(ControlStyles.OptimizedDoubleBuffer, true); this.SetStyle(ControlStyles.ResizeRedraw, true); this.SetStyle(ControlStyles.AllPaintingInWmPaint, true); } @@ -65,8 +63,8 @@ namespace ICSharpCode.AddInManager bounds.Offset(1, 1); bounds.Inflate(-2, -2); Brush gradient = new LinearGradientBrush(bounds, - selected ? SystemColors.ControlLight : SystemColors.ControlLightLight, - selected ? SystemColors.Highlight : SystemColors.ControlDark, + selected ? SystemColors.Control : SystemColors.ControlLightLight, + selected ? SystemColors.Highlight : SystemColors.ControlDark, LinearGradientMode.ForwardDiagonal); GraphicsPath path = new GraphicsPath(); diff --git a/src/AddIns/Misc/AddInManager/Project/Src/Commands.cs b/src/AddIns/Misc/AddInManager/Project/Src/Commands.cs index 3df4433038..f77e8f9986 100644 --- a/src/AddIns/Misc/AddInManager/Project/Src/Commands.cs +++ b/src/AddIns/Misc/AddInManager/Project/Src/Commands.cs @@ -1,9 +1,9 @@ -/* - * Created by SharpDevelop. - * User: Daniel Grunwald - * Date: 26.11.2005 - * Time: 14:53 - */ +// +// 2002-2005 AlphaSierraPapa +// GNU General Public License +// +// $Revision$ +// using System; using ICSharpCode.Core; diff --git a/src/AddIns/Misc/AddInManager/Project/Src/ManagerForm.cs b/src/AddIns/Misc/AddInManager/Project/Src/ManagerForm.cs index 0387e41d50..d297f1ecc7 100644 --- a/src/AddIns/Misc/AddInManager/Project/Src/ManagerForm.cs +++ b/src/AddIns/Misc/AddInManager/Project/Src/ManagerForm.cs @@ -1,9 +1,9 @@ -/* - * Created by SharpDevelop. - * User: Daniel Grunwald - * Date: 26.11.2005 - * Time: 14:53 - */ +// +// 2002-2005 AlphaSierraPapa +// GNU General Public License +// +// $Revision$ +// using System; using System.Collections.Generic; @@ -47,7 +47,11 @@ namespace ICSharpCode.AddInManager int index = 0; AddInControl ctl; - foreach (AddIn addIn in AddInTree.AddIns) { + List addInList = new List(AddInTree.AddIns); + addInList.Sort(delegate(AddIn a, AddIn b) { + return a.Name.CompareTo(b.Name); + }); + foreach (AddIn addIn in addInList) { string identity = addIn.Manifest.PrimaryIdentity; if (identity == null || identity == "SharpDevelop") // || identity == "ICSharpCode.AddInManager" continue; @@ -61,7 +65,40 @@ namespace ICSharpCode.AddInManager while (stack.Count > 0) { splitContainer.Panel1.Controls.Add(stack.Pop()); } + ShowPreinstalledAddInsCheckBoxCheckedChanged(null, null); splitContainer.Panel2Collapsed = true; + splitContainer.Panel1.Paint += delegate(object sender, PaintEventArgs e) { + if (visibleAddInCount == 0) { + Rectangle rect = splitContainer.Panel1.ClientRectangle; + rect.Offset(16, 16); + rect.Inflate(-32, -32); + e.Graphics.DrawString("You don't have any AddIns installed.\n" + + "Download an AddIn from the Internet, then click 'Install AddIn' and " + + "choose the downloaded file to install it.", + Font, SystemBrushes.ControlText, rect); + } + }; + } + + int visibleAddInCount = 0; + + void ShowPreinstalledAddInsCheckBoxCheckedChanged(object sender, EventArgs e) + { + visibleAddInCount = 0; + foreach (AddInControl ctl in splitContainer.Panel1.Controls) { + if (showPreinstalledAddInsCheckBox.Checked) { + ctl.Visible = true; + } else { + if (ctl.Selected) + ctl.Selected = false; + if (ctl == oldFocus) + oldFocus = null; + ctl.Visible = !FileUtility.IsBaseDirectory(FileUtility.ApplicationRootPath, ctl.AddIn.FileName); + } + if (ctl.Visible) + visibleAddInCount += 1; + } + UpdateActionBox(); } void OnControlClick(object sender, EventArgs e) @@ -83,6 +120,7 @@ namespace ICSharpCode.AddInManager if ((ModifierKeys & Keys.Shift) == Keys.Shift && sender != oldFocus) { bool sel = false; foreach (AddInControl ctl in splitContainer.Panel1.Controls) { + if (!ctl.Visible) continue; if (ctl == sender || ctl == oldFocus) { sel = !sel; ctl.Selected = true; @@ -128,23 +166,34 @@ namespace ICSharpCode.AddInManager bool allEnabled = true; bool allDisabled = true; + bool allUninstallable = true; foreach (AddIn addIn in selected) { allEnabled &= addIn.Action == AddInAction.Enable; allDisabled &= addIn.Action == AddInAction.Disable; + if (allUninstallable) { + if (FileUtility.IsBaseDirectory(FileUtility.ApplicationRootPath, addIn.FileName)) { + allUninstallable = false; + } + } } if (allEnabled) { selectedAction = AddInAction.Disable; actionGroupBox.Text = runActionButton.Text = "Disable"; actionDescription.Text = "Disables the selected AddIns."; - ShowDependencies(selected, false); - uninstallButton.Enabled = runActionButton.Enabled = !dependencyTable.Visible; + runActionButton.Enabled = ShowDependencies(selected, false); + if (dependencyTable.Visible) { + actionDescription.Text += "\nThese AddIns are used by:"; + } + uninstallButton.Enabled = allUninstallable && runActionButton.Enabled; } else if (allDisabled) { selectedAction = AddInAction.Enable; actionGroupBox.Text = runActionButton.Text = "Enable"; actionDescription.Text = "Enables the selected AddIns."; - ShowDependencies(selected, true); - runActionButton.Enabled = !dependencyTable.Visible; - uninstallButton.Enabled = true; + runActionButton.Enabled = ShowDependencies(selected, true); + if (dependencyTable.Visible) { + actionDescription.Text += "\nRequired dependencies:"; + } + uninstallButton.Enabled = allUninstallable; } else { actionGroupBox.Text = ""; actionDescription.Text = "AddIns with multiple states are selected"; @@ -155,9 +204,106 @@ namespace ICSharpCode.AddInManager ignoreFocusChange = false; } - void ShowDependencies(List addIns, bool enable) + bool ShowDependencies(List addIns, bool enable) { + List dependencies = new List(); // only used with enable=true + List> dependenciesToSel = new List>(); + Dictionary addInDict = new Dictionary(); + Dictionary modifiedAddIns = new Dictionary(); + + // add available addins + foreach (AddIn addIn in AddInTree.AddIns) { + if (addIn.Action != AddInAction.Enable && addIn.Action != AddInAction.Install) + continue; + if (addIns.Contains(addIn)) + continue; + foreach (KeyValuePair pair in addIn.Manifest.Identities) { + addInDict[pair.Key] = pair.Value; + } + } + + // create list of modified addin names + foreach (AddIn addIn in addIns) { + foreach (KeyValuePair pair in addIn.Manifest.Identities) { + modifiedAddIns[pair.Key] = pair.Value; + } + } + + // add new addins + if (enable) { + foreach (AddIn addIn in addIns) { + foreach (KeyValuePair pair in addIn.Manifest.Identities) { + addInDict[pair.Key] = pair.Value; + } + foreach (AddInReference dep in addIn.Manifest.Dependencies) { + if (!dependencies.Contains(dep)) + dependencies.Add(dep); + } + } + } + + // add dependencies to the to-be-changed addins + foreach (AddIn addIn in AddInTree.AddIns) { + if (addIn.Action != AddInAction.Enable && addIn.Action != AddInAction.Install) + continue; + if (addIns.Contains(addIn)) + continue; + foreach (AddInReference dep in addIn.Manifest.Dependencies) { + if (modifiedAddIns.ContainsKey(dep.Name)) { + dependenciesToSel.Add(new KeyValuePair(addIn, dep)); + } + } + } + foreach (Control ctl in dependencyTable.Controls) { + ctl.Dispose(); + } + dependencyTable.Controls.Clear(); + bool allDepenciesOK = true; + if (dependencies.Count > 0 || dependenciesToSel.Count > 0) { + dependencyTable.RowCount = dependencies.Count + dependenciesToSel.Count; + while (dependencyTable.RowStyles.Count < dependencyTable.RowCount) { + dependencyTable.RowStyles.Add(new RowStyle(SizeType.AutoSize)); + } + int rowIndex = 0; + foreach (AddInReference dep in dependencies) { + if (!AddDependencyRow(addInDict, dep, rowIndex++, null)) + allDepenciesOK = false; + } + foreach (KeyValuePair pair in dependenciesToSel) { + if (!AddDependencyRow(addInDict, pair.Value, rowIndex++, pair.Key.Name)) + allDepenciesOK = false; + } + dependencyTable.Visible = true; + } + return allDepenciesOK; + } + + bool AddDependencyRow(Dictionary addInDict, AddInReference dep, int rowIndex, string requiredByName) + { + string text = requiredByName ?? GetDisplayName(dep.Name); + Version versionFound; + Label label = new Label(); + label.AutoSize = true; + label.Text = text; + PictureBox box = new PictureBox(); + box.BorderStyle = BorderStyle.None; + box.Size = new Size(16, 16); + bool isOK = dep.Check(addInDict, out versionFound); + box.SizeMode = PictureBoxSizeMode.CenterImage; + box.Image = isOK ? ResourceService.GetBitmap("Icons.16x16.OK") : ResourceService.GetBitmap("Icons.16x16.DeleteIcon"); + dependencyTable.Controls.Add(label, 1, rowIndex); + dependencyTable.Controls.Add(box, 0, rowIndex); + return isOK; + } + + string GetDisplayName(string identity) + { + foreach (AddIn addIn in AddInTree.AddIns) { + if (addIn.Manifest.Identities.ContainsKey(identity)) + return addIn.Name; + } + return identity; } void CloseButtonClick(object sender, EventArgs e) @@ -178,6 +324,20 @@ namespace ICSharpCode.AddInManager UpdateActionBox(); } + void InstallButtonClick(object sender, EventArgs e) + { + using (OpenFileDialog dlg = new OpenFileDialog()) { + dlg.Filter = "SharpDevelop AddIns|*.addin;*.sdaddin|All files|*.*"; + dlg.Multiselect = true; + if (dlg.ShowDialog() == DialogResult.OK) { + MessageService.ShowMessage("Not implemented."); + //foreach (string file in dlg.FileNames) { + // + //} + } + } + } + protected override void OnClosed(EventArgs e) { base.OnClosed(e); @@ -196,11 +356,14 @@ namespace ICSharpCode.AddInManager this.bottomPanel = new System.Windows.Forms.Panel(); this.installButton = new System.Windows.Forms.Button(); this.closeButton = new System.Windows.Forms.Button(); + this.showPreinstalledAddInsCheckBox = new System.Windows.Forms.CheckBox(); this.splitContainer = new System.Windows.Forms.SplitContainer(); this.actionGroupBox = new System.Windows.Forms.GroupBox(); this.actionFlowLayoutPanel = new System.Windows.Forms.FlowLayoutPanel(); this.actionDescription = new System.Windows.Forms.Label(); this.dependencyTable = new System.Windows.Forms.TableLayoutPanel(); + this.dummyLabel1 = new System.Windows.Forms.Label(); + this.dummyLabel2 = new System.Windows.Forms.Label(); this.runActionButton = new System.Windows.Forms.Button(); this.uninstallButton = new System.Windows.Forms.Button(); this.bottomPanel.SuspendLayout(); @@ -208,6 +371,7 @@ namespace ICSharpCode.AddInManager this.splitContainer.SuspendLayout(); this.actionGroupBox.SuspendLayout(); this.actionFlowLayoutPanel.SuspendLayout(); + this.dependencyTable.SuspendLayout(); this.SuspendLayout(); // // topPanel @@ -217,11 +381,13 @@ namespace ICSharpCode.AddInManager this.topPanel.Name = "topPanel"; this.topPanel.Size = new System.Drawing.Size(460, 33); this.topPanel.TabIndex = 0; + this.topPanel.Visible = false; // // bottomPanel // this.bottomPanel.Controls.Add(this.installButton); this.bottomPanel.Controls.Add(this.closeButton); + this.bottomPanel.Controls.Add(this.showPreinstalledAddInsCheckBox); this.bottomPanel.Dock = System.Windows.Forms.DockStyle.Bottom; this.bottomPanel.Location = new System.Drawing.Point(0, 355); this.bottomPanel.Name = "bottomPanel"; @@ -234,10 +400,11 @@ namespace ICSharpCode.AddInManager this.installButton.Location = new System.Drawing.Point(274, 6); this.installButton.Name = "installButton"; this.installButton.Size = new System.Drawing.Size(93, 23); - this.installButton.TabIndex = 0; + this.installButton.TabIndex = 1; this.installButton.Text = "Install AddIn"; this.installButton.UseCompatibleTextRendering = true; this.installButton.UseVisualStyleBackColor = true; + this.installButton.Click += new System.EventHandler(this.InstallButtonClick); // // closeButton // @@ -245,12 +412,23 @@ namespace ICSharpCode.AddInManager this.closeButton.Location = new System.Drawing.Point(373, 6); this.closeButton.Name = "closeButton"; this.closeButton.Size = new System.Drawing.Size(75, 23); - this.closeButton.TabIndex = 1; + this.closeButton.TabIndex = 2; this.closeButton.Text = "Close"; this.closeButton.UseCompatibleTextRendering = true; this.closeButton.UseVisualStyleBackColor = true; this.closeButton.Click += new System.EventHandler(this.CloseButtonClick); // + // showPreinstalledAddInsCheckBox + // + this.showPreinstalledAddInsCheckBox.Location = new System.Drawing.Point(3, 6); + this.showPreinstalledAddInsCheckBox.Name = "showPreinstalledAddInsCheckBox"; + this.showPreinstalledAddInsCheckBox.Size = new System.Drawing.Size(169, 24); + this.showPreinstalledAddInsCheckBox.TabIndex = 0; + this.showPreinstalledAddInsCheckBox.Text = "Show preinstalled AddIns"; + this.showPreinstalledAddInsCheckBox.UseCompatibleTextRendering = true; + this.showPreinstalledAddInsCheckBox.UseVisualStyleBackColor = true; + this.showPreinstalledAddInsCheckBox.CheckedChanged += new System.EventHandler(this.ShowPreinstalledAddInsCheckBoxCheckedChanged); + // // splitContainer // this.splitContainer.Dock = System.Windows.Forms.DockStyle.Fill; @@ -269,7 +447,7 @@ namespace ICSharpCode.AddInManager this.splitContainer.Panel2.Controls.Add(this.actionGroupBox); this.splitContainer.Panel2MinSize = 100; this.splitContainer.Size = new System.Drawing.Size(460, 322); - this.splitContainer.SplitterDistance = 310; + this.splitContainer.SplitterDistance = 248; this.splitContainer.TabIndex = 1; // // actionGroupBox @@ -278,7 +456,7 @@ namespace ICSharpCode.AddInManager this.actionGroupBox.Dock = System.Windows.Forms.DockStyle.Fill; this.actionGroupBox.Location = new System.Drawing.Point(0, 0); this.actionGroupBox.Name = "actionGroupBox"; - this.actionGroupBox.Size = new System.Drawing.Size(146, 322); + this.actionGroupBox.Size = new System.Drawing.Size(208, 322); this.actionGroupBox.TabIndex = 0; this.actionGroupBox.TabStop = false; this.actionGroupBox.Text = "actionGroupBox"; @@ -295,7 +473,7 @@ namespace ICSharpCode.AddInManager this.actionFlowLayoutPanel.FlowDirection = System.Windows.Forms.FlowDirection.TopDown; this.actionFlowLayoutPanel.Location = new System.Drawing.Point(3, 17); this.actionFlowLayoutPanel.Name = "actionFlowLayoutPanel"; - this.actionFlowLayoutPanel.Size = new System.Drawing.Size(140, 302); + this.actionFlowLayoutPanel.Size = new System.Drawing.Size(202, 302); this.actionFlowLayoutPanel.TabIndex = 0; this.actionFlowLayoutPanel.WrapContents = false; // @@ -311,21 +489,44 @@ namespace ICSharpCode.AddInManager // // dependencyTable // + this.dependencyTable.AutoSize = true; this.dependencyTable.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; this.dependencyTable.ColumnCount = 2; - this.dependencyTable.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); this.dependencyTable.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F)); + this.dependencyTable.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); + this.dependencyTable.Controls.Add(this.dummyLabel1, 1, 0); + this.dependencyTable.Controls.Add(this.dummyLabel2, 1, 1); this.dependencyTable.Location = new System.Drawing.Point(3, 21); this.dependencyTable.Name = "dependencyTable"; this.dependencyTable.RowCount = 2; - this.dependencyTable.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F)); - this.dependencyTable.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F)); - this.dependencyTable.Size = new System.Drawing.Size(106, 100); + this.dependencyTable.RowStyles.Add(new System.Windows.Forms.RowStyle()); + this.dependencyTable.RowStyles.Add(new System.Windows.Forms.RowStyle()); + this.dependencyTable.Size = new System.Drawing.Size(55, 36); this.dependencyTable.TabIndex = 1; // + // dummyLabel1 + // + this.dummyLabel1.AutoSize = true; + this.dummyLabel1.Location = new System.Drawing.Point(23, 0); + this.dummyLabel1.Name = "dummyLabel1"; + this.dummyLabel1.Size = new System.Drawing.Size(29, 18); + this.dummyLabel1.TabIndex = 0; + this.dummyLabel1.Text = "dep1"; + this.dummyLabel1.UseCompatibleTextRendering = true; + // + // dummyLabel2 + // + this.dummyLabel2.AutoSize = true; + this.dummyLabel2.Location = new System.Drawing.Point(23, 18); + this.dummyLabel2.Name = "dummyLabel2"; + this.dummyLabel2.Size = new System.Drawing.Size(29, 18); + this.dummyLabel2.TabIndex = 1; + this.dummyLabel2.Text = "dep2"; + this.dummyLabel2.UseCompatibleTextRendering = true; + // // runActionButton // - this.runActionButton.Location = new System.Drawing.Point(3, 127); + this.runActionButton.Location = new System.Drawing.Point(3, 63); this.runActionButton.Name = "runActionButton"; this.runActionButton.Size = new System.Drawing.Size(91, 23); this.runActionButton.TabIndex = 2; @@ -336,7 +537,7 @@ namespace ICSharpCode.AddInManager // // uninstallButton // - this.uninstallButton.Location = new System.Drawing.Point(3, 156); + this.uninstallButton.Location = new System.Drawing.Point(3, 92); this.uninstallButton.Name = "uninstallButton"; this.uninstallButton.Size = new System.Drawing.Size(91, 23); this.uninstallButton.TabIndex = 3; @@ -362,8 +563,13 @@ namespace ICSharpCode.AddInManager this.actionGroupBox.ResumeLayout(false); this.actionFlowLayoutPanel.ResumeLayout(false); this.actionFlowLayoutPanel.PerformLayout(); + this.dependencyTable.ResumeLayout(false); + this.dependencyTable.PerformLayout(); this.ResumeLayout(false); } + private System.Windows.Forms.Label dummyLabel2; + private System.Windows.Forms.Label dummyLabel1; + private System.Windows.Forms.CheckBox showPreinstalledAddInsCheckBox; private System.Windows.Forms.Button installButton; private System.Windows.Forms.Button uninstallButton; private System.Windows.Forms.Button runActionButton; diff --git a/src/AddIns/Misc/AddinScout/Project/AddInScout.addin b/src/AddIns/Misc/AddinScout/Project/AddInScout.addin index 100349d58a..7fe51b6e5b 100644 --- a/src/AddIns/Misc/AddinScout/Project/AddInScout.addin +++ b/src/AddIns/Misc/AddinScout/Project/AddInScout.addin @@ -2,8 +2,11 @@ author = "Satguru P Srivastava" copyright = "GPL" url = "http://home.mchsi.com/~ssatguru" - description = "Display AddIn Information" - version = "0.1.0"> + description = "Display AddIn Information"> + + + + diff --git a/src/AddIns/Misc/FiletypeRegisterer/Project/FiletypeRegisterer.addin b/src/AddIns/Misc/FiletypeRegisterer/Project/FiletypeRegisterer.addin index 62fa7ce273..0de8e79e81 100644 --- a/src/AddIns/Misc/FiletypeRegisterer/Project/FiletypeRegisterer.addin +++ b/src/AddIns/Misc/FiletypeRegisterer/Project/FiletypeRegisterer.addin @@ -1,9 +1,12 @@ - + description = "Registers files in the Windows Explorer for #Develop"> + + + + diff --git a/src/AddIns/Misc/HighlightingEditor/Project/HighlightingEditor.addin b/src/AddIns/Misc/HighlightingEditor/Project/HighlightingEditor.addin index c8a52cea05..2e600f3072 100644 --- a/src/AddIns/Misc/HighlightingEditor/Project/HighlightingEditor.addin +++ b/src/AddIns/Misc/HighlightingEditor/Project/HighlightingEditor.addin @@ -1,9 +1,12 @@ - + description = "Editor for syntax highlighting styles for the text editor"> + + + + diff --git a/src/AddIns/Misc/HtmlHelp2/Project/HtmlHelp2.addin b/src/AddIns/Misc/HtmlHelp2/Project/HtmlHelp2.addin index 406ae9af06..d53628b5c3 100644 --- a/src/AddIns/Misc/HtmlHelp2/Project/HtmlHelp2.addin +++ b/src/AddIns/Misc/HtmlHelp2/Project/HtmlHelp2.addin @@ -2,8 +2,7 @@ author = "Mathias Simmack" copyright = "Copyright (c) 2005" url = "unknown" - description = "integrates Microsoft's Help 2.0 Environment" - version = "2.0.0.3"> + description = "integrates Microsoft's Help 2.0 Environment"> diff --git a/src/AddIns/Misc/MbUnitPad/Project/MbUnitPad.addin b/src/AddIns/Misc/MbUnitPad/Project/MbUnitPad.addin index e47a69bc1a..c20f99ce04 100644 --- a/src/AddIns/Misc/MbUnitPad/Project/MbUnitPad.addin +++ b/src/AddIns/Misc/MbUnitPad/Project/MbUnitPad.addin @@ -2,7 +2,7 @@ author = "Daniel Grunwald" copyright = "GNU General Public License" url = "http://www.icsharpcode.net" - description = "Integrated MbUnit test runner for #Develop"> + description = "Runs MbUnit and NUnit tests inside #Develop"> diff --git a/src/AddIns/Misc/RegExpTk/Project/RegExpTk.addin b/src/AddIns/Misc/RegExpTk/Project/RegExpTk.addin index f2d6049026..e9282174bb 100644 --- a/src/AddIns/Misc/RegExpTk/Project/RegExpTk.addin +++ b/src/AddIns/Misc/RegExpTk/Project/RegExpTk.addin @@ -1,10 +1,14 @@ - + + + + diff --git a/src/AddIns/Misc/StartPage/Project/StartPage.addin b/src/AddIns/Misc/StartPage/Project/StartPage.addin index 3733822128..08035b5368 100644 --- a/src/AddIns/Misc/StartPage/Project/StartPage.addin +++ b/src/AddIns/Misc/StartPage/Project/StartPage.addin @@ -1,4 +1,4 @@ - +// 2002-2005 AlphaSierraPapa +// GNU General Public License +// +// $Revision$ +// using System; using System.Drawing; diff --git a/src/Main/Core/Project/Src/AddInTree/AddIn/AddIn.cs b/src/Main/Core/Project/Src/AddInTree/AddIn/AddIn.cs index 4eb140984d..e6f7abf3f7 100644 --- a/src/Main/Core/Project/Src/AddInTree/AddIn/AddIn.cs +++ b/src/Main/Core/Project/Src/AddInTree/AddIn/AddIn.cs @@ -12,10 +12,7 @@ using System.Xml; namespace ICSharpCode.Core { - /// - /// Description of AddIn. - /// - public class AddIn + public sealed class AddIn { Properties properties = new Properties(); List runtimes = new List(); @@ -44,6 +41,11 @@ namespace ICSharpCode.Core return null; } + public override string ToString() + { + return "[AddIn: " + Name + "]"; + } + /// /// Action to execute when the application is restarted. /// diff --git a/src/Main/Core/Project/Src/AddInTree/AddIn/AddInReference.cs b/src/Main/Core/Project/Src/AddInTree/AddIn/AddInReference.cs index e26650f063..965763e39c 100644 --- a/src/Main/Core/Project/Src/AddInTree/AddIn/AddInReference.cs +++ b/src/Main/Core/Project/Src/AddInTree/AddIn/AddInReference.cs @@ -15,7 +15,7 @@ namespace ICSharpCode.Core /// /// Represents a versioned reference to an AddIn. Used by . /// - public class AddInReference + public class AddInReference : ICloneable { string name; Version minimumVersion; @@ -37,6 +37,11 @@ namespace ICSharpCode.Core get { return name; } + set { + if (value == null) throw new ArgumentNullException("name"); + if (value.Length == 0) throw new ArgumentException("name cannot be an empty string", "name"); + name = value; + } } /// Returns true when the reference is valid. @@ -117,14 +122,24 @@ namespace ICSharpCode.Core public AddInReference(string name, Version minimumVersion, Version maximumVersion) { - if (name == null) throw new ArgumentNullException("name"); - if (name.Length == 0) throw new ArgumentException("name cannot be an empty string", "name"); + this.Name = name; if (minimumVersion == null) throw new ArgumentNullException("minimumVersion"); if (maximumVersion == null) throw new ArgumentNullException("maximumVersion"); this.minimumVersion = minimumVersion; this.maximumVersion = maximumVersion; - this.name = name; + } + + public override bool Equals(object obj) + { + if (!(obj is AddInReference)) return false; + AddInReference b = (AddInReference)obj; + return name == b.name && minimumVersion == b.minimumVersion && maximumVersion == b.maximumVersion; + } + + public override int GetHashCode() + { + return name.GetHashCode() ^ minimumVersion.GetHashCode() ^ maximumVersion.GetHashCode(); } public override string ToString() @@ -145,5 +160,15 @@ namespace ICSharpCode.Core } } } + + public AddInReference Clone() + { + return new AddInReference(name, minimumVersion, maximumVersion); + } + + object ICloneable.Clone() + { + return Clone(); + } } } diff --git a/src/Main/Core/Project/Src/AddInTree/AddInManager.cs b/src/Main/Core/Project/Src/AddInTree/AddInManager.cs index 9d1952efe5..ef2329ed01 100644 --- a/src/Main/Core/Project/Src/AddInTree/AddInManager.cs +++ b/src/Main/Core/Project/Src/AddInTree/AddInManager.cs @@ -1,9 +1,9 @@ -/* - * Created by SharpDevelop. - * User: Daniel Grunwald - * Date: 26.11.2005 - * Time: 18:27 - */ +// +// 2002-2005 AlphaSierraPapa +// GNU General Public License +// +// $Revision$ +// using System; using System.Collections.Generic; diff --git a/src/Main/StartUp/Project/Resources/BitmapResources.resources b/src/Main/StartUp/Project/Resources/BitmapResources.resources index d9a2100469..511748f7cf 100644 Binary files a/src/Main/StartUp/Project/Resources/BitmapResources.resources and b/src/Main/StartUp/Project/Resources/BitmapResources.resources differ