System.Windows.Forms.DataGridViewRow.SetValues(params object[])

Here are the examples of the csharp api class System.Windows.Forms.DataGridViewRow.SetValues(params object[]) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

24 Examples 7

1. Example

View license
private void InitView(int shipID)
		{

			var record = RecordManager.Instance.ShipParameter[shipID];

			if (record == null)
			{
				RecordManager.Instance.ShipParameter[shipID] = record = new ShipParameterRecord.ShipParameterElement();
			}


			var keys = RecordManager.Instance.ShipParameter.RecordHeader.Split(',');
			var values = record.SaveLine().Split(',');

			ParameterView.Rows.Clear();
			var rows = new DataGridViewRow[keys.Length];

			for (int i = 0; i < rows.Length; i++)
			{
				rows[i] = new DataGridViewRow();
				rows[i].CreateCells(ParameterView);
				rows[i].SetValues(keys[i], values[i]);
			}

			rows[0].ReadOnly = rows[1].ReadOnly = true;

			ParameterView.Rows.AddRange(rows);

		}

2. Example

View license
private DataGridViewRow GetExpressionViewRow(ExpressionList exp)
		{
			var row = new DataGridViewRow();
			row.CreateCells(ExpressionView);

			row.SetValues(
				exp.Enabled,
				exp.ExternalAnd,
				exp.Inverse,
				exp.InternalAnd,
				exp.ToString()
				);

			return row;
		}

3. Example

View license
private DataGridViewRow GetExpressionDetailViewRow(ExpressionData exp)
		{
			var row = new DataGridViewRow();
			row.CreateCells(ExpressionDetailView);

			row.SetValues(
				exp.Enabled,
				exp.LeftOperand,
				exp.RightOperand,
				exp.Operator
				);

			return row;
		}

4. Example

View license
private void UpdateConstFilterView()
		{

			List<int> values = ConstFilterSelector.SelectedIndex == 0 ? _group.InclusionFilter : _group.ExclusionFilter;

			ConstFilterView.Rows.Clear();

			var rows = new DataGridViewRow[values.Count];
			for (int i = 0; i < rows.Length; i++)
			{
				rows[i] = new DataGridViewRow();
				rows[i].CreateCells(ConstFilterView);

				var ship = KCDatabase.Instance.Ships[values[i]];
				rows[i].SetValues(values[i], ship?.NameWithLevel ?? "(???)");
			}

			ConstFilterView.Rows.AddRange(rows);

		}

5. Example

View license
private void ButtonLeftAll_Click(object sender, EventArgs e)
		{

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

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

			DisabledView.Rows.Clear();
			EnabledView.Rows.AddRange(addrows);
			DisabledView.Sort(DisabledView_Name, ListSortDirection.Ascending);

		}

6. Example

View license
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);

		}

7. Example

Project: ElectronicObserver
Source File: FormQuest.cs
View license
private void ClearQuestView()
		{

			QuestView.Rows.Clear();

			{
				DataGridViewRow row = new DataGridViewRow();
				row.CreateCells(QuestView);
				row.SetValues(null, null, null, "(???)", null);
				QuestView.Rows.Add(row);
			}

		}

8. Example

Project: PokemonSunMoonRNGTool
Source File: Form1.cs
View license
private DataGridViewRow getRow_Egg(int i, EggRNGSearch rng, EggRNGSearch.EggRNGResult result, DataGr/n ..... /n //View Source file for more details /n }

9. Example

Project: bitdiffer
Source File: FileSystemDataGridView.cs
View license
protected override void OnRowsAdded(DataGridViewRowsAddedEventArgs e)
        {
            base.OnRowsAdded(e);

            this.Rows[e.RowIndex].SetValues((_itemType == FileSystemItemType.File) ? Resources.browse_document : Resources.browse_folder, "", "Add...", "");
        }

10. Example

Project: bitdiffer
Source File: FileSystemDataGridView.cs
View license
private void AddItem(string value)
        {
            int index = this.Rows.Add();
            this.Rows[index].SetValues((_itemType == FileSystemItemType.File) ? Resources.browse_document : Resources.browse_folder, value, "Edit", "Delete");
        }

11. Example

View license
private void UpdateBGMPlayerUI()
		{

			BGMPlayer_ControlGrid.Rows.Clear();

			var rows = new DataGridViewRow[BGMHandles.Count];

			int i = 0;
			foreach (var h in BGMHandles.Values)
			{
				var row = new DataGridViewRow();
				row.CreateCells(BGMPlayer_ControlGrid);
				row.SetValues(h.Enabled, h.HandleID, h.Path);
				rows[i] = row;
				i++;
			}

			BGMPlayer_ControlGrid.Rows.AddRange(rows);

			BGMPlayer_VolumeAll.Value = (int)BGMHandles.Values.Average(h => h.Volume);
		}

12. Example

View license
private void ButtonLeft_Click(object sender, EventArgs e)
		{

			var selectedRows = DisabledView.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(EnabledView);
				addrows[i].SetValues(src.Cells[DisabledView_Name.Index].Value, ListSortDirection.Ascending);
				addrows[i].Cells[EnabledView_Name.Index].Tag = src.Cells[DisabledView_Name.Index].Tag;
				addrows[i].Tag = src.Tag;
				DisabledView.Rows.Remove(src);
				i++;
			}

			EnabledView.Rows.AddRange(addrows);
			DisabledView.Sort(DisabledView_Name, ListSortDirection.Ascending);
		}

13. Example

View license
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);
		}

14. Example

Project: ElectronicObserver
Source File: FormShipGroup.cs
View license
private DataGridViewRow CreateShipViewRow(ShipData ship)
		{

			if (ship == null) return null;

			/n ..... /n //View Source file for more details /n }

15. Example

Project: PokemonSunMoonRNGTool
Source File: Form1.cs
View license
private DataGridViewRow getRow_Sta(int i, StationaryRNGSearch rng, StationaryRNGSearch.StationaryRNGResult result, DataGridView dgv)
        {
            int tolerance = (int)i - Convert.ToInt32(St_TargetFrame.Text);
            string true_nature = natures[result.Nature];
            var SynchronizeFlag = result.Synchronize ? "o" : "-";
            string[] status = new string[6];
            for (int j = 0; j < 6; j++)
                status[j] = CB_StaS_Status_Display.Checked ? result.p_Status[j].ToString() : "-";

            DataGridViewRow row = new DataGridViewRow();
            row.CreateCells(dgv);

            row.SetValues(
                i, tolerance,
                result.IVs[0], result.IVs[1], result.IVs[2], result.IVs[3], result.IVs[4], result.IVs[5],
                true_nature, result.UB, SynchronizeFlag, status[0], status[1], status[2], status[3], status[4], status[5], result.PSV, result.Clock, result.row_r.ToString("X16")
                );

            if (result.Shiny)
            {
                row.DefaultCellStyle.BackColor = Color.LightCyan;
            }
            return row;
        }

16. Example

Project: PokemonSunMoonRNGTool
Source File: Form1.cs
View license
private DataGridViewRow getRow_ID(int i, IDRNGSearch rng, IDRNGSearch.IDRNGResult result, DataGridView dgv)
        {
            DataGridViewRow row = new DataGridViewRow();
            row.CreateCells(dgv);

            row.SetValues(
                i, String.Format("{0:D6}", result.ID), result.TSV, result.TID, result.SID, result.Clock
                );

            if (result.Shiny)
            {
                row.DefaultCellStyle.BackColor = Color.LightCyan;
            }
            return row;
        }

17. Example

View license
private DataGridViewRow getRow(int i, RNGResult result)
        {
            int d = i - (int)Time_/n ..... /n //View Source file for more details /n }

18. Example

View license
private void UpdateView()
		{

			var ships = KCDatabase.Instance.Ships.Values;
			var equipments = /n ..... /n //View Source file for more details /n }

19. Example

View license
private void UpdateDetailView(int equipmentID)
		{

			DetailView.SuspendLayout();

			DetailView.Ro/n ..... /n //View Source file for more details /n }

20. Example

View license
private void LoadFiles(string path)
		{

			if (!Directory.Exists(path)) return;

			CurrentPath = path;

			APIView.Rows.Clear();

			var rows = new LinkedList<DataGridViewRow>();

			foreach (string file in Directory.GetFiles(path, "*.json", SearchOption.TopDirectoryOnly))
			{

				var row = new DataGridViewRow();
				row.CreateCells(APIView);

				row.SetValues(Path.GetFileName(file));
				rows.AddLast(row);

			}

			APIView.Rows.AddRange(rows.ToArray());
			APIView.Sort(APIView_FileName, ListSortDirection.Ascending);

		}

21. Example

View license
private void Updated()
		{

			ShipData[] ships = GetShips().ToArray();
			int formation = Formation/n ..... /n //View Source file for more details /n }

22. Example

View license
private void Searcher_DoWork(object sender, DoWorkEventArgs e)
		{

			var args = (SearchArgument)e./n ..... /n //View Source file for more details /n }

23. Example

View license
private void Searcher_DoWork(object sender, DoWorkEventArgs e)
		{

			var args = (SearchArgument)e./n ..... /n //View Source file for more details /n }

24. Example

View license
private void Searcher_DoWork(object sender, DoWorkEventArgs e)
		{

			SearchArgument args = (Search/n ..... /n //View Source file for more details /n }