Exemplo n.º 1
0
        public Producter()
        {
            frmMainForm mainForm = new frmMainForm(new StartProgress());

            _session = mainForm.Session;
            _context = new ContentText();
        }
        }     // end Property

        // Enable controls for the object to be edited
        public virtual void Edit(frmMainForm f)
        {
            f.gbOwlMember.Enabled = true;
            f.txtID.Enabled       = true;
            f.txtName.Enabled     = true;
            f.dtBday.Enabled      = true;
        }
 // Enable controls on form to edit object
 public override void Edit(frmMainForm f)
 {
     base.Edit(f);
     f.gbGrad.Enabled         = true;
     f.txtGradStipend.Enabled = true;
     f.menuDegree.Enabled     = true;
 }
Exemplo n.º 4
0
        }  // end activateGraduateStudent

        // Enables Chairperson textboxes and highlights the Chairperson groupbox
        public static void activateChairperson(frmMainForm f)
        {
            f.gbChairperson.BackColor = Color.LimeGreen;
            activateFaculty(f);  // Faculty must be activated too
            f.txtChairStipend.Enabled = true;
            f.gbChairperson.Enabled   = true;
        }  // end activateChairperson
Exemplo n.º 5
0
        }  // end formAddMode

        // Enable/disable buttons when not in edit mode
        public static void activateAddButtons(frmMainForm f)
        {
            f.btnCreateGrad.Enabled      = true;
            f.btnCreateChair.Enabled     = true;
            f.btnCreateUndergrad.Enabled = true;
            f.btnCreateFaculty.Enabled   = true;
        }  // end activateAddButtons
Exemplo n.º 6
0
        private void btnClose_Click(object sender, EventArgs e)
        {
            frmMainForm mainForm = new frmMainForm();

            mainForm.Show();
            this.Hide();
        }
 // Save data from form to object
 public override void Save(frmMainForm f)
 {
     base.Save(f);
     studentTuition = Convert.ToDecimal(f.txtTuition.Text);
     studentCredits = Convert.ToInt32(f.txtCredits.Text);
     studentYear    = f.menuYear.ToString();
 }
Exemplo n.º 8
0
        public frmFileScan(frmMainForm mainForm)
        {
            InitializeComponent();

            // Link back to the parent form
            parent = mainForm;
        }
Exemplo n.º 9
0
        } // end resetForm

        // Activates and deactivates necessary form buttons
        //    when in add mode
        public static void formAddMode(frmMainForm f)
        {
            f.btnClearForm.Enabled = true;
            f.btnDelete.Enabled    = false;
            f.btnEdit.Enabled      = false;
            f.btnFind.Enabled      = false;
        }  // end formAddMode
Exemplo n.º 10
0
        private void btnDangNhap_Click(object sender, EventArgs e)
        {
            this.Hide();
            DataTable dt = NguoiDungBUS.Instance.Login(txtTenDangNhap.Text.Trim(), txtMatKhau.Text.Trim());

            //MessageBox.Show(Security.EncryptMd5(txtMatKhau.Text));
            if (txtTenDangNhap.Text == "")
            {
                MessageBox.Show("Bạn chưa nhập tên đăng nhập");
            }
            else if (txtMatKhau.Text == "")
            {
                MessageBox.Show("Bạn chưa nhập mật khẩu");
            }
            else if (dt.Rows.Count > 0)
            {
                string      NguoiDungID = dt.Rows[0]["NguoiDungID"].ToString();
                frmMainForm frm         = new frmMainForm(NguoiDungID);
                frm.Show();
            }
            else
            {
                MessageBox.Show("Sai tên tài khoản, mật khẩu");
                this.Show();
                txtMatKhau.Text     = null;
                txtTenDangNhap.Text = null;
                txtTenDangNhap.Focus();
            }
        }
Exemplo n.º 11
0
        }  // end deactivateOwlMember

        // Disables Student textboxes and highlights the Student groupbox
        public static void deactivateStudent(frmMainForm f)
        {
            deactivateUndergraduateStudent(f);   // Must deactivate UG Student too
            deactivateGraduateStudent(f);        // Must deactivate Grad Student too
            f.gbStudent.Enabled   = false;
            f.gbStudent.BackColor = Color.Red;
        }  // end deactivateStudent
        private void ProductView_FormClosed(object sender, FormClosedEventArgs e)
        {
            frmMainForm mainForm = new frmMainForm();

            mainForm.Show();
            Hide();
        }
Exemplo n.º 13
0
 // Enable controls on form to edit object
 public override void Edit(frmMainForm f)
 {
     base.Edit(f);
     f.gbFaculty.Enabled     = true;
     f.txtDepartment.Enabled = true;
     f.menuRank.Enabled      = true;
 }
Exemplo n.º 14
0
        }  // end activateChairperson

        // Disables OwlMember textboxes and highlights the OwlMember groupbox
        public static void deactivateOwlMember(frmMainForm f)
        {
            deactivateStudent(f);
            deactivateFaculty(f);
            f.gbOwlMember.Enabled   = false;
            f.gbOwlMember.BackColor = Color.Red;
        }  // end deactivateOwlMember
        private void frmCustomersView_FormClosing(object sender, FormClosingEventArgs e)
        {
            frmMainForm mainForm = new frmMainForm();

            mainForm.Show();
            Hide();
        }
 // Display data in object on form
 public override void Display(frmMainForm f)
 {
     base.Display(f);
     f.txtTuition.Text = studentTuition.ToString();
     f.txtGPA.Text     = studentGPA.ToString();
     f.menuYear.Text   = studentYear.ToString();
     f.txtCredits.Text = studentCredits.ToString();
 }
 // Enable controls on form to edit object
 public override void Edit(frmMainForm f)
 {
     base.Edit(f);
     f.gbUndergrad.Enabled = true;
     f.txtTuition.Enabled  = true;
     f.txtCredits.Enabled  = true;
     f.menuYear.Enabled    = true;
 }
Exemplo n.º 18
0
        }  // end activateUndergraduateStudent

        // Enables Worker textboxes and highlights the Graduate Student groupbox
        public static void activateGraduateStudent(frmMainForm f)
        {
            activateStudent(f);  // Student must be activated too
            f.menuDegree.Enabled     = true;
            f.txtGradStipend.Enabled = true;
            f.gbGrad.Enabled         = true;
            f.gbGrad.BackColor       = Color.LimeGreen;
        }  // end activateGraduateStudent
        private void frmCustomersView_FormClosed(object sender, FormClosedEventArgs e)
        {
            //when closing, shows main form and hides add customer form
            frmMainForm mainForm = new frmMainForm();

            mainForm.Show();
            Hide();
        }
Exemplo n.º 20
0
        }  // end activateOwlMember

        //  Enables Student textboxes and highlights the Student groupbox
        public static void activateStudent(frmMainForm f)
        {
            activateOwlMember(f);
            f.gbStudent.Enabled   = true;
            f.txtMajor.Enabled    = true;
            f.txtGPA.Enabled      = true;
            f.gbStudent.BackColor = Color.LimeGreen;
        }  // end ActivateStudent
Exemplo n.º 21
0
        }  // end deactivateAddButtons

        // Enables OwlMember textboxes and highlights the OwlMember groupbox
        public static void activateOwlMember(frmMainForm f)
        {
            f.gbOwlMember.Enabled   = true;
            f.gbOwlMember.BackColor = Color.LimeGreen;
            //f.txtID.Enabled = true;
            f.txtName.Enabled = true;
            f.dtBday.Enabled  = true;
        }  // end activateOwlMember
Exemplo n.º 22
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Cursor.Current = Cursors.WaitCursor;

#if !DEBUG
            //如果不是在调试状态,则进行自动更新
            AutoUpdateDlg _updatedlg = new AutoUpdateDlg("海关缉私办案平台客户端升级", ConfigFile.LiveUpdate_SvrInfoUrl);
            _updatedlg.ShowDialog();
#endif



            DevLocalizerCHS.Init();


            DevExpress.UserSkins.BonusSkins.Register();
            DevExpress.Skins.SkinManager.EnableFormSkins();

            /*
             * Caramel
             * Money Twins
             * Lilian
             * The Asphalt World
             * iMaginary
             * Black
             * Blue
             * Coffee
             * Liquid Sky
             * London Liquid Sky
             * Glass Oceans
             * Stardust
             * */
            DevExpress.LookAndFeel.UserLookAndFeel.Default.SetSkinStyle("iMaginary");

            //取版本信息
            Assembly SysAssembly = Assembly.GetEntryAssembly();
            SessionClass.SysAssemblyName      = SysAssembly.GetName();
            SessionClass.SysResourcesAssembly = typeof(Resources).Assembly;
            SinoSZResources.InitResourceDict(SessionClass.SysResourcesAssembly);



            //TrackingServices.RegisterTrackingHandler(new SinoSZRemoteObjectTracker());

            MenuService.PicWidth = 70;
            LoginForm _login = new LoginForm("登录系统", Resources.login_TJ);
            Cursor.Current = Cursors.Default;

            if (_login.ShowDialog() == DialogResult.OK)
            {
                frmMainForm _mainForm = new frmMainForm(ConfigFile.SystemDisplayName);
                _mainForm.ChangePassword += new EventHandler <EventArgs>(_mainForm_ChangePassword);
                _mainForm.ReLoginForm     = _login;
                Application.Run(_mainForm);
            }
        }
Exemplo n.º 23
0
        }  // end activateFaculty

        // Enables Undergrad Student textboxes and highlights the Undergrad Student groupbox
        public static void activateUndergraduateStudent(frmMainForm f)
        {
            activateStudent(f);   // Student must be activated too
            f.txtTuition.Enabled    = true;
            f.txtCredits.Enabled    = true;
            f.menuYear.Enabled      = true;
            f.gbUndergrad.Enabled   = true;
            f.gbUndergrad.BackColor = Color.LimeGreen;
        }  // end activateUndergraduateStudent
Exemplo n.º 24
0
        }  // end ActivateStudent

        // Enables Faculty textboxes and highlights the Faculty groupbox
        public static void activateFaculty(frmMainForm f)
        {
            activateOwlMember(f);
            f.txtDepartment.Enabled = true;
            f.menuRank.Enabled      = true;
            f.gbFaculty.Enabled     = true;
            f.gbFaculty.BackColor   = Color.LimeGreen;
            f.gbStudent.BackColor   = Color.Red;
        }  // end activateFaculty
Exemplo n.º 25
0
        public frmDiskInfoViewer(frmMainForm form)
        {
            InitializeComponent();

            lvwColumnSorter = new DirectoryListColumnSorter();
            lvwDirectory.ListViewItemSorter = lvwColumnSorter;

            parentForm = form;
        }
Exemplo n.º 26
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            frmMainForm mainForm = new frmMainForm();
            generateNewSettingsFilePrompt filePrompt = new generateNewSettingsFilePrompt();

            Application.Run(filePrompt);
            Application.Run(mainForm);
        }
Exemplo n.º 27
0
        public static void resetForm(frmMainForm f)
        {
            //  Reset button components
            f.btnClearForm.Enabled   = true;
            f.btnDelete.Enabled      = false;
            f.btnEdit.Enabled        = false;
            f.btnFind.Enabled        = true;
            f.btnCreate.Enabled      = false;
            f.btnProcessEdit.Enabled = false;



            f.btnCreateFaculty.Enabled   = true;
            f.btnCreateFaculty.Text      = "Create Faculty";
            f.btnCreateChair.Enabled     = true;
            f.btnCreateChair.Text        = "Create Chairperson";
            f.btnCreateGrad.Enabled      = true;
            f.btnCreateGrad.Text         = "Create Graduate Student";
            f.btnCreateUndergrad.Enabled = true;
            f.btnCreateUndergrad.Text    = "Create Undergraduate";


            // Reset group components
            f.gbOwlMember.Enabled     = false;
            f.gbOwlMember.BackColor   = Color.Gainsboro;
            f.gbStudent.Enabled       = false;
            f.gbStudent.BackColor     = Color.Gainsboro;
            f.gbFaculty.Enabled       = false;
            f.gbFaculty.BackColor     = Color.Gainsboro;
            f.gbUndergrad.Enabled     = false;
            f.gbUndergrad.BackColor   = Color.Gainsboro;
            f.gbGrad.Enabled          = false;
            f.gbGrad.BackColor        = Color.Gainsboro;
            f.gbChairperson.BackColor = Color.Gainsboro;
            f.gbChairperson.Enabled   = false;

            // Reset Text boxes
            f.txtID.Enabled           = false;
            f.txtName.Enabled         = false;
            f.dtBday.Enabled          = false;
            f.txtDepartment.Enabled   = false;
            f.menuRank.Enabled        = false;
            f.txtMajor.Enabled        = false;
            f.txtTuition.Enabled      = false;
            f.menuYear.Enabled        = false;
            f.txtCredits.Enabled      = false;
            f.menuDegree.Enabled      = false;
            f.txtGradStipend.Enabled  = false;
            f.txtChairStipend.Enabled = false;

            f.menuDegree.SelectedIndex = -1;
            f.menuYear.SelectedIndex   = -1;
            f.menuRank.SelectedIndex   = -1;
            f.dtBday.Text = "12/31/2006";
        } // end resetForm
 public static bool menuDegreeValidation(frmMainForm f)
 {
     try
     {
         f.menuDegree.SelectedItem.ToString();
         return(true);
     }
     catch
     {
         MessageBox.Show("The drop down menu cannot be left blank");
         return(false);
     }
 }
 //validates that credits is a positive integer
 public static bool validateCredits(frmMainForm f)
 {
     if (notEmpty(f.txtCredits.Text))                                              // not empty
     {
         if (isInteger(f.txtCredits.Text) && isPositiveDecimal(f.txtCredits.Text)) // convertible and greater than or equal to 0.00
         {
             return(true);
         }
         return(false);
     }
     MessageBox.Show("Credits is empty");
     return(false);
 }
Exemplo n.º 30
0
        public frmMainView(frmMainForm mainForm)
        {
            InitializeComponent();
            Dock = DockStyle.Fill;

            this.mMainForm = mainForm;

            Dictionary <SyntaxHighlightingItems, TextStyle> syntaxHighlightingStyles = Configuration.Persistent.SyntaxHighlightingStyles;

            hxbDump.BackColor            = Configuration.Persistent.PageBackground;
            hxbDump.InfoForeColor        = ((SolidBrush)syntaxHighlightingStyles[SyntaxHighlightingItems.DumpHeadersStyle].ForeBrush).Color;
            hxbDump.ForeColor            = ((SolidBrush)syntaxHighlightingStyles[SyntaxHighlightingItems.DumpHexStyle].ForeBrush).Color;
            hxbDump.StringViewColour     = ((SolidBrush)syntaxHighlightingStyles[SyntaxHighlightingItems.DumpAsciiStyle].ForeBrush).Color;
            hxbDump.SelectionBackColor   = ((SolidBrush)syntaxHighlightingStyles[SyntaxHighlightingItems.DumpMainSelectionBackStyle].ForeBrush).Color;
            hxbDump.SelectionForeColor   = ((SolidBrush)syntaxHighlightingStyles[SyntaxHighlightingItems.DumpMainSelectionFrontStyle].ForeBrush).Color;
            hxbDump.ShadowSelectionColor = ((SolidBrush)syntaxHighlightingStyles[SyntaxHighlightingItems.DumpSecondarySelectionBackStyle].ForeBrush).Color;
            hxbDump.ShadowSelectionColor = Color.FromArgb(100, hxbDump.ShadowSelectionColor.R, hxbDump.ShadowSelectionColor.G, hxbDump.ShadowSelectionColor.B);

            assemblerAddressStyle  = syntaxHighlightingStyles[SyntaxHighlightingItems.AssemblerAddressStyle];
            assemblerHexStyle      = syntaxHighlightingStyles[SyntaxHighlightingItems.AssemblerHexStyle];
            assemblerMnemonicStyle = syntaxHighlightingStyles[SyntaxHighlightingItems.AssemblerMnemonicStyle];
            assemblerOperandStyle  = syntaxHighlightingStyles[SyntaxHighlightingItems.AssemblerOperandStyle];
            assemblerAsciiStyle    = syntaxHighlightingStyles[SyntaxHighlightingItems.AssemblerAsciiStyle];
            assemblerUnknownStyle  = syntaxHighlightingStyles[SyntaxHighlightingItems.AssemblerUnknownStyle];

            basicLineNumberStyle  = syntaxHighlightingStyles[SyntaxHighlightingItems.BasicLineNumber];
            basicKeywordStyle     = syntaxHighlightingStyles[SyntaxHighlightingItems.BasicKeyword];
            basicBranchesStyle    = syntaxHighlightingStyles[SyntaxHighlightingItems.BasicBranches];
            basicLoopsStyle       = syntaxHighlightingStyles[SyntaxHighlightingItems.BasicLoops];
            basicStringStyle      = syntaxHighlightingStyles[SyntaxHighlightingItems.BasicString];
            basicNumberStyle      = syntaxHighlightingStyles[SyntaxHighlightingItems.BasicNumber];
            basicDataKeywordStyle = syntaxHighlightingStyles[SyntaxHighlightingItems.BasicDataKeyword];
            basicCommentStyle     = syntaxHighlightingStyles[SyntaxHighlightingItems.BasicComment];

            hyperbasicAddressStyle  = syntaxHighlightingStyles[SyntaxHighlightingItems.HyperbasicAddressStyle];
            hyperbasicLabelStyle    = syntaxHighlightingStyles[SyntaxHighlightingItems.HyperbasicLabelStyle];
            hyperbasicNumberStyle   = syntaxHighlightingStyles[SyntaxHighlightingItems.HyperbasicNumberStyle];
            hyperbasicStringStyle   = syntaxHighlightingStyles[SyntaxHighlightingItems.HyperbasicStringStyle];
            hyperbasicLoopsStyle    = syntaxHighlightingStyles[SyntaxHighlightingItems.HyperbasicLoopStyle];
            hyperbasicBranchesStyle = syntaxHighlightingStyles[SyntaxHighlightingItems.HyperbasicBrancheStyle];
            hyperbasicCodeStyle     = syntaxHighlightingStyles[SyntaxHighlightingItems.HyperbasicCodeStyle];
            hyperbasicCommentStyle  = syntaxHighlightingStyles[SyntaxHighlightingItems.HyperbasicCommentStyle];

            teleassAddressStyle  = syntaxHighlightingStyles[SyntaxHighlightingItems.TeleassAddressStyle];
            teleassLabelStyle    = syntaxHighlightingStyles[SyntaxHighlightingItems.TeleassLabelStyle];
            teleassMnemonicStyle = syntaxHighlightingStyles[SyntaxHighlightingItems.TeleassMnemonicStyle];
            teleassOperandStyle  = syntaxHighlightingStyles[SyntaxHighlightingItems.TeleassOperandStyle];
            teleassCommentStyle  = syntaxHighlightingStyles[SyntaxHighlightingItems.TeleassCommentStyle];

            fctSourceCode.BackColor = Configuration.Persistent.PageBackground;
        }