Changeset 775 for trunk/sources
- Timestamp:
- 11/19/08 02:56:12 (16 years ago)
- Location:
- trunk/sources/HeuristicLab.Settings
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Settings/MainForm.Designer.cs
r757 r775 27 27 this.button1 = new System.Windows.Forms.Button(); 28 28 this.textBox2 = new System.Windows.Forms.TextBox(); 29 this.button2 = new System.Windows.Forms.Button(); 30 this.label1 = new System.Windows.Forms.Label(); 31 this.label2 = new System.Windows.Forms.Label(); 29 32 this.SuspendLayout(); 30 33 // 31 34 // textBox1 32 35 // 33 this.textBox1.Location = new System.Drawing.Point(12, 12); 36 this.textBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 37 | System.Windows.Forms.AnchorStyles.Right))); 38 this.textBox1.Location = new System.Drawing.Point(80, 12); 34 39 this.textBox1.Name = "textBox1"; 35 this.textBox1.Size = new System.Drawing.Size( 260, 20);40 this.textBox1.Size = new System.Drawing.Size(192, 20); 36 41 this.textBox1.TabIndex = 0; 37 42 this.textBox1.TextChanged += new System.EventHandler(this.textBox1_TextChanged); … … 39 44 // button1 40 45 // 41 this.button1.Location = new System.Drawing.Point(12, 38); 46 this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); 47 this.button1.Location = new System.Drawing.Point(116, 78); 42 48 this.button1.Name = "button1"; 43 49 this.button1.Size = new System.Drawing.Size(75, 23); 44 50 this.button1.TabIndex = 1; 45 this.button1.Text = " button1";51 this.button1.Text = "Save"; 46 52 this.button1.UseVisualStyleBackColor = true; 47 53 this.button1.Click += new System.EventHandler(this.button1_Click); … … 49 55 // textBox2 50 56 // 51 this.textBox2.Location = new System.Drawing.Point(12, 106); 57 this.textBox2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 58 | System.Windows.Forms.AnchorStyles.Right))); 59 this.textBox2.Location = new System.Drawing.Point(80, 38); 52 60 this.textBox2.Name = "textBox2"; 53 this.textBox2.ReadOnly = true; 54 this.textBox2.Size = new System.Drawing.Size(260, 20); 61 this.textBox2.Size = new System.Drawing.Size(192, 20); 55 62 this.textBox2.TabIndex = 0; 56 this.textBox2.TextChanged += new System.EventHandler(this.textBox1_TextChanged); 63 this.textBox2.TextChanged += new System.EventHandler(this.textBox2_TextChanged); 64 // 65 // button2 66 // 67 this.button2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); 68 this.button2.Location = new System.Drawing.Point(197, 78); 69 this.button2.Name = "button2"; 70 this.button2.Size = new System.Drawing.Size(75, 23); 71 this.button2.TabIndex = 2; 72 this.button2.Text = "Reload"; 73 this.button2.UseVisualStyleBackColor = true; 74 this.button2.Click += new System.EventHandler(this.button2_Click); 75 // 76 // label1 77 // 78 this.label1.AutoSize = true; 79 this.label1.Location = new System.Drawing.Point(12, 15); 80 this.label1.Name = "label1"; 81 this.label1.Size = new System.Drawing.Size(62, 13); 82 this.label1.TabIndex = 3; 83 this.label1.Text = "Application:"; 84 // 85 // label2 86 // 87 this.label2.AutoSize = true; 88 this.label2.Location = new System.Drawing.Point(12, 41); 89 this.label2.Name = "label2"; 90 this.label2.Size = new System.Drawing.Size(32, 13); 91 this.label2.TabIndex = 3; 92 this.label2.Text = "User:"; 57 93 // 58 94 // MainForm … … 60 96 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 61 97 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 62 this.ClientSize = new System.Drawing.Size(284, 264); 98 this.ClientSize = new System.Drawing.Size(284, 113); 99 this.Controls.Add(this.label2); 100 this.Controls.Add(this.label1); 101 this.Controls.Add(this.button2); 63 102 this.Controls.Add(this.button1); 64 103 this.Controls.Add(this.textBox2); … … 77 116 private System.Windows.Forms.Button button1; 78 117 private System.Windows.Forms.TextBox textBox2; 118 private System.Windows.Forms.Button button2; 119 private System.Windows.Forms.Label label1; 120 private System.Windows.Forms.Label label2; 79 121 } 80 122 } -
trunk/sources/HeuristicLab.Settings/MainForm.cs
r758 r775 17 17 private void MainForm_Load(object sender, EventArgs e) { 18 18 settings = Properties.Settings.Default; 19 settings.Reload(); 20 textBox1.Text = settings.AnotherSetting; 21 textBox2.Text = settings.MySetting; 19 textBox1.Text = settings.MyApplicationSetting; 20 textBox2.Text = settings.MyUserSetting; 22 21 } 23 22 … … 27 26 28 27 private void textBox1_TextChanged(object sender, EventArgs e) { 29 settings.AnotherSetting = textBox1.Text; 28 settings.MyApplicationSetting = textBox1.Text; 29 } 30 31 private void textBox2_TextChanged(object sender, EventArgs e) { 32 settings.MyUserSetting = textBox2.Text; 33 } 34 35 private void button2_Click(object sender, EventArgs e) { 36 settings.Reload(); 37 textBox1.Text = settings.MyApplicationSetting; 38 textBox2.Text = settings.MyUserSetting; 30 39 } 31 40 } -
trunk/sources/HeuristicLab.Settings/Properties/Settings.Designer.cs
r757 r775 26 26 [global::System.Configuration.ApplicationScopedSettingAttribute()] 27 27 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 28 [global::System.Configuration.DefaultSettingValueAttribute(" NiceValue")]29 public string My Setting {28 [global::System.Configuration.DefaultSettingValueAttribute("Application Setting Value")] 29 public string MyApplicationSetting { 30 30 get { 31 return ((string)(this["MySetting"])); 31 return ((string)(this["MyApplicationSetting"])); 32 } 33 set { 34 this["MyApplicationSetting"] = value; 32 35 } 33 36 } … … 35 38 [global::System.Configuration.UserScopedSettingAttribute()] 36 39 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 37 [global::System.Configuration.DefaultSettingValueAttribute(" COOL!!")]38 public string AnotherSetting {40 [global::System.Configuration.DefaultSettingValueAttribute("User Setting Value")] 41 public string MyUserSetting { 39 42 get { 40 return ((string)(this[" AnotherSetting"]));43 return ((string)(this["MyUserSetting"])); 41 44 } 42 45 set { 43 this[" AnotherSetting"] = value;46 this["MyUserSetting"] = value; 44 47 } 45 48 } -
trunk/sources/HeuristicLab.Settings/Properties/Settings.settings
r757 r775 3 3 <Profiles /> 4 4 <Settings> 5 <Setting Name="My Setting" Type="System.String" Scope="Application">6 <Value Profile="(Default)"> NiceValue</Value>5 <Setting Name="MyApplicationSetting" Type="System.String" Scope="Application"> 6 <Value Profile="(Default)">Application Setting Value</Value> 7 7 </Setting> 8 <Setting Name=" AnotherSetting" Type="System.String" Scope="User">9 <Value Profile="(Default)"> COOL!!</Value>8 <Setting Name="MyUserSetting" Type="System.String" Scope="User"> 9 <Value Profile="(Default)">User Setting Value</Value> 10 10 </Setting> 11 11 </Settings> -
trunk/sources/HeuristicLab.Settings/app.config
r757 r775 11 11 <applicationSettings> 12 12 <HeuristicLab.Settings.Properties.Settings> 13 <setting name="My Setting" serializeAs="String">14 <value> NiceValue</value>13 <setting name="MyApplicationSetting" serializeAs="String"> 14 <value>Application Setting Value</value> 15 15 </setting> 16 16 </HeuristicLab.Settings.Properties.Settings> … … 18 18 <userSettings> 19 19 <HeuristicLab.Settings.Properties.Settings> 20 <setting name=" AnotherSetting" serializeAs="String">21 <value> COOL!!</value>20 <setting name="MyUserSetting" serializeAs="String"> 21 <value>User Setting Value</value> 22 22 </setting> 23 23 </HeuristicLab.Settings.Properties.Settings>
Note: See TracChangeset
for help on using the changeset viewer.