コード例 #1
0
ファイル: frmPath837P.cs プロジェクト: jlarapr/MMMPMC2012
        private void btnIndex_Click(object sender, EventArgs e)
        {
            try
            {
                this.Enabled = false;
                String server = GetRegistry.Registry.read(Program.RegKey, "server");
                String database = GetRegistry.Registry.read(Program.RegKey, "database");
                String uid = encryptQueryString.Encrypt.DecryptText(GetRegistry.Registry.read(Program.RegKey, "uid"));
                String password = encryptQueryString.Encrypt.DecryptText(GetRegistry.Registry.read(Program.RegKey, "password"));

                String FontSize_837p = GetRegistry.Registry.read(Program.RegKey, "FontSize_837p");
                String PositionHorizontal_837p = GetRegistry.Registry.read(Program.RegKey, "PositionHorizontal_837p");
                String PositionVertical_837p = GetRegistry.Registry.read(Program.RegKey, "PositionVertical_837p");

                multiTiff mulTiff = new multiTiff(server, database, uid, password);
                String tblTable = null;
                //    String Count_MMM_PMC = null;
                String WhatIs_MMM_or_PMC = null;

                switch (lblApp.Text)
                {
                    case "MMM 837P":
                        {
                            String table = GetRegistry.Registry.read(Program.RegKey, "Table_MMM_837P");
                            tblTable = table;
                            WhatIs_MMM_or_PMC = "MMM";
                        }
                        break;
                    case "PMC 837P":
                        {
                            String table = GetRegistry.Registry.read(Program.RegKey, "Table_PMC_837P");
                            tblTable = table;
                            WhatIs_MMM_or_PMC = "PMC";
                        }
                        break;
                }
                toolStripProgressBar1.Value = 0;
                if (mulTiff.run837P(txtFoxFile.Text, txtImgOut.Text + "\\" + DateTime.Now.ToString("yyyyMMdd") + "-837.Dat", toolStripProgressBar1, toolStripStatusLabel1, tblTable, WhatIs_MMM_or_PMC))
                {
                    toolStripProgressBar1.Value = 0;
                    mulTiff.getmultiTiff837P(txtFoxFile.Text, txtImgIn.Text, txtImgOut.Text, toolStripProgressBar1, toolStripStatusLabel1, tblTable, int.Parse(FontSize_837p), int.Parse(PositionHorizontal_837p), int.Parse(PositionVertical_837p));
                    MessageBox.Show("Total de Imagenes:" + mulTiff._totalmg);
                    MessageBox.Show("Total de Reclamaciones:" + mulTiff._totalReclamaciones);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
            finally
            {
                this.Enabled = true;
            }
        }
コード例 #2
0
ファイル: frmPath.cs プロジェクト: jlarapr/MMMPMC2012
        private void btnIndex_Click(object sender, EventArgs e)
        {
            try
            {
                toolStripProgressBar1.Value = 0;
                String server = GetRegistry.Registry.read(Program.RegKey, "server");
                String database = GetRegistry.Registry.read(Program.RegKey, "database");
                String uid = encryptQueryString.Encrypt.DecryptText(GetRegistry.Registry.read(Program.RegKey, "uid"));
                String password = encryptQueryString.Encrypt.DecryptText(GetRegistry.Registry.read(Program.RegKey, "password"));

                String FontSize_837i = GetRegistry.Registry.read(Program.RegKey, "FontSize_837i");
                String PositionHorizontal_837i = GetRegistry.Registry.read(Program.RegKey, "PositionHorizontal_837i");
                String PositionVertical_837i = GetRegistry.Registry.read(Program.RegKey, "PositionVertical_837i");

                String Count_MMM_837 = GetRegistry.Registry.read(Program.RegKey, "Count_MMM_837");
                String Count_PMC_837 = GetRegistry.Registry.read(Program.RegKey, "Count_PMC_837");

                multiTiff mulTiff = new multiTiff(server,database, uid,password);

                switch (this.Text)
                {
                    case "MMM 837I":
                        {
                            String countMMM = GetRegistry.Registry.read(Program.RegKey, "Count_MMM_837");
                            String table = GetRegistry.Registry.read(Program.RegKey, "Table_MMM_837I");

                            if ( mulTiff.run(txtFox.Text.Trim() ,txtImgOut.Text + "\\" + DateTime.Now.ToString("yyyyMMdd") + "-837I.Dat", toolStripProgressBar1, toolStripStatusLabel1, table,countMMM))
                            {
                                toolStripProgressBar1.Value = 0;
                                mulTiff.getmultiTiff(txtFox.Text.Trim(),txtImgIn.Text, txtImgOut.Text, toolStripProgressBar1, toolStripStatusLabel1, table, int.Parse( FontSize_837i), int.Parse(PositionHorizontal_837i), int.Parse(PositionVertical_837i), Count_MMM_837);
                                MessageBox.Show("Total de Imagenes:" + mulTiff._totalmg);
                                MessageBox.Show("Total de Reclamaciones:" + mulTiff._totalReclamaciones);

                            }
                        }
                        break;
                    case "PMC 837I":
                        {
                            String countPMC = GetRegistry.Registry.read(Program.RegKey, "Count_PMC_837");
                            String table = GetRegistry.Registry.read(Program.RegKey, "Table_PMC_837I");

                            if (mulTiff.run(txtFox.Text.Trim(),txtImgOut.Text + "\\" + DateTime.Now.ToString("yyyyMMdd") + "-837I.Dat", toolStripProgressBar1, toolStripStatusLabel1,table,countPMC))
                            {
                                toolStripProgressBar1.Value = 0;
                                mulTiff.getmultiTiff(txtFox.Text.Trim(),txtImgIn.Text, txtImgOut.Text, toolStripProgressBar1, toolStripStatusLabel1, table,int.Parse(FontSize_837i),int.Parse(PositionHorizontal_837i),int.Parse(PositionVertical_837i),Count_PMC_837);
                                MessageBox.Show("Total de Imagenes:" + mulTiff._totalmg);
                                MessageBox.Show("Total de Reclamaciones:" + mulTiff._totalReclamaciones);
                            }
                        }
                        break;
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }