本文整理汇总了C#中System.Windows.Forms.ToolStrip.SuspendLayout方法的典型用法代码示例。如果您正苦于以下问题:C# ToolStrip.SuspendLayout方法的具体用法?C# ToolStrip.SuspendLayout怎么用?C# ToolStrip.SuspendLayout使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Windows.Forms.ToolStrip
的用法示例。
在下文中一共展示了ToolStrip.SuspendLayout方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: UpdateToolbarText
public static void UpdateToolbarText(ToolStrip toolStrip)
{
toolStrip.SuspendLayout();
foreach (ToolStripItem item in toolStrip.Items) {
if (item is IStatusUpdate) {
((IStatusUpdate)item).UpdateText();
}
}
toolStrip.ResumeLayout();
}
示例2: addInLuoiItem
public static ToolStripDropDownButton addInLuoiItem(ToolStrip toolStripBar, TreeList treeList)
{
toolStripBar.SuspendLayout();
ToolStripSeparator InLuoiSep = new System.Windows.Forms.ToolStripSeparator();
InLuoiSep.Name = "InLuoiSep";
InLuoiSep.Size = new System.Drawing.Size(200, 20);
ToolStripDropDownButton inLuoi = new System.Windows.Forms.ToolStripDropDownButton();
inLuoi.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.ImageAndText;
inLuoi.Image = FWImageDic.PRINT_IMAGE20;
inLuoi.ImageTransparentColor = System.Drawing.Color.Magenta;
inLuoi.Name = "inLuoi";
inLuoi.Size = new System.Drawing.Size(200, 20);
inLuoi.Text = "In danh sách";
ToolStripMenuItem itemIn = new ToolStripMenuItem("In");
itemIn.Name = "in";
itemIn.DisplayStyle = ToolStripItemDisplayStyle.Text;
itemIn.Size = new System.Drawing.Size(200, 20);
itemIn.Click += delegate(object sender, EventArgs e)
{
if (treeList != null)
{
treeList.Print();
}
};
inLuoi.DropDownItems.Add(itemIn);
ToolStripMenuItem itemXemTruoc = new ToolStripMenuItem("Xem trước");
itemXemTruoc.Name = "xemTruoc";
itemXemTruoc.DisplayStyle = ToolStripItemDisplayStyle.Text;
itemXemTruoc.Size = new System.Drawing.Size(200, 20);
itemXemTruoc.Click += delegate(object sender, EventArgs e)
{
HelpMsgBox._showWaitingMsg(delegate()
{
if (treeList != null)
{
treeList.ShowPrintPreview();
}
});
};
inLuoi.DropDownItems.Add(itemXemTruoc);
toolStripBar.Items.Add(InLuoiSep);
toolStripBar.Items.Add(inLuoi);
toolStripBar.ResumeLayout(false);
toolStripBar.PerformLayout();
return inLuoi;
}
示例3: ToolStrip1
public ToolStrip1()
{
ToolStrip toolStrip = new ToolStrip();
toolStrip.SuspendLayout();
toolStrip.Dock = DockStyle.Top;
var tb = zForm.CreateToolStripTextBox(backColor: SystemColors.Control, width: 100);
tb.Enabled = false;
toolStrip.Items.Add(tb);
toolStrip.Items.Add(zForm.CreateToolStripLabel("tata"));
toolStrip.Items.Add(zForm.CreateToolStripLabelSeparator(100));
toolStrip.Items.Add(zForm.CreateToolStripTextBox("toto"));
toolStrip.ResumeLayout(false);
this.SuspendLayout();
this.ClientSize = new Size(1000, 300);
this.Controls.Add(toolStrip);
this.ResumeLayout(false);
this.PerformLayout();
}
示例4: InitializeComponent
private void InitializeComponent()
{
components = new Container();
toolStrip2 = new ToolStrip();
toolStripButton10 = new ToolStripButton();
toolStripSeparator5 = new ToolStripSeparator();
toolStripComboBox1 = new ToolStripComboBox();
toolStripComboBox2 = new ToolStripComboBox();
toolStripButton11 = new ToolStripButton();
toolStripButton13 = new ToolStripButton();
toolStripSeparator2 = new ToolStripSeparator();
toolStripProgressBar1 = new ToolStripProgressBar();
menuStrip1 = new MenuStrip();
Communication = new ToolStripMenuItem();
Connect = new ToolStripMenuItem();
Acquisition = new ToolStripMenuItem();
Samples = new ToolStripMenuItem();
Continous = new ToolStripMenuItem();
toolStripSeparator1 = new ToolStripSeparator();
Start = new ToolStripMenuItem();
Stop = new ToolStripMenuItem();
Settings = new ToolStripMenuItem();
timer1 = new Timer(components);
toolStripLabel1 = new ToolStripLabel();
toolStripTextBox2 = new ToolStripSCTexBox();
toolStrip2.SuspendLayout();
menuStrip1.SuspendLayout();
toolStrip2.Items.AddRange(new ToolStripItem[] { toolStripButton10, toolStripSeparator5, toolStripComboBox1, toolStripComboBox2, toolStripTextBox2, toolStripButton11, toolStripButton13, toolStripSeparator2, toolStripProgressBar1, toolStripLabel1 });
toolStrip2.Location = new Point(0, 0x30);
toolStrip2.Name = "toolStrip2";
toolStrip2.Size = new Size(0x29f, 0x19);
toolStrip2.TabIndex = 10;
toolStrip2.Text = "Acquisition toolbar";
toolStripButton10.DisplayStyle = ToolStripItemDisplayStyle.Image;
toolStripButton10.Image = Resources.Connect;
toolStripButton10.ImageTransparentColor = Color.Magenta;
toolStripButton10.Name = "toolStripButton10";
toolStripButton10.Size = new Size(0x17, 0x16);
toolStripButton10.Text = "Connect";
toolStripButton10.ToolTipText = "Connect/Disconnect";
toolStripSeparator5.Name = "toolStripSeparator5";
toolStripSeparator5.Size = new Size(6, 0x19);
toolStripComboBox1.DropDownStyle = ComboBoxStyle.DropDownList;
toolStripComboBox1.Items.AddRange(new object[] { "1", "10", "25", "50" });
toolStripComboBox1.Name = "toolStripComboBox1";
toolStripComboBox1.Size = new Size(0x4b, 0x19);
toolStripComboBox1.ToolTipText = "Data acquisition frequency (Hz)";
toolStripComboBox2.DropDownStyle = ComboBoxStyle.DropDownList;
toolStripComboBox2.Items.AddRange(new object[] { "Samples", "Continous" });
toolStripComboBox2.Name = "toolStripComboBox2";
toolStripComboBox2.Size = new Size(90, 0x19);
toolStripComboBox2.ToolTipText = "Acquisition Mode";
toolStripButton11.DisplayStyle = ToolStripItemDisplayStyle.Image;
toolStripButton11.Image = Resources.StartAcquistion;
toolStripButton11.ImageTransparentColor = Color.Magenta;
toolStripButton11.Name = "toolStripButton11";
toolStripButton11.Size = new Size(0x17, 0x16);
toolStripButton11.Text = "Start";
toolStripButton13.DisplayStyle = ToolStripItemDisplayStyle.Image;
toolStripButton13.Image = Resources.StopAcquistion;
toolStripButton13.ImageTransparentColor = Color.Magenta;
toolStripButton13.Name = "toolStripButton13";
toolStripButton13.Size = new Size(0x17, 0x16);
toolStripButton13.Text = "Stop";
toolStripSeparator2.Name = "toolStripSeparator2";
toolStripSeparator2.Size = new Size(6, 0x19);
toolStripProgressBar1.Name = "toolStripProgressBar1";
toolStripProgressBar1.Size = new Size(100, 0x16);
toolStripProgressBar1.Step = 2;
toolStripProgressBar1.Style = ProgressBarStyle.Continuous;
toolStripProgressBar1.ToolTipText = "Acquisition progress";
menuStrip1.Items.AddRange(new ToolStripItem[] { Communication });
menuStrip1.Location = new Point(0, 0);
menuStrip1.Name = "menuStrip1";
menuStrip1.Size = new Size(200, 0x18);
menuStrip1.TabIndex = 0;
menuStrip1.Text = "menuStrip1";
Communication.DropDownItems.AddRange(new ToolStripItem[] { Connect, Acquisition, Settings });
Communication.Name = "Communication";
Communication.Size = new Size(0x5b, 20);
Communication.Text = "Communication";
Connect.Name = "Connect";
Connect.Size = new Size(0x88, 0x16);
Connect.Text = "Connect";
Acquisition.DropDownItems.AddRange(new ToolStripItem[] { Samples, Continous, toolStripSeparator1, Start, Stop });
Acquisition.Name = "Acquisition";
Acquisition.Size = new Size(0x88, 0x16);
Acquisition.Text = "Acquisition";
Samples.Checked = true;
Samples.CheckState = CheckState.Checked;
Samples.Name = "Samples";
Samples.Size = new Size(0x85, 0x16);
Samples.Text = "Samples";
Continous.Name = "Continous";
Continous.Size = new Size(0x85, 0x16);
Continous.Text = "Continous";
toolStripSeparator1.Name = "toolStripSeparator1";
toolStripSeparator1.Size = new Size(130, 6);
Start.Name = "Start";
Start.Size = new Size(0x85, 0x16);
//.........这里部分代码省略.........
示例5: CreateStandardToolStrip
private void CreateStandardToolStrip(IDesignerHost host, ToolStrip tool)
{
string[] strArray = new string[] { System.Design.SR.GetString("StandardMenuNew"), System.Design.SR.GetString("StandardMenuOpen"), System.Design.SR.GetString("StandardMenuSave"), System.Design.SR.GetString("StandardMenuPrint"), "-", System.Design.SR.GetString("StandardToolCut"), System.Design.SR.GetString("StandardMenuCopy"), System.Design.SR.GetString("StandardMenuPaste"), "-", System.Design.SR.GetString("StandardToolHelp") };
string[] strArray2 = new string[] { "new", "open", "save", "print", "-", "cut", "copy", "paste", "-", "help" };
if (host != null)
{
tool.SuspendLayout();
ToolStripDesigner._autoAddNewItems = false;
DesignerTransaction transaction = this._host.CreateTransaction(System.Design.SR.GetString("StandardMenuCreateDesc"));
try
{
INameCreationService nameCreationService = (INameCreationService) this._provider.GetService(typeof(INameCreationService));
string str = "standardMainToolStrip";
string name = str;
int num = 1;
if (host != null)
{
while (this._host.Container.Components[name] != null)
{
name = str + num++.ToString(CultureInfo.InvariantCulture);
}
}
int index = 0;
foreach (string str3 in strArray)
{
name = null;
str = "ToolStripButton";
name = this.NameFromText(str3, typeof(ToolStripButton), nameCreationService, true);
ToolStripItem component = null;
if (name.Contains("Separator"))
{
component = (ToolStripSeparator) this._host.CreateComponent(typeof(ToolStripSeparator), name);
IDesigner designer = this._host.GetDesigner(component);
if (designer is ComponentDesigner)
{
((ComponentDesigner) designer).InitializeNewComponent(null);
}
}
else
{
component = (ToolStripButton) this._host.CreateComponent(typeof(ToolStripButton), name);
IDesigner designer2 = this._host.GetDesigner(component);
if (designer2 is ComponentDesigner)
{
((ComponentDesigner) designer2).InitializeNewComponent(null);
}
PropertyDescriptor descriptor = TypeDescriptor.GetProperties(component)["DisplayStyle"];
if (descriptor != null)
{
descriptor.SetValue(component, ToolStripItemDisplayStyle.Image);
}
PropertyDescriptor descriptor2 = TypeDescriptor.GetProperties(component)["Text"];
if (descriptor2 != null)
{
descriptor2.SetValue(component, str3);
}
Bitmap image = null;
try
{
image = this.GetImage(strArray2[index]);
}
catch
{
}
if (image != null)
{
PropertyDescriptor descriptor3 = TypeDescriptor.GetProperties(component)["Image"];
if (descriptor3 != null)
{
descriptor3.SetValue(component, image);
}
component.ImageTransparentColor = Color.Magenta;
}
}
tool.Items.Add(component);
index++;
}
MemberDescriptor member = TypeDescriptor.GetProperties(tool)["Items"];
this.componentChangeSvc.OnComponentChanging(tool, member);
this.componentChangeSvc.OnComponentChanged(tool, member, null, null);
}
catch (Exception exception)
{
if (exception is InvalidOperationException)
{
((IUIService) this._provider.GetService(typeof(IUIService))).ShowError(exception.Message);
}
if (transaction != null)
{
transaction.Cancel();
transaction = null;
}
}
finally
{
ToolStripDesigner._autoAddNewItems = true;
if (transaction != null)
{
transaction.Commit();
transaction = null;
//.........这里部分代码省略.........
示例6: RevertMerge
public static bool RevertMerge (ToolStrip targetToolStrip, ToolStrip sourceToolStrip)
{
if (sourceToolStrip == null)
throw new ArgumentNullException ("sourceToolStrip");
List<ToolStripItem> items_to_move = new List<ToolStripItem> ();
// Find every ToolStripItem who's Owner is the source toolstrip
// - If it's a TSMI, see if any of the subitems need to be moved back
foreach (ToolStripItem tsi in targetToolStrip.Items) {
if (tsi.Owner == sourceToolStrip)
items_to_move.Add (tsi);
else if (tsi is ToolStripMenuItem)
foreach (ToolStripItem menuitem in (tsi as ToolStripMenuItem).DropDownItems)
foreach (ToolStripMenuItem tsmi in sourceToolStrip.Items)
if (menuitem.Owner == tsmi.DropDown)
items_to_move.Add (menuitem);
}
// If we didn't find anything, return false
if (items_to_move.Count == 0 && targetToolStrip.HiddenMergedItems.Count == 0)
return false;
// Put back all the target's items removed in the merge
while (targetToolStrip.HiddenMergedItems.Count > 0) {
targetToolStrip.RevertMergeItem (targetToolStrip.HiddenMergedItems[0]);
targetToolStrip.HiddenMergedItems.RemoveAt (0);
}
sourceToolStrip.SuspendLayout ();
targetToolStrip.SuspendLayout ();
// Revert everything
while (items_to_move.Count > 0) {
sourceToolStrip.RevertMergeItem (items_to_move[0]);
items_to_move.Remove (items_to_move[0]);
}
sourceToolStrip.ResumeLayout ();
targetToolStrip.ResumeLayout ();
sourceToolStrip.IsCurrentlyMerged = false;
targetToolStrip.IsCurrentlyMerged = false;
sourceToolStrip.CurrentlyMergedWith = null;
targetToolStrip.CurrentlyMergedWith = null;
return true;
}
示例7: PropertyGrid
public PropertyGrid() {
onComponentAdd = new ComponentEventHandler(OnComponentAdd);
onComponentRemove = new ComponentEventHandler(OnComponentRemove);
onComponentChanged = new ComponentChangedEventHandler(OnComponentChanged);
SuspendLayout();
AutoScaleMode = AutoScaleMode.None;
if (!isScalingInitialized) {
if (DpiHelper.IsScalingRequired) {
normalButtonSize = DpiHelper.LogicalToDeviceUnits(DEFAULT_NORMAL_BUTTON_SIZE);
largeButtonSize = DpiHelper.LogicalToDeviceUnits(DEFAULT_LARGE_BUTTON_SIZE);
}
isScalingInitialized = true;
}
try
{
gridView = CreateGridView(null);
gridView.TabStop = true;
gridView.MouseMove += new MouseEventHandler(this.OnChildMouseMove);
gridView.MouseDown += new MouseEventHandler(this.OnChildMouseDown);
gridView.TabIndex = 2;
separator1 = CreateSeparatorButton();
separator2 = CreateSeparatorButton();
toolStrip = new ToolStrip();
toolStrip.SuspendLayout();
toolStrip.ShowItemToolTips = true;
toolStrip.AccessibleName = SR.GetString(SR.PropertyGridToolbarAccessibleName);
toolStrip.AccessibleRole = AccessibleRole.ToolBar;
toolStrip.TabStop = true;
toolStrip.AllowMerge = false;
// This caption is for testing.
toolStrip.Text = "PropertyGridToolBar";
// LayoutInternal handles positioning, and for perf reasons, we manually size.
toolStrip.Dock = DockStyle.None;
toolStrip.AutoSize = false;
toolStrip.TabIndex = 1;
toolStrip.ImageScalingSize = normalButtonSize;
// parity with the old...
toolStrip.CanOverflow = false;
// hide the grip but add in a few more pixels of padding.
toolStrip.GripStyle = ToolStripGripStyle.Hidden;
Padding toolStripPadding = toolStrip.Padding;
toolStripPadding.Left = 2;
toolStrip.Padding = toolStripPadding;
SetToolStripRenderer();
// always add the property tab here
AddRefTab(DefaultTabType, null, PropertyTabScope.Static, true);
doccomment = new DocComment(this);
doccomment.SuspendLayout();
doccomment.TabStop = false;
doccomment.Dock = DockStyle.None;
doccomment.BackColor = SystemColors.Control;
doccomment.ForeColor = SystemColors.ControlText;
doccomment.MouseMove += new MouseEventHandler(this.OnChildMouseMove);
doccomment.MouseDown += new MouseEventHandler(this.OnChildMouseDown);
hotcommands = new HotCommands(this);
hotcommands.SuspendLayout();
hotcommands.TabIndex = 3;
hotcommands.Dock = DockStyle.None;
SetHotCommandColors(false);
hotcommands.Visible = false;
hotcommands.MouseMove += new MouseEventHandler(this.OnChildMouseMove);
hotcommands.MouseDown += new MouseEventHandler(this.OnChildMouseDown);
Controls.AddRange(new Control[] { doccomment, hotcommands, gridView, toolStrip });
SetActiveControlInternal(gridView);
toolStrip.ResumeLayout(false); // SetupToolbar should perform the layout
SetupToolbar();
this.PropertySort = PropertySort.Categorized | PropertySort.Alphabetical;
this.Text = "PropertyGrid";
SetSelectState(0);
}
catch (Exception ex)
{
Debug.WriteLine(ex.ToString());
}
finally {
if (doccomment != null) {
doccomment.ResumeLayout(false);
}
if (hotcommands != null) {
hotcommands.ResumeLayout(false);
}
//.........这里部分代码省略.........
示例8: Merge
public static bool Merge(ToolStrip sourceToolStrip, ToolStrip targetToolStrip)
{
if (sourceToolStrip == null)
{
throw new ArgumentNullException("sourceToolStrip");
}
if (targetToolStrip == null)
{
throw new ArgumentNullException("targetToolStrip");
}
if (targetToolStrip == sourceToolStrip)
{
throw new ArgumentException(System.Windows.Forms.SR.GetString("ToolStripMergeImpossibleIdentical"));
}
bool flag = IsSpecialMDIStrip(sourceToolStrip) || ((sourceToolStrip.AllowMerge && targetToolStrip.AllowMerge) && (sourceToolStrip.GetType().IsAssignableFrom(targetToolStrip.GetType()) || targetToolStrip.GetType().IsAssignableFrom(sourceToolStrip.GetType())));
MergeHistory history = null;
if (flag)
{
history = new MergeHistory(sourceToolStrip);
int count = sourceToolStrip.Items.Count;
if (count > 0)
{
sourceToolStrip.SuspendLayout();
targetToolStrip.SuspendLayout();
try
{
int num2 = count;
int num3 = 0;
int num4 = 0;
while (num3 < count)
{
ToolStripItem source = sourceToolStrip.Items[num4];
MergeRecursive(source, targetToolStrip.Items, history.MergeHistoryItemsStack);
int num5 = num2 - sourceToolStrip.Items.Count;
num4 = (num5 > 0) ? num4 : (num4 + 1);
num2 = sourceToolStrip.Items.Count;
num3++;
}
}
finally
{
sourceToolStrip.ResumeLayout();
targetToolStrip.ResumeLayout();
}
if (history.MergeHistoryItemsStack.Count > 0)
{
targetToolStrip.MergeHistoryStack.Push(history);
}
}
}
bool flag2 = false;
if ((history != null) && (history.MergeHistoryItemsStack.Count > 0))
{
flag2 = true;
}
return flag2;
}
示例9: addNhapTuFileItem
public static ToolStripDropDownButton addNhapTuFileItem(ToolStrip toolStripBar, GridView gridView)
{
toolStripBar.SuspendLayout();
ToolStripDropDownButton nhapTuFile = new System.Windows.Forms.ToolStripDropDownButton();
nhapTuFile.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.ImageAndText;
nhapTuFile.Image = FWImageDic.EXPORT_TO_FILE_IMAGE20;
nhapTuFile.ImageTransparentColor = System.Drawing.Color.Magenta;
nhapTuFile.Name = "nhapTuFile";
nhapTuFile.Size = new System.Drawing.Size(200, 20);
nhapTuFile.Text = "Nhập từ file";
ToolStripMenuItem itemTemplate = new ToolStripMenuItem("Tạo định dạng file nhập");
itemTemplate.Name = "taoDinhDangNhap";
itemTemplate.DisplayStyle = ToolStripItemDisplayStyle.Text;
itemTemplate.Size = new System.Drawing.Size(200, 20);
nhapTuFile.DropDownItems.Add(itemTemplate);
ToolStripMenuItem itemChonFile = new ToolStripMenuItem("Chọn file để nhập");
itemChonFile.Name = "chonFileNhap";
itemChonFile.DisplayStyle = ToolStripItemDisplayStyle.Text;
nhapTuFile.DropDownItems.Add(itemChonFile);
ToolStripSeparator InLuoiSep = new System.Windows.Forms.ToolStripSeparator();
InLuoiSep.Name = "InLuoiSep";
InLuoiSep.Size = new System.Drawing.Size(200, 20);
toolStripBar.Items.Add(InLuoiSep);
toolStripBar.Items.Add(nhapTuFile);
toolStripBar.ResumeLayout(false);
toolStripBar.PerformLayout();
return nhapTuFile;
}
示例10: LoadBtnToolStrip
public void LoadBtnToolStrip(ToolStrip ts, String fileName)
{
ts.SuspendLayout();
if (fileName != null)
{
try
{
String tempStr;
tempStr = fileName.Split(new char[] { '.' })[fileName.Split(new char[] { '.' }).Length - 1];
if (tempStr.ToUpper() == "XML" && File.Exists(fileName))
{
XmlDocument doc = new XmlDocument();
doc.Load(fileName);
XmlNode root = doc.SelectSingleNode("/root/buttons");
for (int i = 0; i < root.ChildNodes.Count; i++)
{
XmlElement elem = (XmlElement)root.ChildNodes[i];
ToolStripButton btn = new ToolStripButton();
btn.Text = elem.Attributes["Text"].InnerText;
btn.Name = elem.Attributes["Name"].InnerText;
try
{
btn.Image = Image.FromFile(elem.Attributes["Image"].InnerText);
}
catch
{
Trace.WriteLine("Error:加载工具栏按钮错误\""+btn.Name+"\" Image 加载错误");
}
btn.Tag = elem.Attributes["Function"].InnerText;
try
{
string visibleStr = elem.Attributes["visible"].InnerText;
btn.Visible = bool.Parse(visibleStr);
}
catch
{
Trace.WriteLine("Error:加载工具栏按钮错误,按钮\""+btn.Name+"\" visble 解析错误");
}
try
{
string imgFileName = elem.Attributes["Image"].InnerText;
if (imgFileName != "" && File.Exists(imgFileName))
{
btn.Image = Image.FromFile(imgFileName);
}
}
catch
{
}
btn.TextImageRelation = TextImageRelation.ImageAboveText;
btn.Click += new EventHandler(menu_Click);
ts.Items.Add(btn);
}
}
}
catch (System.Exception ex)
{
//ToDo:Log Message
Trace.WriteLine("Error:" + ex.Message + ex.StackTrace);
}
}
ts.ResumeLayout(false);
ts.PerformLayout();
}
示例11: InitializeComponent
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
void InitializeComponent() {
components = new System.ComponentModel.Container();
var resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm));
toolStripContainer1 = new ToolStripContainer();
panel1 = new Panel();
shapeContainer1 = new ShapeContainer();
menuStrip1 = new MenuStrip();
fileToolStripMenuItem = new ToolStripMenuItem();
newToolStripMenuItem = new ToolStripMenuItem();
openToolStripMenuItem = new ToolStripMenuItem();
toolStripSeparator = new ToolStripSeparator();
saveToolStripMenuItem = new ToolStripMenuItem();
saveAsToolStripMenuItem = new ToolStripMenuItem();
exportToolStripMenuItem = new ToolStripMenuItem();
exportImageToolStripMenuItem = new ToolStripMenuItem();
comeImmagineVettorialeToolStripMenuItem = new ToolStripMenuItem();
toolStripSeparator1 = new ToolStripSeparator();
printToolStripMenuItem = new ToolStripMenuItem();
printPreviewToolStripMenuItem = new ToolStripMenuItem();
toolStripSeparator2 = new ToolStripSeparator();
exitToolStripMenuItem = new ToolStripMenuItem();
editToolStripMenuItem = new ToolStripMenuItem();
undoToolStripMenuItem = new ToolStripMenuItem();
redoToolStripMenuItem = new ToolStripMenuItem();
toolStripSeparator3 = new ToolStripSeparator();
cutToolStripMenuItem = new ToolStripMenuItem();
copyToolStripMenuItem = new ToolStripMenuItem();
pasteToolStripMenuItem = new ToolStripMenuItem();
toolStripSeparator4 = new ToolStripSeparator();
selectAllToolStripMenuItem = new ToolStripMenuItem();
objectsTSMI = new ToolStripMenuItem();
lineKindTSMI = new ToolStripMenuItem();
toolsToolStripMenuItem = new ToolStripMenuItem();
customizeToolStripMenuItem = new ToolStripMenuItem();
optionsToolStripMenuItem = new ToolStripMenuItem();
showTSMI = new ToolStripMenuItem();
hideTSMI = new ToolStripMenuItem();
helpToolStripMenuItem = new ToolStripMenuItem();
contentsToolStripMenuItem = new ToolStripMenuItem();
indexToolStripMenuItem = new ToolStripMenuItem();
searchToolStripMenuItem = new ToolStripMenuItem();
toolStripSeparator5 = new ToolStripSeparator();
aboutToolStripMenuItem = new ToolStripMenuItem();
toolStrip1 = new ToolStrip();
newToolStripButton = new ToolStripButton();
saveToolStripButton = new ToolStripButton();
openToolStripButton = new ToolStripButton();
printToolStripButton = new ToolStripButton();
toolStripSeparator6 = new ToolStripSeparator();
cutToolStripButton = new ToolStripButton();
copyToolStripButton = new ToolStripButton();
pasteToolStripButton = new ToolStripButton();
toolStripSeparator7 = new ToolStripSeparator();
libraryTS = new ToolStripSplitButton();
linkModeTS = new CheckableToolStripSplitButton();
toolStripSeparator8 = new ToolStripSeparator();
fontTS = new CheckableToolStripSplitButton();
altriToolStripMenuItem = new ToolStripMenuItem();
fColorTS = new CheckableToolStripSplitButton();
altriToolStripMenuItem1 = new ToolStripMenuItem();
bColorTS = new CheckableToolStripSplitButton();
altriToolStripMenuItem2 = new ToolStripMenuItem();
borderColorTS = new CheckableToolStripSplitButton();
altriToolStripMenuItem3 = new ToolStripMenuItem();
toolStripSeparator9 = new ToolStripSeparator();
resizeTS = new ToolStripButton();
gridTS = new ToolStripButton();
toolStripSeparator10 = new ToolStripSeparator();
helpToolStripButton = new ToolStripButton();
imageList1 = new ImageList(components);
fColorDialog = new ColorDialog();
fontDialog1 = new FontDialog();
bColorDialog = new ColorDialog();
printDocument1 = new System.Drawing.Printing.PrintDocument();
printDialog1 = new PrintDialog();
printPreviewDialog1 = new PrintPreviewDialog();
openFileDialog1 = new OpenFileDialog();
saveFileDialog1 = new SaveFileDialog();
saveFileDialog2 = new SaveFileDialog();
borderColorDialog = new ColorDialog();
saveFileDialog3 = new SaveFileDialog();
toolStripContainer1.ContentPanel.SuspendLayout();
toolStripContainer1.TopToolStripPanel.SuspendLayout();
toolStripContainer1.SuspendLayout();
panel1.SuspendLayout();
menuStrip1.SuspendLayout();
toolStrip1.SuspendLayout();
SuspendLayout();
//
// toolStripContainer1
//
//
// toolStripContainer1.ContentPanel
//
toolStripContainer1.ContentPanel.Controls.Add(panel1);
toolStripContainer1.ContentPanel.Size = new System.Drawing.Size(804, 529);
//.........这里部分代码省略.........
示例12: CreateToolsPanel
private void CreateToolsPanel()
{
ToolStrip toolStrip1 = new ToolStrip();
toolStrip1.SuspendLayout();
toolStrip1.Items.Add(zForm.CreateToolStripButton("panel 1", (sender, eventArgs) => ActiveTabPanel(0)));
toolStrip1.Items.Add(zForm.CreateToolStripButton("panel 2", (sender, eventArgs) => ActiveTabPanel(1)));
toolStrip1.Items.Add(zForm.CreateToolStripButton("panel 3", (sender, eventArgs) => ActiveTabPanel(2)));
toolStrip1.Items.Add(zForm.CreateToolStripButton("panel 4", (sender, eventArgs) => ActiveTabPanel(3)));
toolStrip1.Items.Add(zForm.CreateToolStripButton("panel 5", (sender, eventArgs) => ActiveTabPanel(4)));
toolStrip1.ResumeLayout(false);
_toolsPanel.Controls.Add(toolStrip1);
}
示例13: InitializeComponent
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.Windows.Forms.ToolStrip toolStrip1;
System.Windows.Forms.ToolStripButton _openButton;
System.Windows.Forms.ToolStripMenuItem _fileMenuItem;
System.Windows.Forms.ToolStripMenuItem _openMenuItem;
System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
System.Windows.Forms.ToolStripSeparator toolStripSeparator2;
System.Windows.Forms.ToolStripMenuItem _exitMenuItem;
System.Windows.Forms.ToolStrip toolStrip2;
System.Windows.Forms.ToolStripContainer _toolStripContainer;
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm));
System.Windows.Forms.ToolStripMenuItem _addTreeContextMenuIten;
System.Windows.Forms.ToolStripMenuItem _removeListContextMenuItem;
System.Windows.Forms.ToolStripMenuItem removeToolStripMenuItem;
System.Windows.Forms.ToolStripMenuItem _renameListContextMenuItem;
this._saveButton = new System.Windows.Forms.ToolStripButton();
this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator();
this._generateButton = new System.Windows.Forms.ToolStripButton();
this._saveMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this._manageCulturesMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this._generateMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this._addResourceButton = new System.Windows.Forms.ToolStripButton();
this._removeResourceButton = new System.Windows.Forms.ToolStripButton();
this._renameResourceButton = new System.Windows.Forms.ToolStripButton();
this._treeSplitter = new System.Windows.Forms.SplitContainer();
this._paneTree = new Rsdn.LocUtil.Pane();
this._categoryTree = new Rsdn.TreeGrid.TreeGrid();
this._nameCol = new System.Windows.Forms.ColumnHeader();
this._countCol = new System.Windows.Forms.ColumnHeader();
this._treeImages = new System.Windows.Forms.ImageList(this.components);
this._resourceSplitter = new System.Windows.Forms.SplitContainer();
this._paneItems = new Rsdn.LocUtil.Pane();
this._itemList = new System.Windows.Forms.ListView();
this._itemNameCol = new System.Windows.Forms.ColumnHeader();
this._listImages = new System.Windows.Forms.ImageList(this.components);
this._paneProperties = new Rsdn.LocUtil.Pane();
this._propertyGrid = new System.Windows.Forms.PropertyGrid();
this._menuStrip = new System.Windows.Forms.MenuStrip();
this._resourceMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this._addResourceMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this._removeResourceMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this._renameResourceMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this._treeContextMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
this._listContextMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
this._openFileDialog = new System.Windows.Forms.OpenFileDialog();
this.BottomToolStripPanel = new System.Windows.Forms.ToolStripPanel();
this.TopToolStripPanel = new System.Windows.Forms.ToolStripPanel();
this.RightToolStripPanel = new System.Windows.Forms.ToolStripPanel();
this.LeftToolStripPanel = new System.Windows.Forms.ToolStripPanel();
this.ContentPanel = new System.Windows.Forms.ToolStripContentPanel();
toolStrip1 = new System.Windows.Forms.ToolStrip();
_openButton = new System.Windows.Forms.ToolStripButton();
_fileMenuItem = new System.Windows.Forms.ToolStripMenuItem();
_openMenuItem = new System.Windows.Forms.ToolStripMenuItem();
toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
_exitMenuItem = new System.Windows.Forms.ToolStripMenuItem();
toolStrip2 = new System.Windows.Forms.ToolStrip();
_toolStripContainer = new System.Windows.Forms.ToolStripContainer();
_addTreeContextMenuIten = new System.Windows.Forms.ToolStripMenuItem();
_removeListContextMenuItem = new System.Windows.Forms.ToolStripMenuItem();
removeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
_renameListContextMenuItem = new System.Windows.Forms.ToolStripMenuItem();
toolStrip1.SuspendLayout();
toolStrip2.SuspendLayout();
_toolStripContainer.ContentPanel.SuspendLayout();
_toolStripContainer.TopToolStripPanel.SuspendLayout();
_toolStripContainer.SuspendLayout();
this._treeSplitter.Panel1.SuspendLayout();
this._treeSplitter.Panel2.SuspendLayout();
this._treeSplitter.SuspendLayout();
this._paneTree.SuspendLayout();
this._resourceSplitter.Panel1.SuspendLayout();
this._resourceSplitter.Panel2.SuspendLayout();
this._resourceSplitter.SuspendLayout();
this._paneItems.SuspendLayout();
this._paneProperties.SuspendLayout();
this._menuStrip.SuspendLayout();
this._treeContextMenu.SuspendLayout();
this._listContextMenu.SuspendLayout();
this.SuspendLayout();
//
// toolStrip1
//
toolStrip1.Dock = System.Windows.Forms.DockStyle.None;
toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
_openButton,
this._saveButton,
this.toolStripSeparator3,
this._generateButton});
toolStrip1.Location = new System.Drawing.Point(3, 24);
toolStrip1.Name = "toolStrip1";
toolStrip1.Size = new System.Drawing.Size(87, 25);
toolStrip1.TabIndex = 1;
//.........这里部分代码省略.........
示例14: InitializeComponent
private void InitializeComponent()
{
System.Windows.Forms.ToolStrip tsRoot;
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm));
this.tscbRootList = new System.Windows.Forms.ToolStripComboBox();
this.toolContainer = new System.Windows.Forms.ToolStripContainer();
this.tsMisc = new System.Windows.Forms.ToolStrip();
this.tsbMakeRoot = new System.Windows.Forms.ToolStripButton();
this.tsbFindPage = new System.Windows.Forms.ToolStripButton();
this.tsbRefresh = new System.Windows.Forms.ToolStripButton();
this.tsWorkingSet = new System.Windows.Forms.ToolStrip();
this.tsbAddWorkingSet = new System.Windows.Forms.ToolStripButton();
this.tsbRemoveWorkingSet = new System.Windows.Forms.ToolStripButton();
this.tsbAddLink = new System.Windows.Forms.ToolStripButton();
this.tsbRemoveLink = new System.Windows.Forms.ToolStripButton();
tsRoot = new System.Windows.Forms.ToolStrip();
tsRoot.SuspendLayout();
this.toolContainer.BottomToolStripPanel.SuspendLayout();
this.toolContainer.TopToolStripPanel.SuspendLayout();
this.toolContainer.SuspendLayout();
this.tsMisc.SuspendLayout();
this.tsWorkingSet.SuspendLayout();
this.SuspendLayout();
//
// tsRoot
//
tsRoot.BackColor = System.Drawing.Color.White;
tsRoot.Dock = System.Windows.Forms.DockStyle.None;
tsRoot.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.tscbRootList});
tsRoot.Location = new System.Drawing.Point(3, 0);
tsRoot.Name = "tsRoot";
tsRoot.Padding = new System.Windows.Forms.Padding(0);
tsRoot.Size = new System.Drawing.Size(211, 25);
tsRoot.TabIndex = 0;
tsRoot.Text = "toolStrip1";
//
// tscbRootList
//
this.tscbRootList.BackColor = System.Drawing.Color.White;
this.tscbRootList.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.tscbRootList.Margin = new System.Windows.Forms.Padding(0);
this.tscbRootList.Name = "tscbRootList";
this.tscbRootList.Size = new System.Drawing.Size(200, 25);
this.tscbRootList.SelectedIndexChanged += new System.EventHandler(this.tscbRootListSelectionChanged);
//
// toolContainer
//
//
// toolContainer.BottomToolStripPanel
//
this.toolContainer.BottomToolStripPanel.BackColor = System.Drawing.Color.White;
this.toolContainer.BottomToolStripPanel.Controls.Add(this.tsWorkingSet);
this.toolContainer.BottomToolStripPanel.Controls.Add(this.tsMisc);
this.toolContainer.BottomToolStripPanel.RenderMode = System.Windows.Forms.ToolStripRenderMode.Professional;
//
// toolContainer.ContentPanel
//
this.toolContainer.ContentPanel.BackColor = System.Drawing.Color.White;
this.toolContainer.ContentPanel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.toolContainer.ContentPanel.Size = new System.Drawing.Size(237, 508);
this.toolContainer.Dock = System.Windows.Forms.DockStyle.Fill;
this.toolContainer.Location = new System.Drawing.Point(0, 0);
this.toolContainer.Margin = new System.Windows.Forms.Padding(0);
this.toolContainer.Name = "toolContainer";
this.toolContainer.Size = new System.Drawing.Size(237, 564);
this.toolContainer.TabIndex = 1;
this.toolContainer.Text = "toolStripContainer1";
//
// toolContainer.TopToolStripPanel
//
this.toolContainer.TopToolStripPanel.BackColor = System.Drawing.SystemColors.ControlLightLight;
this.toolContainer.TopToolStripPanel.Controls.Add(tsRoot);
this.toolContainer.TopToolStripPanel.RenderMode = System.Windows.Forms.ToolStripRenderMode.Professional;
//
// tsMisc
//
this.tsMisc.AllowItemReorder = true;
this.tsMisc.BackColor = System.Drawing.Color.White;
this.tsMisc.Dock = System.Windows.Forms.DockStyle.None;
this.tsMisc.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.tsbMakeRoot,
this.tsbFindPage,
this.tsbRefresh});
this.tsMisc.Location = new System.Drawing.Point(127, 0);
this.tsMisc.Name = "tsMisc";
this.tsMisc.Size = new System.Drawing.Size(96, 31);
this.tsMisc.TabIndex = 1;
//
// tsbMakeRoot
//
this.tsbMakeRoot.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.tsbMakeRoot.Image = ((System.Drawing.Image)(resources.GetObject("tsbMakeRoot.Image")));
this.tsbMakeRoot.ImageAlign = System.Drawing.ContentAlignment.BottomCenter;
this.tsbMakeRoot.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
this.tsbMakeRoot.ImageTransparentColor = System.Drawing.Color.Magenta;
this.tsbMakeRoot.Name = "tsbMakeRoot";
this.tsbMakeRoot.Size = new System.Drawing.Size(28, 28);
this.tsbMakeRoot.Text = "Make Selected Node the Root";
this.tsbMakeRoot.ToolTipText = "Make Selected Node the Root";
//.........这里部分代码省略.........
示例15: BuildToolStrip
/// <summary>
/// Called to build menus and toolbars. Override this method to customize menu and toolbar building.
/// </summary>
/// <remarks>
/// The default implementation simply clears and re-creates the toolstrip using methods on the
/// utility class <see cref="ToolStripBuilder"/>.
/// </remarks>
/// <param name="kind"></param>
/// <param name="toolStrip"></param>
/// <param name="actionModel"></param>
protected virtual void BuildToolStrip(ToolStripBuilder.ToolStripKind kind, ToolStrip toolStrip, ActionModelNode actionModel)
{
// avoid flicker
toolStrip.SuspendLayout();
// very important to clean up the existing ones first
ToolStripBuilder.Clear(toolStrip.Items);
if (actionModel != null)
{
if (actionModel.ChildNodes.Count > 0)
{
// Toolstrip should only be visible if there are items on it
if (kind == ToolStripBuilder.ToolStripKind.Toolbar)
ToolStripBuilder.BuildToolStrip(kind, toolStrip.Items, actionModel.ChildNodes, ToolStripBuilder.ToolStripBuilderStyle.GetDefault(), ToolStripSettings.Default.IconSize);
else
ToolStripBuilder.BuildToolStrip(kind, toolStrip.Items, actionModel.ChildNodes);
}
}
toolStrip.ResumeLayout();
}