Пример #1
0
        private void ClearTabs()
        {
            //Object description
            ObjectPropertyGrid_newVersion.SelectedObject     = null;
            ObjectPropertyGrid_oldVersion.SelectedObject     = null;
            ObjectPropertyGrid_currentVersion.SelectedObject = null;

            //Changed Properties
            changedPropertieslistView.Clear();
            ApplyValueButton.Visible = false;
            OldValuetextBox.Clear();
            NewValuetextBox.Clear();
            CurrentValuetextBox.Clear();

            //Layout
            tabControl1.TabPages.Remove(tabPage3);
            OldLayoutElementHost.Child     = null;
            NewLayoutElementHost.Child     = null;
            CurrentLayoutElementHost.Child = null;
        }
Пример #2
0
        private void changedPropertieslistView_SelectedIndexChanged(object sender, EventArgs e)
        {
            OldValuetextBox.Clear();
            NewValuetextBox.Clear();
            CurrentValuetextBox.Clear();
            ApplyValueButton.Visible = false;

            if (changedPropertieslistView.SelectedItems.Count > 0)
            {
                if (changedPropertieslistView.SelectedItems[0].Tag != null)
                {
                    foreach (string key in ((Dictionary <string, string>)changedPropertieslistView.SelectedItems[0].Tag).Keys)
                    {
                        switch (key)
                        {
                        case "NEW":
                            NewValuetextBox.Text = ((Dictionary <string, string>)changedPropertieslistView.SelectedItems[0].Tag)[key];
                            break;

                        case "OLD":
                            OldValuetextBox.Text = ((Dictionary <string, string>)changedPropertieslistView.SelectedItems[0].Tag)[key];
                            break;

                        case "CURRENT":
                            CurrentValuetextBox.Text = ((Dictionary <string, string>)changedPropertieslistView.SelectedItems[0].Tag)[key];
                            break;
                        }
                    }

                    if (changedPropertieslistView.SelectedItems[0].Text == "SqlStatement" && ((DeltaListEntry)ObjectstreeView.SelectedNode.Tag).HasConflicts)
                    {
                        NewValuetextBox.ReadOnly = false;
                        ApplyValueButton.Visible = true;
                    }
                }
            }
        }