Exemple #1
0
        private void SetListViewItemImage(ListViewItem item, int maxLength)
        {
            string sequence = Convert.ToString(item.Tag);

            Bitmap bmp = GScrollSettings.BuildSequenceImage(sequence, maxLength, _launchListView.BackColor);

            this._actionImageList.Images.Add(bmp);
            item.ImageIndex = (this._actionImageList.Images.Count - 1);
        }
Exemple #2
0
        public DialogResult ShowDialog(string sequence, string action)
        {
            _sequence = sequence;
            _processNameTextBox.Text = action;

            if (_sequence.Length > 0)
            {
                _sequencePictureBox.Image = GScrollSettings.BuildSequenceImage(_sequence, _sequence.Length, SystemColors.Window, 64, 64);
            }

            return(base.ShowDialog());
        }
Exemple #3
0
        private void _availablePictureBox_MouseDown(object sender, MouseEventArgs e)
        {
            int clickedRegion = -1;

            if (e.X <= (5 * 64) && _sequence.Length < 7)
            {
                clickedRegion = (e.X / 64);
                _sequence    += clickedRegion.ToString();

                if (null != _sequencePictureBox.Image)
                {
                    _sequencePictureBox.Image.Dispose();
                }
                _sequencePictureBox.Image = GScrollSettings.BuildSequenceImage(_sequence, _sequence.Length, SystemColors.Window, 64, 64);
            }
        }
Exemple #4
0
        private void _sequencePictureBox_MouseDown(object sender, MouseEventArgs e)
        {
            if (e.X <= (_sequence.Length * 64))
            {
                int clickedIndex = (e.X / 64);
                _sequence = _sequence.Remove(clickedIndex, 1);

                if (null != _sequencePictureBox.Image)
                {
                    _sequencePictureBox.Image.Dispose();
                }
                if (_sequence.Length > 0)
                {
                    _sequencePictureBox.Image = GScrollSettings.BuildSequenceImage(_sequence, _sequence.Length, SystemColors.Window, 64, 64);
                }
                else
                {
                    _sequencePictureBox.Image = null;
                }
            }
        }
Exemple #5
0
 public EditLaunch()
 {
     InitializeComponent();
     _availablePictureBox.Image = GScrollSettings.BuildSequenceImage("01234", 5, SystemColors.Window, 64, 64);
 }