public void AddMicrophone(Microphone m) { microphones.Add(m); if (string.IsNullOrWhiteSpace(m.Name)) m.Name = "Microphone " + microphones.Count; OnMicrophoneAdded(new DistanceDocumentEventArgs(m)); OnChanged(EventArgs.Empty); }
public MicrophoneIcon(Microphone mic) { this.mic = mic; icon = new Image(); icon.Source = new BitmapImage(new Uri(BaseUriHelper.GetBaseUri(Application.Current.MainWindow), "Images/microphone.png")); // Register for updates on the mouse down event so that we may start a drag'n'drop operation. this.icon.MouseDown += icon_MouseDown; }
public MicrophoneIcon(Microphone mic) { this.mic = mic; this.icon = new PictureBox(); Icon.SizeMode = PictureBoxSizeMode.AutoSize; Bitmap b = new Bitmap(@"C:\Users\Henrik\Documents\visual studio 2013\Projects\Distance\Distance\microphone.png"); b.MakeTransparent(); Icon.Image = b; // Place the image so that the center of it is where the document mic coordinates are. Icon.Location = new Point(mic.X - Icon.Image.Width / 2, mic.Y - Icon.Image.Height / 2); // Register for updates on the mouse down event so that we may start a drag'n'drop operation. this.icon.MouseDown += icon_MouseDown; }
public DistanceDocumentEventArgs(ReferencePoint rp) { this.mic = null; this.rp = rp; }
public DistanceDocumentEventArgs(Microphone mic) { this.mic = mic; this.rp = null; }
public DistanceDocumentEventArgs(Microphone mic, ReferencePoint rp) { this.mic = mic; this.rp = rp; }