Наследование: System.Windows.Forms.Form
Пример #1
0
        private void VolumeOnClick(object sender, EventArgs eventArgs)
        {
            var         user  = (IUserInfo)this.SelectedNode.Tag;
            VolumeEntry entry = ClientData.GetVolumes(Server).FirstOrDefault(ve => ve.Username == user.Username)
                                ?? new VolumeEntry {
                Username = user.Username, ServerId = Server.Id
            };

            VolumeForm volume = new VolumeForm(entry.Gain, v =>
            {
                foreach (var s in Client.Sources[user])
                {
                    Client.Audio.Update(s, new AudioEnginePlaybackOptions(v));
                }
            },

                                               v =>
            {
                entry.Gain = v;
                ClientData.SaveOrUpdate(entry);
            });

            volume.ShowDialog(this.Parent);
        }
Пример #2
0
		private void VolumeOnClick (object sender, EventArgs eventArgs)
		{
			var user = (IUserInfo)this.SelectedNode.Tag;
			VolumeEntry entry = ClientData.GetVolumes (Server).FirstOrDefault (ve => ve.Username == user.Username)
				                    ?? new VolumeEntry { Username = user.Username, ServerId = Server.Id };

			VolumeForm volume = new VolumeForm (entry.Gain, v =>
			{
				foreach (var s in Client.Sources[user])
					Client.Audio.Update (s, new AudioEnginePlaybackOptions (v));
			},
			
			v =>
			{
				entry.Gain = v;
				ClientData.SaveOrUpdate (entry);
			});
			volume.ShowDialog (this.Parent);
		}