示例#1
0
        private void ButtonRight_Click(object sender, EventArgs e)
        {
            var selectedRows = EnabledView.SelectedRows;

            if (selectedRows.Count == 0)
            {
                System.Media.SystemSounds.Asterisk.Play();
                return;
            }

            var addrows = new DataGridViewRow[selectedRows.Count];
            int i       = 0;

            foreach (DataGridViewRow src in selectedRows)
            {
                addrows[i] = new DataGridViewRow();
                addrows[i].CreateCells(DisabledView);
                addrows[i].SetValues(src.Cells[DisabledView_Name.Index].Value);
                addrows[i].Cells[DisabledView_Name.Index].Tag = src.Cells[EnabledView_Name.Index].Tag;
                addrows[i].Tag = src.Tag;
                EnabledView.Rows.Remove(src);
                i++;
            }

            DisabledView.Rows.AddRange(addrows);
            DisabledView.Sort(DisabledView_Name, ListSortDirection.Ascending);
        }
示例#2
0
 public void ShowDisabledScreen(OverlayDetails details)
 {
     if (IsActive(this.DisabledOverLay) == false)
     {
         WriteMessage("ShowDisabledScreen");
         var view = new DisabledView(details);
         view.Tag = DisabledOverLay;
         MainWindow.AddSubview(view);
         HideAll(this.DisabledOverLay);
     }
 }
示例#3
0
        private void ButtonRightAll_Click(object sender, EventArgs e)
        {
            var addrows = new DataGridViewRow[EnabledView.Rows.Count];
            int i       = 0;

            foreach (DataGridViewRow src in EnabledView.Rows)
            {
                addrows[i] = new DataGridViewRow();
                addrows[i].CreateCells(DisabledView);
                addrows[i].SetValues(src.Cells[DisabledView_Name.Index].Value);
                addrows[i].Cells[DisabledView_Name.Index].Tag = src.Cells[EnabledView_Name.Index].Tag;
                addrows[i].Tag = src.Tag;
                i++;
            }

            EnabledView.Rows.Clear();
            DisabledView.Rows.AddRange(addrows);
            DisabledView.Sort(DisabledView_Name, ListSortDirection.Ascending);
        }
		public void ShowDisabledScreen(OverlayDetails details)
		{
			if (IsActive(this.DisabledOverLay) == false) {
				WriteMessage ("ShowDisabledScreen");
				var view = new DisabledView (details);
				view.Tag = DisabledOverLay;
				MainWindow.AddSubview(view);
				HideAll(this.DisabledOverLay);
			}
		}