示例#1
0
        public void Setting()
        {
            SetSize(cfg.SizeWindow);
            SetPos(cfg.PositionWindow);
            #region textBoxes CheckBoxs
            windNotify.textBoxes[0].Text = cfg.SizeWindow.ToString();
            windNotify.textBoxes[1].Text = cfg.CountSmoothHistogram.ToString();
            windNotify.textBoxes[2].Text = cfg.SizeLineHeight.ToString();
            windNotify.textBoxes[3].Text = cfg.PositionWindow.ToString();
            windNotify.textBoxes[4].Text = cfg.SmoothnessLine.ToString();

            windNotify.CheckBoxs[0].Active = cfg.TomMost;
            windNotify.CheckBoxs[1].Active = cfg.isSmoothness;
            #endregion

            //
            Dispatcher.BeginInvoke(
                new ThreadStart(delegate {
                ControlsLib.CreateLine(this.Height, this.Width, cfg.SizeLineHeight, ListLine, cfg.ColorLine);
            }));
            timer.Time = cfg.TimeInterval;

            audio.Dada = cfg.Dada;
            audio.Db   = cfg.Db;
        }
示例#2
0
        //private void ListLabel_Loaded(object sender, RoutedEventArgs e)
        //    => Dispatcher.BeginInvoke(
        //        new ThreadStart(delegate {
        //            ControlsLib.CreateLine(this.Height, this.Width, cfg.SizeLineHeight, ListLine, cfg.ColorLine);
        //        }));

        private void Window_SizeChanged(object sender, SizeChangedEventArgs e)
        {
            //ControlsLib.Clear();
            Dispatcher.BeginInvoke(
                new ThreadStart(delegate {
                ControlsLib.CreateLine(this.Height, this.Width, cfg.SizeLineHeight, ListLine, cfg.ColorLine);
            }));
        }
示例#3
0
        void EventText_notify(object sender, TextChangedEventArgs e)
        {
            #region Size window
            string   text_size = windNotify.textBoxes[0].Text;
            string[] strarray  = text_size.Split(new char[] { '*' });
            if (strarray.Length != 2)
            {
                return;
            }
            if (int.TryParse(strarray[0], out int x) && int.TryParse(strarray[1], out int y))
            {
                SetSize(cfg.SizeWindow = new Size(x, y));
                SetPos(cfg.PositionWindow);
            }
            #endregion
            #region Smooth
            string text_Smooth = windNotify.textBoxes[1].Text;
            if (int.TryParse(text_Smooth, out int c))
            {
                audio.CSmoothHistogram = cfg.CountSmoothHistogram = c;
            }
            #endregion
            #region sizeline
            string text_sizeline = windNotify.textBoxes[2].Text;
            if (int.TryParse(text_sizeline, out int s))
            {
                cfg.SizeLineHeight = s > 3? s:3;
                ControlsLib.Clear();
                ControlsLib.CreateLine(this.Height, this.Width, cfg.SizeLineHeight, ListLine, cfg.ColorLine);
            }
            #endregion
            #region Position window
            string[] strarray_positionwind = windNotify.textBoxes[3].Text.Split(new char[] { '*' });
            if (strarray_positionwind.Length != 2)
            {
                return;
            }
            if (int.TryParse(strarray_positionwind[0], out int x_p) && int.TryParse(strarray_positionwind[1], out int y_p))
            {
                SetPos(cfg.PositionWindow = new Point(
                           x_p,
                           y_p
                           ));
            }
            #endregion
            #region SmoothnessLine
            if (double.TryParse(windNotify.textBoxes[4].Text, out double s_))
            {
                cfg.SmoothnessLine = s_;
            }
            #endregion

            cfg.ColorLine = windNotify.ColorBoxs[0].ColorARGB;
            SaveSetting();
            Setting();
        }