コード例 #1
0
 private void buttonEditVariables_Click(object sender, EventArgs e)
 {
     if (SaveChanges())
     {
         DataSetCreator creator = new DataSetCreator(DataSet);
         if (creator.ShowDialog(this) == System.Windows.Forms.DialogResult.OK)
         {
             RefreshDataList();
         }
     }
 }
コード例 #2
0
        // add a data set to the document
        private void dataSetToolStripMenuItem_Click(object sender, EventArgs e)
        {
            string dataSetName = EnterTextDialog.EnterText("Enter a name for the new data set.", "New Data Set", CreateResourceName("Data Set"), Properties.Resources.DataSet32);

            if (dataSetName != null)
            {
                DataSet dataSet = new DataSet(Properties.Settings.Default.DefaultDataSetVariables)
                {
                    Name = dataSetName
                };
                DataSetCreator creator = new DataSetCreator(dataSet);
                if (creator.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                {
                    DialogResult = System.Windows.Forms.DialogResult.None;
                    AddResource(dataSet);
                    OpenResourceEditor(dataSet);
                }
            }
        }