Example #1
0
 public static void SetResult(BlinkLabel labelResult, string msg)
 {
     if (labelResult.InvokeRequired)
     {
         Action <BlinkLabel, string> d = SetResult;
         labelResult.Invoke(d, new object[] { labelResult, msg });
     }
     else
     {
         labelResult.Text = msg;
         if (msg == "TEST")
         {
             labelResult.ForeColor  = Color.Blue;
             labelResult.TextMove   = true;
             labelResult.Blink      = true;
             labelResult.BlinkColor = Color.DarkSeaGreen;
             labelResult.Interval   = 400;
         }
         if (msg == "PASS")
         {
             labelResult.ForeColor = Color.Green;
             labelResult.Blink     = false;
         }
         if (msg == "FAIL")
         {
             labelResult.ForeColor = Color.Red;
             labelResult.Blink     = false;
         }
     }
 }
Example #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);
        }