Пример #1
0
        private void OnJobPositionChanged(JobPositionChangedEventArgs e)
        {
            var control = jobControls[e.OldPosition];

            jobControls.RemoveAt(e.OldPosition);
            jobControls.Insert(e.NewPosition, control);

            mainTlp.SuspendLayout();

            while (mainTlp.RowStyles.Count > 1)
            {
                RemoveItemFromMainTlp(mainTlp.Controls[0] as JobControl, 0);
            }

            int position = 0;

            foreach (var entry in uploader.Queue)
            {
                AddItemToMainTlp(position, jobControls.Single(jc => jc.Job == entry));
                position++;
            }

            mainTlp.ResumeLayout();

            RefreshMoveButtonsEnabled();
        }
Пример #2
0
 private void Uploader_JobPositionChanged(object sender, JobPositionChangedEventArgs e)
 {
     Actions.Add(new JobChangedArgs(JobChangedType.PositionChanged, e));
 }