コード例 #1
0
        public Producter()
        {
            frmMainForm mainForm = new frmMainForm(new StartProgress());

            _session = mainForm.Session;
            _context = new ContentText();
        }
コード例 #2
0
        }     // 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;
        }
コード例 #3
0
 // 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;
 }
コード例 #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
コード例 #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
コード例 #6
0
        private void btnClose_Click(object sender, EventArgs e)
        {
            frmMainForm mainForm = new frmMainForm();

            mainForm.Show();
            this.Hide();
        }
コード例 #7
0
 // 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();
 }
コード例 #8
0
        public frmFileScan(frmMainForm mainForm)
        {
            InitializeComponent();

            // Link back to the parent form
            parent = mainForm;
        }
コード例 #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
コード例 #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();
            }
        }
コード例 #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
コード例 #12
0
        private void ProductView_FormClosed(object sender, FormClosedEventArgs e)
        {
            frmMainForm mainForm = new frmMainForm();

            mainForm.Show();
            Hide();
        }
コード例 #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;
 }
コード例 #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
コード例 #15
0
        private void frmCustomersView_FormClosing(object sender, FormClosingEventArgs e)
        {
            frmMainForm mainForm = new frmMainForm();

            mainForm.Show();
            Hide();
        }
コード例 #16
0
 // 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();
 }
コード例 #17
0
 // 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;
 }
コード例 #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
コード例 #19
0
        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();
        }
コード例 #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
コード例 #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
コード例 #22
0
ファイル: Program.cs プロジェクト: aehyok/ServerMeta
        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);
            }
        }
コード例 #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
コード例 #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
コード例 #25
0
        public frmDiskInfoViewer(frmMainForm form)
        {
            InitializeComponent();

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

            parentForm = form;
        }
コード例 #26
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            frmMainForm mainForm = new frmMainForm();
            generateNewSettingsFilePrompt filePrompt = new generateNewSettingsFilePrompt();

            Application.Run(filePrompt);
            Application.Run(mainForm);
        }
コード例 #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
コード例 #28
0
 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);
     }
 }
コード例 #29
0
 //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);
 }
コード例 #30
0
ファイル: frmMainView.cs プロジェクト: retroric/OricExplorer
        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;
        }