コード例 #1
0
        public PlaybackChangedForm(IDevice device)
        {
            InitializeComponent();

            SetStyle(ControlStyles.UserPaint, true);
            SetStyle(ControlStyles.AllPaintingInWmPaint, true);
            SetStyle(ControlStyles.DoubleBuffer, true);

            this.Location = FormLocationHelper.GetLocation(mySize);
            SetColors();
            this.labelDevice.Text = device.DeviceName;
        }
コード例 #2
0
        public QuickviewForm(PlaybackChangerContext context)
        {
            InitializeComponent();

            buttonUpdate.Tag = new VersionTag(null, string.Empty, Enums.Constants.UpdateType.check);

            _context = context;

            SetStyle(ControlStyles.UserPaint, true);
            SetStyle(ControlStyles.AllPaintingInWmPaint, true);
            SetStyle(ControlStyles.DoubleBuffer, true);

            this.Location = FormLocationHelper.GetLocation(mySize);
            buttonSettings.FlatAppearance.BorderColor = Color.FromArgb(0, 255, 255, 255);

            SetColors();
            var devices = _context.DeviceController.Devices;

            PopulateDevices(devices);
        }
コード例 #3
0
        /// <summary>
        /// The window was activated/gained focus.
        /// Update the colors for they could have changed, repopulated accordingly.
        /// </summary>
        private void View_Activated(object sender, EventArgs e)
        {
            var t = new Timer
            {
                Interval = 250
            };

            t.Tick += delegate
            {
                t.Stop();
                t.Dispose();

                _context.DeviceController.RefreshDevices();
                PopulateDevices(_context.DeviceController.Devices);
            };
            this.StartPosition = FormStartPosition.Manual;
            Point location = FormLocationHelper.GetLocation(mySize);

            this.Location = location;

            SetColors();
            t.Start();
        }