private void ManageStrings_Load(object sender, EventArgs e)
        {
            _stringsView.Clear();
            foreach (KeyValuePair<string, string> kvp in this._original)
            {
                DieselStringEntry bse = new DieselStringEntry(kvp.Key, kvp.Value);
                _stringsView.Add(bse);
            }

            this.stringsCollection_dataGridView.DataSource = this._stringsView;
            this.stringsCollection_dataGridView.Refresh();
        }
Example #2
0
        private void ManageStrings_Load(object sender, EventArgs e)
        {
            _stringsView.Clear();
            foreach (KeyValuePair <string, string> kvp in this._original)
            {
                DieselStringEntry bse = new DieselStringEntry(kvp.Key, kvp.Value);
                _stringsView.Add(bse);
            }

            this.stringsCollection_dataGridView.DataSource = this._stringsView;
            this.stringsCollection_dataGridView.Refresh();
        }
Example #3
0
        private void stringsCollection_dataGridView_SelectionChanged(object sender, EventArgs e)
        {
            if (this.stringsCollection_dataGridView.SelectedRows.Count <= 0)
            {
                return;
            }

            foreach (DataGridViewRow row in this.stringsCollection_dataGridView.SelectedRows)
            {
                DieselStringEntry temp = (DieselStringEntry)row.DataBoundItem;

                this.stringIDTextBox.Text = temp.Key;
                this.stringTextBox.Text   = temp.Value;
            }
        }
 /// <summary>
 /// The serialize.
 /// </summary>
 /// <param name="stringEntry">
 /// The mod.
 /// </param>
 /// <returns>
 /// The <see cref="string"/>.
 /// </returns>
 public static string Serialize(DieselStringEntry stringEntry)
 {
     return(JsonConvert.SerializeObject(stringEntry));
 }
 /// <summary>
 /// The serialize.
 /// </summary>
 /// <param name="stringEntry">
 /// The mod.
 /// </param>
 /// <returns>
 /// The <see cref="string"/>.
 /// </returns>
 public static string Serialize(DieselStringEntry stringEntry)
 {
     return JsonConvert.SerializeObject(stringEntry);
 }