Example #1
0
        public void DeleteGel()
        {
            if (SelectedGel == null)
            {
                windowManager.ShowMessageBox("请选择要删除的Gel卡");
                return;
            }
            List <T_Gel> selsteps = new List <T_Gel>(SelectedGel.ToArray());

            foreach (var selstep in selsteps)
            {
                var result = windowManager.ShowMessageBox(String.Format("确定删除【{0}】吗?", selstep.GelName), "系统提示", System.Windows.MessageBoxButton.YesNo, System.Windows.MessageBoxImage.Asterisk);
                if (result == System.Windows.MessageBoxResult.Yes)
                {
                    if (gelService.DeleteGel(selstep))
                    {
                        Gels.Remove(selstep);
                    }
                    else
                    {
                        windowManager.ShowMessageBox("删除失败!");
                        return;
                    }
                }
            }
        }
Example #2
0
        public void CopyGel()
        {
            if (SelectedGel == null)
            {
                windowManager.ShowMessageBox("请选择要复制的Gel卡");
                return;
            }
            List <T_Gel> selsteps = new List <T_Gel>(SelectedGel.ToArray());

            foreach (var selstep in selsteps)
            {
                var TargetGel = gelService.CopyGel(selstep);
                Gels.Add(TargetGel);
            }
        }