Exemplo n.º 1
0
        /// <summary>
        /// Show Dialog to enter new gesture name.
        /// </summary>
        void ShowPopUpEnterCustomSignName()
        {
            string newCustomSign = Promt.ShowDialog("Enter a name", "Add a new gesture");

            if (newCustomSign.Trim().Length > 0)
            {
                CreateCustomSignName(newCustomSign);
            }
        }
Exemplo n.º 2
0
        private async void ImportData_Click(object sender, EventArgs e)
        {
            List <string> list = new List <string>();

            for (int i = 0; i < 1000; i++)
            {
                list.Add(i.ToString());
            }
            var progress = new Progress <ProgressReport>();

            progress.ProgressChanged += (o, report) =>
            {
                progressBar.Value = report.PercentComplete;
                progressBar.Update();
            };


            listName = Promt.ShowDialog("Введите имя Листа", "Имя Листа в файле Excel");
            //   nameFile_text.Text = listName;
            //  progressBar.Visible = true;
            await ProcessData(list, progress);

            ImportData.Enabled = false;
            if (Weather_radio.Checked)
            {
                ImportExcel.LoadExcelFactors(listName, fileName);
            }
            else if (Accident_radio.Checked)
            {
                ImportExcel.LoadExcelAccident(listName, fileName);
            }
            else if (Fires_radio.Checked)
            {
                ImportExcel.LoadExcelFires(listName, fileName);
            }
            else if (HaCS_radio.Checked)
            {
                ImportExcel.LoadExcelHaCS(listName, fileName);
            }
            ImportData.Enabled = true;
        }