示例#1
0
        private void button_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                dict = ProcessExcel.ReadCellFromTxt();
                if (openFileDialog.ShowDialog() == true)
                {
                    file_txtbox.Text = openFileDialog.FileName;
                }

                currentValue_txtbox.Text = ProcessExcel.ReadCellValue(openFileDialog.FileName, dict["Row"], dict["Column"]);
                valueToSave_txtbox.Text  = NumbersToText.ConvertAmountInPLN(ProcessExcel.ReadCellValue(openFileDialog.FileName, dict["Row"], dict["Column"]));
                save_btn.IsEnabled       = true;
            }
            catch (Exception ex)
            {
                currentValue_txtbox.Text = "Błąd! " + ex.Message;
                valueToSave_txtbox.Text  = "Błąd! " + ex.Message;
                save_btn.IsEnabled       = false;
            }
        }
示例#2
0
 private void save_btn_Click(object sender, RoutedEventArgs e)
 {
     ProcessExcel.SaveToCell(openFileDialog.FileName, dict["Row"], dict["Column"], NumbersToText.ConvertAmountInPLN(ProcessExcel.ReadCellValue(openFileDialog.FileName, dict["Row"], dict["Column"])));
     save_btn.IsEnabled = false;
     if (openAfterSave_chkbox.IsChecked == true)
     {
         System.Diagnostics.Process.Start(openFileDialog.FileName);
     }
 }