private void windowsUIButtonPanel1_ButtonClick(object sender, DevExpress.XtraBars.Docking2010.ButtonEventArgs e)
 {
     DevExpress.XtraBars.Docking2010.WindowsUIButton button=e.Button as DevExpress.XtraBars.Docking2010.WindowsUIButton;
     switch (button.Tag.ToString()) {
         case "exit":
             TagInitEntry_FormClosed(null, null);
             break;
         case "change":
             this.Close();
             Process.Start(Application.ExecutablePath);
             break;
     }
 }
        private void Bar_Tool_ButtonClick(object sender, DevExpress.XtraBars.Docking2010.ButtonEventArgs e)
        {
            DevExpress.XtraBars.Docking2010.WindowsUIButton b = e.Button as DevExpress.XtraBars.Docking2010.WindowsUIButton;
            if (b != null)
            {
                if (b.Caption == "平铺")
                {
                    GridCtl.MainView = TView;
                }
                else if (b.Caption == "列表")

                {
                    GridCtl.MainView = GridView;
                }
            }
        }
Exemple #3
0
 private void ArafFrmDurusInsert_Load(object sender, EventArgs e)
 {
     WorkStationPanel.Buttons.Clear();
     using (ARAFEntities context = new ARAFEntities())
     {
         var query = from contact in context.ARF_SUSPEND_WORKSTATION
                     where
                     contact.WS_ID == MakineID orderby contact.BUTTON_QUEUE
                     select contact;
         foreach (var result1 in query)
         {
             customBackButton         = new DevExpress.XtraBars.Docking2010.WindowsUIButton();
             customBackButton.Caption = result1.SUSPEND_NAME;
             customBackButton.Tag     = result1.SUSPEND_ID;
             WorkStationPanel.Buttons.Add(customBackButton);
         }
     }
 }
Exemple #4
0
        private void RibbonForm1_Load(object sender, EventArgs e)
        {
            WorkStationPanel.Buttons.Clear();
            using (ARAFEntities context = new ARAFEntities())
            {
                string LastName = Environment.MachineName;
                var    query1   = from contact in context.WORKSTATION
                                  where
                                  contact.COMPUTER_NAME == LastName
                                  select contact;

                // Iterate through the collection of Contact items.
                foreach (var result1 in query1)
                {
                    customBackButton         = new DevExpress.XtraBars.Docking2010.WindowsUIButton();
                    customBackButton.Caption = result1.WS_NAME;
                    customBackButton.Tag     = result1.WS_ID;
                    WorkStationPanel.Buttons.Add(customBackButton);
                }
            }

            df.RestoreLayout(gridViewPlandakiIsler, "gridViewPlandakiIsler_" + this.Name);
            widthRatio  = Screen.PrimaryScreen.Bounds.Width / 1024;
            heightRatio = Screen.PrimaryScreen.Bounds.Height / 768;
            SizeF scale = new SizeF(widthRatio, heightRatio);

            this.Scale(scale);
            foreach (Control control in this.Controls)
            {
                control.Font = new Font("Verdana", control.Font.SizeInPoints * heightRatio * widthRatio);
            }
            PanelTipiAyarla(1, cardViewSiparis_Urun);
            PanelTipiAyarla(2, cardViewMiktar);
            Makinebilgisi();
            PlandakiIsler(MakineID);

            ChardDoldur();
        }