Esempio n. 1
0
        void menuItemEnterProdId_Click(object sender, EventArgs e)
        {
            isBusy = true;
            InputForm form = new InputForm(cache, IdType.Prod);

            if (form.ShowDialog() == DialogResult.Cancel)
            {
                isBusy = false;
                return;
            }
            prodId = form.id;
            SelectProdsListRecord(prodId);
            ProductSelected();
            isBusy = false;
        }
Esempio n. 2
0
 void menuItemEnterContId_Click(object sender, EventArgs e)
 {
     try
     {
         isBusy = true;
         InputForm form = new InputForm(cache, IdType.Cont);
         if (form.ShowDialog() == DialogResult.Cancel)
         {
             isBusy = false;
             return;
         }
         contId = form.id;
         ControllerSelected();
     }
     catch (Exception ex)
     {
         isBusy = true;
         MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK,
                         MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1);
         isBusy = false;
     }
 }
Esempio n. 3
0
        /// <summary> Дополнительная инициализация компонентов </summary>
        void MainForm_Load(object sender, EventArgs e)
        {
            ImageList            = new ImageList();
            Cache                = new Cache("gg");
            Cache.Line           = ProgramSettings.Line;
            InputForm            = new InputForm();
            AcceptionForm        = new AcceptionForm();
            SelectActionForm     = new SelectActionForm();
            AuthentificationForm = new AuthentificationForm();
            Delegate             = new IntScIDDelegate(InterpretScannedID);
            State                = ProgramState.InitialState;

            SuspendLayout();

            // Инициализация списков
            string[] Captions    = new string[] { "Дата", "Линия", "Атрибут", "Значение" };
            int[]    Proportions = new int[] { 2, 2, 3, 4 };
            ProdsList = CreateListView(Captions, Proportions);

            //ProdsList.SmallImageList = AuthentificationForm.imageList;

            Captions    = new string[] { "Время", "Дефект", "Оператор" };
            Proportions = new int[] { 3, 5, 5 };
            RegsList    = CreateListView(Captions, Proportions);
            Captions    = new string[] { "Код", "Дефект" };
            Proportions = new int[] { 2, 5 };
            DefsList    = CreateListView(Captions, Proportions);
            Captions    = new string[] { "Код", "Оператор" };
            Proportions = new int[] { 2, 5 };
            WorksList   = CreateListView(Captions, Proportions);

            // Инициализация кнопок
            LeftButton   = CreateButton(ButtonPosition.Left, 11);
            CenterButton = CreateButton(ButtonPosition.Center, 21);
            RightButton  = CreateButton(ButtonPosition.Right, 31);

            ResumeLayout();
            Manager(UserAction.Undefined);
        }