Esempio n. 1
0
 private void btnSave_Click(object sender, RoutedEventArgs e)
 {
     if (StoredProcList.GetSPList().IsEmpty)
     {
         if (MessageBox.Show("Do you want to save an empty list?", "Nothing added to list", MessageBoxButton.YesNo) == MessageBoxResult.No)
         {
             return;
         }
     }
     //TODO: make the default be the right place
     Microsoft.Win32.SaveFileDialog svDlg = new Microsoft.Win32.SaveFileDialog();
     svDlg.Filter          = @"Racoon Settings|*.rst|All Files|*.*";
     svDlg.DefaultExt      = "*.rst";
     svDlg.Title           = "Select target for settings file";
     svDlg.OverwritePrompt = false;
     svDlg.FileName        = RacoonMiddleWare.Properties.Settings.Default.QueryDefsPath;
     if (svDlg.ShowDialog().Value)
     {
         StoredProcList.GetSPList().SaveToFile(svDlg.FileName);
         tbStatusText.Text = "Saved";
     }
     else
     {
         tbStatusText.Text = "Save Canceled";
     }
 }
Esempio n. 2
0
 private void btnAdd_Click(object sender, RoutedEventArgs e)
 {
     StoredProcList.GetSPList().CreateAndAdd(QryName, QueryType, ContentText, Server, DataStore);
     tbStatusText.Text = "Added item";
 }