예제 #1
0
        private async void btnReindex_Click(object sender, EventArgs e)
        {
            // create a new instance of the alert form
            alert = new AlertForm();
            alert.Show();
            if (tabControlTMLifting.SelectedTab == tabControlTMLifting.TabPages["tabPageFileBasedTM"])
            {
                btnReindex.Enabled = false;

                var tms = lstTms.Items.OfType <TranslationMemoryInfo>().ToList();

                _bw.RunWorkerAsync(tms);
            }
            else
            {
                var selectedRowIndex = gridServerBasedTMs.SelectedCells[0].RowIndex;
                var selectedRow      = gridServerBasedTMs.Rows[selectedRowIndex].DataBoundItem as TranslationMemoryDetails;
                var x = await _sbTMs.GroupShareClient.TranslationMemories.Reindex(selectedRow.TranslationMemoryId, new FuzzyRequest());
            }
        }
예제 #2
0
        private async void btnReindex_Click(object sender, EventArgs e)
        {
            if (tabControlTMLifting.SelectedTab == tabControlTMLifting.TabPages["tabPageFileBasedTM"])
            {
                _alert = new AlertForm();
                _alert.Show();
                _alert.progressBar1.Style = ProgressBarStyle.Marquee;
                btnReindex.Enabled        = false;

                var tms = lstTms.Items.OfType <TranslationMemoryInfo>().ToList();

                _bw.RunWorkerAsync(tms);
            }
            else
            {
                var selectedRowIndex = gridServerBasedTMs.SelectedCells[0].RowIndex;
                var selectedRow      = gridServerBasedTMs.Rows[selectedRowIndex].DataBoundItem as TranslationMemoryDetails;
                var x = await _sbTMs.GroupShareClient.TranslationMemories.Reindex(selectedRow.TranslationMemoryId, new FuzzyRequest());

                gridServerBasedTMs.Rows[selectedRowIndex].Cells["Status"].Value = x.Status;
            }
        }