Exemplo n.º 1
0
 public Bit8MenuItem(AudioPanel entry, AudioPanelMenuManager manager) : base("8 bit")
 {
     this.entry   = entry;
     this.manager = manager;
     this.Checked = true;
     this.value   = 8;
 }
        public AudioPanelMenu(AudioPanel parent)
        {
            this.parent  = parent;
            this.manager = new AudioPanelMenuManager(this);

            InitChildren();

            this.BackColor = Color.FromArgb(255, 35, 35, 35);
            this.Items.AddRange(new ToolStripItem[] {
                this.file,
                this.edit,
                this.encode,
                this.fourier,
                this.toggleFreq
            });
            this.Location = new Point(0, 0);
            this.Name     = "Menu";
            this.Size     = new Size(this.ClientSize.Width, AudioPanel.MENU_HEIGHT);
            this.TabIndex = 0;
            this.Text     = "Menu";
            this.Renderer = new ToolStripProfessionalRenderer(new MenuColoursTable());

            IsMono           = true;
            IsFrequencyShown = true;
        }
Exemplo n.º 3
0
 public khz8MenuItem(AudioPanel entry, AudioPanelMenuManager manager) : base("8,000 Hz")
 {
     this.entry   = entry;
     this.manager = manager;
     this.Checked = true;
     this.value   = 8000;
 }
Exemplo n.º 4
0
        public FourierWorker(AudioPanel entry, GUI.MenuItem.Fourier.RunFourierMenuItem button, Structure.TypeKey.Windowing type, int channelIndex)
        {
            this.entry               = entry;
            this.button              = button;
            this.DoWork             += new DoWorkEventHandler(RunDFTOnSelection);
            this.RunWorkerCompleted += new RunWorkerCompletedEventHandler(CallbackAsync);
            this.chIndex             = channelIndex;
            this.type    = type;
            this.threads = new Thread[4];
            dftResults   = new List <List <ComplexNumber> >();
            dftResults.Add(new List <ComplexNumber>());
            dftResults.Add(new List <ComplexNumber>());
            dftResults.Add(new List <ComplexNumber>());
            dftResults.Add(new List <ComplexNumber>());

            if (channelIndex == 0)
            {
                ch = entry.TimeChannel1;
            }
            else if (channelIndex == 1)
            {
                ch = entry.TimeChannel2;
            }
            button.Enabled = false;
        }
        public RectangularWinMenuItem(AudioPanel entry, AudioPanelMenuManager manager) : base("None")
        {
            this.entry   = entry;
            this.manager = manager;

            this.Checked       = true;
            manager.WindowMode = Structure.TypeKey.Windowing.Rectangular;
        }
Exemplo n.º 6
0
 public ChartRenderWorker(AudioPanel entry, int channelIndex, bool initialLoad)
 {
     this.initialLoad         = initialLoad;
     this.entry               = entry;
     this.channelIndex        = channelIndex;
     this.DoWork             += new DoWorkEventHandler(NormalizeChartData);
     this.RunWorkerCompleted += new RunWorkerCompletedEventHandler(CallbackAsync);
 }
Exemplo n.º 7
0
        /// <summary>
        /// Creates an instance Audio control
        /// </summary>
        /// <param name="sensor">Instance of the KinectSensor object</param>
        /// <returns>Returns an instance of the control</returns>
        private static SwapChainPanel CreateAudio(KinectSensor sensor)
        {
            AudioPanel control = new AudioPanel();

            control.AudioSource = sensor.AudioSource;

            return(control);
        }
Exemplo n.º 8
0
        public FilterWorker(AudioPanel entry, Abstract.AbsMenuItem <String> button, List <ComplexNumber> filter, int channelIndex)
        {
            this.entry               = entry;
            this.button              = button;
            this.filter              = filter;
            this.DoWork             += new DoWorkEventHandler(RunFilterOnSelection);
            this.RunWorkerCompleted += new RunWorkerCompletedEventHandler(CallbackAsync);
            this.chIndex             = channelIndex;
            this.threads             = new Thread[4];

            idftResults = new List <List <int> >();
            idftResults.Add(new List <int>());
            idftResults.Add(new List <int>());
            idftResults.Add(new List <int>());
            idftResults.Add(new List <int>());

            convolutionResults = new List <List <int> >();
            convolutionResults.Add(new List <int>());
            convolutionResults.Add(new List <int>());
            convolutionResults.Add(new List <int>());
            convolutionResults.Add(new List <int>());
            button.Enabled = false;
        }
 public ApplyFilter1MenuItem(AudioPanel entry, AudioPanelMenuManager manager) : base("Apply Filter Mono / L")
 {
     this.entry   = entry;
     this.manager = manager;
 }
 public RunFourierMenuItem(AudioPanel entry, AudioPanelMenuManager manager) : base("Run On Selection")
 {
     this.entry   = entry;
     this.manager = manager;
     this.Running = false;
 }
Exemplo n.º 11
0
 public EditTimeDomain(AudioPanel panel)
 {
     this.panel = panel;
 }
Exemplo n.º 12
0
 public OpenMenuItem(AudioPanel entry, AudioPanelMenuManager manager) : base("Open")
 {
     this.entry   = entry;
     this.manager = manager;
 }
Exemplo n.º 13
0
 public Bit24MenuItem(AudioPanel entry, AudioPanelMenuManager manager) : base("24 bit")
 {
     this.entry   = entry;
     this.manager = manager;
     this.value   = 24;
 }
Exemplo n.º 14
0
 public PasteMenuItem(AudioPanel entry) : base("Paste")
 {
     this.entry = entry;
 }
Exemplo n.º 15
0
 public SineWinMenuItem(AudioPanel entry, AudioPanelMenuManager manager) : base("Sine")
 {
     this.entry   = entry;
     this.manager = manager;
 }
Exemplo n.º 16
0
 public CloseMenuItem(AudioPanel entry, AudioPanelMenuManager manager) : base("Close")
 {
     this.entry   = entry;
     this.manager = manager;
 }
Exemplo n.º 17
0
 public static void Initialize()
 {
     instance = ResourcesExtensions.InstantiateFromResources <AudioPanel>(nameof(AudioPanel), null);
     DontDestroyOnLoad(instance);
 }
Exemplo n.º 18
0
 public khz44MenuItem(AudioPanel entry, AudioPanelMenuManager manager) : base("44,100 Hz")
 {
     this.entry   = entry;
     this.manager = manager;
     this.value   = 44100;
 }
Exemplo n.º 19
0
 public MonoMenuItem(AudioPanel entry, AudioPanelMenuManager manager) : base("Mono")
 {
     this.entry   = entry;
     this.manager = manager;
     this.Checked = true;
 }
Exemplo n.º 20
0
 public CopyMenuItem(AudioPanel entry) : base("Copy")
 {
     this.entry = entry;
 }
Exemplo n.º 21
0
 public WelchWinMenuItem(AudioPanel entry, AudioPanelMenuManager manager) : base("Welch")
 {
     this.entry   = entry;
     this.manager = manager;
 }
Exemplo n.º 22
0
 public Bit32MenuItem(AudioPanel entry, AudioPanelMenuManager manager) : base("32 bit")
 {
     this.entry   = entry;
     this.manager = manager;
     this.value   = 32;
 }
Exemplo n.º 23
0
 public Bit16MenuItem(AudioPanel entry, AudioPanelMenuManager manager) : base("16 bit")
 {
     this.entry   = entry;
     this.manager = manager;
     this.value   = 16;
 }
Exemplo n.º 24
0
 public CutMenuItem(AudioPanel entry) : base("Cut")
 {
     this.entry = entry;
 }
Exemplo n.º 25
0
 public StereoMenuItem(AudioPanel entry, AudioPanelMenuManager manager) : base("Stereo")
 {
     this.entry   = entry;
     this.manager = manager;
 }
Exemplo n.º 26
0
 public khz11MenuItem(AudioPanel entry, AudioPanelMenuManager manager) : base("11,025 Hz")
 {
     this.entry   = entry;
     this.manager = manager;
     this.value   = 11025;
 }
Exemplo n.º 27
0
        /// <summary>
        /// Начинает отрисовку записи
        /// </summary>
        /// <param name="repUser">Пользователь, у которого сделали репост (null, если нет)</param>
        private void BeginLayoutDesign(User repUser, bool rep)
        {
            if (Copied_Post != null)
            {
                repost.Children.Add(new ctrPost(Copied_Post, repUser, true));
            }

            if (!rep)
            {
                BitmapImage bilikes = new BitmapImage();
                bilikes.BeginInit();
                var streamlike = File.OpenRead(Environment.CurrentDirectory + @"\like.png");
                bilikes.StreamSource = streamlike;
                bilikes.EndInit();
                likesImage.Source = bilikes;

                BitmapImage bireps = new BitmapImage();
                bireps.BeginInit();
                var streamrep = File.OpenRead(Environment.CurrentDirectory + @"\rep.png");
                bireps.StreamSource = streamrep;
                bireps.EndInit();
                repImage.Source = bireps;
            }
            else
            {
                foot.Height             = 0;
                user_ico.Width          = 40;
                user_ico.Height         = 40;
                user_ico_circle.RadiusX = 20;
                user_ico_circle.RadiusY = 20;
                user_ico_circle.Rect    = new Rect(0, 0, 40, 40);
            }
            if (Videos != null)
            {
                videos.Margin = new Thickness(5, 0, 5, 5);
                //-------------adding-videos-------------\\
                foreach (Video vid in Videos)
                {
                    VideoPanel.Add(new ctrVideo(vid));
                }
            }
            if (Photos != null)
            {
                photos.Margin = new Thickness(5, 0, 5, 5);
                //------------adding-photos--------------\\
                foreach (Photo phot in Photos)
                {
                    PhotoPanel.Add(new ctrPhoto(phot));
                }
            }
            if (Poll != null)
            {
                polls.Margin = new Thickness(5, 0, 5, 5);
                //----------------add-poll---------------\\
                PollPanel.Add(new ctrPoll(Poll));
            }
            if (Audios != null)
            {
                foreach (Media.Audio aud in Audios)
                {
                    AudioPanel.Add(new Audio(aud));
                }
            }
            if (Links != null)
            {
                links.Margin = new Thickness(5, 0, 5, 5);
                //----------------add-link---------------\\
                links.Children.Add(new ctrLink(Links[0]));
            }
        }
Exemplo n.º 28
0
 public TriangularWinMenuItem(AudioPanel entry, AudioPanelMenuManager manager) : base("Bartlett")
 {
     this.entry   = entry;
     this.manager = manager;
 }
Exemplo n.º 29
0
 public khz22MenuItem(AudioPanel entry, AudioPanelMenuManager manager) : base("22,050 Hz")
 {
     this.entry   = entry;
     this.manager = manager;
     this.value   = 22050;
 }
Exemplo n.º 30
0
 public DeleteMenuItem(AudioPanel entry) : base("Delete")
 {
     this.entry = entry;
 }