コード例 #1
0
        public CSSPWQInputToolForm()
        {
            Thread.CurrentThread.CurrentCulture   = new CultureInfo("en-CA");
            Thread.CurrentThread.CurrentUICulture = new CultureInfo("en-CA");

            currentCulture   = Thread.CurrentThread.CurrentCulture;
            currentUICulture = Thread.CurrentThread.CurrentUICulture;

            InitializeComponent();
            FormTitle        = this.Text;
            ControlBackColor = lblSampleCrewInitials.BackColor;
            TextBoxBackColor = textBoxSampleCrewInitials.BackColor;
            DataGridViewCSSPBackgroundColor = dataGridViewCSSP.BackgroundColor;
            lblSamplingPlanFileName.Text    = "";
            panelPassword.Dock     = DockStyle.Fill;
            panelApp.Dock          = DockStyle.Fill;
            panelButtonBar.Visible = false;
            panelPassword.BringToFront();
            CurrentPanel = panelPassword;
            panelPasswordCenter.Location  = new Point(panelPassword.Width / 2 - panelPasswordCenter.Size.Width / 2, panelPassword.Height / 2 - panelPasswordCenter.Size.Height / 2);
            panelPasswordCenter.Anchor    = AnchorStyles.None;
            panelAppInput.Dock            = DockStyle.Fill;
            panelAppInputFiles.Dock       = DockStyle.Fill;
            panelSendToServerCompare.Dock = DockStyle.Fill;
            FillCSSPMPNTable();
            webBrowserCSSP.ScriptErrorsSuppressed = true;

            csspFCFormWriter   = new CSSPFCFormWriter(LanguageEnum.en, "Empty for now");
            csspLabSheetParser = new CSSPLabSheetParser();
            dateTimePickerArchiveFilterFrom.Value = new DateTime(DateTime.Now.Year, 1, 1);
            dateTimePickerArchiveFilterTo.Value   = new DateTime(DateTime.Now.Year, 12, 31);
            RadioButtonBathNumberChanged();
        }
コード例 #2
0
        public void Setup(LanguageEnum LanguageRequest)
        {
            CultureInfo cultureInfo = new CultureInfo(LanguageRequest + "-CA");

            csspLabSheetParser = new CSSPLabSheetParser();

            FileInfo fiLabSheetTestFile = new FileInfo(@"C:\CSSP latest code\CSSPLabSheetParserDLL\CSSPLabSheetParserDLLTest\LabSheetTestFile.txt");

            Assert.IsTrue(fiLabSheetTestFile.Exists);

            StreamReader sr           = fiLabSheetTestFile.OpenText();
            string       FullFileText = sr.ReadToEnd();

            sr.Close();

            LabSheetA1Sheet labSheetA1Sheet = csspLabSheetParser.ParseLabSheetA1(FullFileText);

            Assert.AreEqual("", labSheetA1Sheet.Error);

            csspFCFormWriter = new CSSPFCFormWriter(LanguageRequest, FullFileText);
        }