Exemplo n.º 1
0
        private void openingFormButton_Click(object sender, EventArgs e)
        {
            OpeningForm openingForm = new OpeningForm();

            openingForm.FormClosed += delegate(object source, FormClosedEventArgs args)
            {
                this.Visible = true;
            };
            openingForm.Show();
        }
Exemplo n.º 2
0
            // загрузка: mdl load simpen.ui,,simpenDomain; simpen.ui form
            // выгрузка: clr unload domain simpenDomain
            public static void showForm(string unparsed)
            {
                DEBUG_MODE =
                    unparsed == null ? false : unparsed.ToUpper().Equals("DEBUG");

                if (form == null || form.IsDisposed)
                {
                    form = new OpeningForm();
                }

                WindowHelper.show(form, Addin.Instance.Name + "::" + "Opening");
                form.runLocatingTool();
            }
Exemplo n.º 3
0
        private void initializeForm()
        {
            if (form_ != null && !form_.IsDisposed)
            {
                return;
            }
            form_ = new OpeningForm();
            form_.setAction_ShowErrorMessage(showErrorMessage_);

            form_.tabCtrlMain.TabPages.RemoveByKey("tabCreate");
            form_.tabCtrlMain.TabPages.RemoveByKey("tabUpdate");

            form_.Text = $"Проёмы v{AssemblyVersion.VersionStr}"
                         + (isDebugMode_ ? " [DEBUG]" : string.Empty);

            form_.setAction_OnCloseForm(groupModel_.clearContext);
            form_.setDataSource(groupModel_.TaskTable);

            form_.setAction_SetReadOnly(setReadOnly_);

            form_.setAction_DataRowsAdded(rowsAdded_);
            form_.setAction_Create(addToModel_);
            form_.setAction_Preview(preview_);

            groupModel_.AttrsXDoc = null;
            form_.setAction_LoadXmlAttrs(groupModel_.loadXmlAttrs);

            form_.setBinding(nameof(form_.lblSelectionCount), "Text",
                             groupModel_, nameof(groupModel_.SelectionCount),
                             BindinUpdateMode.ControlOnly);

            form_.dgvCreationTasks.ReadOnly = true;
            ensureReadOnlyColumns();
            form_.dgvCreationTasks.ShowRowErrors = true;

            form_.dgvCreationTasks.SelectionChanged     += DgvCreationTasks_SelectionChanged;
            form_.dgvCreationTasks.CellMouseDoubleClick += DgvCreationTasks_CellMouseDoubleClick;

        #if DEBUG
            // form_.tabControl1.TabPages.RemoveAt(0); // TODO временно до отладки и ввода в работу
        #endif
        }
Exemplo n.º 4
0
 private void btnSignIn_Click(object sender, EventArgs e)
 {
     if (cmbPosition.Text == "Manager")
     {
         if (txtUserName == null || txtPassword == null)
         {
             MessageBox.Show("Please Fill the Field");
         }
         else
         {
             string userName = txtUserName.Text;
             string password = txtPassword.Text;
             if (userName == "admin" && password == "admin")
             {
                 OpeningForm op = new OpeningForm();
                 op.Show();
             }
             else
             {
                 MessageBox.Show("Please try to valid authentication");
             }
         }
     }
 }