Exemplo n.º 1
0
        //Dictionary<string, string[]> ItemEachLot;
        public ProjSelect(MainWindow parent)
        {
            InitializeComponent();
            //Set lot hint
            lotHint.Content = "稳定性简便输入格式:\n批号+空格+条件(A/L/T)+月份\n例如:\n\"111AK L3\"相当于111AK(25*60,3M)\n\"111AK A6\"相当于111AK(40*75,6M)\n\"111AK T44\"相当于111AK(30*65,44M)";
            var version = Assembly.GetExecutingAssembly().GetName().Version;

            Title  = "序列表编辑器 " + version.Major + "." + version.Minor + "." + version.Revision;
            Parent = parent;
            if (!File.Exists(System.AppDomain.CurrentDomain.BaseDirectory + @"ds"))
            {
                MessageBox.Show("找不到数据库", "错误");
                Hide();
                return;
            }
            database = ConfigParser.ParseDrug();
            config   = ConfigParser.ParseConfig();
            plateStyle100.IsChecked = true;
            plateStyle            = PlateStyle.Normal;
            lblRT.IsEnabled       = config[0];
            uTime.IsEnabled       = config[0];
            SetTime.IsEnabled     = config[0];
            methodGrid.IsReadOnly = !config[0];
            comboProj.Items.Clear();
            database.Keys.ToList().ForEach(x => comboProj.Items.Add(x));
            tip.Text = "1: 请务必确认SOP版本;当前版本仅支持单张序列表\n2: 稳定性样品请用小括号注明贮存条件,或使用简便格式\n3: CDN溶出度不得与其他项使用同一个序列表";
            #region delete after 2 list done

            #endregion
        }
Exemplo n.º 2
0
        public FinalList(ProjSelect parent, string projName, ProjectInfo projInfo, string[] items, List <TaskSet> tasks, PlateStyle plateStyle, string invalid, string[] lots, string firstVial)
        {
            Parent = parent;
            InitializeComponent();
            this.projInfo        = projInfo;
            this.items           = items;
            this.tasks           = tasks;
            this.projName        = projName;
            FullList1            = new ObservableCollection <ListItem>();
            FullList2            = new ObservableCollection <ListItem>();
            std1StartVials       = new Dictionary <int, int>();
            std1StartVialsSuffix = new Dictionary <int, string>();
            this.plateStyle      = plateStyle;
            currentVial          = ParseInvalid(firstVial);
            STDenum = 0;

            // change lots abbr. to normal style
            this.Lots = new string[lots.Length];
            Regex reg = new Regex(@" ([L|A|T])([0-9]{1,2})(\b)");

            for (int i = 0; i < lots.Length; i++)
            {
                Match match = reg.Match(lots[i]);
                if (match.Success)
                {
                    Lots[i] = lots[i].Replace(" A", @"(40*75,")
                              .Replace(" L", @"(25*60,")
                              .Replace(" T", @"(30*65,") + "M)";
                }
                else
                {
                    Lots[i] = lots[i];
                }
            }

            this.invalid  = invalid;
            this.first    = firstVial;
            conditionList = new VialCondition[2][];
            for (int i = 0; i < conditionList.Length; i++)
            {
                conditionList[i] = new VialCondition[300];
                for (int j = 0; j < conditionList[i].Length; j++)
                {
                    if (j < currentVial)
                    {
                        conditionList[i][j] = VialCondition.Used;
                    }
                    else
                    {
                        conditionList[i][j] = VialCondition.Available;
                    }
                }
            }
            preservedSTD1 = new ListItem();
            Gen();
            for (int i = 0; i < FullList1.Count; i++)
            {
                if (!SysCheck(FullList1[i]))
                {
                    sampleStartIndex = i;
                    break;
                }
            }
            finalList.ItemsSource = FullList1;
        }
Exemplo n.º 3
0
 private void plateStyle96_Checked(object sender, RoutedEventArgs e) => plateStyle  = PlateStyle.NewB;
Exemplo n.º 4
0
 private void plateStyle100_Checked(object sender, RoutedEventArgs e) => plateStyle = PlateStyle.Normal;