Example #1
0
        private void Load_UcLoadSale()
        {
            try
            {
                // 31	8 : สิทธิ์ใช้งานหน้าค้นหาการขาย     เข้าใช้งานหน้าค้นหาการขาย
                int AuthorizeId = 31;

                if (SQLAuthorized.CheckAuthorized(ClassProperty.permisRoleId, AuthorizeId) == false)
                {
                    SQLAuthorized.AlertAuthorized("สิทธิ์ใช้งานหน้าค้นหาการขาย", "ไม่มีสิทธิ์เข้าใช้งานหน้าค้นหาการขาย");
                    return;
                }

                ClassProperty.IsOpenBuy = true;

                FlyoutDialog flyout_Dialog = new FlyoutDialog(FindForm(), new UcLoadSale());
                flyout_Dialog.Properties.Style = FlyoutStyle.Popup;
                {
                    var frm = flyout_Dialog;
                    if (frm.ShowDialog(this) == DialogResult.OK)
                    {
                    }

                    frm.Dispose();
                }
                this.Show();
            }
            catch (Exception ex)
            {
                XtraMessageBox.Show(ex.Message);
            }
        }
Example #2
0
 /// <summary>
 /// 系統設定按鈕
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void SettingbarButtonItem_ItemClick(object sender, ItemClickEventArgs e)
 {
     AfterLockFlag = LockFlag;
     LockFlag      = false;
     if (!FlyoutFlag)
     {
         FlyoutFlag = true;
         PanelControl panelControl = new PanelControl()
         {
             Size = new Size(418, 492)
         };
         flyout = new FlyoutDialog(this, panelControl);
         flyout.Properties.Style = FlyoutStyle.Popup;
         SystemSettingUserControl systemSettingUserControl = new SystemSettingUserControl(BankAccountSetting)
         {
             Form1 = this
         };
         systemSettingUserControl.Parent = panelControl;
         flyout.Show();
     }
     else
     {
         FlyoutFlag = false;
         flyout.Close();
     }
 }
Example #3
0
        private void Load_UcCustomerType()
        {
            try
            {
                // 15	5 : สิทธิ์ใช้งานหน้าสมาชิก	เข้าใช้งานหน้าสมาชิก
                int AuthorizeId = 15;

                if (SQLAuthorized.CheckAuthorized(ClassProperty.permisRoleId, AuthorizeId) == false)
                {
                    SQLAuthorized.AlertAuthorized("สิทธิ์ใช้งานหน้าผู้ใช้งาน", "ไม่มีสิทธิ์เข้าใช้งานหน้าสมาชิก");
                    return;
                }

                ClassProperty.IsCusType       = 0;
                ClassProperty.CustomerGroupId = 0;
                ClassProperty.IsOpenBuy       = true;

                FlyoutDialog flyout_Dialog = new FlyoutDialog(FindForm(), new UcCustomerType());
                flyout_Dialog.Properties.Style = FlyoutStyle.Popup;
                {
                    var frm = flyout_Dialog;
                    if (frm.ShowDialog(this) == DialogResult.OK)
                    {
                    }

                    frm.Dispose();
                }
                this.Show();
            }
            catch (Exception ex)
            {
                XtraMessageBox.Show(ex.Message);
            }
        }
Example #4
0
 private void LoginsimpleButton_Click(object sender, EventArgs e)
 {
     userSetting = InitialMethod.UserSettings();
     if (AccounttextEdit.Text == userSetting[0].UserName)
     {
         if (PasswordtextEdit.Text == userSetting[0].UserPassWord)
         {
             mainForm.navigationFrame.SelectedPageIndex = 1;
         }
         else
         {
             FlyoutAction action = new FlyoutAction();
             action.Description = "密碼錯誤!";
             action.Commands.Add(FlyoutCommand.OK);
             { FlyoutDialog.Show(FindForm(), action); };
         }
     }
     else
     {
         FlyoutAction action = new FlyoutAction();
         action.Description = "帳號密碼錯誤!";
         action.Commands.Add(FlyoutCommand.OK);
         { FlyoutDialog.Show(FindForm(), action); };
     }
 }
Example #5
0
        public MyFlyoutPanel01()
        {
            InitializeComponent();
            //flyoutPanel1.ShowPopup();
            // https://www.devexpress.com/Support/Center/Question/Details/T333871/flyoutpanel-sample
            // https://documentation.devexpress.com/WindowsForms/114578/Controls-and-Libraries/Messages-Notifications-and-Dialogs/Flyout-Panel#beak
            //flyoutPanel1.OwnerControl = this.simpleButton1;

            this.flyoutPanel2.OwnerControl = this.simpleButton1;
            this.flyoutPanel2.Showing     += FlyoutPanel2_Showing;
            this.flyoutPanel2.Hidden      += FlyoutPanel2_Hidden;
            // https://www.devexpress.com/Support/Center/Question/Details/T258043/how-to-use-flyoutdialog-with-usercontrol-from-a-usercontrol-not-from-windowsform
            FlyoutAction action = new FlyoutAction();

            action.Commands.Add(FlyoutCommand.OK);
            action.Commands.Add(FlyoutCommand.Cancel);
            FlyoutDialog.Show(this.FindForm(), action, new MyButtonEdit01());


            FlyoutProperties properties = new FlyoutProperties();

            properties.ButtonSize = new Size(100, 10);
            properties.Style      = FlyoutStyle.Popup;
            FlyoutDialog.Show(this.FindForm(), "", new MyButtonEdit01(), properties, 0, 0);
            //FlyoutDialog.Show(this.FindForm(), new MyButtonEdit01());

            //FlyoutDialog.Show(this.FindForm(), MyDevExpressFunctions.CreateCloseAction(), properties);
        }
Example #6
0
        void DisplayChuyenPhongWithSelectedTile(ThuePhongDTO thuePhong = null)
        {
            //DTO.PhongDTO phongDTO = new DTO.PhongDTO((int)tileView1.GetRowCellValue(tileView1.GetSelectedRows()[0], "MaPhong"), (string)tileView1.GetRowCellValue(tileView1.GetSelectedRows()[0], "TenPhong"), (int)tileView1.GetRowCellValue(tileView1.GetSelectedRows()[0], "MaLoaiPhong"), tileView1.GetRowCellValue(tileView1.GetSelectedRows()[0], "Tang").ToString(), tileView1.GetRowCellValue(tileView1.GetSelectedRows()[0], "GhiChu").ToString(), (int)tileView1.GetRowCellValue(tileView1.GetSelectedRows()[0], "MaTinhTrangPhong"));
            ThuePhongDTO thuePhongDto;

            if (thuePhong == null)
            {
                thuePhongDto = listPhongDangThue[(int)danhSachPhong.Rows[tileView1.GetFocusedDataSourceRowIndex()]["MaPhong"]];
            }
            else
            {
                thuePhongDto = thuePhong;
            }

            ChuyenPhong formChuyenPhong = new ChuyenPhong(thuePhongDto);

            if (FlyoutDialog.Show(this.FindForm(), formChuyenPhong) == DialogResult.OK)
            {
                DisplayTinhTrangPhongWithSelectedTile(formChuyenPhong.GetThuePhongMoi());
            }
            else
            {
            }

            //this.TinhtrangPagecontrol.SelectedPage = PageThanhtoan;
        }
Example #7
0
        private void ShearsimpleButton_Click(object sender, EventArgs e)
        {
            XtraReportSetting = InitialMethod.InitialXtraReportLoad();
            ReportTitleSetting reportTitle = InitialMethod.InitialReportTitleSetting();

            if (StartdateEdit.Text != "")
            {
                string ttime = string.Empty;
                if (XtraReportSetting.Day.ToString().Length == 2)
                {
                    ttime = Convert.ToDateTime(StartdateEdit.EditValue).ToString("yyyy/MM/") + $"{XtraReportSetting.Day} 00:00:00";
                }
                else
                {
                    ttime = Convert.ToDateTime(StartdateEdit.EditValue).ToString("yyyy/MM/") + $"0{XtraReportSetting.Day} 00:00:00";
                }
                XtraReport         xtraReport         = new XtraReport();
                AnalysisXtraReport analysisXtraReport = new AnalysisXtraReport();
                analysisXtraReport.create_XtraReport(MysqlMethod, ttime, reportTitle);
                analysisXtraReport.CreateDocument();
                xtraReport.Pages.AddRange(analysisXtraReport.Pages);
                documentViewer1.DocumentSource = xtraReport;
            }
            else
            {
                FlyoutAction action = new FlyoutAction();
                action.Caption     = "電表資訊-查詢報表錯誤";
                action.Description = "請選擇條件再進行瀏覽";
                action.Commands.Add(FlyoutCommand.OK);
                FlyoutDialog.Show(FindForm(), action);
            }
        }
Example #8
0
        private void GridControl1_DoubleClick(object sender, EventArgs e)
        {
            try
            {
                GridView testView = gridView1 as GridView;
                //MessageBox.Show(testView.FocusedRowHandle.ToString());
                //this.gridControl1.DataSource = new MyDatabaseConnect01().connection8(test.eqpNumber, "");
                //DataRow drFocusedRow = testView.GetDataRow(testView.FocusedRowHandle);

                if (testView.SelectedRowsCount <= 0)
                {
                    return;
                }
                //MyDialog01 dialog = new MyDialog01(eqpId, testView.GetRowCellValue(testView.FocusedRowHandle, "PROCESS_SEQ").ToString(), testView.GetRowCellValue(testView.FocusedRowHandle, "PROD_ORDER_NUMBER").ToString());
                //dialog.Show();

                FlyoutProperties properties = new FlyoutProperties();
                properties.ButtonSize = new Size(100, 10);
                properties.Style      = FlyoutStyle.Popup;
                FlyoutDialog.Show(this.FindForm(), "", new MyDialog01(eqpId, testView.GetRowCellValue(testView.FocusedRowHandle, "PROCESS_SEQ").ToString(), testView.GetRowCellValue(testView.FocusedRowHandle, "PROD_ORDER_NUMBER").ToString()), properties, 0, 0);
                //FlyoutDialog.Show(this.FindForm(), new MyButtonEdit01());
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Example #9
0
        private void simpleButton1_Click(object sender, EventArgs e)
        {
            HttpResponseMessage response = new HttpResponseMessage();

            login    = textBox1.Text;
            password = textBox2.Text;
            Task.Run(async() =>
            {
                response = await Main.client.GetAsync("api/Client/IsRegister?login="******"&password="******"Пользователь не найден"
                };
                FlyoutCommand command1 = new FlyoutCommand()
                {
                    Text = "Close", Result = DialogResult.OK
                };
                action.Commands.Add(command1);
                FlyoutProperties properties = new FlyoutProperties();
                properties.ButtonSize = new Size(100, 40);
                properties.Style      = FlyoutStyle.MessageBox;
                FlyoutDialog.Show(M, action, properties);
            }
            else
            if (response.IsSuccessStatusCode)
            {
                client.CLogin    = login;
                client.CPassword = password;
                this.Close();
            }
        }
        public static bool PreviewSale(string alisveriId)
        {
            try
            {
                EnsureFormLoaded();

                using (var db = new Db())
                {
                    _saleForm.DataSource = db.GetSaleInvoiceFormDatasource(alisveriId);
                    _saleForm.CreateDocument();
                }

                var control = new UcPrint
                {
                    Document = _saleForm
                };
                control.Initialize();

                WaitFormScope.CloseIfOpened();
                return(FlyoutDialog.Show(AppContext.MainForm, control) == DialogResult.OK);
            }
            catch (Exception ex)
            {
                AppContext.Logger.Error(ex);
                throw new B2CPackageCollectException(StringResource.OperationFailedRetry);
            }
        }
Example #11
0
        private void Load_UcAddCustomerPrice()
        {
            try
            {
                FlyoutDialog flyout_Dialog = new FlyoutDialog(FindForm(), new UcAddCustomerPrice());
                flyout_Dialog.Properties.Style = FlyoutStyle.Popup;
                {
                    var frm = flyout_Dialog;
                    if (frm.ShowDialog(this) == DialogResult.OK)
                    {
                        LoadCustomerPrices(sCustomerId);
                    }
                    else
                    {
                    }

                    frm.Dispose();
                }
                this.Show();
            }
            catch (Exception ex)
            {
                XtraMessageBox.Show(ex.Message);
            }
        }
Example #12
0
        private void simpleButton1_Click(object sender, EventArgs e)
        {
            Film Fi18 = OneFilm.Buy.Where(s => s.FAge == 18).FirstOrDefault();
            Film Fi0  = OneFilm.Buy.Where(s => s.FAge < 18).FirstOrDefault();

            if (Fi0 != null && Fi18 != null)
            {
                FlyoutAction action = new FlyoutAction()
                {
                    Caption = "Внимание!", Description = "Невозможно завершить покупку. Невозможна одновременая покупка фильмов с рейтингом <18+ и >18+ "
                };
                FlyoutCommand command1 = new FlyoutCommand()
                {
                    Text = "Close", Result = DialogResult.OK
                };
                action.Commands.Add(command1);
                FlyoutProperties properties = new FlyoutProperties();
                properties.ButtonSize = new Size(100, 40);
                properties.Style      = FlyoutStyle.MessageBox;
                FlyoutDialog.Show(this, action, properties);
            }
            else
            {
                Card C = new Card(price - price * sale, this);
                C.Show();
                simpleButton1.Enabled = false;
                dataGridView2.Rows.Clear();
                dataGridView2.Refresh();
                //this.Hide();
            }
        }
Example #13
0
        private void simpleButton1_Click(object sender, EventArgs e)
        {
            List <int> f = new List <int>();

            foreach (Film p in OneFilm.Buy)
            {
                f.Add(p.FId);
            }
            JObject r = new JObject(
                new JProperty("login", Register.client.CLogin),
                new JProperty("password", Register.client.CPassword),
                new JProperty("F", new JArray(f)),
                new JProperty("Cost", JPrice)
                );

            string json = r.ToString();

            Task.Run(async() =>
            {
                response = await Main.client.PostAsJsonAsync("api/Client/Buy", json);
            }).Wait();
            if (response.IsSuccessStatusCode)
            {
                string s = "Оплата: " + Price;
                OneFilm.Buy.Clear();

                FlyoutAction action = new FlyoutAction()
                {
                    Caption = "Спасибо за покупку!", Description = s
                };
                FlyoutCommand command1 = new FlyoutCommand()
                {
                    Text = "Close", Result = DialogResult.OK
                };
                action.Commands.Add(command1);
                FlyoutProperties properties = new FlyoutProperties();
                properties.ButtonSize = new Size(100, 40);
                properties.Style      = FlyoutStyle.MessageBox;
                FlyoutDialog.Show(M, action, properties);
                this.Close();
            }
            else
            {
                FlyoutAction action = new FlyoutAction()
                {
                    Caption = response.StatusCode.ToString()
                };
                FlyoutCommand command1 = new FlyoutCommand()
                {
                    Text = "Close", Result = DialogResult.OK
                };
                action.Commands.Add(command1);
                FlyoutProperties properties = new FlyoutProperties();
                properties.ButtonSize = new Size(100, 40);
                properties.Style      = FlyoutStyle.MessageBox;
                FlyoutDialog.Show(M, action, properties);
            }
        }
Example #14
0
        public void ShowMessage(string caption, string messageText)
        {
            FlyoutAction action = new FlyoutAction();

            action.Caption     = caption;
            action.Description = messageText;
            action.Commands.Add(FlyoutCommand.OK);
            FlyoutDialog.Show(this, action);
        }
Example #15
0
        private void MainForm_FormClosing(object sender, FormClosingEventArgs e)
        {
            DevExpress.XtraBars.Docking2010.Views.WindowsUI.FlyoutAction action = new DevExpress.XtraBars.Docking2010.Views.WindowsUI.FlyoutAction()
            {
                Caption = "友情提示", Description = "是否关闭此应用程序?"
            };
            Predicate <DialogResult> predicate = canCloseFunc;

            DevExpress.XtraBars.Docking2010.Views.WindowsUI.FlyoutCommand command1 = new DevExpress.XtraBars.Docking2010.Views.WindowsUI.FlyoutCommand()
            {
                Text = "关闭", Result = System.Windows.Forms.DialogResult.Yes
            };
            DevExpress.XtraBars.Docking2010.Views.WindowsUI.FlyoutCommand command2 = new DevExpress.XtraBars.Docking2010.Views.WindowsUI.FlyoutCommand()
            {
                Text = "取消", Result = System.Windows.Forms.DialogResult.No
            };
            DevExpress.XtraBars.Docking2010.Views.WindowsUI.FlyoutCommand command3 = new DevExpress.XtraBars.Docking2010.Views.WindowsUI.FlyoutCommand()
            {
                Text = "重启", Result = System.Windows.Forms.DialogResult.Retry
            };
            DevExpress.XtraBars.Docking2010.Views.WindowsUI.FlyoutCommand command4 = new DevExpress.XtraBars.Docking2010.Views.WindowsUI.FlyoutCommand()
            {
                Text = "切换用户", Result = System.Windows.Forms.DialogResult.Ignore
            };
            action.Commands.Add(command1);
            action.Commands.Add(command2);
            action.Commands.Add(command3);
            action.Commands.Add(command4);
            FlyoutProperties properties = new FlyoutProperties();

            properties.ButtonSize = new Size(100, 40);
            properties.Style      = FlyoutStyle.MessageBox;
            properties.Appearance.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center;
            DialogResult result = FlyoutDialog.Show(this, action, properties, predicate);

            if (result == System.Windows.Forms.DialogResult.Yes)
            {
                this.close = true;
                e.Cancel   = false;
            }
            else if (result == System.Windows.Forms.DialogResult.Retry)
            {
                System.Diagnostics.Process.Start(System.Reflection.Assembly.GetExecutingAssembly().Location, "restart");
                System.Environment.Exit(0);
                //this.restart = true;
                //e.Cancel = false;
            }
            else if (result == System.Windows.Forms.DialogResult.Ignore)
            {
                this.changeuser = true;
                e.Cancel        = false;
            }
            else
            {
                e.Cancel = true;
            }
        }
Example #16
0
        private void Adddevice_Click(object sender, EventArgs e)
        {
            FlyoutDialog dia = new FlyoutDialog(this.FindForm(), new AddDevice(this.SelectedItem));

            if (dia.ShowDialog() == DialogResult.OK)
            {
                this.RefreshSelected();
            }
        }
Example #17
0
        public DialogResult ShowFlyoutDialog(FlyoutStyle style = FlyoutStyle.MessageBox)
        {
            FlyoutProperties properties = new FlyoutProperties()
            {
                Style = style
            };

            return(FlyoutDialog.Show(null, this, properties));
        }
Example #18
0
 private void barListItem1_ListItemClick(object sender, DevExpress.XtraBars.ListItemClickEventArgs e)
 {
     #region Help畫面
     FlyoutAction action = new FlyoutAction();
     action.Description = "版權聲明 Copyright©\r\n著作權© 2020 新茂能源實業有限公司 版權所有。\r\nCopyright© 2020 SIN MAO Energy CO.,LTD All right reserved.\r\n \r\n工程版本:1.0.0";
     action.Commands.Add(FlyoutCommand.OK);
     { FlyoutDialog.Show(FindForm(), action); };
     #endregion
 }
Example #19
0
        private void Newtask_Click(object sender, EventArgs e)
        {
            FlyoutDialog dia = new FlyoutDialog(this.FindForm(), new NewTask());

            if (dia.ShowDialog() == DialogResult.OK)
            {
                LoadTask();//刷新加载
            }
        }
Example #20
0
        private void navButtonSettings_ElementClick(object sender, NavElementEventArgs e)
        {
            Modules.SettingsUC settingsUC = new Modules.SettingsUC(allowTransition);
            DialogResult       result     = FlyoutDialog.Show(this, settingsUC);

            if (result == System.Windows.Forms.DialogResult.OK)
            {
                allowTransition = settingsUC.checkEdit1.Checked;
            }
        }
Example #21
0
        /// <inheritdoc />
        public void NotifyError(string errorTitle, string errorMessage)
        {
            var dialog = new FlyoutDialog(this, new FlyoutAction(MessageBoxButtons.OK, MessageBoxDefaultButton.Button1)
            {
                Caption     = errorTitle,
                Description = errorMessage
            });

            dialog.ShowDialog();
        }
Example #22
0
        private void navButtonSettings_ElementClick(object sender, NavElementEventArgs e)
        {
            var settingsUC = new SettingsUC(allowTransition);
            var result     = FlyoutDialog.Show(this, settingsUC);

            if (result == DialogResult.OK)
            {
                allowTransition = settingsUC.checkEdit1.Checked;
            }
        }
Example #23
0
        private void Setting_Click(object sender, EventArgs e)
        {
            FlyoutDialog dia = new FlyoutDialog(this.FindForm(), new DbServiceSetting());

            if (dia.ShowDialog() == DialogResult.OK)
            {
                FlyoutDialog dia2 = new FlyoutDialog(this.FindForm(), new DownloadSelectName());
                if (dia2.ShowDialog() == DialogResult.OK)
                {
                    LoadDevice();
                }
            }
        }
Example #24
0
        private void button1_Click(object sender, EventArgs e)
        {
            FlyoutAction action = new FlyoutAction();
            action.Caption = "Confirm";
            //action.Commands.Add(FlyoutCommand.OK);
            //action.Commands.Add(FlyoutCommand.Cancel);
            XtraUserControl1 c = new XtraUserControl1();
            d = new FlyoutDialog(this, action, c);
            c.dialog = d;
            // MyFlyoutDialog dialog = new MyFlyoutDialog(this, action, new UserControl1());
            //dialog.

            d.ShowDialog();
        }
Example #25
0
        public bool DialogMessage(string caption, string messageText)
        {
            bool         result;
            FlyoutAction action = new FlyoutAction();

            action.Caption     = caption;
            action.Description = messageText;
            action.Commands.Add(FlyoutCommand.Yes);
            action.Commands.Add(FlyoutCommand.No);

            result = (FlyoutDialog.Show(this, action) == System.Windows.Forms.DialogResult.Yes);

            return(result);
        }
Example #26
0
        private void simpleButton2_Click(object sender, EventArgs e)
        {
            Client tmp = new Client();
            HttpResponseMessage response = new HttpResponseMessage();

            tmp.CLogin    = textBox1.Text;
            tmp.CPassword = textBox2.Text;
            Task.Run(async() =>
            {
                response = await Main.client.PostAsJsonAsync <Client>("api/Client/Register", tmp);
            }).Wait();

            if (!response.IsSuccessStatusCode)
            {
                FlyoutAction action = new FlyoutAction()
                {
                    Caption = "Пользователь уже существует "
                };
                FlyoutCommand command1 = new FlyoutCommand()
                {
                    Text = "Close", Result = DialogResult.OK
                };
                action.Commands.Add(command1);
                FlyoutProperties properties = new FlyoutProperties();
                properties.ButtonSize = new Size(100, 40);
                properties.Style      = FlyoutStyle.MessageBox;
                FlyoutDialog.Show(M, action, properties);
            }
            else
            if (response.IsSuccessStatusCode)
            {
                FlyoutAction action = new FlyoutAction()
                {
                    Caption = "Пользователь успешно создан! "
                };
                FlyoutCommand command1 = new FlyoutCommand()
                {
                    Text = "Close", Result = DialogResult.OK
                };
                action.Commands.Add(command1);
                FlyoutProperties properties = new FlyoutProperties();
                properties.ButtonSize = new Size(100, 40);
                properties.Style      = FlyoutStyle.MessageBox;
                FlyoutDialog.Show(M, action, properties);
                OneFilm.Buy.Clear();
                client = tmp;
                this.Close();
            }
        }
 void IDocument.Show()
 {
     if (dialog == null)
     {
         dialog         = new FlyoutDialog(Program.MainForm, view, Program.MainForm.MenuManager);
         dialog.Closed += dialog_Closed;
         using (dialog)
             dialog.ShowDialog();
         dialog = null;
     }
     else
     {
         dialog.Activate();
     }
 }
Example #28
0
        private void FlyoutPanel1_ButtonClick(object sender, FlyoutPanelButtonClickEventArgs e)
        {
            try
            {
                string caption = e.Button.Caption.ToString();
                switch (caption)
                {
                case "작업이동":
                    if (FlyoutDialog.Show(this.FindForm(), MyDevExpressFunctions.CreateCloseAction()) == System.Windows.Forms.DialogResult.Yes)
                    {
                        List <DashboardDTO>  gridList   = this.gridControl2.DataSource as List <DashboardDTO>;
                        IList <DashboardDTO> resultList = new List <DashboardDTO>();
                        for (int x = 0; x < gridList.Count; x++)
                        {
                            // https://stackoverflow.com/questions/12762617/how-to-get-the-selected-row-values-of-devexpress-xtragrid
                            if (gridList[x].CHK2.ToString() == "True")
                            {
                                DashboardDTO vo = gridList[x];
                                vo.EQP_ID      = gridList[checkedGridView1].EQP_ID;
                                vo.ORDER_COUNT = gridList[checkedGridView1].ORDER_COUNT;
                                resultList.Add(vo);
                            }
                        }
                        this.gridControl3.DataSource = resultList;
                    }
                    ;

                    break;

                case "적용":
                    //(sender as FlyoutPanel).HidePopup();
                    //this.panelComparence.Visible = false; this.flyoutPanel1.OptionsButtonPanel.ShowButtonPanel = false;
                    (sender as FlyoutPanel).HidePopup();
                    this.panelComparence.Visible = false; this.flyoutPanel1.OptionsButtonPanel.ShowButtonPanel = false; this.gridControl3.Visible = false; this.gridControl3.DataSource = null;
                    break;

                case "취소":
                    // . . .
                    (sender as FlyoutPanel).HidePopup();
                    this.panelComparence.Visible = false; this.flyoutPanel1.OptionsButtonPanel.ShowButtonPanel = false; this.gridControl3.Visible = false; this.gridControl3.DataSource = null;
                    break;
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
 private void AddsimpleButton_Click(object sender, EventArgs e)
 {
     if (!FlyoutFlag)
     {
         FlyoutFlag = true;
         PanelControl panelControl = new PanelControl()
         {
             Size = new Size(465, 467)
         };
         flyout = new FlyoutDialog(Form1, panelControl);
         flyout.Properties.Style = FlyoutStyle.Popup;
         ElectricSettingUserControl1 CaseSettingUserControl = new ElectricSettingUserControl1(this, Form1, Ewatch_MySqlMethod);
         panelControl.Controls.Add(CaseSettingUserControl);
         flyout.Show();
     }
 }
Example #30
0
 private void AddsimpleButton_Click(object sender, EventArgs e)
 {
     if (!FlyoutFlag)
     {
         FlyoutFlag = true;
         PanelControl panelControl = new PanelControl()
         {
             Size = new Size(459, 178)
         };
         flyout = new FlyoutDialog(Form1, panelControl);
         flyout.Properties.Style = FlyoutStyle.Popup;
         DeviceConfigUserControl1 deviceConfigUserControl1 = new DeviceConfigUserControl1(this, Form1, ChungHsin_MySqlMethod);
         panelControl.Controls.Add(deviceConfigUserControl1);
         flyout.Show();
     }
 }
Example #31
0
 /// <summary>
 /// 設定按鈕觸發
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void SettingbarButtonItem_ItemClick(object sender, ItemClickEventArgs e)
 {
     if (!FlyoutFlag)
     {
         accordionControl1.Enabled = false;
         FlyoutFlag = true;
         PanelControl panelControl = new PanelControl()
         {
             Size = new Size(850, 572)
         };
         flyout = new FlyoutDialog(this, panelControl);
         flyout.Properties.Style = FlyoutStyle.Popup;
         SettingUserControl settingUserControl = new SettingUserControl(MysqlMethod, this);
         settingUserControl.Parent = panelControl;
         flyout.Show();
     }
 }
 private void ShowDropDown(Control hostedControl, Color borderColor)
 {
     hostedControl.Width = Math.Max(hostedControl.Width, base.EditRegionSize.Width - 2);
     this._dropDownHolder = new DropDownHolder(hostedControl, base.ActionPanel, borderColor, base.ActionPanel.Font, this);
     if (base.ActionPanel.RightToLeft != RightToLeft.Yes)
     {
         Rectangle r = new Rectangle(Point.Empty, base.EditRegionSize);
         Size size = this._dropDownHolder.Size;
         Point point = base.ActionPanel.PointToScreen(base.EditRegionLocation);
         Rectangle workingArea = Screen.FromRectangle(base.ActionPanel.RectangleToScreen(r)).WorkingArea;
         size.Width = Math.Max(r.Width + 1, size.Width);
         point.X = Math.Min(workingArea.Right - size.Width, Math.Max(workingArea.X, (point.X + r.Right) - size.Width));
         point.Y += r.Y;
         if (workingArea.Bottom < ((size.Height + point.Y) + r.Height))
         {
             point.Y -= size.Height + 1;
         }
         else
         {
             point.Y += r.Height;
         }
         this._dropDownHolder.Location = point;
     }
     else
     {
         this._dropDownHolder.RightToLeft = base.ActionPanel.RightToLeft;
         Rectangle rectangle3 = new Rectangle(Point.Empty, base.EditRegionSize);
         Size size2 = this._dropDownHolder.Size;
         Point point2 = base.ActionPanel.PointToScreen(base.EditRegionLocation);
         Rectangle rectangle4 = Screen.FromRectangle(base.ActionPanel.RectangleToScreen(rectangle3)).WorkingArea;
         size2.Width = Math.Max(rectangle3.Width + 1, size2.Width);
         point2.X = Math.Min(rectangle4.Right - size2.Width, Math.Max(rectangle4.X, point2.X - rectangle3.Width));
         point2.Y += rectangle3.Y;
         if (rectangle4.Bottom < ((size2.Height + point2.Y) + rectangle3.Height))
         {
             point2.Y -= size2.Height + 1;
         }
         else
         {
             point2.Y += rectangle3.Height;
         }
         this._dropDownHolder.Location = point2;
     }
     base.ActionPanel.InMethodInvoke = true;
     base.ActionPanel.SetDropDownActive(true);
     try
     {
         this._dropDownHolder.ShowDropDown(this._button);
     }
     finally
     {
         this._button.ResetMouseStates();
         base.ActionPanel.SetDropDownActive(false);
         base.ActionPanel.InMethodInvoke = false;
     }
 }