コード例 #1
0
        protected override void ResourceLoader()
        {
            base.ResourceLoader();

            Elements[SOUND_ELEMENT_INDEX].Activate +=
                delegate() {
                SoundDialog d = new SoundDialog(this, mpq);
                d.Ok     += delegate() { DismissDialog(); };
                d.Cancel += delegate() { DismissDialog(); };
                ShowDialog(d);
            };

            Elements[SPEED_ELEMENT_INDEX].Activate +=
                delegate() {
                SpeedDialog d = new SpeedDialog(this, mpq);
                d.Ok     += delegate() { DismissDialog(); };
                d.Cancel += delegate() { DismissDialog(); };
                ShowDialog(d);
            };

            Elements[VIDEO_ELEMENT_INDEX].Activate +=
                delegate() {
                VideoDialog d = new VideoDialog(this, mpq);
                d.Ok     += delegate() { DismissDialog(); };
                d.Cancel += delegate() { DismissDialog(); };
                ShowDialog(d);
            };

            Elements[NETWORK_ELEMENT_INDEX].Activate +=
                delegate() {
                NetworkDialog d = new NetworkDialog(this, mpq);
                d.Ok     += delegate() { DismissDialog(); };
                d.Cancel += delegate() { DismissDialog(); };
                ShowDialog(d);
            };

            Elements[PREVIOUS_ELEMENT_INDEX].Activate +=
                delegate() {
                if (Previous != null)
                {
                    Previous();
                }
            };

            for (int i = 0; i < Elements.Count; i++)
            {
                Console.WriteLine("{0}: {1} '{2}'", i, Elements[i].Type, Elements[i].Text);
            }
        }
コード例 #2
0
ファイル: OptionsDialog.cs プロジェクト: carriercomm/scsharp
		protected override void ResourceLoader ()
		{
			base.ResourceLoader ();

			Elements[SOUND_ELEMENT_INDEX].Activate +=
				delegate () {
					SoundDialog d = new SoundDialog (this, mpq);
					d.Ok += delegate () { DismissDialog (); };
					d.Cancel += delegate () { DismissDialog (); };
					ShowDialog (d);
				};

			Elements[SPEED_ELEMENT_INDEX].Activate +=
				delegate () {
					SpeedDialog d = new SpeedDialog (this, mpq);
					d.Ok += delegate () { DismissDialog (); };
					d.Cancel += delegate () { DismissDialog (); };
					ShowDialog (d);
				};

			Elements[VIDEO_ELEMENT_INDEX].Activate +=
				delegate () {
					VideoDialog d = new VideoDialog (this, mpq);
					d.Ok += delegate () { DismissDialog (); };
					d.Cancel += delegate () { DismissDialog (); };
					ShowDialog (d);
				};

			Elements[NETWORK_ELEMENT_INDEX].Activate +=
				delegate () {
					NetworkDialog d = new NetworkDialog (this, mpq);
					d.Ok += delegate () { DismissDialog (); };
					d.Cancel += delegate () { DismissDialog (); };
					ShowDialog (d);
				};

			Elements[PREVIOUS_ELEMENT_INDEX].Activate +=
				delegate () {
					if (Previous != null)
						Previous ();
				};

			for (int i = 0; i < Elements.Count; i ++)
				Console.WriteLine ("{0}: {1} '{2}'", i, Elements[i].Type, Elements[i].Text);
		}