public void CompleteAll()
        {
            if (Helper.CheckConnectInternet() == true)
            {
                CompleteCheckBoxOnline();
                connection.Content = "Online";
                control.Fill       = Brushes.Green;
                CreateXml createXml = new CreateXml();
                BRefresh.IsEnabled          = false;
                BStatistic.IsEnabled        = true;
                OfflineDataCurrency.Content = "";
            }
            else
            {
                CompleteCheckBoxOffline();
                connection.Content          = "Offline";
                control.Fill                = Brushes.Red;
                BRefresh.IsEnabled          = true;
                BStatistic.IsEnabled        = false;
                OfflineDataCurrency.Content = "Kursy walut z dnia: " + Helper.ReversDate();
            }

            Helper.AddItemToComboBoxList(ref comboBox1, true, Helper.CheckConnectInternet());
            Helper.AddItemToComboBoxList(ref comboBox2, true, Helper.CheckConnectInternet());
            comboBox1.SelectedIndex = 0;
            comboBox2.SelectedIndex = 1;
            textBox1.Focus();
            textBox2.IsReadOnly = true;
        }
Esempio n. 2
0
 private void btnClientXml_Click(object sender, EventArgs e)
 {
     action(new Action(() =>
     {
         var temps           = (this.lbFiles.Tag as List <ItemFileInfo>);
         List <string> files = temps.Where((l) => l.ExtensionName.Equals(".xls")).Select(l => l.Path).ToList();
         FileExcelDatas exceldatas;
         if (ReadExcelData.Instance().ReadExcelDataToCache(files, out exceldatas, new Action <string>((msg) => { Show(msg); }), false))
         {
             //生成XML
             CreateXml.Instance().ActionExcelData(exceldatas, "AC", this.cb_isnull.Checked, new Action <string>((msg) => { Show(msg); }));
             //生成 Xml 对应 CSharp
             CreateXMLCSharp.Instance().ActionExcelData(exceldatas, this.tbcodepack.Text, new Action <string>((msg) => { Show(msg); }));
             Show("Excel 转 客户端专属 XML 文件处理完成");
             try
             {
                 System.Diagnostics.Process.Start(CreateBase.CSharpPath);
             }
             catch { }
         }
     }));
 }