Ejemplo n.º 1
0
        private void InitializeDesign()
        {
            //Window
            this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
            HubHeader header = new HubHeader(this);

            this.statusBar      = new UI.WindowsForms.UIElements.StatusBar(this);
            this.sizeGrip       = new SizeGrip(this);
            this.SizeChanged   += Hub_SizeChanged;
            pnlContainer        = new TableLayoutPanel();
            hubItem             = new TableLayoutPanel();
            hubItem.ColumnCount = 4;
            hubItem.RowCount    = 5;


            pnlContainer.Top = 50;

            pnlContainer.Font = FontManager.GetFont("IRANSans", 14, FontStyle.Regular);

            HandleResize();
            pnlContainer.ColumnCount = 3;
            pnlContainer.RowCount    = 1;
            pnlContainer.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 330));
            //BasicInformation
            HubButton basicInformation = new HubButton(Definitions.EnvironmentNames.BasicInformation, this);

            hubItem.Controls.Add(basicInformation, 0, 0);
            //Sales Management
            HubButton KalaGostaran = new HubButton(Definitions.EnvironmentNames.KalaGostaran, this);

            hubItem.Controls.Add(KalaGostaran, 1, 0);
            //Sales Management
            HubButton sales = new HubButton(Definitions.EnvironmentNames.Sales, this);

            hubItem.Controls.Add(sales, 1, 1);

            HubButton salesManagement = new HubButton(Definitions.EnvironmentNames.SalesManagement, this);

            hubItem.Controls.Add(salesManagement, 0, 1);
            //  pnlHubItemContainer.Controls.Add(salesManagement);
            //Sales

            // Treasury
            HubButton treasury = new HubButton(Definitions.EnvironmentNames.Treasury, this);

            hubItem.Controls.Add(treasury, 0, 2);
            //Accounting
            HubButton accounting = new HubButton(Definitions.EnvironmentNames.Accounting, this);

            hubItem.Controls.Add(accounting, 1, 2);

            //Reporting
            HubButton reporting = new HubButton(Definitions.EnvironmentNames.Reporting, this);

            hubItem.Controls.Add(reporting, 0, 3);

            ////Warehouse
            //HubButton warehouse = new HubButton(Definitions.EnvironmentNames.Warehouse, this);
            //pnlHubItemContainer.Controls.Add(warehouse);
            //Rahyab
            HubButton rahyab = new HubButton(Definitions.EnvironmentNames.Rahyab, this);

            hubItem.Controls.Add(rahyab, 1, 3);

            //EMS
            HubButton ems = new HubButton(Definitions.EnvironmentNames.EMS, this);

            hubItem.Controls.Add(ems, 0, 4);
            //SMS
            HubButton sms = new HubButton(Definitions.EnvironmentNames.SMS, this);

            hubItem.Controls.Add(sms, 1, 4);
            //BackupAndRestore
            HubButton bak = new HubButton(Definitions.EnvironmentNames.BackupAndRestore, this);

            hubItem.Controls.Add(bak, 2, 4);
            //Settings
            HubButton setting = new HubButton(Definitions.EnvironmentNames.Settings, this);

            hubItem.Controls.Add(setting, 3, 4);

            hubItem.Dock        = DockStyle.Fill;
            hubItem.RightToLeft = RightToLeft.Yes;
            pnlContainer.Controls.Add(hubItem, 2, 0);

            pnlSeperator = new FlowLayoutPanel();

            pnlSeperator.BackColor = Color.Transparent;

            pnlSeperator.Dock = DockStyle.Left;
            HubSeperator seperator = new HubSeperator(this.pnlSeperator);

            seperator.Height = Screen.PrimaryScreen.Bounds.Height - 100;
            pnlSeperator.Controls.Add(seperator);
            pnlSeperator.ControlAdded += PnlSeperator_ControlAdded;
            pnlSeperator.Width         = seperator.Width;
            pnlContainer.Controls.Add(pnlSeperator, 1, 0);

            pnlFeed             = new TableLayoutPanel();
            pnlFeed.ColumnCount = 1;
            pnlFeed.RowCount    = 3;
            System.Windows.Forms.Panel pnlTopFeed = new System.Windows.Forms.Panel();
            pnlTopFeed.Dock = DockStyle.Top;
            System.Windows.Forms.Panel pnlFooterFeed = new System.Windows.Forms.Panel();
            pnlFooterFeed.Dock  = DockStyle.Bottom;
            pnlMainFeed         = new System.Windows.Forms.Panel();
            pnlMainFeed.Dock    = DockStyle.Fill;
            pnlFeed.RightToLeft = RightToLeft.Yes;
            pnlFeed.BackColor   = Color.FromArgb(238, 238, 238);
            pnlFeed.Width       = pnlContainer.Width - hubItem.Width - pnlSeperator.Width;
            pnlFeed.Height      = Screen.PrimaryScreen.Bounds.Height;

            LinkLabel lbltxtAtiran = new LinkLabel();

            lbltxtAtiran.AutoSize = true;
            lbltxtAtiran.Parent   = pnlFeed;
            lbltxtAtiran.Font     = FontManager.GetFont("IRANSans", 11, FontStyle.Regular);
            lbltxtAtiran.Text     = $"گروه نرم افزاري آتيران www.Atiran.ir";
            lbltxtAtiran.Dock     = DockStyle.Top;
            pnlFooterFeed.Controls.Add(lbltxtAtiran);
            pnlMainFeed.Height = pnlFeed.Height - pnlTopFeed.Height - pnlFooterFeed.Height - 100;
            pnlFeed.Controls.Add(pnlTopFeed, 0, 0);
            pnlFeed.Controls.Add(pnlMainFeed, 0, 1);
            pnlFeed.Controls.Add(pnlFooterFeed, 0, 2);
            pnlFeed.ControlAdded += PnlFeed_ControlAdded;
            newsBox      = new System.Windows.Forms.Panel();
            newsBox.Dock = DockStyle.Fill;
            pnlMainFeed.BringToFront();

            pnlContainer.Controls.Add(pnlFeed, 0, 0);

            this.Controls.Add(pnlContainer);
        }
Ejemplo n.º 2
0
        private void InitializeDesign_()
        {
            //Window
            this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
            HubHeader header = new HubHeader(this);

            this.statusBar    = new UI.WindowsForms.UIElements.StatusBar(this);
            this.sizeGrip     = new SizeGrip(this);
            this.SizeChanged += Hub_SizeChanged;
            pnlContainer      = new TableLayoutPanel();


            pnlContainer.Top = 60;

            pnlContainer.Font = FontManager.GetFont("IRANSans", 14, FontStyle.Regular);

            HandleResize();

            pnlContainer.ColumnCount = 3;
            pnlContainer.RowCount    = 1;
            pnlContainer.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 330));
            pnlHubItemContainer = new FlowLayoutPanel();
            pnlHubItemContainer.FlowDirection = FlowDirection.RightToLeft;
            pnlHubItemContainer.WrapContents  = true;
            pnlHubItemContainer.Dock          = DockStyle.Fill;
            pnlHubItemContainer.Padding       = new Padding(0, 0, 50, 0);

            //BasicInformation

            HubButton  basicInformation = new HubButton(Definitions.EnvironmentNames.BasicInformation, this);
            BlinkLabel l = new BlinkLabel();

            l.Text      = "ماژول جديد";
            l.ForeColor = Color.Red;
            basicInformation.Controls.Add(l);
            pnlHubItemContainer.Controls.Add(basicInformation);

            //Sales Management
            HubButton salesManagement = new HubButton(Definitions.EnvironmentNames.SalesManagement, this);

            pnlHubItemContainer.Controls.Add(salesManagement);
            //Kala Gostaran
            HubButton kalaGostaran = new HubButton(Definitions.EnvironmentNames.KalaGostaran, this);

            pnlHubItemContainer.Controls.Add(kalaGostaran);
            //Sales
            HubButton sales = new HubButton(Definitions.EnvironmentNames.Sales, this);

            pnlHubItemContainer.Controls.Add(sales);

            // Treasury
            HubButton treasury = new HubButton(Definitions.EnvironmentNames.Treasury, this);

            pnlHubItemContainer.Controls.Add(treasury);

            //Reporting
            HubButton reporting = new HubButton(Definitions.EnvironmentNames.Reporting, this);

            pnlHubItemContainer.Controls.Add(reporting);

            //Warehouse
            HubButton warehouse = new HubButton(Definitions.EnvironmentNames.Warehouse, this);

            pnlHubItemContainer.Controls.Add(warehouse);

            //Accounting
            HubButton accounting = new HubButton(Definitions.EnvironmentNames.Accounting, this);

            pnlHubItemContainer.Controls.Add(accounting);

            //Rahyab
            HubButton rahyab = new HubButton(Definitions.EnvironmentNames.Rahyab, this);

            pnlHubItemContainer.Controls.Add(rahyab);

            //EMS
            HubButton ems = new HubButton(Definitions.EnvironmentNames.EMS, this);

            pnlHubItemContainer.Controls.Add(ems);
            //BackupAndRestore
            HubButton bak = new HubButton(Definitions.EnvironmentNames.BackupAndRestore, this);

            pnlHubItemContainer.Controls.Add(bak);
            //Settings
            HubButton setting = new HubButton(Definitions.EnvironmentNames.Settings, this);

            pnlHubItemContainer.Controls.Add(setting);
            //SMS
            HubButton sms = new HubButton(Definitions.EnvironmentNames.SMS, this);

            pnlHubItemContainer.Controls.Add(sms);



            pnlContainer.Controls.Add(pnlHubItemContainer, 2, 0);

            pnlSeperator = new FlowLayoutPanel();

            pnlSeperator.BackColor = Color.Transparent;

            pnlSeperator.Dock = DockStyle.Left;
            HubSeperator seperator = new HubSeperator(this.pnlSeperator);

            seperator.Height = Screen.PrimaryScreen.Bounds.Height - 100;
            pnlSeperator.Controls.Add(seperator);
            pnlSeperator.ControlAdded += PnlSeperator_ControlAdded;
            pnlContainer.Controls.Add(pnlSeperator, 1, 0);

            pnlFeed           = new TableLayoutPanel();
            pnlFeed.BackColor = Color.FromArgb(238, 238, 238);
            pnlFeed.Width     = pnlContainer.Width - pnlHubItemContainer.Width - pnlSeperator.Width;
            pnlFeed.Height    = Screen.PrimaryScreen.Bounds.Height;

            pnlFeed.ControlAdded += PnlFeed_ControlAdded;

            pnlContainer.Controls.Add(pnlFeed, 0, 0);

            this.Controls.Add(pnlContainer);
        }