Exemplo n.º 1
0
        /// <summary>
        /// Constructs the Audio Panel.
        /// </summary>
        /// <param name="size">Size of the main panel.</param>
        /// <param name="parent">The main program Form that holds the panel.</param>
        public AudioPanel(Size size, AudioProgram parent)
        {
            this.Parent        = parent;
            this.MenuStrip     = new PanelMenuStrip(this);
            this.durationTimer = new System.Timers.Timer();
            this.playTimer     = new System.Timers.Timer();

            this.recorder = Recorder.Instance;
            this.InitPanels(size);
            this.InitCharts(size);
            this.InitButtons();

            this.AddMouseEventsToChildControls(this.Panel);
            this.Parent.Resize += new EventHandler(this.ResizePanels);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Constructs the menustrip.
        /// </summary>
        /// <param name="parent">The program that the menustrip is in.</param>
        public WindowMenuStrip(AudioProgram parent)
        {
            this.window   = parent;
            this.recorder = Recorder.Instance;

            this.InitFile();
            this.InitEncoding();
            this.InitRecord();

            // Setup default selected sample rate and bit rate
            this.window.SampleRate = 8000;
            this.window.BitRate    = 8;

            this.BackColor = ColorSettings.BLACKGRAY;
            this.ForeColor = ColorSettings.GRAY;
            this.Name      = "WindowMenuStrip";
            this.Margin    = new Padding(0);

            this.ResumeLayout(false);
            this.PerformLayout();
            this.RenderMode = ToolStripRenderMode.Professional;
            this.Renderer   = new MenuToolStripRenderer();
        }