/// <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.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(NewDocumentDialogClass)); this.fileNameTextBox = new System.Windows.Forms.TextBox(); this.typeList = new System.Windows.Forms.ListView(); this.largeIconsImageList = new System.Windows.Forms.ImageList(this.components); this.smallIconsImageList = new System.Windows.Forms.ImageList(this.components); this.categoryTree = new System.Windows.Forms.TreeView(); this.treeImageList = new System.Windows.Forms.ImageList(this.components); this.nameLabel = new System.Windows.Forms.Label(); this.locationLabel = new System.Windows.Forms.Label(); this.browseButton = new System.Windows.Forms.Button(); this.okButton = new System.Windows.Forms.Button(); this.cancelButton = new System.Windows.Forms.Button(); this.buttonsGroup = new System.Windows.Forms.GroupBox(); this.isSeperateDirectory = new System.Windows.Forms.CheckBox(); this.smallIconButton = new System.Windows.Forms.Button(); this.largeIconButton = new System.Windows.Forms.Button(); this.categoryLabel = new System.Windows.Forms.Label(); this.typeLabel = new System.Windows.Forms.Label(); this.folderBrowserDialog = new System.Windows.Forms.FolderBrowserDialog(); this.fileLocationCombo = new NETXP.Controls.ComboBoxEx(); this.buttonsGroup.SuspendLayout(); this.SuspendLayout(); // // fileNameTextBox // this.fileNameTextBox.Location = new System.Drawing.Point(64, 184); this.fileNameTextBox.Name = "fileNameTextBox"; this.fileNameTextBox.Size = new System.Drawing.Size(392, 20); this.fileNameTextBox.TabIndex = 3; this.fileNameTextBox.Text = ""; // // typeList // this.typeList.Alignment = System.Windows.Forms.ListViewAlignment.SnapToGrid; this.typeList.AllowColumnReorder = true; this.typeList.AutoArrange = false; this.typeList.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.typeList.GridLines = true; this.typeList.HideSelection = false; this.typeList.LargeImageList = this.largeIconsImageList; this.typeList.Location = new System.Drawing.Point(232, 32); this.typeList.MultiSelect = false; this.typeList.Name = "typeList"; this.typeList.Size = new System.Drawing.Size(224, 144); this.typeList.SmallImageList = this.smallIconsImageList; this.typeList.TabIndex = 2; this.typeList.View = System.Windows.Forms.View.SmallIcon; this.typeList.SelectedIndexChanged += new System.EventHandler(this.typeList_SelectedIndexChanged); // // largeIconsImageList // this.largeIconsImageList.ColorDepth = System.Windows.Forms.ColorDepth.Depth32Bit; this.largeIconsImageList.ImageSize = new System.Drawing.Size(32, 32); this.largeIconsImageList.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("largeIconsImageList.ImageStream"))); this.largeIconsImageList.TransparentColor = System.Drawing.Color.Transparent; // // smallIconsImageList // this.smallIconsImageList.ColorDepth = System.Windows.Forms.ColorDepth.Depth32Bit; this.smallIconsImageList.ImageSize = new System.Drawing.Size(18, 18); this.smallIconsImageList.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("smallIconsImageList.ImageStream"))); this.smallIconsImageList.TransparentColor = System.Drawing.Color.Transparent; // // categoryTree // this.categoryTree.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.categoryTree.ImageList = this.treeImageList; this.categoryTree.Location = new System.Drawing.Point(8, 32); this.categoryTree.Name = "categoryTree"; this.categoryTree.SelectedImageIndex = 1; this.categoryTree.ShowRootLines = false; this.categoryTree.Size = new System.Drawing.Size(216, 144); this.categoryTree.TabIndex = 1; this.categoryTree.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.categoryTree_AfterSelect); // // treeImageList // this.treeImageList.ColorDepth = System.Windows.Forms.ColorDepth.Depth32Bit; this.treeImageList.ImageSize = new System.Drawing.Size(20, 20); this.treeImageList.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("treeImageList.ImageStream"))); this.treeImageList.TransparentColor = System.Drawing.Color.Transparent; // // nameLabel // this.nameLabel.FlatStyle = System.Windows.Forms.FlatStyle.System; this.nameLabel.Location = new System.Drawing.Point(8, 184); this.nameLabel.Name = "nameLabel"; this.nameLabel.Size = new System.Drawing.Size(56, 23); this.nameLabel.TabIndex = 4; this.nameLabel.Text = "Name :"; // // locationLabel // this.locationLabel.FlatStyle = System.Windows.Forms.FlatStyle.System; this.locationLabel.Location = new System.Drawing.Point(8, 224); this.locationLabel.Name = "locationLabel"; this.locationLabel.Size = new System.Drawing.Size(56, 23); this.locationLabel.TabIndex = 5; this.locationLabel.Text = "Location :"; // // browseButton // this.browseButton.FlatStyle = System.Windows.Forms.FlatStyle.System; this.browseButton.Location = new System.Drawing.Point(384, 224); this.browseButton.Name = "browseButton"; this.browseButton.Size = new System.Drawing.Size(72, 23); this.browseButton.TabIndex = 5; this.browseButton.Text = "Browse..."; this.browseButton.Click += new System.EventHandler(this.browseButton_Click); // // okButton // this.okButton.FlatStyle = System.Windows.Forms.FlatStyle.System; this.okButton.Location = new System.Drawing.Point(288, 16); this.okButton.Name = "okButton"; this.okButton.Size = new System.Drawing.Size(80, 23); this.okButton.TabIndex = 7; this.okButton.Text = "OK"; this.okButton.Click += new System.EventHandler(this.okButton_Click); // // cancelButton // this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel; this.cancelButton.FlatStyle = System.Windows.Forms.FlatStyle.System; this.cancelButton.Location = new System.Drawing.Point(376, 16); this.cancelButton.Name = "cancelButton"; this.cancelButton.Size = new System.Drawing.Size(80, 23); this.cancelButton.TabIndex = 8; this.cancelButton.Text = "Cancel"; this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click); // // buttonsGroup // this.buttonsGroup.Controls.Add(this.isSeperateDirectory); this.buttonsGroup.Controls.Add(this.okButton); this.buttonsGroup.Controls.Add(this.cancelButton); this.buttonsGroup.Dock = System.Windows.Forms.DockStyle.Bottom; this.buttonsGroup.FlatStyle = System.Windows.Forms.FlatStyle.System; this.buttonsGroup.Location = new System.Drawing.Point(0, 254); this.buttonsGroup.Name = "buttonsGroup"; this.buttonsGroup.Size = new System.Drawing.Size(466, 48); this.buttonsGroup.TabIndex = 6; this.buttonsGroup.TabStop = false; // // isSeperateDirectory // this.isSeperateDirectory.Enabled = false; this.isSeperateDirectory.FlatStyle = System.Windows.Forms.FlatStyle.System; this.isSeperateDirectory.Location = new System.Drawing.Point(24, 16); this.isSeperateDirectory.Name = "isSeperateDirectory"; this.isSeperateDirectory.Size = new System.Drawing.Size(168, 24); this.isSeperateDirectory.TabIndex = 8; this.isSeperateDirectory.Text = "Create directory for Project"; this.isSeperateDirectory.Visible = false; // // smallIconButton // this.smallIconButton.FlatStyle = System.Windows.Forms.FlatStyle.Popup; this.smallIconButton.Image = ((System.Drawing.Image)(resources.GetObject("smallIconButton.Image"))); this.smallIconButton.Location = new System.Drawing.Point(408, 8); this.smallIconButton.Name = "smallIconButton"; this.smallIconButton.Size = new System.Drawing.Size(24, 23); this.smallIconButton.TabIndex = 9; this.smallIconButton.Click += new System.EventHandler(this.smallIconButton_Click); // // largeIconButton // this.largeIconButton.FlatStyle = System.Windows.Forms.FlatStyle.Popup; this.largeIconButton.Image = ((System.Drawing.Image)(resources.GetObject("largeIconButton.Image"))); this.largeIconButton.Location = new System.Drawing.Point(432, 8); this.largeIconButton.Name = "largeIconButton"; this.largeIconButton.Size = new System.Drawing.Size(24, 23); this.largeIconButton.TabIndex = 10; this.largeIconButton.Click += new System.EventHandler(this.largeIconButton_Click); // // categoryLabel // this.categoryLabel.Location = new System.Drawing.Point(8, 16); this.categoryLabel.Name = "categoryLabel"; this.categoryLabel.Size = new System.Drawing.Size(100, 16); this.categoryLabel.TabIndex = 13; this.categoryLabel.Text = "Category :"; // // typeLabel // this.typeLabel.Location = new System.Drawing.Point(232, 16); this.typeLabel.Name = "typeLabel"; this.typeLabel.Size = new System.Drawing.Size(100, 16); this.typeLabel.TabIndex = 14; this.typeLabel.Text = "Type :"; // // fileLocationCombo // this.fileLocationCombo.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; this.fileLocationCombo.Flags = ((NETXP.Controls.AutoCompleteFlags)((NETXP.Controls.AutoCompleteFlags.FileSystemDirs | NETXP.Controls.AutoCompleteFlags.AutoSuggestForceOn))); this.fileLocationCombo.Location = new System.Drawing.Point(64, 224); this.fileLocationCombo.MRUHive = NETXP.Controls.MRUKeyHive.LocalMachine; this.fileLocationCombo.MRUKey = "Software\\RoboAntz Labs\\MegaIDE\\Recent Documents\\RecentRecentlyTyped"; this.fileLocationCombo.Name = "fileLocationCombo"; this.fileLocationCombo.Size = new System.Drawing.Size(304, 21); this.fileLocationCombo.TabIndex = 15; // // NewDocumentDialogClass // this.AcceptButton = this.okButton; this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); this.CancelButton = this.cancelButton; this.ClientSize = new System.Drawing.Size(466, 302); this.Controls.Add(this.fileLocationCombo); this.Controls.Add(this.typeLabel); this.Controls.Add(this.categoryLabel); this.Controls.Add(this.largeIconButton); this.Controls.Add(this.smallIconButton); this.Controls.Add(this.buttonsGroup); this.Controls.Add(this.browseButton); this.Controls.Add(this.locationLabel); this.Controls.Add(this.nameLabel); this.Controls.Add(this.categoryTree); this.Controls.Add(this.typeList); this.Controls.Add(this.fileNameTextBox); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "NewDocumentDialogClass"; this.ShowInTaskbar = false; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; this.buttonsGroup.ResumeLayout(false); this.ResumeLayout(false); }
// We take a service provider in our constructor so that our main form can give us // services (like the property grid and toolbox). public SampleDesignerHost(IServiceProvider parentProvider) { this.serviceContainer = new ServiceContainer(parentProvider); designerTable = new Hashtable(); sites = new Hashtable(CaseInsensitiveHashCodeProvider.Default, CaseInsensitiveComparer.Default); loadingDesigner = false; transactionCount = 0; reloading = false; // Services that we already have implemented on our object serviceContainer.AddService(typeof(IDesignerHost), this); serviceContainer.AddService(typeof(IContainer), this); serviceContainer.AddService(typeof(IComponentChangeService), this); serviceContainer.AddService(typeof(IExtenderProviderService), this); serviceContainer.AddService(typeof(IDesignerEventService), this); // And services that we demand create. ServiceCreatorCallback callback = new ServiceCreatorCallback(this.OnCreateService); serviceContainer.AddService(typeof(IToolboxService), callback); serviceContainer.AddService(typeof(ISelectionService), callback); serviceContainer.AddService(typeof(ITypeDescriptorFilterService), callback); serviceContainer.AddService(typeof(IMenuCommandService), callback); // serviceContainer.AddService(typeof(IMenuEditorService), callback); - UNIMPLEMENTED // serviceContainer.AddService(typeof(IHelpService), callback); - UNIMPLEMENTED // serviceContainer.AddService(typeof(IReferenceService), callback); - UNIMPLEMENTED // serviceContainer.AddService(typeof(IPropertyValueUIService), callback); - UNIMPLEMENTED // Configure extender providers. ((IExtenderProviderService)this).AddExtenderProvider(new SampleNameExtenderProvider(this)); ((IExtenderProviderService)this).AddExtenderProvider(new SampleInheritedNameExtenderProvider(this)); //defaultMenuCommands = new DefaultMenuCommands(this); //defaultMenuCommands.AddTo(menuCommandService); // +Add Serialization Service serviceContainer.AddService(typeof(IDesignerSerializationService), callback); // -Add Serialization Service currentComponentsCombo = new NETXP.Controls.ComboBoxEx(); currentComponentsCombo.Visible = false; VisualPascalABC.Form1.Form1_object.PropertiesWindow.GetComponentsComboPanel().Controls.Add(currentComponentsCombo); currentComponentsCombo.EnableMRU = false; currentComponentsCombo.Dock = DockStyle.Fill; NETXP.Controls.ComboBoxEx baseCombo = VisualPascalABC.Form1.Form1_object.PropertiesWindow.GetComponentsCombo(); currentComponentsCombo.ItemHeight = baseCombo.ItemHeight; currentComponentsCombo.Font = baseCombo.Font; currentComponentsCombo.DrawMode = baseCombo.DrawMode; currentComponentsCombo.DropDownStyle = baseCombo.DropDownStyle; currentComponentsCombo.Flags = baseCombo.Flags; currentComponentsCombo.SelectedIndexChanged += new EventHandler(currentComponentsCombo_SelectedIndexChanged); currentComponentsCombo.Visible = true; currentComponentsCombo.ImageList = controlImages; }