private void AddNode(FileNode node, TranslationDictionary dictionary)
        {
            var editor = new ResourceNodeControl(node, dictionary)
            {
                Dock = DockStyle.Fill
            };

            editor.Changed += editor_Changed;
            editor.Visible = false;

            _tableLayoutPanel.RowCount = _tableLayoutPanel.Controls.Count + 1;

            while (_tableLayoutPanel.RowStyles.Count <= _tableLayoutPanel.RowCount)
            {
                _tableLayoutPanel.RowStyles.Add(new RowStyle(SizeType.AutoSize));
            }

            _tableLayoutPanel.SetRow(editor, _tableLayoutPanel.Controls.Count - 1);
            _tableLayoutPanel.Controls.Add(editor);
        }
        public ResourceNodeControl(FileNode node, TranslationDictionary dictionary)
            : this()
        {
            if (node == null)
                throw new ArgumentNullException("node");
            if (dictionary == null)
                throw new ArgumentNullException("dictionary");

            _dictionary = dictionary;

            _name.Text = node.Name;
            _source.Text = node.Source;
            _comment.Text = node.Comment;
            _originalSource.Text = node.OriginalSource;
            _translated.Text = node.Translated;
            _proposal.Text = dictionary.GetTranslation(node.Source);

            UpdateControlVisibility();
            UpdateColor();
        }