Browse Source
git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@1956 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61shortcuts
21 changed files with 8 additions and 689 deletions
@ -1,59 +0,0 @@ |
|||||||
// <file>
|
|
||||||
// <copyright see="prj:///doc/copyright.txt"/>
|
|
||||||
// <license see="prj:///doc/license.txt"/>
|
|
||||||
// <owner name="Matthew Ward" email="mrward@users.sourceforge.net"/>
|
|
||||||
// <version>$Revision$</version>
|
|
||||||
// </file>
|
|
||||||
|
|
||||||
using ICSharpCode.Core; |
|
||||||
using ICSharpCode.SharpDevelop.Gui; |
|
||||||
using System; |
|
||||||
using System.Collections.Generic; |
|
||||||
using System.Windows.Forms; |
|
||||||
|
|
||||||
namespace ICSharpCode.WixBinding |
|
||||||
{ |
|
||||||
/* |
|
||||||
/// <summary>
|
|
||||||
/// Builds the View | Setup menu items.
|
|
||||||
/// </summary>
|
|
||||||
public class SetupViewMenuBuilder : ISubmenuBuilder |
|
||||||
{ |
|
||||||
public SetupViewMenuBuilder() |
|
||||||
{ |
|
||||||
} |
|
||||||
|
|
||||||
public ToolStripItem[] BuildSubmenu(Codon codon, object owner) |
|
||||||
{ |
|
||||||
List<ToolStripMenuItem> items = new List<ToolStripMenuItem>(); |
|
||||||
AddInTreeNode node = AddInTree.GetTreeNode("/AddIns/WixBinding/View"); |
|
||||||
foreach (Codon childCodon in node.Codons) { |
|
||||||
items.Add(CreateMenuItem(childCodon, owner)); |
|
||||||
} |
|
||||||
return items.ToArray(); |
|
||||||
} |
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Creates the toolstrip menu item and assumes that there are never any
|
|
||||||
/// child menu items.
|
|
||||||
/// </summary>
|
|
||||||
public ToolStripMenuItem CreateMenuItem(Codon codon, object owner) |
|
||||||
{ |
|
||||||
ToolStripMenuItem item = (ToolStripMenuItem)codon.BuildItem(owner, null); |
|
||||||
|
|
||||||
// Set shortcut.
|
|
||||||
string shortcut = codon.Properties["shortcut"]; |
|
||||||
if (shortcut != null) { |
|
||||||
item.ShortcutKeys = MenuCommand.ParseShortcut(shortcut); |
|
||||||
} |
|
||||||
|
|
||||||
// Set icon
|
|
||||||
string icon = codon.Properties["icon"]; |
|
||||||
if (!String.IsNullOrEmpty(icon)) { |
|
||||||
item.Image = IconService.GetBitmap(icon); |
|
||||||
} |
|
||||||
return item; |
|
||||||
} |
|
||||||
} |
|
||||||
*/ |
|
||||||
} |
|
||||||
@ -1,46 +0,0 @@ |
|||||||
// <file>
|
|
||||||
// <copyright see="prj:///doc/copyright.txt"/>
|
|
||||||
// <license see="prj:///doc/license.txt"/>
|
|
||||||
// <owner name="none" email=""/>
|
|
||||||
// <version>$Revision$</version>
|
|
||||||
// </file>
|
|
||||||
|
|
||||||
/* |
|
||||||
using System; |
|
||||||
using System.Drawing; |
|
||||||
|
|
||||||
namespace ICSharpCode.FormsDesigner |
|
||||||
{ |
|
||||||
/// <summary>
|
|
||||||
/// Interface defining the tab order mode.ning the tab order mode.
|
|
||||||
/// </summary>
|
|
||||||
public interface ITabOrder |
|
||||||
{ |
|
||||||
/// <summary>
|
|
||||||
/// Checks if tab order mode is active
|
|
||||||
/// </summary>
|
|
||||||
bool IsTabOrderMode { get; } |
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Sets the next tab index if over a control.
|
|
||||||
/// </summary>
|
|
||||||
void SetNextTabIndex(Point p); |
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Sets the previous tab index if over a control.
|
|
||||||
/// </summary>
|
|
||||||
void SetPrevTabIndex(Point p); |
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Show tab order.
|
|
||||||
/// </summary>
|
|
||||||
void ShowTabOrder(); |
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Show tab order.
|
|
||||||
/// </summary>
|
|
||||||
void HideTabOrder(); |
|
||||||
|
|
||||||
} |
|
||||||
} |
|
||||||
*/ |
|
||||||
@ -1,104 +0,0 @@ |
|||||||
// <file>
|
|
||||||
// <copyright see="prj:///doc/copyright.txt"/>
|
|
||||||
// <license see="prj:///doc/license.txt"/>
|
|
||||||
// <owner name="none" email=""/>
|
|
||||||
// <version>$Revision$</version>
|
|
||||||
// </file>
|
|
||||||
|
|
||||||
/* |
|
||||||
using System; |
|
||||||
using System.Diagnostics; |
|
||||||
using System.Drawing; |
|
||||||
using System.Drawing.Drawing2D; |
|
||||||
using System.Collections; |
|
||||||
using System.ComponentModel; |
|
||||||
using System.ComponentModel.Design; |
|
||||||
using System.Windows.Forms; |
|
||||||
using System.Windows.Forms.Design; |
|
||||||
using ICSharpCode.FormsDesigner.Services; |
|
||||||
|
|
||||||
namespace ICSharpCode.FormsDesigner |
|
||||||
{ |
|
||||||
/// <summary>
|
|
||||||
/// This class represents a visual feedback for the current tab index of a
|
|
||||||
/// form control.
|
|
||||||
/// </summary>
|
|
||||||
public class TabIndexControl : Control |
|
||||||
{ |
|
||||||
static Color BACKCOLOR2 = Color.DarkViolet; // background color when changed
|
|
||||||
static Color BACKCOLOR = Color.DarkBlue; // normal background color
|
|
||||||
static Color TEXTCOLOR = Color.White; // text color
|
|
||||||
static Font TEXTFONT = new Font("Tahoma",8); // font for the tab index number text
|
|
||||||
static Size DEFSIZE = new Size(20, 20); // default (also minimum) size of the control
|
|
||||||
|
|
||||||
protected Control associatedControl; // Associated form control
|
|
||||||
protected bool hasChanged = false; // indicates if tab index has changed.
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets that the tab index contro has changed the index
|
|
||||||
/// </summary>
|
|
||||||
public bool HasChanged { |
|
||||||
get { |
|
||||||
return hasChanged; |
|
||||||
} |
|
||||||
set { |
|
||||||
hasChanged = value; |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
public Control AssociatedControl { |
|
||||||
get { |
|
||||||
return associatedControl; |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Creates a tab index control.
|
|
||||||
/// </summary>
|
|
||||||
public TabIndexControl(Control c) |
|
||||||
{ |
|
||||||
associatedControl = c; |
|
||||||
this.Size = DEFSIZE; |
|
||||||
this.SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.UserPaint | ControlStyles.AllPaintingInWmPaint, true); |
|
||||||
c.LocationChanged += new EventHandler(SetLocation); |
|
||||||
c.TabIndexChanged += new EventHandler(RepaintOnTabIndexChange); |
|
||||||
SetLocation(this, EventArgs.Empty); |
|
||||||
} |
|
||||||
|
|
||||||
void RepaintOnTabIndexChange(object sender, EventArgs e) |
|
||||||
{ |
|
||||||
HasChanged = true; |
|
||||||
Refresh(); |
|
||||||
} |
|
||||||
|
|
||||||
void SetLocation(object sender, EventArgs e) |
|
||||||
{ |
|
||||||
this.Left = associatedControl.Left; |
|
||||||
this.Top = associatedControl.Top; |
|
||||||
} |
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Drawing code to draw the tab index number above the associated control.
|
|
||||||
/// </summary>
|
|
||||||
protected override void OnPaint(PaintEventArgs pe) |
|
||||||
{ |
|
||||||
Graphics g = pe.Graphics; |
|
||||||
|
|
||||||
string tabIndexAsString = associatedControl.TabIndex.ToString(); |
|
||||||
Size sz = Size.Round(g.MeasureString( tabIndexAsString,TEXTFONT)); |
|
||||||
|
|
||||||
this.Width = (sz.Width < DEFSIZE.Width )? DEFSIZE.Width : sz.Width; |
|
||||||
this.Height = DEFSIZE.Height; |
|
||||||
Rectangle r = new Rectangle(0,0,this.Width,this.Height); |
|
||||||
|
|
||||||
Color bkColor = ( hasChanged )? BACKCOLOR2 : BACKCOLOR; |
|
||||||
g.FillRectangle(new SolidBrush(bkColor),r); |
|
||||||
|
|
||||||
StringFormat sf = new StringFormat(); |
|
||||||
sf.Alignment = StringAlignment.Center; |
|
||||||
sf.LineAlignment = StringAlignment.Center; |
|
||||||
g.DrawString(tabIndexAsString, TEXTFONT, new SolidBrush(TEXTCOLOR), r, sf); |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
*/ |
|
||||||
@ -1,34 +0,0 @@ |
|||||||
// <file>
|
|
||||||
// <copyright see="prj:///doc/copyright.txt"/>
|
|
||||||
// <license see="prj:///doc/license.txt"/>
|
|
||||||
// <owner name="Mike Krüger" email="mike@icsharpcode.net"/>
|
|
||||||
// <version>$Revision$</version>
|
|
||||||
// </file>
|
|
||||||
|
|
||||||
using System; |
|
||||||
using System.Collections; |
|
||||||
using System.Xml; |
|
||||||
|
|
||||||
using ICSharpCode.SharpDevelop.Gui; |
|
||||||
using ICSharpCode.Core; |
|
||||||
using ICSharpCode.SharpDevelop.Project; |
|
||||||
|
|
||||||
namespace ICSharpCode.Core |
|
||||||
{ |
|
||||||
/* |
|
||||||
public class ProjectOpenConditionEvaluator : IConditionEvaluator |
|
||||||
{ |
|
||||||
public bool IsValid(object caller, Condition condition) |
|
||||||
{ |
|
||||||
IProject project = ProjectService.CurrentProject; |
|
||||||
|
|
||||||
string openproject = condition.Properties["activeproject"]; |
|
||||||
|
|
||||||
if (openproject == "*") { |
|
||||||
return project != null; |
|
||||||
} |
|
||||||
return project != null && project.Language == openproject; |
|
||||||
} |
|
||||||
} |
|
||||||
*/ |
|
||||||
} |
|
||||||
Loading…
Reference in new issue