| 0: | using System; | |
| 1: | using System.Collections; | |
| 2: | using System.ComponentModel; | |
| 3: | using System.Drawing; | |
| 4: | using System.Data; | |
| 5: | using System.Windows.Forms; | |
| 6: | ||
| 7: | using SharpDevelop.Tool.Data; | |
| 8: | using SharpDevelop.Internal.Project; | |
| 9: | ||
| 10: | namespace SharpDevelop.Gui.Dialogs { | |
| 11: | /// <summary> | |
| 12: | /// Summary description for UserControl2. | |
| 13: | /// </summary> | |
| 14: | public class CombineDependencyPanel : AbstractOptionPanel | |
| 15: | { | |
| 16: | private System.Windows.Forms.Label label1; | |
| 17: | private System.Windows.Forms.ComboBox comboBox1; | |
| 18: | private System.Windows.Forms.CheckedListBox checkedListBox1; | |
| 19: | private System.Windows.Forms.Label label2; | |
| 20: | /// <summary> | |
| 21: | /// Required designer variable. | |
| 22: | /// </summary> | |
| 23: | private System.ComponentModel.Container components = null; | |
| 24: | Combine combine; | |
| 25: | ||
| 26: | public override void Accept() | |
| 27: | { | |
| 28: | // TODO : Project dependency accept | |
| 29: | } | |
| 30: | ||
| 31: | void FillCheckListBox(object sender, EventArgs e) | |
| 32: | { | |
| 33: | checkedListBox1.Items.Clear(); | |
| 34: | ||
| 35: | foreach (CombineEntry entry in combine.Entries) { | |
| 36: | if (entry.Name != comboBox1.SelectedItem.ToString()) { | |
| 37: | checkedListBox1.Items.Add(entry.Name); | |
| 38: | } | |
| 39: | } | |
| 40: | } | |
| 41: | ||
| 42: | public CombineDependencyPanel(Combine combine) : base(Resource.GetString("Dialog.Options.CombineOptions.Dependencies.PanelName")) | |
| 43: | { | |
| 44: | this.combine = combine; | |
| 45: | // This call is required by the Windows.Forms Form Designer. | |
| 46: | InitializeComponent(); | |
| 47: | ||
| 48: | foreach (CombineEntry entry in combine.Entries) | |
| 49: | comboBox1.Items.Add(entry.Name); | |
| 50: | ||
| 51: | if (comboBox1.Items.Count > 0) { | |
| 52: | comboBox1.SelectedIndex = 0; | |
| 53: | } | |
| 54: | ||
| 55: | FillCheckListBox(null, null); | |
| 56: | } | |
| 57: | ||
| 58: | /// <summary> | |
| 59: | /// Clean up any resources being used. | |
| 60: | /// </summary> | |
| 61: | protected override void Dispose(bool disposing) | |
| 62: | { | |
| 63: | if (disposing) { | |
| 64: | if (components != null){ | |
| 65: | components.Dispose(); | |
| 66: | } | |
| 67: | } | |
| 68: | base.Dispose(disposing); | |
| 69: | } | |
| 70: | ||
| 71: | #region Windows Form Designer generated code | |
| 72: | /// <summary> | |
| 73: | /// Required method for Designer support - do not modify | |
| 74: | /// the contents of this method with the code editor. | |
| 75: | /// </summary> | |
| 76: | private void InitializeComponent() | |
| 77: | { | |
| 78: | this.label1 = new System.Windows.Forms.Label(); | |
| 79: | this.comboBox1 = new System.Windows.Forms.ComboBox(); | |
| 80: | this.checkedListBox1 = new System.Windows.Forms.CheckedListBox(); | |
| 81: | this.label2 = new System.Windows.Forms.Label(); | |
| 82: | this.SuspendLayout(); | |
| 83: | // | |
| 84: | // label1 | |
| 85: | // | |
| 86: | this.label1.Anchor = ((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | |
| 87: | | System.Windows.Forms.AnchorStyles.Right); | |
| 88: | this.label1.Location = new System.Drawing.Point(8, 8); | |
| 89: | this.label1.Name = "label1"; | |
| 90: | this.label1.Size = new System.Drawing.Size(304, 16); | |
| 91: | this.label1.TabIndex = 0; | |
| 92: | this.label1.Text = Resource.GetString("Dialog.Options.CombineOptions.Dependencies.EntryLabel"); | |
| 93: | // | |
| 94: | // comboBox1 | |
| 95: | // | |
| 96: | this.comboBox1.Anchor = ((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | |
| 97: | | System.Windows.Forms.AnchorStyles.Right); | |
| 98: | this.comboBox1.DropDownWidth = 304; | |
| 99: | this.comboBox1.Location = new System.Drawing.Point(8, 24); | |
| 100: | this.comboBox1.Name = "comboBox1"; | |
| 101: | this.comboBox1.Size = new System.Drawing.Size(304, 21); | |
| 102: | this.comboBox1.TabIndex = 1; | |
| 103: | this.comboBox1.DropDownStyle = ComboBoxStyle.DropDownList; | |
| 104: | ||
| 105: | comboBox1.SelectedIndexChanged += new EventHandler(FillCheckListBox); | |
| 106: | ||
| 107: | // | |
| 108: | // checkedListBox1 | |
| 109: | // | |
| 110: | this.checkedListBox1.Anchor = (((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | |
| 111: | | System.Windows.Forms.AnchorStyles.Left) | |
| 112: | | System.Windows.Forms.AnchorStyles.Right); | |
| 113: | this.checkedListBox1.Location = new System.Drawing.Point(8, 72); | |
| 114: | this.checkedListBox1.Name = "checkedListBox1"; | |
| 115: | this.checkedListBox1.Size = new System.Drawing.Size(304, 214); | |
| 116: | this.checkedListBox1.TabIndex = 2; | |
| 117: | // | |
| 118: | // label2 | |
| 119: | // | |
| 120: | this.label2.Anchor = ((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | |
| 121: | | System.Windows.Forms.AnchorStyles.Right); | |
| 122: | this.label2.Location = new System.Drawing.Point(8, 56); | |
| 123: | this.label2.Name = "label2"; | |
| 124: | this.label2.Size = new System.Drawing.Size(304, 16); | |
| 125: | this.label2.TabIndex = 3; | |
| 126: | this.label2.Text = Resource.GetString("Dialog.Options.CombineOptions.Dependencies.DependsOnLabel"); | |
| 127: | // | |
| 128: | // Form10 | |
| 129: | // | |
| 130: | this.ClientSize = new System.Drawing.Size(320, 293); | |
| 131: | this.Controls.AddRange(new System.Windows.Forms.Control[] { | |
| 132: | this.label2, | |
| 133: | this.checkedListBox1, | |
| 134: | this.comboBox1, | |
| 135: | this.label1}); | |
| 136: | this.Name = "Form10"; | |
| 137: | this.Text = "Form10"; | |
| 138: | this.ResumeLayout(false); | |
| 139: | ||
| 140: | } | |
| 141: | #endregion | |
| 142: | } | |
| 143: | } | |
| 144: |
This page was automatically generated by SharpDevelop.