Ejemplo n.º 1
0
        private void btnCreate_Click(object sender, RoutedEventArgs e)
        {
            var objSettingsWindow = new SettingsWindow2();

            objSettingsWindow.setSettings(new FieldSettings());
            if (objSettingsWindow.ShowDialog().Value)
            {
                tableSettings.FieldSettingsList.Add(objSettingsWindow.getSettings());
                refreshBind();
            }
        }
Ejemplo n.º 2
0
        private void btnUpdate_Click(object sender, RoutedEventArgs e)
        {
            var command   = sender as Button;
            var fieldname = command.Tag as string;
            var idx       = tableSettings.FieldSettingsList.FindIndex(i => i.FieldName == fieldname);

            var objSettingsWindow = new SettingsWindow2();

            objSettingsWindow.setSettings(tableSettings.FieldSettingsList[idx]);
            if (objSettingsWindow.ShowDialog().Value)
            {
                tableSettings.FieldSettingsList[idx] = objSettingsWindow.getSettings();
                refreshBind();
            }
        }