Example #1
1
        public LoadFBForm(pBaseEntities ge, fBaseEntities fe)
        {
            InitializeComponent();
            _ge = ge;
            _fe = fe;
            dp_maxdate.ValueChanged += new EventHandler(dp_maxdate_ValueChanged);
            dp_mindate.ValueChanged += new EventHandler(dp_maxdate_ValueChanged);

            HelpProvider help = new HelpProvider();
            help.HelpNamespace = "Recog_help.chm";
            help.SetHelpNavigator(this, HelpNavigator.Topic);
            help.SetHelpKeyword(this, "menu_excel.htm");
        }
Example #2
0
 public MDScaleM1(MDAnswers mdAnswers, pBaseEntities GlobalEntities, MDScaleM1_1 groupA, MDScaleM1_2 groupB)
 {
     _answers = mdAnswers;
     _ge = GlobalEntities;
     _groupA = groupA;
     _groupB = groupB;
 }
Example #3
0
        public static int GetMark(pBaseEntities GlobalEntities, AAnswers aAnswers, List<int> AnswersYes, List<int> AnswersNo)
        {
            int m = 0;

            testsparam t = GlobalEntities.testsparams.First(tp => tp.idt == (int)EnumPTests.Addictive);
            t.answersparams.Load();

            for (int i = 0; i < AnswersYes.Count; i++)
            {
                answersparam a = t.answersparams.First(ap => ap.num == AnswersYes[i]);
                a.cellsparams.Load();
                if (aAnswers[(int)a.num - 1].SelectedCellDescription.Trim() != "")
                {
                    cellsparam c = a.cellsparams.First(cp => cp.description.Trim() == aAnswers[(int)a.num - 1].SelectedCellDescription.Trim());
                    if (c.mark == 1) { m++; }
                }
            }

            for (int i = 0; i < AnswersNo.Count; i++)
            {
                answersparam a = t.answersparams.First(ap => ap.num == AnswersNo[i]);
                a.cellsparams.Load();
                if (aAnswers[(int)a.num - 1].SelectedCellDescription.Trim() != "")
                {
                    cellsparam c = a.cellsparams.First(cp => cp.description.Trim() == aAnswers[(int)a.num - 1].SelectedCellDescription.Trim());
                    if (c.mark == 0) { m++; }
                }
            }

            return m;
        }
Example #4
0
 public DTestReport(human human, testresult testresult, pBaseEntities ge, fBaseEntities fe, bool WithResult)
 {
     _testresult = testresult;
       _human = human;
       _ge = ge;
       _fe = fe;
       _withresult = WithResult;
       _listscales = new List<IScale>();
     // 1 level
       _listscales.Add(new DScaleL(GetAnswersFromBase(), _ge));
       _listscales.Add(new DScaleF(GetAnswersFromBase(), _ge));
       _listscales.Add(new DScaleK(GetAnswersFromBase(), _ge));
       _listscales.Add(new DScaleHS(GetAnswersFromBase(), _ge, new DScaleK(GetAnswersFromBase(), _ge)));
       _listscales.Add(new DScaleD(GetAnswersFromBase(), _ge));
       _listscales.Add(new DScaleHY(GetAnswersFromBase(), _ge));
       _listscales.Add(new DScalePD(GetAnswersFromBase(), _ge, new DScaleK(GetAnswersFromBase(), _ge)));
       _listscales.Add(new DScaleMF(GetAnswersFromBase(), _ge));
       _listscales.Add(new DScalePA(GetAnswersFromBase(), _ge));
       _listscales.Add(new DScalePT(GetAnswersFromBase(), _ge, new DScaleK(GetAnswersFromBase(), _ge)));
       _listscales.Add(new DScaleSC(GetAnswersFromBase(), _ge, new DScaleK(GetAnswersFromBase(), _ge)));
       _listscales.Add(new DScaleMA(GetAnswersFromBase(), _ge, new DScaleK(GetAnswersFromBase(), _ge)));
       _listscales.Add(new DScaleSI(GetAnswersFromBase(), _ge));
     //2 level
       _listscales.Add(new DScaleAC(GetAnswersFromBase(), _ge));
       _listscales.Add(new DScalePC(GetAnswersFromBase(), _ge));
       _listscales.Add(new DScaleDAN(GetAnswersFromBase(), _ge));
     //3 level
       _listscales.Add(new DScaleDS(GetAnswersFromBase(), _ge));
       _listscales.Add(new DScaleNPU(GetAnswersFromBase(), _ge));
       _listscales.Add(new DScaleCS(GetAnswersFromBase(), _ge));
       _listscales.Add(new DScaleMN(GetAnswersFromBase(), _ge));
     //4 level
       _listscales.Add(new DScaleLAP(GetAnswersFromBase(), _ge));
     //  _listscales.Add(new  DScaleKL(GetAnswersFromBase(),_human, _ge));
 }
Example #5
0
 public NPNTestLoader(pBaseEntities GlobalEntities, TwoButtonsControl Control)
 {
     _ge = GlobalEntities;
         _ktc = Control;
         _answers = new LAnswers(_ge);
         arg = new TestDoneEventArgs();
 }
Example #6
0
 public Recognizer(pBaseEntities GlobalEntities,Bitmap image,int testid)
 {
     _ge = GlobalEntities;
        _image = image;
        _testid = testid;
        arg = new EventArgs();
 }
Example #7
0
 public KettellATestLoader(pBaseEntities GlobalEntities, ThreeButtonsControl Control)
 {
     _ge = GlobalEntities;
         _ktc = Control;
         _answers = new KettellAnswers(_ge);
         arg = new TestDoneEventArgs();
 }
Example #8
0
        public BaseManager()
        {
            _pbconnectionisvalid = false;
            _fbconnectionisvalid = false;

            if (Settings.Default.ServerType == FbServerType.Embedded.ToString())
            {
                _servertype = FbServerType.Embedded;
            }
            else
            {
                _servertype = FbServerType.Default;
            }

            _serverip = Settings.Default.ServerIP;
            _pdatabase = Settings.Default.pBaseAlias;
            _fdatabase = Settings.Default.fBaseAlias;

            string pconnstring = pConnectionString();
            string fconnstring = fConnectionString();

            if (_pbconnectionisvalid == true & _fbconnectionisvalid == true)
            {
                _ge = new pBaseEntities(pconnstring);
                _fe = new fBaseEntities(fconnstring);
            }
            else
            {
                _ge = null;
                _fe = null;
            }
        }
Example #9
0
 public KettellATestReport(human human, testresult testresult, pBaseEntities ge, fBaseEntities fe, bool WithResult)
 {
     _testresult = testresult;
     _human = human;
     _ge = ge;
     _fe = fe;
     _withresult = WithResult;
     _listscales = new List<IScale>();
     _listscales.Add(new KettellScaleA(this.GetAnswersFromBase(), _ge,EnumKettellType.AForm));
     _listscales.Add(new KettellScaleB(this.GetAnswersFromBase(), _ge, EnumKettellType.AForm));
     _listscales.Add(new KettellScaleC(this.GetAnswersFromBase(), _ge, EnumKettellType.AForm));
     _listscales.Add(new KettellScaleE(this.GetAnswersFromBase(), _ge, EnumKettellType.AForm));
     _listscales.Add(new KettellScaleF(this.GetAnswersFromBase(), _ge, EnumKettellType.AForm));
     _listscales.Add(new KettellScaleG(this.GetAnswersFromBase(), _ge, EnumKettellType.AForm));
     _listscales.Add(new KettellScaleH(this.GetAnswersFromBase(), _ge, EnumKettellType.AForm));
     _listscales.Add(new KettellScaleI(this.GetAnswersFromBase(), _ge, EnumKettellType.AForm));
     _listscales.Add(new KettellScaleL(this.GetAnswersFromBase(), _ge, EnumKettellType.AForm));
     _listscales.Add(new KettellScaleM(this.GetAnswersFromBase(), _ge, EnumKettellType.AForm));
     _listscales.Add(new KettellScaleN(this.GetAnswersFromBase(), _ge, EnumKettellType.AForm));
     _listscales.Add(new KettellScaleO(this.GetAnswersFromBase(), _ge, EnumKettellType.AForm));
     _listscales.Add(new KettellScaleQ1(this.GetAnswersFromBase(), _ge, EnumKettellType.AForm));
     _listscales.Add(new KettellScaleQ2(this.GetAnswersFromBase(), _ge, EnumKettellType.AForm));
     _listscales.Add(new KettellScaleQ3(this.GetAnswersFromBase(), _ge, EnumKettellType.AForm));
     _listscales.Add(new KettellScaleQ4(this.GetAnswersFromBase(), _ge, EnumKettellType.AForm));
 }
Example #10
0
        public void Start()
        {
            Splash sf = new Splash();
            sf.Show();
            //try
            //{

            BaseManager database = new BaseManager();
            if (database.FbconnectionIsValid == true & database.PbconnectionIsValid==true)
            {
                _ge = database.Ge;
                _fe = database.Fe;
                sf.Close();
                arg.IsSuccess = true;
                OnConnectComplite();
            }
            else
            {
                sf.Close();
                MessageBox.Show("Требуется настройка подключения к базам данных.\nСейчас Вам будут предоставлены настройки по умолчанию.","Философия выбора",MessageBoxButtons.OK,MessageBoxIcon.Error);
                arg.IsSuccess = false;
                OnConnectComplite();
            }

            //}
            //catch(Exception ex)
            //{
            //    MessageBox.Show(ex.Message);
            //    sf.Close();
            //}
        }
Example #11
0
 public RecogAutomator(EnumPTests test, pBaseEntities ge,fBaseEntities fe, EnumPReferences reference=EnumPReferences.NoReference,bool printing=true )
 {
     _test = test;
     _reference = reference;
     _fe = fe;
     _ge = ge;
     _printing = printing;
 }
Example #12
0
 public TestPnn(pBaseEntities ge, fBaseEntities fe, bool IsAlone)
 {
     arg = new TestDoneEventArgs();
        _ge = ge;
        _fe = fe;
        _alone = IsAlone;
        _tstfrm = new TestPnnForm();
 }
Example #13
0
        public MDTestReport(human human, testresult testresult, pBaseEntities ge, fBaseEntities fe, bool WithResult)
        {
            _testresult = testresult;
            _human = human;
            _ge = ge;
            _fe = fe;
            _withresult = WithResult;
            _listscales = new List<IScale>();
            int ages = (_testresult.testdate.Date - _human.birthday.Value.Date).Days / 365;
            MDAnswers _answers = GetAnswersFromBase();
            MDScaleAnamnes _anamnes = new MDScaleAnamnes(_answers, _ge);
            MDScaleLie _lie = new MDScaleLie(_answers, _ge);
            MDScaleM1_1 _m1_1 = new MDScaleM1_1(_answers, _ge);
            MDScaleM1_2 _m1_2 = new MDScaleM1_2(_answers, _ge);
            MDScaleM1 _m1 = new MDScaleM1(_answers, _ge, _m1_1, _m1_2);

            MDScaleM2 _m2 = new MDScaleM2(_answers, _ge);
            MDScaleM2_1 _m2_1 = new MDScaleM2_1(_answers, _ge);
            MDScaleM2_2 _m2_2 = new MDScaleM2_2(_answers, _ge);
            MDScaleM2_3 _m2_3 = new MDScaleM2_3(_answers, _ge);

            MDScaleM3 _m3 = new MDScaleM3(_answers, _ge);
            MDScaleM3_1 _m3_1 = new MDScaleM3_1(_answers, _ge);
            MDScaleM3_2 _m3_2 = new MDScaleM3_2(_answers, _ge);
            MDScaleM3_3 _m3_3 = new MDScaleM3_3(_answers, _ge);
            MDScaleM3_4 _m3_4 = new MDScaleM3_4(_answers, _ge);
            MDScaleM3_5 _m3_5 = new MDScaleM3_5(_answers, _ge);
            MDScaleM3_6 _m3_6 = new MDScaleM3_6(_answers, _ge);

            MDScaleIntegral _integral = new MDScaleIntegral(_anamnes, _lie, _m1, _m2, _m3);

            _listscales.Add(_lie);
            _listscales.Add(_anamnes);
            _listscales.Add(_m1);
            if (_withresult == true)
            {
                _listscales.Add(_m1_1);
                _listscales.Add(_m1_2);
            }
            _listscales.Add(_m2);
            if (_withresult == true)
            {
                _listscales.Add(_m2_1);
                _listscales.Add(_m2_2);
                _listscales.Add(_m2_3);
            }
            _listscales.Add(_m3);
            if (_withresult == true)
            {
                _listscales.Add(_m3_1);
                _listscales.Add(_m3_2);
                _listscales.Add(_m3_3);
                _listscales.Add(_m3_4);
                _listscales.Add(_m3_5);
                _listscales.Add(_m3_6);
            }
            _listscales.Add(_integral);
        }
Example #14
0
 public ContrastsTestReport(human human, testresult testresult, pBaseEntities ge, fBaseEntities fe)
 {
     _testresult = testresult;
     _human = human;
     _ge = ge;
     _fe = fe;
     _listscales = new List<IScale>();
     _listscales.Add(new ContrastsScale(this.GetAnswersFromBase()));
 }
Example #15
0
 public ReferenceFactory(human human,pBaseEntities ge, fBaseEntities fe)
 {
     _ge = ge;
     _fe = fe;
     _human = human;
     _human.testresults.Load();
     _evalrefs = new List<string[]>();
     this.GetEvalRefs();
 }
Example #16
0
 public ExcelReport(pBaseEntities ge, fBaseEntities fe, EnumPTests test)
 {
     _ge = ge;
     _fe = fe;
     _test = test;
     _worker = new BackgroundWorker();
     _worker.DoWork += new DoWorkEventHandler(_worker_DoWork);
     _worker.WorkerReportsProgress = true;
     _worker.WorkerSupportsCancellation = true;
 }
Example #17
0
 public TestD(pBaseEntities ge, fBaseEntities fe,bool  IsAlone)
 {
     arg = new TestDoneEventArgs();
     _ge = ge;
     _fe = fe;
     _alone = IsAlone;
     tkf = new TestDForm(_ge);
     tkf.etc_end.btn_savedata.Click += new EventHandler(btn_savedata_Click);
     tkf.etc_end.btn_exit.Click += new EventHandler(btn_exit_Click);
 }
Example #18
0
        public PoollForm(pBaseEntities ge, fBaseEntities fe)
        {
            InitializeComponent();
            _ge = ge;
            _fe = fe;

            HelpProvider help = new HelpProvider();
            help.HelpNamespace = "Recog_help.chm";
            help.SetHelpNavigator(this, HelpNavigator.Topic);
            help.SetHelpKeyword(this, "test_common.htm");
        }
Example #19
0
 public AutomatorForm(pBaseEntities ge, fBaseEntities fe)
 {
     InitializeComponent();
     _ge = ge;
     _fe = fe;
     this.FillListRefs();
     HelpProvider help = new HelpProvider();
     help.HelpNamespace = "Recog_help.chm";
     help.SetHelpNavigator(this, HelpNavigator.Topic);
     help.SetHelpKeyword(this, "scan_wizard.htm");
 }
Example #20
0
        public PTestReport(human human, testresult testresult, pBaseEntities ge, fBaseEntities fe, bool WithResult)
        {
            _testresult = testresult;
              _human = human;
              _ge = ge;
              _fe = fe;
              _withresult = WithResult;
              _listscales = new List<IScale>();

              _listscales.Add(new PScaleI(GetAnswersFromBase(), _ge));
              _listscales.Add(new PScaleNPU(GetAnswersFromBase(), _ge));
        }
Example #21
0
        private void cmd_editans_Click(object sender, EventArgs e)
        {
            pBaseEntities pb = new pBaseEntities();
            IEnumerable<answersparam> answers = pb.answersparams.Where(a => a.ida == this.IDA);
            foreach (answersparam ap in answers)
            {
                ap.description = this.tb_desc.Text;
                ap.cellswidth = (int)this.nu_width.Value;
                ap.cellshight = (int)this.nu_hight.Value;
                ap.intercellswidth = (int)this.nu_intercells.Value;

            }
            pb.SaveChanges();
            this.Close();
        }
Example #22
0
        public TestResultForm(testresult tstresult, int humanid, pBaseEntities ge, fBaseEntities fe)
        {
            InitializeComponent();
            _ge = ge;
            _fe = fe;
            _testresult = tstresult;
            _humanid = humanid;

            RemarkToolTip = new ToolTip();
            RemarkToolTip.ToolTipIcon = ToolTipIcon.Info;
            RemarkToolTip.ToolTipTitle = "Вопрос:";
            RemarkToolTip.IsBalloon = true;

            HelpProvider help = new HelpProvider();
            help.HelpNamespace = "Recog_help.chm";
            help.SetHelpNavigator(this, HelpNavigator.Topic);
            help.SetHelpKeyword(this, "result_character.htm#test_view");
        }
Example #23
0
        public RForm(int TestID, int HumanID, pBaseEntities ge,fBaseEntities fe)
        {
            InitializeComponent();

            _ge = ge;
            _fe = fe;
            _testid = TestID;
            _humanid = HumanID;
            _sm = new ScanerManager(_ge, new WinFormsWindowMessageHook(this));
            RemarkToolTip = new ToolTip();
            RemarkToolTip.ToolTipIcon = ToolTipIcon.Info;
            RemarkToolTip.ToolTipTitle = "Вопрос:";
            RemarkToolTip.IsBalloon = true;

            HelpProvider help = new HelpProvider();
            help.HelpNamespace = "Recog_help.chm";
            help.SetHelpNavigator(this, HelpNavigator.Topic);
            help.SetHelpKeyword(this, "test_blank.htm");
        }
Example #24
0
        public static ITest CreateTest(EnumPTests test, pBaseEntities ge, fBaseEntities fe, bool isAlone)
        {
            ITest _gentest=null;
              switch (test)
              {
              case EnumPTests.KettellC:
                  _gentest = new TestKettellC(ge, fe, isAlone);
                  break;
              case EnumPTests.PNN:
                  _gentest = new TestPnn(ge, fe, isAlone);
                  break;
              case EnumPTests.Adaptability:
                  _gentest = new TestD(ge,fe, isAlone);
                  break;
              case EnumPTests.FPI:
                  _gentest = new TestFPI(ge, fe, isAlone);
                  break;
              case EnumPTests.KettellA:
                  _gentest = new TestKettellA(ge, fe, isAlone);
                  break;
              case EnumPTests.Modul2:
                  _gentest = new TestMD(ge, fe, isAlone);
                  break;
              case EnumPTests.Contrasts:
                  _gentest = new TestContrasts(fe);
                  break;
              case EnumPTests.Prognoz:
                  _gentest = new TestP(ge,fe,isAlone);
                  break;
              case EnumPTests.Addictive:
                  _gentest = new TestA(ge, fe, isAlone);
                  break;
              case EnumPTests.NPNA:
                  _gentest = new TestNPN(ge, fe, isAlone);
                  break;
              case EnumPTests.Leongard:
                  _gentest = new TestL(ge, fe, isAlone);
                  break;

              }
              return _gentest;
        }
Example #25
0
        public static int GetMark(pBaseEntities GlobalEntities, MDAnswers mdAnswers, List<int> answers)
        {
            int m = 0;

            testsparam t = GlobalEntities.testsparams.First(tp => tp.idt == (int)EnumPTests.Modul2);
            t.answersparams.Load();

            for (int i = 0; i < answers.Count; i++)
            {
                answersparam a = t.answersparams.First(ap => ap.num == answers[i]);
                a.cellsparams.Load();
                if (mdAnswers[(int)a.num - 1].SelectedCellDescription.Trim() != "")
                {
                    cellsparam c = a.cellsparams.First(cp => cp.description.Trim() == mdAnswers[(int)a.num - 1].SelectedCellDescription.Trim());
                     m+=(int)c.mark;
                }
            }

            return m;
        }
Example #26
0
        public LTestReport(human human, testresult testresult, pBaseEntities ge, fBaseEntities fe, bool WithResult)
        {
            _testresult = testresult;
              _human = human;
              _ge = ge;
              _fe = fe;
              _withresult = WithResult;
              _listscales = new List<IScale>();

              _listscales.Add(new LScaleG1(GetAnswersFromBase(), _ge));
              _listscales.Add(new LScaleG2(GetAnswersFromBase(), _ge));
              _listscales.Add(new LScaleG3(GetAnswersFromBase(), _ge));
              _listscales.Add(new LScaleG4(GetAnswersFromBase(), _ge));
              _listscales.Add(new LScaleG5(GetAnswersFromBase(), _ge));
              _listscales.Add(new LScaleG6(GetAnswersFromBase(), _ge));
              _listscales.Add(new LScaleG7(GetAnswersFromBase(), _ge));
              _listscales.Add(new LScaleG8(GetAnswersFromBase(), _ge));
              _listscales.Add(new LScaleG9(GetAnswersFromBase(), _ge));
              _listscales.Add(new LScaleG10(GetAnswersFromBase(), _ge));
        }
Example #27
0
 public FPITestReport(human human, testresult testresult, pBaseEntities ge, fBaseEntities fe, bool WithResult)
 {
     _testresult = testresult;
       _human = human;
       _ge = ge;
       _fe = fe;
       _withresult = WithResult;
       _listscales = new List<IScale>();
       _listscales.Add(new FPIScaleI(this.GetAnswersFromBase(),_ge));
       _listscales.Add(new FPIScaleII(this.GetAnswersFromBase(), _ge));
       _listscales.Add(new FPIScaleIII(this.GetAnswersFromBase(), _ge));
       _listscales.Add(new FPIScaleIV(this.GetAnswersFromBase(), _ge));
       _listscales.Add(new FPIScaleV(this.GetAnswersFromBase(), _ge));
       _listscales.Add(new FPIScaleVI(this.GetAnswersFromBase(), _ge));
       _listscales.Add(new FPIScaleVII(this.GetAnswersFromBase(), _ge));
       _listscales.Add(new FPIScaleVIII(this.GetAnswersFromBase(), _ge));
       _listscales.Add(new FPIScaleIX(this.GetAnswersFromBase(), _ge));
       _listscales.Add(new FPIScaleX(this.GetAnswersFromBase(), _ge));
       _listscales.Add(new FPIScaleXI(this.GetAnswersFromBase(), _ge));
       _listscales.Add(new FPIScaleXII(this.GetAnswersFromBase(), _ge));
 }
Example #28
0
 public static int GetMark(pBaseEntities GlobalEntities, KettellAnswers KettellAnswers, List<int> AnswersNums,EnumKettellType KType)
 {
     int m = 0;
     testsparam t;
     if (KType == EnumKettellType.CForm)
     {
         t = GlobalEntities.testsparams.First(tp => tp.idt == (int)EnumPTests.KettellC);
     }
     else { t = GlobalEntities.testsparams.First(tp => tp.idt == (int)EnumPTests.KettellA); }
         t.answersparams.Load();
         for (int i = 0; i < AnswersNums.Count; i++)
         {
             answersparam a = t.answersparams.First(ap => ap.num == AnswersNums[i]);
             a.cellsparams.Load();
             if (KettellAnswers[(int)a.num - 1].SelectedCellDescription.Trim() != "")
             {
                 cellsparam c = a.cellsparams.First(cp => cp.description.Trim() == KettellAnswers[(int)a.num - 1].SelectedCellDescription.Trim());
                 m += c.mark.Value;
             }
     }
     return m;
 }
Example #29
0
        public ExportForm(fBaseEntities fe, pBaseEntities ge)
        {
            InitializeComponent();
            _fe = fe;
            _ge = ge;
            _backuptool = new BackupTool(_fe);
            _backuptool.HumanDone += new EventHandler(_backuptool_HumanDone);
            chb_fam.Click += new EventHandler(chb_fam_Click);

            chb_tests.Click += new EventHandler(chb_fam_Click);

            cb_fam.SelectedValueChanged += new EventHandler(cb_fam_SelectedValueChanged);
            cb_tests.SelectedValueChanged += new EventHandler(cb_fam_SelectedValueChanged);

            dp_begdate.ValueChanged += new EventHandler(cb_fam_SelectedValueChanged);
            dp_enddate.ValueChanged += new EventHandler(cb_fam_SelectedValueChanged);

            SetGridStyle();

            HelpProvider help = new HelpProvider();
            help.HelpNamespace = "Recog_help.chm";
            help.SetHelpNavigator(this, HelpNavigator.Topic);
            help.SetHelpKeyword(this, "menu_settings.htm#export_resp");
        }
Example #30
-1
        public StenForm(int testid, int humanid, pBaseEntities ge, fBaseEntities fe)
        {
            InitializeComponent();
            _ge = ge;
            _fe = fe;
            _humanid = humanid;
            _testid = testid;

            HelpProvider help = new HelpProvider();
            help.HelpNamespace = "Recog_help.chm";
            help.SetHelpNavigator(this, HelpNavigator.Topic);
            help.SetHelpKeyword(this, "test_sten.htm");
        }