private void initProcessor(Form parent) { _voiceOutput = new VoiceMediaOutput(); _voiceOutput.Init(this, _conf); FaceMediaOutput face = new FaceMediaOutput(); face.Init(this, _conf); face.FaceEvent += new FaceEventHandler(OnFaceEvent); List <MediaOutput> outs = new List <MediaOutput>(); outs.Add(_voiceOutput); outs.Add(face); _processor = new MediaProcessor(_profile, outs, _conf); _processor.Processed += new Action(_processor_Processed); }
override public void Init(Profile profile, Form parent) { base.Init(profile, parent); InitializeComponent(); initColors(); _conf = new Configer(); //_processor = new MediaProcessor(_parent, _profile); //_processor.Processed += new Action(SetPlayIcon); _processors = new List <MediaProcessor>(); _musicLines = new List <MusicLine>(); for (int i = 0; i < Rows; i++) { BoomDataGrid.Rows.Add(); // init media processors VoiceMediaOutput voice = new VoiceMediaOutput(); voice.Init(this, new Configer()); List <MediaOutput> outs = new List <MediaOutput>(); outs.Add(voice); List <string> types = Profile.DefaultSpecfifcTypes.ToList(); types.AddRange(this.GetSpecificSoundTypes()); MediaProcessor proc = new MediaProcessor(profile, types.ToArray(), outs, _conf); TextBox tb = new TextBox(); tb.BorderStyle = BorderStyle.FixedSingle; tb.Parent = this; tb.Top = (i + 1) * 22 + 6; tb.Width = MusicComboBox.Width; tb.Left = MusicComboBox.Left; tb.Click += new EventHandler(tb_Click); tb.TextChanged += new EventHandler(tb_TextChanged); tb.DoubleClick += new EventHandler(tb_DoubleClick); tb.Tag = i; MusicLine ml = new MusicLine(tb, proc); _musicLines.Add(ml); _processors.Add(proc); } Label l = new Label(); l.Text = "Звуки Звуки Звуки Звуки Звуки"; l.Parent = this; l.Top = (Rows + 1) * 22 + 6; l.Left = MusicComboBox.Left + 10; l.Width = MusicComboBox.Width; l.BorderStyle = BorderStyle.None; l.BackColor = Color.FromArgb(255, 255, 192); BoomDataGrid.Height = Rows * 25 + 10; this.Height = Rows * 25 + 12; for (int i = 0; i < Columns; i++) { int n = BoomDataGrid.Columns.Count; DataGridViewTextBoxColumn C1 = new DataGridViewTextBoxColumn(); C1.Name = n.ToString(); //C1.State == n.ToString(); //C1.FlatStyle = FlatStyle.System; C1.ReadOnly = true; C1.CellTemplate.Style.BackColor = Color.White; C1.Width = 25; BoomDataGrid.Columns.Add(C1);//"Frame" + n.ToString(), n.ToString()); // BoomDataGrid.Columns[n].Width = 25; for (int j = 0; j < Rows; j++) { BoomDataGrid[i, j].Tag = 0; BoomDataGrid[i, j].Style.SelectionBackColor = Color.White; //(DataGridViewButton)BoomDataGrid[i, j].Clik } } //MusicComboBox.Items.AddRange(_profile.GetSpecificSoundsByType("музыка")); }