Ejemplo n.º 1
0
        /// <summary>
        /// ������ ��������� � TreeView ���������
        /// </summary>
        private void StartProgram(TreeNode node)
        {
            Common.PZUsers.Program program = node.Tag as Common.PZUsers.Program;
              if (program == null)
            return;
              // ������
              ProgramsTree.Enabled = false;
              StatusSplash.Create(MainStatusStrip);
              StatusSplash.Message("������ " + program.name);
              log.Message("������ " + program.name);
              try
              {
            if (!current.SetProgram(program.code))
              Functions.CloseApplication();

            Form form = null;
            // ��������, ����� ����� ��� ����� �� ����� ���������. ���� ����� ��������� ��������� exe-����, ��
            // ������� ��� ��������� ������ 'current.User.id+" "+program.id'
            switch (program.code.ToUpper())
            {
              case "GENERALREPORT":
            form = new LIMSReport.MainForm();
            break;
              case "PRODUCTSPECIFICATION":
            form = new ProductSpecification.SpecificationForm();
            break;
              case "GENERALPASSPORTREPORT":
            form = new CertTankReport.CertTankForm();
            break;
              case "UNCPRODUCTSDICT":
            form = new UncProductsEditor.UNCProductsEditorForm();
            break;
              case "MAINADMINMODULE":
            form = new AdminModule.AdminForm();
            break;
              default:
            // �������� ��������� ����� RunPath
            System.Diagnostics.Process.Start(program.runpath);
            break;
            }
            if (form != null)
            {
              form.FormClosed += new FormClosedEventHandler(ApplicationFormClosed);
              form.Text = String.Format("{0} [{1}]", current.Program.name, current.User.name);
              form.Show();

              //this.Hide(); // ���� ����������������, �� �� ����� ����� ����� ����� ����� ��������� ��������� �������
            }
              }
              finally
              {
            ProgramsTree.Enabled = true;
            StatusSplash.Close();
              }
        }
 public AnalyzePart(SpecificationForm frm, int c, int r1, int r2)
 {
     form = frm;
       column = c;
       row1 = r1;
       row2 = r2;
 }