예제 #1
0
 private void startEditor(EditorListItem item)
 {
     editForm.ShowDialog(this, item);
     if (item.IsEdit)
     {
         file.strBytes[(int)item.Tag] = item.NewStrBytes;
     }
     else
     {
         file.strBytes[(int)item.Tag] = item.OriginStrBytes;
     }
 }
예제 #2
0
 public void ShowDialog(IWin32Window Owner, EditorListItem item)
 {
     this.item = item;
     if (item.NewStrBytes != null)
     {
         textBox1.Text = Encoding.UTF8.GetString(item.NewStrBytes);
     }
     else
     {
         textBox1.Text = Encoding.UTF8.GetString(item.OriginStrBytes);
     }
     ShowDialog(Owner);
 }
예제 #3
0
        private void RefreshListView()
        {
            Logger.I("Refresh the list");

            listView1.BeginUpdate();
            for (int i = 0; i < file.strBytes.Count; i++)
            {
                EditorListItem item = new EditorListItem(file.strBytes[i])
                {
                    Tag = i
                };
                listView1.Items.Add(item);
            }
            listView1.EndUpdate();
        }