Exemple #1
0
        private void Form1_Load(object sender, EventArgs e)
        {
            pnlPendingVisible = false;
            Timer1.Interval   = (int)Math.Round(TimeSpan.FromSeconds(2d).TotalMilliseconds);
            Timer1.Start();

            _punchID          = 0;
            pnlPendingVisible = false;

            // db.needToclockedOutLastShift()
            // db.createIPSession()
            IsMdiContainer = true;
            My.MyProject.Forms.FrmHomePage.MdiParent = this;
            decimal heigt = (decimal)(My.MyProject.Computer.Screen.Bounds.Size.Height / 1.04d);

            Size = (Size) new Point(My.MyProject.Computer.Screen.Bounds.Size.Width, (int)Math.Round(heigt));
            var tip = new ToolTip();

            tip.SetToolTip(exitPictureBox, "Exit");
            tip.SetToolTip(minimizePictureBox, "Minimize");

            // to ignore border od Parent form
            foreach (Control c in Controls)
            {
                if (c is MdiClient)
                {
                    c.BackColor = BackColor;
                    int windowLong = GetWindowLong(c.Handle, GWL_EXSTYLE);
                    windowLong = windowLong & ~WS_EX_CLIENTEDGE;
                    SetWindowLong(c.Handle, GWL_EXSTYLE, windowLong);
                    c.Width = c.Width + 1;
                    break;
                }
            }

            MdlOptionsManagement.getClearedModels(this);
            My.MyProject.Forms.FrmHomePage.WindowState = FormWindowState.Maximized;
            if (FormsTab1.FormExists(My.MyProject.Forms.FrmHomePage.Name))
            {
                return;
            }
            else
            {
                AddFormToPanel(My.MyProject.Forms.FrmHomePage);
                FormsTab1.AddFormTab("Home Page", My.MyProject.Forms.FrmHomePage.Name);
            }

            selectedOption = My.MyProject.Forms.FrmHomePage;
            MdlLoadingSetting.adjustScreen(selectedOption, menuIsExpanded);
            MdlLoadingSetting.adjustScreen(PanelWindows, menuIsExpanded);
            // FrmHomePage.Show()
            // HarvesterAlive1.Enabled = True

            //  HideLoadForm();
        }
Exemple #2
0
        private void SlideMenu1_MainMenuKeySelected(string MainMenyKey)
        {
            string tabName         = "";
            Form   selectedOption2 = My.MyProject.Forms.FrmInConstruction;

            if (MainMenyKey.Equals("Home"))
            {
                selectedOption = My.MyProject.Forms.FrmHomePage;
                tabName        = "Home Page";
            }
            else if (MainMenyKey.Equals("Inbound Cargo"))
            {
                selectedOption = My.MyProject.Forms.FrmRailList;
                tabName        = "Inbound Cargo";
            }
            else if (MainMenyKey.Equals("Bookings"))
            {
                selectedOption = My.MyProject.Forms.FrmBookingList;
                tabName        = "Bookings";
            }
            else if (MainMenyKey.Equals("Clock In/Out"))
            {
                selectedOption = My.MyProject.Forms.FrmTimeTracker;
                tabName        = "Clock In/Out";
            }

            if (tabName.Equals(""))
            {
                // HideLoadForm();
                return;
            }
            else if (FormsTab1.FormExists(selectedOption.Name))
            {
                // HideLoadForm();
                return;
            }
            else
            {
                // showLOadForm();
                MdlLoadingSetting.adjustScreen(PanelWindows, menuIsExpanded);
                MdlLoadingSetting.adjustScreen(selectedOption, menuIsExpanded);
                AddFormToPanel(selectedOption);
                FormsTab1.AddFormTab(tabName, selectedOption.Name);
                // HideLoadForm();
            }
        }
Exemple #3
0
        private void SlideMenu1_SubMenuKeySelected(string MainMenuKey, string SubMenuKey)
        {
            // showLOadForm();
            string tabName = "";

            // Human Resources
            if (SubMenuKey.Equals("Employee Management"))
            {
                selectedOption = My.MyProject.Forms.FrmEmployeeManagement;
                tabName        = "Employee Management";
            }
            else if (SubMenuKey.Equals("Time Management"))
            {
                selectedOption = My.MyProject.Forms.FrmTimeSheet;
                tabName        = "Time Management";
            }
            else if (SubMenuKey.Equals("Shift Management"))
            {
                selectedOption = My.MyProject.Forms.FrmShiftScheduling;
                tabName        = "Shift Management";
            }
            else if (SubMenuKey.Equals("Safety/Risk Manageme"))
            {
                selectedOption = My.MyProject.Forms.FrmSafetyRiskMain;
                // Containers - In Construction
                tabName = "Risk Management";
            }
            else if (SubMenuKey.Equals("Assign Container"))
            {
                selectedOption = My.MyProject.Forms.FrmAssignContainer;
                tabName        = "Assign Container";
            }
            else if (SubMenuKey.Equals("EDI"))
            {
                selectedOption = My.MyProject.Forms.FrmEDIManagement;
                tabName        = "EDI";
            }
            else if (SubMenuKey.Equals("EDI Performance Audi"))
            {
                selectedOption = My.MyProject.Forms.frmEDIPerformanceAudit;
                tabName        = "EDI Performance Audit";
            }
            else if (SubMenuKey.Equals("In/Out Gate"))
            {
                selectedOption = My.MyProject.Forms.FrmInOutGate;
                tabName        = "In/Out Gate";
            }
            else if (SubMenuKey.Equals("Container Management"))
            {
                selectedOption = My.MyProject.Forms.FrmListContainers;
                tabName        = "Container Management";
            }
            // Containers - Ready
            else if (SubMenuKey.Equals("Block Container"))
            {
                selectedOption = My.MyProject.Forms.FrmListBlockedContainers;
                tabName        = "Blocked Containers";
            }
            else if (SubMenuKey.Equals("Transfer Container"))
            {
                selectedOption = My.MyProject.Forms.FrmListTransfers;
                tabName        = "Transfer Container";
            }
            else if (SubMenuKey.Equals("CFIA Labels"))
            {
                selectedOption = My.MyProject.Forms.FrmCFIALabel;
                tabName        = "Labels";
            }
            else if (SubMenuKey.Equals("Companies"))
            {
                selectedOption = My.MyProject.Forms.FrmDisplayContacts;
                tabName        = "Companies";
            }
            else if (SubMenuKey.Equals("Pre Scripts"))
            {
                selectedOption = My.MyProject.Forms.FrmDisplayTemplates;
                tabName        = "Pre Scripts";
            }

            // Bookings - In Construction
            else if (SubMenuKey.Equals("Bookings Report"))
            {
                selectedOption = My.MyProject.Forms.FrmBookingReport;
                tabName        = "Bookings Report";
            }
            else if (SubMenuKey.Equals("Vessel"))
            {
                selectedOption = My.MyProject.Forms.frmVesselList;
                tabName        = "Vessel";
            }
            else if (SubMenuKey.Equals("Vessel Voyage"))
            {
                selectedOption = My.MyProject.Forms.frmVesselVoyageList;
                tabName        = "Vessel Voyage";
            }

            // Dispatch - In construction
            else if (SubMenuKey.Equals("Logs"))
            {
                selectedOption = My.MyProject.Forms.FrmLogs;
                tabName        = "Logs";
            }
            else if (SubMenuKey.Equals("TruckDrivers"))
            {
                f = new frmTruckDriverList();
                selectedOption = f;
                tabName        = "Truck Drivers";
            }
            else if (SubMenuKey.Equals("Requests"))
            {
                selectedOption = My.MyProject.Forms.FrmInConstruction;
                tabName        = "Requests";
            }
            else if (SubMenuKey.Equals("Trucking Reconciliat"))
            {
                selectedOption = My.MyProject.Forms.FrmTruckingRecon;
                tabName        = "Trucking Reconciliation";
            }
            else if (SubMenuKey.Equals("Carrier Assignment"))
            {
                selectedOption = My.MyProject.Forms.FrmCarrierAssignment;
                tabName        = "Carrier Assignment";
            }
            else if (SubMenuKey.Equals("Epty Bag Inventory"))
            {
                selectedOption = My.MyProject.Forms.FrmEmptyBagInvList;
                tabName        = "Empty Bag Inventory";
            }
            else if (SubMenuKey.Equals("Grain Inventory"))
            {
                selectedOption = My.MyProject.Forms.FrmGrainInvList;
                tabName        = "Grain Inventory";
            }
            else if (SubMenuKey.Equals("Inbound"))
            {
                selectedOption = My.MyProject.Forms.FrmListRequests;
                tabName        = "Inbound";
            }
            else if (SubMenuKey.Equals("Outbound"))
            {
                selectedOption = My.MyProject.Forms.FrmInConstruction;
                tabName        = "Outbound";
            }

            MdlLoadingSetting.adjustScreen(PanelWindows, menuIsExpanded);
            MdlLoadingSetting.adjustScreen(selectedOption, menuIsExpanded);
            if (FormsTab1.FormExists(selectedOption.Name))
            {
                // HideLoadForm();
                return;
            }
            else
            {
                AddFormToPanel(selectedOption);
                FormsTab1.AddFormTab(tabName, selectedOption.Name);
                // HideLoadForm();
            }
        }