Click here to Skip to main content
15,905,508 members
Home / Discussions / Windows Forms
   

Windows Forms

 
AnswerRe: Toolbar or BindingNavigator? Pin
kuyak20001-Oct-07 18:05
kuyak20001-Oct-07 18:05 
GeneralRe: Toolbar or BindingNavigator? Pin
aharrisreid4-Oct-07 15:48
aharrisreid4-Oct-07 15:48 
GeneralRe: Toolbar or BindingNavigator? Pin
kuyak20008-Oct-07 0:40
kuyak20008-Oct-07 0:40 
GeneralRe: Toolbar or BindingNavigator? Pin
aharrisreid8-Oct-07 0:50
aharrisreid8-Oct-07 0:50 
QuestionColumnHeaderMouseDoubleClick event Pin
tthellebuyck19-Sep-07 5:04
tthellebuyck19-Sep-07 5:04 
AnswerRe: ColumnHeaderMouseDoubleClick event Pin
bttds26-Sep-07 19:42
bttds26-Sep-07 19:42 
QuestionSession like variables Pin
benqazou19-Sep-07 2:58
benqazou19-Sep-07 2:58 
AnswerRe: Session like variables Pin
Lutosław19-Sep-07 6:59
Lutosław19-Sep-07 6:59 
I would use a static class with a static member with an indexer:
public static class SC
{
	private static SettingsClass settings = new SettingsClass();
	public static SettingsClass Application
	{
		get { return settings; }
	}
	public class SettingsClass
	{
		Dictionary<string, object> settings = new Dictionary<string,object>();
		public object this[string id]
		{
			get
			{
				return settings[id];
			}
			set
			{
				if (!settings.ContainsKey(id))
					settings.Add(id, value);
				else
					settings[id] = value;
			}
		}
	}
}

add use it this way:
SC.Application["key"] = someObject;

Hope it helps anyhow.



Greetings - Gajatko

Portable.NET is part of DotGNU, a project to build a complete Free Software replacement for .NET - a system that truly belongs to the developers.

GeneralRe: Session like variables [modified] Pin
benqazou24-Sep-07 4:20
benqazou24-Sep-07 4:20 
GeneralRe: Session like variables [modified] Pin
Lutosław24-Sep-07 4:55
Lutosław24-Sep-07 4:55 
AnswerRe: Session like variables Pin
Lutosław19-Sep-07 7:08
Lutosław19-Sep-07 7:08 
AnswerRe: Session like variables -> Properties Pin
Arjan Einbu22-Sep-07 10:46
Arjan Einbu22-Sep-07 10:46 
AnswerRe: Session like variables Pin
Pete O'Hanlon23-Sep-07 9:09
mvePete O'Hanlon23-Sep-07 9:09 
GeneralRe: Session like variables Pin
benqazou24-Sep-07 4:03
benqazou24-Sep-07 4:03 
AnswerRe: Session like variables [modified] Pin
bttds26-Sep-07 19:55
bttds26-Sep-07 19:55 
QuestionCombining 2 projects into 1 Pin
heztheone18-Sep-07 21:53
heztheone18-Sep-07 21:53 
AnswerRe: Combining 2 projects into 1 Pin
Lutosław19-Sep-07 7:04
Lutosław19-Sep-07 7:04 
GeneralRe: Combining 2 projects into 1 Pin
heztheone19-Sep-07 20:54
heztheone19-Sep-07 20:54 
GeneralRe: Combining 2 projects into 1 Pin
Lutosław20-Sep-07 1:45
Lutosław20-Sep-07 1:45 
GeneralRe: Combining 2 projects into 1 Pin
heztheone20-Sep-07 2:05
heztheone20-Sep-07 2:05 
GeneralRe: Combining 2 projects into 1 Pin
Lutosław21-Sep-07 23:32
Lutosław21-Sep-07 23:32 
QuestionChild DataGridView Pin
somagunasekaran18-Sep-07 18:14
somagunasekaran18-Sep-07 18:14 
QuestionCheckBox Code...... Pin
1203b564218-Sep-07 14:51
1203b564218-Sep-07 14:51 
AnswerRe: CheckBox Code...... Pin
Dave Kreskowiak18-Sep-07 16:25
mveDave Kreskowiak18-Sep-07 16:25 
QuestionStringCollection in Embedded Resources Pin
Yordan Yordanov18-Sep-07 3:47
Yordan Yordanov18-Sep-07 3:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.