Esempio n. 1
0
        private void ImportDictionaries_Click(object sender, EventArgs e)
        {
            Stream strm = OpenFile();

            if (strm == null)
            {
                return;
            }
            m_Stopwatch.Start();
            try
            {
                using (strm)
                {
                    UpdateToolStrip(this, new ProgressChangedEventArgs(1, "Reading xml file"));
                    PreliminaryDataRoute _cnfg = PreliminaryDataRoute.ImportDocument(strm);
                    UpdateToolStrip(this, new ProgressChangedEventArgs(1, "Importing Data"));
                    _cnfg.ImportData(m_URLTextBox.Text.Trim());
                    SetDone("Done");
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Exception", MessageBoxButtons.OK, MessageBoxIcon.Error);
                SetDone(ex.Message);
            }
        }
Esempio n. 2
0
 private void ImportDictionaryCodeActivity_ExecuteCode(object sender, EventArgs e)
 {
     using (Stream _stream = workflowProperties.Item.File.OpenBinaryStream())
     {
         PreliminaryDataRoute _cnfg = PreliminaryDataRoute.ImportDocument(_stream);
         _cnfg.ImportData(workflowProperties.WebUrl);
         FillUpTimeSlots         = _cnfg.FillUpTimeSlots;
         FillUpTimeSlotTemplates = _cnfg.FillUpTimeSlotTemplates;
     }
 }