private void InitPersonFilter(string groupName, RibbonPageGroup ribbonGroup)
        {
            if (!_isManager)
            {
                return;
            }
            BarEditItem recordPersonDrop = new BarEditItem();

            recordPersonDrop.Width             = 100;
            recordPersonDrop.Caption           = Properties.Resources.RecordPerson;
            recordPersonDrop.CaptionAlignment  = DevExpress.Utils.HorzAlignment.Near;
            recordPersonDrop.EditValueChanged += (sender, e) =>
            {
                _filterrecordPerson = recordPersonDrop.EditValue.ToString();
                FilterTaskList();
            };
            RepositoryItemImageComboBox recordPersonItems = new RepositoryItemImageComboBox();
            var recordPersonList = _projectTaskList.Select(c => c.RecordPerson).Distinct <string>();

            recordPersonItems.Items.Add(new ImageComboBoxItem(Properties.Resources.None, string.Empty, -1));
            foreach (var recordPerson in recordPersonList)
            {
                recordPersonItems.Items.Add(new ImageComboBoxItem(recordPerson, recordPerson, -1));
            }
            recordPersonDrop.Edit = recordPersonItems;
            ribbonGroup.ItemLinks.Add(recordPersonDrop, true);
            FilterTaskList();
        }
 public frmChuongTrinhAdvanceQL()
 {
     InitializeComponent();
     IDField = CHUONG_TRINH.CT_ID;
     DisplayField = CHUONG_TRINH.MA_CT;
     this._UsingCheckFiler = false;
     _msgConfirmBeforeDelete = AppConst.ConfirmDeleteChuongTrinhQL;
     _msgNotifyDeleteFail = AppConst.DeleteFailChuongTrinhQL;
     Fix = new PhieuQuanLyBandedFix(this);
     AppCtrl.SetAutoHideEmptyBand(gridViewMaster);
     checkListCol = AppCtrl.AddTuyBienCot(this.barManager1, this.MainBar, gridViewMaster,
         new GridColumn[] { Col_CT_ThoiHanBangQuyen },
     Col_CT_NoiDung.Name, Col_CT_TenGoc.Name, Col_CT_TietMuc.Name, Col_CT_Nuoc.Name, Col_CT_NamSX.Name,
     Col_CT_BanQuyenThuoc.Name, Col_CT_BanQuyenDIDEnd.Name, Col_CT_BanQuyenDTNNEnd.Name, Col_CT_BanQuyenHTV.Name);
     AppCtrl.InitPrintGrid(this, false);
     //AppCtrl.SetTenYear(NamSXTu, NamSXDen);
     AppCtrl.FormatButtonTimKiem(this);
     AppCtrl.AddXemTatCa(this);
     AppCtrl.AddRefresh(this);
     filterControl1.FilterChanged += delegate(object sender, FilterChangedEventArgs e)
     {
         if (e.Action == FilterChangedAction.ClearAll ||
             (e.Action == FilterChangedAction.RemoveNode && filterControl1.FilterString == ""))
         {
             gridViewMaster.ClearColumnsFilter();
         }
     };
 }
예제 #3
0
        private void SetBarItem(string name, GalleryDropDown galleryDropDown, bool enable)
        {
            BarEditItem barItem = new BarEditItem();

            barItem.Tag        = name;
            barItem.Name       = name;
            barItem.LargeGlyph = GetBitmapByName("add", new Size(16, 16));
            barItem.Glyph      = GetBitmapByName("add", new Size(16, 16));
            barItem.Enabled    = enable;
            barItem.ItemClick += (s, e) =>
            {
                galleryDropDown.HidePopup();
                string key = _entityName + ":AddFilterConditionList";
                var    filterConditionListView = _workItem.Items.Get <FilterConditionList>(key);
                if (filterConditionListView == null)
                {
                    filterConditionListView = _workItem.Items.AddNew <FilterConditionList>(key);
                }
                filterConditionListView.SetGridView(_view, "", "", "");
                filterConditionListView.EntityTypeName = _entityName;
                filterConditionListView.ShowDialog();
                BindFilterFile();
            };
            barItem.Caption = GetLocalizedCaption(name);
            galleryDropDown.ItemLinks.Add(barItem);
        }
        public frmLibXemLichPhatSongQL()
        {
            InitializeComponent();
            IDField =BIEN_MUC.BM_ID;
            DisplayField = BIEN_MUC.MA_BANG;
            fix = new PhieuQuanLy10Fix(this);
            barButtonItemPrintNew = AppCtrl.InitPrintGrid(this, true);
            repositoryItemCheckedCotHienThi = AppCtrl.AddTuyBienCot(barManager1, MainBar, gridViewMaster,
                new string[] {colKenhPhat.Name, colNgay.Name,colGio.Name,colThoiLuong.Name,colTietMuc.Name
                ,colNoiDung.Name,colTapso.Name,colMaBang.Name,colLoaiLuuTru.Name,colThongSo.Name
                ,colTinhTrang.Name,colPopUp.Name,colTTDinhKem.Name,colKe.Name,colNgan.Name
                ,colTang.Name,colSoLanPhat.Name,colPhatLanDau.Name,colDVSH.Name
                ,colDVCC.Name,colNuocSX.Name,colDTKG.Name,colRating.Name,colNamSX.Name,colTenGoc.Name,colThongTinThem.Name});
            //if (repositoryItemCheckedCotHienThi.GetCheckedItems().ToString() != string.Empty)
            //{
            //   // if (colKenhPhat.Visible) colKenhPhat.Group();
            //  //  if (colNgay.Visible) colNgay.Group();
            //    //if (colTietMuc.Visible) colTietMuc.Group();
            //}
            AppCtrl.FormatButtonTimKiem(this);
            AppCtrl.AddXemTatCa(this);
            AppCtrl.AddRefresh(this);

            _msgConfirmBeforeDelete = "Bạn có muốn 'Xóa' biên mục đang chọn?";
            _msgNotifyDeleteFail = "Thao tác 'Xóa' biên mục \"{0}\" thực hiện không thành công. Vui lòng kiểm tra lại dữ liệu.";
        }
예제 #5
0
 public BarEditItemTextBinding(BarEditItem control, object dataSource, string dataMember)
 {
     _control = control;
     _binding = new Binding("EditValue", dataSource, dataMember);
     DataBindings.Add(_binding);
     _control.EditValueChanged += _control_EditValueChanged;
 }
예제 #6
0
        private bool validateTradeID()
        {
            bool returnValue = true;

            foreach (BarItem item in rbnCntrlAxFolderPnal.Items)
            {
                if (item.Caption.ToLower().StartsWith("trade id"))
                {
                    BarEditItem editItem = (BarEditItem)item;
                    if (editItem.EditValue.ToString() == "")
                    {
                        MessageBox.Show("Please enter the trade ID.");
                        returnValue = false;
                        return(returnValue);
                    }
                    try
                    {
                        int tradeId = Convert.ToInt32(editItem.EditValue.ToString());
                        returnValue = AXPnl.ValidateTradeWithUser(tradeId);
                    }
                    catch (Exception e)
                    {
                        XtraMessageBox.Show("Please enter a valid trade ID." + Environment.NewLine +
                                            "Error CNF-410 in " + FORM_NAME + ".validateTradeID(): " + e.Message,
                                            FORM_ERROR_CAPTION, MessageBoxButtons.OK, MessageBoxIcon.Error);
                        returnValue = false;
                    }
                }
            }
            return(returnValue);
        }
예제 #7
0
        private void CustomDateParametrizedAction_CustomizeControl(object sender, CustomizeControlEventArgs e)
        {
            //Inside BarManager.
            BarEditItem barItem = e.Control as BarEditItem;

            if (barItem != null)
            {
                RepositoryItemDateEdit repositoryItem = (RepositoryItemDateEdit)barItem.Edit;
                repositoryItem.Mask.MaskType = DevExpress.XtraEditors.Mask.MaskType.DateTime;
                repositoryItem.Mask.EditMask = "MM/dd/yyyy hh:mm:ss";
                repositoryItem.Mask.UseMaskAsDisplayFormat = true;
                barItem.Width = 270; //BarManager scales controls itself
            }
            else
            {
                //Inside LayoutManager.
                ButtonEdit buttonEdit = e.Control as ButtonEdit;
                if (buttonEdit != null)
                {
                    buttonEdit.Properties.Mask.MaskType = DevExpress.XtraEditors.Mask.MaskType.DateTime;
                    buttonEdit.Properties.Mask.EditMask = "MM/dd/yyyy hh:mm:ss";
                    buttonEdit.Properties.Mask.UseMaskAsDisplayFormat = true;
                    buttonEdit.MinimumSize = new Size(ScaledWidth(270), 0);
                }
            }
        }
예제 #8
0
 private void ActionControlsSiteController_CustomizeActionControl(object sender, ActionControlEventArgs e)
 {
     if ((Frame.Template is RibbonForm) && needWordWrapActionsId.Contains(e.ActionControl.ActionId) && (e.ActionControl.NativeControl is BarButtonItem))
     {
         BarItemLink barItemLink = GetBarItemLinkForBarItem((IActionControlsSite)Frame.Template, (BarItem)e.ActionControl.NativeControl);
         if ((barItemLink != null) && (!barItemLink.IsLinkInMenu))
         {
             barItemLink.UserCaption = barItemLink.Item.Caption.Replace(' ', '\n');
         }
     }
     if (beginGroupActionsId.Contains(e.ActionControl.ActionId) && (e.ActionControl.NativeControl is BarItem))
     {
         BarItemLink barItemLink = GetBarItemLinkForBarItem((IActionControlsSite)Frame.Template, (BarItem)e.ActionControl.NativeControl);
         if (barItemLink != null)
         {
             barItemLink.BeginGroup = true;
         }
     }
     if (e.ActionControl.ActionId == "FindBySubjectAction")
     {
         BarEditItem barEditItem = e.ActionControl.NativeControl as BarEditItem;
         if (barEditItem != null)
         {
             RepositoryItemButtonEdit edit = barEditItem.Edit as RepositoryItemButtonEdit;
             if (edit != null)
             {
                 EditorButton executeButton = edit.Buttons.FirstOrDefault(x => (string)x.Tag == "ExecuteButton");
                 if (executeButton != null)
                 {
                     executeButton.Kind = ButtonPredefines.Search;
                 }
             }
         }
     }
 }
        void OnTicksChanged(object sender, EventArgs e)
        {
            if (!ViewModel.RealTimeDataViewModel.IsReady)
            {
                return;
            }
            BarEditItem barEditItem = sender as BarEditItem;

            if (barEditItem != null && barEditItem.Name == "comboBoxBarEditItem")
            {
                var vm = StockMarketView.defaultViewModel;
                if (vm != null)
                {
                    int numberOfTicks   = ((PeriodItem)barEditItem.EditValue).Ticks;
                    int newCandlesCount = daysCount / numberOfTicks;
                    if (vm.Ticks != numberOfTicks || vm.CandlesCount != newCandlesCount)
                    {
                        vm.SetTicks(numberOfTicks);
                        vm.CandlesCount = newCandlesCount;
                        vm.OnCandlesCountChanged();
                    }
                }
            }
            UpdateSeriesView();
        }
예제 #10
0
        public override void Init(object sender)
        {
            IMap2DView mapView = UCService.GetContent(typeof(Map2DView)) as Map2DView;

            if (mapView == null)
            {
                return;
            }
            bool bBind = mapView.Bind(this);

            if (!bBind)
            {
                return;
            }

            //base.Init(sender);
            BarEditItem item = sender as BarEditItem;

            if (item.Edit is RepositoryItemComboBox)
            {
                RepositoryItemComboBox ricb = item.Edit as RepositoryItemComboBox;
                string[] scale = new string[] { "米", "千米", "英尺", "英里" };
                ricb.Items.AddRange(scale);
                //item.EditValue = ricb.Items[0];
            }
        }
		private void InitContextMenu()
		{
			_barManager.BeginInit();

			var maxId = _barManager.MaxItemId++;

			var buttonEditor = new RepositoryItemButtonEdit { AutoHeight = false };
			buttonEditor.Buttons.Clear();
			buttonEditor.Buttons.AddRange(new[] {
				new EditorButton(ButtonPredefines.Delete)
			});
			buttonEditor.ButtonClick += (o, e) =>
			{
				((ButtonEdit)o).EditValue = null;
			};
			ItemHoverNote = new BarEditItem
			{
				Id = maxId,
				Caption = "Hover Note",
				Edit = buttonEditor,
				Width = 150
			};
			maxId++;
			ItemHoverNote.EditValueChanged += (o, e) => LineBreakLoader.OnHoverChanged();

			_barManager.Items.Add(ItemHoverNote);
			_barManager.MaxItemId = maxId;

			_barManager.EndInit();
		}
예제 #12
0
        private void barCbb_ServerRole_EditValueChanged(object sender, EventArgs e)
        {
            BarEditItem item           = sender as BarEditItem;
            var         serverRoleName = item.EditValue.ToString();

            ribbonPageGroup_Permission.Text = serverRoleName;
        }
예제 #13
0
        public PopupMenuSearchHelper(PopupMenu someMenu)
        {
            currentMenu = someMenu;
            RepositoryItemButtonEdit searchEditor = new RepositoryItemButtonEdit();

            searchEditor.Buttons[0].Kind  = DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph;
            searchEditor.Buttons[0].Image = WindowsFormsApplication1.Properties.Resources.search16;

            searchEditor.ButtonClick      += new DevExpress.XtraEditors.Controls.ButtonPressedEventHandler(searchEditor_ButtonClick);
            searchEditor.EditValueChanged += new EventHandler(searchEditor_EditValueChanged);


            searchBarItem         = new BarEditItem(currentMenu.Manager, searchEditor);
            searchBarItem.Width   = 200;
            searchBarItem.Caption = "Find item";

            if (currentMenu.ItemLinks.Count == 0)
            {
                currentMenu.AddItem(searchBarItem);
            }
            else
            {
                currentMenu.InsertItem(currentMenu.ItemLinks[0], searchBarItem);
            }
            currentMenu.Popup -= new EventHandler(menu_Popup);
            currentMenu.Popup += new EventHandler(menu_Popup);

            someMenu.Manager.HighlightedLinkChanged += new HighlightedLinkChangedEventHandler(Manager_HighlightedLinkChanged);
        }
예제 #14
0
        /// <summary>
        /// 加载分页数据
        /// </summary>
        /// <param name="barEditPage"></param>
        /// <param name="gridCtrl"></param>
        /// <param name="gridView"></param>
        /// <param name="inoutType"></param>
        /// <param name="rowCount"></param>
        public void ClickPopup(BarEditItem barEditPage, BarButtonItem firstPage, BarButtonItem forwardPage, BarButtonItem nextPage, BarButtonItem lastPage
                               , BarButtonItem skipPage, GridControl gridCtrl, GridView gridView, int inoutType)
        {
            int rowCount = 0;

            ShowBill(gridCtrl, gridView, inoutType, 1, rowCount);

            if (rowCount == 0)
            {
                //赋初值 总页数为1
                barEditPage.Tag = 1;
            }
            else
            {
                //将总页数赋值给barEditPageNo.Tag
                barEditPage.Tag = rowCount % 40 == 0 ? rowCount / 40 : rowCount / 40 + 1;
            }

            firstPage.Enabled   = false;
            forwardPage.Enabled = false;
            if (int.Parse(barEditPage.Tag.ToString()) == 1)
            {
                nextPage.Enabled = false;
                lastPage.Enabled = false;
                skipPage.Enabled = false;
            }
            else
            {
                nextPage.Enabled = true;
                lastPage.Enabled = true;
                skipPage.Enabled = true;
            }
        }
예제 #15
0
        /// <summary>
        /// 跳转
        /// </summary>
        /// <param name="barEditPage"></param>
        /// <param name="gridCtrl"></param>
        /// <param name="gridView"></param>
        /// <param name="inoutType"></param>
        /// <param name="rowCount"></param>
        public void LoadSkipPage(BarEditItem barEditPage, BarButtonItem firstPage, BarButtonItem forwardPage, BarButtonItem nextPage, BarButtonItem lastPage
                                 , BarButtonItem skipPage, GridControl gridCtrl, GridView gridView, int inoutType)
        {
            int rowCount = 0;

            if (int.Parse(barEditPage.EditValue.ToString()) > int.Parse(barEditPage.Tag.ToString()))
            {
                XtraMessageBox.Show("超过总页数", Constants.SYSTEM_PROMPT, MessageBoxButtons.OK, MessageBoxIcon.Information);
                int page = int.Parse(barEditPage.Tag.ToString());
                ShowBill(gridCtrl, gridView, inoutType, page, rowCount);
                barEditPage.EditValue = page;

                firstPage.Enabled   = true;
                forwardPage.Enabled = true;
                nextPage.Enabled    = false;
                lastPage.Enabled    = false;
                skipPage.Enabled    = true;
            }
            else
            {
                ShowBill(gridCtrl, gridView, inoutType, int.Parse(barEditPage.EditValue.ToString()), rowCount);
                firstPage.Enabled   = true;
                forwardPage.Enabled = true;
                nextPage.Enabled    = true;
                lastPage.Enabled    = true;
                skipPage.Enabled    = true;
            }
        }
        public BarItem MapFrom(StatusBarElement element)
        {
            switch (element.ElementType)
            {
            case StatusBarElementType.Text:
                var barStaticItem = new BarStaticItem();
                barStaticItem.AutoSize      = mapFrom(element.AutoSize);
                barStaticItem.Alignment     = mapFrom(element.Alignment);
                barStaticItem.Width         = element.Width;
                barStaticItem.TextAlignment = element.TextAlignment;
                barStaticItem.Appearance.TextOptions.HotkeyPrefix = HKeyPrefix.None;
                return(barStaticItem);

            case StatusBarElementType.ProgressBar:
                var repositoryItemProgressBar = new RepositoryItemProgressBar {
                    Minimum = 0, Maximum = 100
                };
                var barEditItem = new BarEditItem {
                    Edit = repositoryItemProgressBar
                };
                barEditItem.Width     = element.Width;
                barEditItem.Alignment = mapFrom(element.Alignment);
                return(barEditItem);

            default:
                throw new ArgumentOutOfRangeException("element");
            }
        }
예제 #17
0
        public void CanAddAndRemove_From_BarLinksOwnerCollectionUIAdapter()
        {
            // Looking at the Adapter, the prerequisite setup is that the BarItem passed to the
            // BarItemWrapper constructor, must have already been added to the BarManager

            Bar bar = new Bar {
                Manager = new BarManager()
            };
            BarItem editItem = new BarEditItem(bar.Manager);

            bar.ItemLinks.Add(editItem);                // add before passing to BarItemWrapper

            var barItemWrapper        = new BarItemWrapper(bar.ItemLinks, editItem);
            IUIElementAdapter adapter = new XtraBarUIAdapterFactory().GetAdapter(barItemWrapper);

            Assert.IsType(typeof(BarLinksOwnerCollectionUIAdapter), adapter);

            //add
            BarItem buttonItem  = new BarButtonItem(bar.Manager, "test2");
            var     objectAdded = adapter.Add(buttonItem);

            Assert.Equal(buttonItem, objectAdded as BarButtonItem);
            Assert.Equal(2, barItemWrapper.ItemLinks.Count);

            //remove
            adapter.Remove(buttonItem);
            Assert.Equal(1, barItemWrapper.ItemLinks.Count);

            adapter.Remove(editItem);
            Assert.Equal(0, barItemWrapper.ItemLinks.Count);
        }
예제 #18
0
        private void CustomStringParametrizedAction_CustomizeControl(object sender, CustomizeControlEventArgs e)
        {
            //Inside BarManager.
            BarEditItem barItem = e.Control as BarEditItem;

            if (barItem != null)
            {
                RepositoryItemTextEdit repositoryItem = (RepositoryItemTextEdit)barItem.Edit;
                repositoryItem.Mask.MaskType = DevExpress.XtraEditors.Mask.MaskType.Simple;
                repositoryItem.Mask.EditMask = "(000)000-00-00";
                repositoryItem.Mask.UseMaskAsDisplayFormat = true;
                repositoryItem.EditValueChanged           += repositoryItem_EditValueChanged;
                barItem.Width = 250; //BarManager scales controls itself
            }
            else
            {
                //Inside LayoutManager.
                ButtonEdit buttonEdit = e.Control as ButtonEdit;
                if (buttonEdit != null)
                {
                    buttonEdit.Properties.Mask.MaskType = DevExpress.XtraEditors.Mask.MaskType.Simple;
                    buttonEdit.Properties.Mask.EditMask = "(000)000-00-00";
                    buttonEdit.Properties.Mask.UseMaskAsDisplayFormat = true;
                    buttonEdit.MinimumSize       = new Size(ScaledWidth(250), 0);
                    buttonEdit.EditValueChanged += repositoryItem_EditValueChanged;
                }
            }
        }
예제 #19
0
        public InplaceDataNavigatorHelper(BarEditItem barItem)
        {
            owner = barItem;

            repo = owner.Edit as RepositoryItemInplaceDataNavigator;
            repo.EditNavigator.PositionChanged += EditNavigator_PositionChanged;
        }
예제 #20
0
        private BarEditItem CreateBarEditItem(TextEntryActionItem item)
        {
            var guiItem = new BarEditItem();

            guiItem.Name    = item.Key;
            guiItem.Caption = item.Caption;

            RepositoryItemTextEdit textBox = new RepositoryItemTextEdit();

            guiItem.Edit = textBox;

            if (item.Width != 0)
            {
                guiItem.Width = item.Width;
            }

            if (!item.Enabled)
            {
                guiItem.Enabled = false;
            }

            textBox.EditValueChanged += delegate(object sender, System.EventArgs e)
            {
                var edit = sender as DevExpress.XtraEditors.TextEdit;
                item.PropertyChanged -= TextEntryActionItem_PropertyChanged;
                item.Text             = edit.Text;
                item.PropertyChanged += TextEntryActionItem_PropertyChanged;
            };

            return(guiItem);
        }
 public LibraryRibbonTextEdit(BarEditItem beiItem)
 {
     this.beiItem = beiItem;
     riteItem = (RepositoryItemTextEdit)beiItem.Edit;
     riteItem.EditValueChanged += new EventHandler(Edit_EditValueChanged);
     riteItem.KeyDown += OnKeyDown;
     Text = string.Empty;
 }
예제 #22
0
        private void PageSizeEditor_EditValueChanged(object sender, EventArgs e)
        {
            BarEditItem editor = (BarEditItem)sender;

            PageSize = int.Parse((string)editor.EditValue);
            DataAdapter.SelectCommand.Parameters["@size"].Value = PageSize;
            dtOrders.Clear();
            DataAdapter.Fill(dtOrders);
        }
예제 #23
0
 private void OnBarEditItemValueChanged(object sender, EventArgs e)
 {
     BarEditItem item = sender as BarEditItem;
     object val = item.EditValue;
     string txt = string.Empty;
     if (val != null)
         txt = val.ToString();
     XtraMessageBox.Show(txt);
 }
예제 #24
0
        public bool CanDuplicateMultiple(BarEditItem barEdit)
        {
            if (MainViewModel == null || MainViewModel.SelectedEntities.Count == 0)
            {
                return(false);
            }

            return(true);
        }
예제 #25
0
 public ProgressBackgroundWork(BarEditItem progresBarItem, BarStaticItem statusNotifier)
 {
     ProgressBarItem = progresBarItem;
     StatusNotifier = statusNotifier;
     Worker = new System.ComponentModel.BackgroundWorker();
     Worker.WorkerReportsProgress = true;
     Worker.DoWork += new System.ComponentModel.DoWorkEventHandler(Worker_DoWork);
     Worker.ProgressChanged += new System.ComponentModel.ProgressChangedEventHandler(Worker_ProgressChanged);
 }
예제 #26
0
        private void barEditItem1_EditValueChanged(object sender, EventArgs e)
        {
            BarEditItem     item = sender as BarEditItem;
            _Entity_SubInfo info = item.EditValue as _Entity_SubInfo;

            if (info != null)
            {
                this.CurrQD = info;
                this.BindData();
            }
        }
예제 #27
0
        private void _initializeComponents()
        {
            _bpMain      = new BackgroundPanel();
            this.Content = _bpMain;
            _bmMain      = new BarManager()
            {
                AllowCustomization = false, AllowQuickCustomization = false
            };
            _bpMain.Content = _bmMain;
            _bMainMenu      = new Bar()
            {
                IsMainMenu = true, AllowCustomizationMenu = false, AllowQuickCustomization = DevExpress.Utils.DefaultBoolean.False, DockInfo = new BarDockInfo()
                {
                    ContainerType = BarContainerType.Top
                }
            };
            _bmMain.Bars.Add(_bMainMenu);

            _btn_Refresh = new BarButtonItem()
            {
                Content = "Refresh", Glyph = new BitmapImage(((DXImageInfo) new DXImageConverter().ConvertFromString("Refresh_16x16.png")).MakeUri())
            };
            _btn_Refresh.ItemClick += _btn_Refresh_ItemClick;
            _btn_Add = new BarButtonItem()
            {
                Content = "Add", Glyph = new BitmapImage(((DXImageInfo) new DXImageConverter().ConvertFromString("AddNewDataSource_16x16.png")).MakeUri())
            };
            _btn_Add.ItemClick += _btn_Add_ItemClick;
            _btn_Edit           = new BarButtonItem()
            {
                Content = "Edit", Glyph = new BitmapImage(((DXImageInfo) new DXImageConverter().ConvertFromString("EditDataSource_16x16.png")).MakeUri())
            };
            _btn_Edit.ItemClick += _btn_Edit_ItemClick;
            _btn_Delete          = new BarButtonItem()
            {
                Content = "Delete", Glyph = new BitmapImage(((DXImageInfo) new DXImageConverter().ConvertFromString("DeleteDataSource_16x16.png")).MakeUri())
            };
            _btn_Delete.ItemClick += _btn_Delete_ItemClick;

            _bei_Filter = new BarEditItem()
            {
                EditSettings = new TextEditSettings(), EditWidth = 150, Content = "Filter"
            };
            _bei_Filter.EditValueChanged += _bei_Filter_EditValueChanged;

            _bMainMenu.Items.Add(_btn_Refresh);
            _bMainMenu.Items.Add(_btn_Add);
            _bMainMenu.Items.Add(_btn_Edit);
            _bMainMenu.Items.Add(_btn_Delete);

            _bMainMenu.Items.Add(_bei_Filter);

            _bmMain.Child = _generateView();
        }
 public frmPCTXemLichPhatSong(object id, bool? IsAdd)
 {
     this.IsAdd = IsAdd;
     InitializeComponent();
     InitGrid();
     barButtonItemCapNhat.Visibility = DevExpress.XtraBars.BarItemVisibility.Never;
     repositoryItemCheckedCotHienThi = AppCtrl.AddTuyBienCot(barManager1, bar3, gridViewMaster,
         new string[] {CotKenhPhat.Name,CotNgayPhatSong.Name,CotGioPhatSong.Name,CotThoiLuong.Name
             ,CotTietMuc.Name,CotNoiDung.Name,CotTapSo.Name,CotMaBang.Name
             ,CotSoLanDaPhat.Name,CotNgayPhatLanDau.Name,CotDonViSoHuu.Name,CotDonViCungCap.Name
             ,CotNuocSanXuat.Name,CotDoiTuongKhanGia.Name,CotRating.Name});
     HelpControlExt.AutoSetTabIndex(this);
 }
        public frmBienMucAdvanceQL()
        {
            InitializeComponent();
            TimKiem = new AppBienMucGridTemplate(gridViewMaster);
            IDField = BIEN_MUC.BM_ID;
            DisplayField = BIEN_MUC.MA_BANG;
            Fix = new PhieuQuanLy10BandedFix(this);
            AppCtrl.SetAutoHideEmptyBand(gridViewMaster);

            BandedGridColumn colBanQuyen = new BandedGridColumn();//Cột dùng để lọc, ko hiện trên lưới
            colBanQuyen.Caption = TimKiem.CotThoiHanBanQuyen.Caption;
            gridViewMaster.Columns.Add(colBanQuyen);
            TimKiem.gridBandNguonGoc.Columns.Add(colBanQuyen);
            HelpGridColumn.CotDateEdit(colBanQuyen, BIEN_MUC.THOI_HAN_BAN_QUYEN);

            BandedGridColumn colIsBanQuyen = new BandedGridColumn();//Cột dùng để lọc, ko hiện trên lưới
            colIsBanQuyen.Caption = "Thời hạn bản quyền (loại)";
            gridViewMaster.Columns.Add(colIsBanQuyen);
            TimKiem.gridBandNguonGoc.Columns.Add(colIsBanQuyen);
            AppCtrl.InitCotBanQuyen(colIsBanQuyen, BIEN_MUC.IS_THOI_HAN_BAN_QUYEN);

            checkListCol = TimKiem.AddTuyBienCot(this.barManager1, MainBar, colBanQuyen,colIsBanQuyen);

            AppCtrl.InitPrintGrid(this,false);
            AppCtrl.FormatButtonTimKiem(this);
            BarButtonItem xemtatCa = AppCtrl.AddXemTatCa(this);
            xemtatCa.ItemClick += delegate(object sender, ItemClickEventArgs e)
            {
                popupControlContainerFilter.Visible = true;
                dockPanel1.Visibility = DevExpress.XtraBars.Docking.DockVisibility.AutoHide;
                dockPanel1.HideSliding();
                filterControl1.SetDefaultColumn(null);
                filterControl1.FilterString = null;
                filterControl1.SetDefaultColumn(filterControl1.FilterColumns[BIEN_MUC.TIET_MUC]);
            };
            filterControl1.FilterChanged += delegate(object sender, FilterChangedEventArgs e)
            {
                if (e.Action == FilterChangedAction.ClearAll ||
                    (e.Action == FilterChangedAction.RemoveNode && filterControl1.FilterString == ""))
                {
                    gridViewMaster.ClearColumnsFilter();
                }
            };
            this.dockManager1.Load += new EventHandler(dockManager1_Load);

            _msgConfirmBeforeDelete = "Bạn có muốn 'Xóa' biên mục đang chọn?";
            _msgNotifyDeleteFail = "Thao tác 'Xóa' biên mục \"{0}\" thực hiện không thành công. Vui lòng kiểm tra lại dữ liệu.";
        }
        public ServersSettingsController(ServerListControl serverListControl,
            ProjectListControl projectListControl,
            BarStaticItem statusTextItem, 
            BarEditItem statusProgressItem)
        {
            this.serverListControl = serverListControl;
            this.projectListControl = projectListControl;
            this.statusTextItem = statusTextItem;
            this.statusProgressItem = statusProgressItem;

            configurationService = (ConfigurationService)ContextRegistry.GetContext().GetObject("ConfigurationService");
            hudsonService = (HudsonService)ContextRegistry.GetContext().GetObject("HudsonService");
            serverListControl.ConfigurationService = configurationService;
            projectListControl.ConfigurationService = configurationService;
            projectListControl.HudsonService = hudsonService;
        }
예제 #31
0
        public frmLichPhatSongQL()
        {
            InitializeComponent();
            IDField = "LPS_ID";
            DisplayField = "LPS_ID";
            fix = new PhieuQuanLy10Fix(this);
            barButtonItemPrintNew = AppCtrl.InitPrintGrid(this, true);
            AppCtrl.FormatButtonTimKiem(this);
            AppCtrl.AddXemTatCa(this);

            repositoryItemCheckedCotHienThi = AppCtrl.AddTuyBienCot(barManager1, this.MainBar, gridViewMaster,
              new string[] {colKenhPhat.Name,colNgayPhatSong.Name,colGioPhatSong.Name,colThoiLuong.Name
                    ,colTietMuc.Name,colNoiDung.Name,colTapSo.Name,colMaBang.Name
                    ,colThongTinThem.Name,colGhiChu.Name});
            AppCtrl.AddRefresh(this);

            _msgConfirmBeforeDelete = "Bạn có muốn 'Xóa' lịch phát sóng đang chọn?";
            _msgNotifyDeleteFail = "Thao tác 'Xóa' lịch phát sóng \"{0}\" thực hiện không thành công. Vui lòng kiểm tra lại dữ liệu.";
        }
예제 #32
0
        public frmTimKiemDonGian()
        {
            InitializeComponent();
            TimKiem = new AppBienMucGridTemplate(gridViewMaster);
            IDField = BIEN_MUC.BM_ID;
            DisplayField = BIEN_MUC.MA_BANG;
            Fix = new PhieuQuanLy10BandedFix(this);
            AppCtrl.SetAutoHideEmptyBand(gridViewMaster);
            checkListCol = TimKiem.AddTuyBienCot(barManager1, MainBar);
            AppCtrl.InitPrintGrid(this,false);
            AppCtrl.SetMaskNam(NamSXTu, NamSXDen);
            //AppCtrl.SetTenYear(NamSXTu, NamSXDen);
            AppCtrl.FormatButtonTimKiem(this);
            AppCtrl.AddXemTatCa(this);
            AppCtrl.AddRefresh(this);

            //_msgConfirmBeforeDelete = "Bạn có muốn 'Xóa' biên mục \"{0}\" ?";
            _msgConfirmBeforeDelete = "Bạn có muốn 'Xóa' biên mục đang chọn?";
            _msgNotifyDeleteFail = "Thao tác 'Xóa' biên mục \"{0}\" thực hiện không thành công. Vui lòng kiểm tra lại dữ liệu.";
        }
 public frmPostMasterDeletedQL()
 {
     InitializeComponent();
     IDField = CHUONG_TRINH_POST_MASTER.CTPM_ID;
     DisplayField = "TenPostMaster";
     this._UsingCheckFiler = false;
     _msgConfirmBeforeDelete = AppConst.ConfirmDeleteChuongTrinhQL;
     _msgNotifyDeleteFail = AppConst.DeleteFailChuongTrinhQL;
     Fix = new PhieuQuanLyBandedFix(this);
     AppCtrl.SetAutoHideEmptyBand(gridViewMaster);
     checkListCol = AppCtrl.AddTuyBienCot(this.barManager1, this.MainBar, gridViewMaster,
           new GridColumn[] { Col_PM_MaChuongTrinh },
           Col_PM_TenChuongTrinh.Name, Col_PM_TietMuc.Name, Col_PM_PostMaster.Name,
       Col_PM_LoaiLuu.Name, Col_PM_PopUp.Name, Col_PM_ThanhLy.Name, Col_PM_TongTap.Name);
     AppCtrl.InitPrintGrid(this, false);
     //AppCtrl.SetTenYear(NamSXTu, NamSXDen);
     AppCtrl.FormatButtonTimKiem(this);
     AppCtrl.AddXemTatCa(this);
     AppCtrl.AddRefresh(this);
 }
예제 #34
0
 public frmChuongTrinhQL()
 {
     InitializeComponent();
     IDField = CHUONG_TRINH.CT_ID;
     DisplayField = CHUONG_TRINH.MA_CT;
     this._UsingCheckFiler = false;
     _msgConfirmBeforeDelete = AppConst.ConfirmDeleteChuongTrinhQL;
     _msgNotifyDeleteFail = AppConst.DeleteFailChuongTrinhQL;
     Fix = new PhieuQuanLyBandedFix(this);
     AppCtrl.SetAutoHideEmptyBand(gridViewMaster);
     checkListCol = AppCtrl.AddTuyBienCot(this.barManager1, this.MainBar, gridViewMaster,
         new GridColumn[]{Col_CT_ThoiHanBangQuyen},
     Col_CT_NoiDung.Name, Col_CT_TenGoc.Name, Col_CT_TietMuc.Name, Col_CT_Nuoc.Name,Col_CT_NamSX.Name,
     Col_CT_BanQuyenThuoc.Name,Col_CT_BanQuyenDIDEnd.Name,Col_CT_BanQuyenDTNNEnd.Name,Col_CT_BanQuyenHTV.Name);
     AppCtrl.InitPrintGrid(this, false);
     AppCtrl.SetMaskNam(NamSXTu, NamSXDen);
     //AppCtrl.SetTenYear(NamSXTu, NamSXDen);
     AppCtrl.FormatButtonTimKiem(this);
     AppCtrl.AddXemTatCa(this);
     AppCtrl.AddRefresh(this);
 }
		private void InitContextMenu()
		{
			_barManager.BeginInit();

			var maxId = _barManager.MaxItemId++;

			var fontEditor = new RepositoryItemButtonEdit()
			{
				AutoHeight = false,
				TextEditStyle = TextEditStyles.DisableTextEditor
			};
			fontEditor.Buttons.Clear();
			fontEditor.Buttons.AddRange(new[] { new EditorButton(ButtonPredefines.Ellipsis) });
			var fontEditHandler = new Action<object, EventArgs>((o, e) =>
			{
				using (var dlgFont = new FontDialog())
				{
					dlgFont.Font = ItemFont.Tag as Font;
					if (dlgFont.ShowDialog() != DialogResult.OK) return;
					ItemFont.Tag = dlgFont.Font;
					ItemFont.EditValue = Utils.FontToString(dlgFont.Font);
				}
			});
			fontEditor.ButtonClick += (o, e) => fontEditHandler(o, e);
			fontEditor.Click += (o, e) => fontEditHandler(o, e);
			ItemFont = new BarEditItem
			{
				Id = maxId,
				Caption = "Font  ",
				Edit = fontEditor,
				Width = 150
			};
			ItemFont.EditValueChanged += (o, e) =>
			{
				LineBreakLoader.OnFontChanged();
				_barManager.CloseMenus();
			};
			maxId++;

			var colorEditor = new RepositoryItemHtmlColorEdit
			{
				AutoHeight = false,
			};
			colorEditor.Buttons.Clear();
			colorEditor.Buttons.AddRange(new[] { new EditorButton(ButtonPredefines.Ellipsis) });
			colorEditor.OnColorSelected += (o, e) =>
			{
				_barManager.CloseMenus();
			};
			ItemFontColor = new BarEditItem
			{
				Id = maxId,
				Caption = "Font Color  ",
				Edit = colorEditor,
				Width = 150
			};
			maxId++;
			ItemFontColor.EditValueChanged += (o, e) =>
			{
				LineBreakLoader.OnColorChanged();
				_barManager.CloseMenus();
			};

			_barManager.Items.Add(ItemFontColor);
			_barManager.MaxItemId = maxId;

			_barManager.EndInit();
		}
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.components = new System.ComponentModel.Container();
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(CommonParentForm));
     this.rbnMain = new DevExpress.XtraBars.Ribbon.RibbonControl();
     this.appMenu = new DevExpress.XtraBars.Ribbon.ApplicationMenu(this.components);
     this.bbiSettings = new DevExpress.XtraBars.BarButtonItem();
     this.bbiExitUser = new DevExpress.XtraBars.BarButtonItem();
     this.siVersion = new DevExpress.XtraBars.BarStaticItem();
     this.alignButtonGroup = new DevExpress.XtraBars.BarButtonGroup();
     this.bbiAdd = new DevExpress.XtraBars.BarButtonItem();
     this.bbiRemove = new DevExpress.XtraBars.BarButtonItem();
     this.bbiRefresh = new DevExpress.XtraBars.BarButtonItem();
     this.bbiExel = new DevExpress.XtraBars.BarButtonItem();
     this.bbiAdmin = new DevExpress.XtraBars.BarButtonItem();
     this.bbiSave = new DevExpress.XtraBars.BarButtonItem();
     this.bbiRoleEdit = new DevExpress.XtraBars.BarButtonItem();
     this.brDockMenuItem = new DevExpress.XtraBars.BarDockingMenuItem();
     this.brEdItControlsStates = new DevExpress.XtraBars.BarEditItem();
     this.ripceControlsStates = new DevExpress.XtraEditors.Repository.RepositoryItemPopupContainerEdit();
     this.rpMain = new DevExpress.XtraBars.Ribbon.RibbonPage();
     this.rpgMain = new DevExpress.XtraBars.Ribbon.RibbonPageGroup();
     this.rpDictionaries = new DevExpress.XtraBars.Ribbon.RibbonPage();
     this.rpgCommonDictionaries = new DevExpress.XtraBars.Ribbon.RibbonPageGroup();
     this.rpReports = new DevExpress.XtraBars.Ribbon.RibbonPage();
     this.rpSettings = new DevExpress.XtraBars.Ribbon.RibbonPage();
     this.rpAdmin = new DevExpress.XtraBars.Ribbon.RibbonPage();
     this.rpgAdmin = new DevExpress.XtraBars.Ribbon.RibbonPageGroup();
     this.riceStates = new DevExpress.XtraEditors.Repository.RepositoryItemCheckEdit();
     this.rsbMain = new DevExpress.XtraBars.Ribbon.RibbonStatusBar();
     this.defaultLookAndFeel = new DevExpress.LookAndFeel.DefaultLookAndFeel(this.components);
     this.dxErrorProvider = new DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider(this.components);
     this.documentMng = new DevExpress.XtraBars.Docking2010.DocumentManager(this.components);
     this.MDIViewNative = new DevExpress.XtraBars.Docking2010.Views.NativeMdi.NativeMdiView(this.components);
     this.MDIViewTabbed = new DevExpress.XtraBars.Docking2010.Views.Tabbed.TabbedView(this.components);
     this.bbiChangeUser = new DevExpress.XtraBars.BarButtonItem();
     ((System.ComponentModel.ISupportInitialize)(this.rbnMain)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.appMenu)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.ripceControlsStates)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.riceStates)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.dxErrorProvider)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.documentMng)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.MDIViewNative)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.MDIViewTabbed)).BeginInit();
     this.SuspendLayout();
     //
     // rbnMain
     //
     this.rbnMain.ApplicationButtonDropDownControl = this.appMenu;
     this.rbnMain.ApplicationButtonText = "Меню";
     this.rbnMain.AutoSizeItems = true;
     this.rbnMain.Categories.AddRange(new DevExpress.XtraBars.BarManagerCategory[] {
     new DevExpress.XtraBars.BarManagerCategory("Dictionaries", new System.Guid("bfb17616-73d9-42e6-8028-a10ce19e5160"))});
     this.rbnMain.ExpandCollapseItem.Id = 0;
     this.rbnMain.Items.AddRange(new DevExpress.XtraBars.BarItem[] {
     this.rbnMain.ExpandCollapseItem,
     this.siVersion,
     this.alignButtonGroup,
     this.bbiAdd,
     this.bbiRemove,
     this.bbiRefresh,
     this.bbiExel,
     this.bbiAdmin,
     this.bbiSave,
     this.bbiRoleEdit,
     this.brDockMenuItem,
     this.bbiSettings,
     this.brEdItControlsStates,
     this.bbiExitUser,
     this.bbiChangeUser});
     this.rbnMain.Location = new System.Drawing.Point(0, 0);
     this.rbnMain.MaxItemId = 162;
     this.rbnMain.Name = "rbnMain";
     this.rbnMain.Pages.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPage[] {
     this.rpMain,
     this.rpDictionaries,
     this.rpReports,
     this.rpSettings,
     this.rpAdmin});
     this.rbnMain.RepositoryItems.AddRange(new DevExpress.XtraEditors.Repository.RepositoryItem[] {
     this.ripceControlsStates,
     this.riceStates});
     this.rbnMain.RibbonStyle = DevExpress.XtraBars.Ribbon.RibbonControlStyle.Office2013;
     this.rbnMain.ShowToolbarCustomizeItem = false;
     this.rbnMain.Size = new System.Drawing.Size(1210, 173);
     this.rbnMain.StatusBar = this.rsbMain;
     this.rbnMain.Toolbar.ItemLinks.Add(this.bbiAdd);
     this.rbnMain.Toolbar.ItemLinks.Add(this.bbiRemove);
     this.rbnMain.Toolbar.ItemLinks.Add(this.bbiRefresh);
     this.rbnMain.Toolbar.ItemLinks.Add(this.bbiSave);
     this.rbnMain.Toolbar.ItemLinks.Add(this.bbiExel);
     this.rbnMain.Toolbar.ItemLinks.Add(this.brDockMenuItem);
     this.rbnMain.Toolbar.ShowCustomizeItem = false;
     this.rbnMain.ToolbarLocation = DevExpress.XtraBars.Ribbon.RibbonQuickAccessToolbarLocation.Below;
     this.rbnMain.ShowCustomizationMenu += new DevExpress.XtraBars.Ribbon.RibbonCustomizationMenuEventHandler(this.RibbonShowCustomizationMenu);
     this.rbnMain.Merge += new DevExpress.XtraBars.Ribbon.RibbonMergeEventHandler(this.MainMerge);
     //
     // appMenu
     //
     this.appMenu.ItemLinks.Add(this.bbiSettings, true);
     this.appMenu.ItemLinks.Add(this.bbiChangeUser);
     this.appMenu.ItemLinks.Add(this.bbiExitUser);
     this.appMenu.Name = "appMenu";
     this.appMenu.Ribbon = this.rbnMain;
     //
     // bbiSettings
     //
     this.bbiSettings.Caption = "Настройки";
     this.bbiSettings.Description = "Настройки программы";
     this.bbiSettings.Hint = "Настройки программы";
     this.bbiSettings.Id = 76;
     this.bbiSettings.LargeGlyph = ((System.Drawing.Image)(resources.GetObject("bbiSettings.LargeGlyph")));
     this.bbiSettings.Name = "bbiSettings";
     //
     // bbiExitUser
     //
     this.bbiExitUser.Caption = "Выход";
     this.bbiExitUser.CategoryGuid = new System.Guid("6ffddb2b-9015-4d97-a4c1-91613e0ef537");
     this.bbiExitUser.Id = 160;
     this.bbiExitUser.LargeGlyph = ((System.Drawing.Image)(resources.GetObject("bbiExitUser.LargeGlyph")));
     this.bbiExitUser.Name = "bbiExitUser";
     //
     // siVersion
     //
     this.siVersion.Caption = "Версия:";
     this.siVersion.Id = 31;
     this.siVersion.Name = "siVersion";
     this.siVersion.TextAlignment = System.Drawing.StringAlignment.Near;
     //
     // alignButtonGroup
     //
     this.alignButtonGroup.Caption = "Align Commands";
     this.alignButtonGroup.Id = 52;
     this.alignButtonGroup.Name = "alignButtonGroup";
     //
     // bbiAdd
     //
     this.bbiAdd.Caption = "Добавить данные";
     this.bbiAdd.Glyph = ((System.Drawing.Image)(resources.GetObject("bbiAdd.Glyph")));
     this.bbiAdd.Hint = "Добавить новую запись в текущий элемент интерфейса";
     this.bbiAdd.Id = 62;
     this.bbiAdd.ItemShortcut = new DevExpress.XtraBars.BarShortcut((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.N));
     this.bbiAdd.Name = "bbiAdd";
     this.bbiAdd.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.AddItemClick);
     //
     // bbiRemove
     //
     this.bbiRemove.Caption = "Удалить данные";
     this.bbiRemove.Glyph = ((System.Drawing.Image)(resources.GetObject("bbiRemove.Glyph")));
     this.bbiRemove.Hint = "Удалить текущие данные";
     this.bbiRemove.Id = 63;
     this.bbiRemove.ItemShortcut = new DevExpress.XtraBars.BarShortcut((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Delete));
     this.bbiRemove.Name = "bbiRemove";
     this.bbiRemove.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.RemoveItemClick);
     //
     // bbiRefresh
     //
     this.bbiRefresh.Caption = "Обновить данные";
     this.bbiRefresh.Glyph = ((System.Drawing.Image)(resources.GetObject("bbiRefresh.Glyph")));
     this.bbiRefresh.Hint = "Обновить записи из базы данных";
     this.bbiRefresh.Id = 65;
     this.bbiRefresh.ItemShortcut = new DevExpress.XtraBars.BarShortcut(System.Windows.Forms.Keys.F5);
     this.bbiRefresh.Name = "bbiRefresh";
     this.bbiRefresh.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.RefreshItemClick);
     //
     // bbiExel
     //
     this.bbiExel.Caption = "Сохранить в Exel";
     this.bbiExel.Glyph = ((System.Drawing.Image)(resources.GetObject("bbiExel.Glyph")));
     this.bbiExel.Hint = "Сохранить данные в виде Excel";
     this.bbiExel.Id = 66;
     this.bbiExel.Name = "bbiExel";
     this.bbiExel.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.ExelItemClick);
     //
     // bbiAdmin
     //
     this.bbiAdmin.Caption = "Настройка интерфейсов";
     this.bbiAdmin.Glyph = ((System.Drawing.Image)(resources.GetObject("bbiAdmin.Glyph")));
     this.bbiAdmin.Hint = "Администрирование внешнего вида форм";
     this.bbiAdmin.Id = 69;
     this.bbiAdmin.LargeGlyph = ((System.Drawing.Image)(resources.GetObject("bbiAdmin.LargeGlyph")));
     this.bbiAdmin.Name = "bbiAdmin";
     this.bbiAdmin.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.AdminItemClick);
     //
     // bbiSave
     //
     this.bbiSave.Caption = "Сохранить в базу";
     this.bbiSave.Glyph = ((System.Drawing.Image)(resources.GetObject("bbiSave.Glyph")));
     this.bbiSave.Hint = "Сохранить изменения текущего элемента на сервер";
     this.bbiSave.Id = 70;
     this.bbiSave.ItemShortcut = new DevExpress.XtraBars.BarShortcut((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.S));
     this.bbiSave.Name = "bbiSave";
     this.bbiSave.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.CommitItemClick);
     //
     // bbiRoleEdit
     //
     this.bbiRoleEdit.Caption = "Настройка ролей и сотрудников";
     this.bbiRoleEdit.Glyph = ((System.Drawing.Image)(resources.GetObject("bbiRoleEdit.Glyph")));
     this.bbiRoleEdit.Id = 71;
     this.bbiRoleEdit.LargeGlyph = ((System.Drawing.Image)(resources.GetObject("bbiRoleEdit.LargeGlyph")));
     this.bbiRoleEdit.Name = "bbiRoleEdit";
     this.bbiRoleEdit.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.RoleEditItemClick);
     //
     // brDockMenuItem
     //
     this.brDockMenuItem.Caption = "Расположение форм";
     this.brDockMenuItem.Glyph = ((System.Drawing.Image)(resources.GetObject("brDockMenuItem.Glyph")));
     this.brDockMenuItem.Hint = "Настройка расположения форм";
     this.brDockMenuItem.Id = 78;
     this.brDockMenuItem.Name = "brDockMenuItem";
     //
     // brEdItControlsStates
     //
     this.brEdItControlsStates.Edit = this.ripceControlsStates;
     this.brEdItControlsStates.Id = 89;
     this.brEdItControlsStates.Name = "brEdItControlsStates";
     //
     // ripceControlsStates
     //
     this.ripceControlsStates.AutoHeight = false;
     this.ripceControlsStates.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
     new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
     this.ripceControlsStates.Name = "ripceControlsStates";
     //
     // rpMain
     //
     this.rpMain.Groups.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPageGroup[] {
     this.rpgMain});
     this.rpMain.Name = "rpMain";
     this.rpMain.Text = "Главная";
     //
     // rpgMain
     //
     this.rpgMain.Name = "rpgMain";
     this.rpgMain.Text = "Главное";
     //
     // rpDictionaries
     //
     this.rpDictionaries.Groups.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPageGroup[] {
     this.rpgCommonDictionaries});
     this.rpDictionaries.Name = "rpDictionaries";
     this.rpDictionaries.Text = "Справочники";
     //
     // rpgCommonDictionaries
     //
     this.rpgCommonDictionaries.Name = "rpgCommonDictionaries";
     this.rpgCommonDictionaries.Text = "Общие";
     //
     // rpReports
     //
     this.rpReports.Name = "rpReports";
     this.rpReports.Text = "Отчёты";
     //
     // rpSettings
     //
     this.rpSettings.Name = "rpSettings";
     this.rpSettings.Text = "Настройки системы";
     //
     // rpAdmin
     //
     this.rpAdmin.Groups.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPageGroup[] {
     this.rpgAdmin});
     this.rpAdmin.Name = "rpAdmin";
     this.rpAdmin.Text = "Администрирование";
     this.rpAdmin.Visible = false;
     //
     // rpgAdmin
     //
     this.rpgAdmin.ItemLinks.Add(this.bbiAdmin);
     this.rpgAdmin.ItemLinks.Add(this.bbiRoleEdit);
     this.rpgAdmin.Name = "rpgAdmin";
     this.rpgAdmin.Text = "Администратор";
     //
     // riceStates
     //
     this.riceStates.Name = "riceStates";
     this.riceStates.NullStyle = DevExpress.XtraEditors.Controls.StyleIndeterminate.Unchecked;
     //
     // rsbMain
     //
     this.rsbMain.ItemLinks.Add(this.siVersion);
     this.rsbMain.Location = new System.Drawing.Point(0, 669);
     this.rsbMain.Name = "rsbMain";
     this.rsbMain.Ribbon = this.rbnMain;
     this.rsbMain.Size = new System.Drawing.Size(1210, 31);
     //
     // dxErrorProvider
     //
     this.dxErrorProvider.ContainerControl = this;
     //
     // documentMng
     //
     this.documentMng.MdiParent = this;
     this.documentMng.MenuManager = this.rbnMain;
     this.documentMng.ShowThumbnailsInTaskBar = DevExpress.Utils.DefaultBoolean.False;
     this.documentMng.View = this.MDIViewNative;
     this.documentMng.ViewCollection.AddRange(new DevExpress.XtraBars.Docking2010.Views.BaseView[] {
     this.MDIViewNative,
     this.MDIViewTabbed});
     //
     // bbiChangeUser
     //
     this.bbiChangeUser.Caption = "Сменить пользователя";
     this.bbiChangeUser.Id = 161;
     this.bbiChangeUser.LargeGlyph = ((System.Drawing.Image)(resources.GetObject("bbiChangeUser.LargeGlyph")));
     this.bbiChangeUser.Name = "bbiChangeUser";
     //
     // CommonParentForm
     //
     this.AllowFormGlass = DevExpress.Utils.DefaultBoolean.False;
     this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
     this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
     this.ClientSize = new System.Drawing.Size(1210, 700);
     this.Controls.Add(this.rsbMain);
     this.Controls.Add(this.rbnMain);
     this.IsMdiContainer = true;
     this.Name = "CommonParentForm";
     this.Ribbon = this.rbnMain;
     this.StatusBar = this.rsbMain;
     this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
     this.Activated += new System.EventHandler(this.CommonParentFormActivated);
     this.Load += new System.EventHandler(this.CommonParentFormLoad);
     this.Shown += new System.EventHandler(this.CommonParentFormShown);
     ((System.ComponentModel.ISupportInitialize)(this.rbnMain)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.appMenu)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.ripceControlsStates)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.riceStates)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.dxErrorProvider)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.documentMng)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.MDIViewNative)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.MDIViewTabbed)).EndInit();
     this.ResumeLayout(false);
     this.PerformLayout();
 }
예제 #37
0
        private void GenerateQuickPrinterToRibbon()
        {
            if (this.view.Ribbon == null) return;

            var systemPage = this.view.Ribbon.Pages.GetPageByName("systemPage");
            if (systemPage == null)
            {
                LoggingService.Error("ReportService.GenerateQuickPrinterToRibbon处方法GetPageByName未找到systemPage");
                return;
            }

            var groupReport = systemPage.GetGroupByName("groupReport");
            if (groupReport == null)
            {
                LoggingService.Error("ReportService.GenerateQuickPrinterToRibbon处方法GetGroupByName未找到groupReport");
                return;
            }

            //添加快速打印组
            var groupQuickPrint = new RibbonPageGroup();
            groupQuickPrint.Name = "groupQuickPrint";
            groupQuickPrint.Text = "快速打印";
            groupQuickPrint.ShowCaptionButton = false;
            groupQuickPrint.AllowTextClipping = false;
            groupQuickPrint.MergeOrder = groupReport.MergeOrder + 1;
            systemPage.Groups.Add(groupQuickPrint);

            var printButtons = new Dictionary<int, BarButtonItem>();
            var printLabels = new Dictionary<int, BarStaticItem>();

            var printerList = LocalPrinter.GetLocalPrinters();
            var reportIdList = this.reportIds.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);

            foreach (var reportId in reportIdList)
            {
                string reportName = this.GetReportDefaultFormatName(Convert.ToInt32(reportId));

                if (reportName.IsEmpty())
                    continue;

                //添加选择打印机
                //label
                var lblPrinter = new BarStaticItem();
                lblPrinter.Caption = "{0}".FormatWith(reportName);
                printLabels.Add(Convert.ToInt32(reportId), lblPrinter);
                groupQuickPrint.Ribbon.Items.Add(lblPrinter);
                groupQuickPrint.ItemLinks.Add(lblPrinter, true);

                //combobox
                var cbbChoosePrinter = new RepositoryItemComboBox();
                cbbChoosePrinter.AutoHeight = false;
                cbbChoosePrinter.Name = "cbbChoosePrinter_" + reportId;
                cbbChoosePrinter.TextEditStyle = TextEditStyles.DisableTextEditor;
                cbbChoosePrinter.Items.AddRange(printerList);

                //item
                var bbiChoosePrinter = new BarEditItem();
                bbiChoosePrinter.RibbonStyle = RibbonItemStyles.SmallWithoutText;
                bbiChoosePrinter.Edit = cbbChoosePrinter;
                bbiChoosePrinter.Name = "bbiChoosePrinter_" + reportId;
                bbiChoosePrinter.Width = 100;
                groupQuickPrint.Ribbon.Items.Add(bbiChoosePrinter);
                groupQuickPrint.ItemLinks.Add(bbiChoosePrinter);


                //设置为默认打印机
                bbiChoosePrinter.EditValue = LocalPrinter.DefaultPrinter;
                var config = QuickPrintManager.Current.GetQuickPrintItem(this.view.UniqueId, Convert.ToInt32(reportId));
                if (config != null && !config.PrinterName.IsEmpty() && printerList.Contains(config.PrinterName))
                {
                    bbiChoosePrinter.EditValue = config.PrinterName;
                }

                bbiChoosePrinter.Hint = bbiChoosePrinter.EditValue.ToStringEx();
                bbiChoosePrinter.EditValueChanged += delegate
                {
                    var item = new QuickPrintItem()
                    {
                        MenuId = this.view.UniqueId,
                        ReportId = Convert.ToInt32(reportId),
                        PrinterName = bbiChoosePrinter.EditValue.ToStringEx()
                    };
                    QuickPrintManager.Current.AddConfig(item);
                    QuickPrintManager.Current.SaveConfig();
                    bbiChoosePrinter.Hint = bbiChoosePrinter.EditValue.ToStringEx();
                };

                //添加快速打印按钮
                //添加打印机按钮
                var bbiQuickPrint = new BarButtonItem();
                bbiQuickPrint.Caption = "打印";
                bbiQuickPrint.Hint = reportName;
                bbiQuickPrint.Name = "bbiQuickPrint_" + reportId;
                bbiQuickPrint.Tag = reportId;
                bbiQuickPrint.LargeGlyph = Properties.Resources.Action_Print_32x32;

                bbiQuickPrint.ItemClick += (sender, args) =>
                {
                    if (bbiChoosePrinter != null)
                    {
                        var priterName = bbiChoosePrinter.EditValue.ToStringEx();
                        if (priterName.IsEmpty())
                        {
                            MessageService.ShowError("请选择打印机.");
                            return;
                        }
                        this.QuickPrint(Convert.ToInt32(reportId), priterName);
                    }
                    else
                    {
                        this.QuickPrint(Convert.ToInt32(reportId), LocalPrinter.DefaultPrinter);
                    }
                };
                printButtons.Add(Convert.ToInt32(reportId), bbiQuickPrint);
                groupQuickPrint.Ribbon.Items.Add(bbiQuickPrint);
                groupQuickPrint.ItemLinks.Add(bbiQuickPrint);

                this.ReportFormatChanged += (sender, args) =>
                {
                    if (printButtons.ContainsKey(args.ReportId))
                    {
                        var btn = printButtons[args.ReportId];
                        btn.Hint = args.ReportFormatName;
                    }
                    if (printLabels.ContainsKey(args.ReportId))
                    {
                        var lbl = printLabels[args.ReportId];
                        lbl.Caption = "{0}".FormatWith(args.ReportFormatName);
                    }
                };
            }
        }
예제 #38
0
 private void SetChecked(BarEditItem item, bool isChecked)
 {
     if (item.Edit is RepositoryItemCheckEdit)
     {
         item.EditValue = isChecked;
     }
 }
예제 #39
0
		private void InitializeComponent()
		{
            DevExpress.XtraBars.Ribbon.GalleryItemGroup galleryItemGroup1 = new DevExpress.XtraBars.Ribbon.GalleryItemGroup();
            DevExpress.XtraBars.Ribbon.GalleryItemGroup galleryItemGroup2 = new DevExpress.XtraBars.Ribbon.GalleryItemGroup();
            DevExpress.XtraBars.Ribbon.GalleryItemGroup galleryItemGroup3 = new DevExpress.XtraBars.Ribbon.GalleryItemGroup();
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm));
            this.ribbonControl1 = new DevExpress.XtraBars.Ribbon.RibbonControl();
            this.btnNewTerminal = new DevExpress.XtraBars.BarButtonItem();
            this.btnNewTerminal2 = new DevExpress.XtraBars.BarButtonItem();
            this.btnNewTerminal3 = new DevExpress.XtraBars.BarButtonItem();
            this.btnStart = new DevExpress.XtraBars.BarButtonItem();
            this.btnStop = new DevExpress.XtraBars.BarButtonItem();
            this.btnClear = new DevExpress.XtraBars.BarButtonItem();
            this.txtUsername = new DevExpress.XtraBars.BarEditItem();
            this.repositoryItemTextEdit1 = new DevExpress.XtraEditors.Repository.RepositoryItemTextEdit();
            this.txtPassword = new DevExpress.XtraBars.BarEditItem();
            this.repositoryItemTextEdit2 = new DevExpress.XtraEditors.Repository.RepositoryItemTextEdit();
            this.btnLogin = new DevExpress.XtraBars.BarButtonItem();
            this.btnChangePassword = new DevExpress.XtraBars.BarButtonItem();
            this.btnLogout = new DevExpress.XtraBars.BarButtonItem();
            this.lblSystemTime = new DevExpress.XtraBars.BarStaticItem();
            this.lblTotalTransaction = new DevExpress.XtraBars.BarStaticItem();
            this.lblTotalTerminal = new DevExpress.XtraBars.BarStaticItem();
            this.barEditItem1 = new DevExpress.XtraBars.BarEditItem();
            this.repositoryItemPopupContainerEdit1 = new DevExpress.XtraEditors.Repository.RepositoryItemPopupContainerEdit();
            this.ribbonGalleryBarItem1 = new DevExpress.XtraBars.RibbonGalleryBarItem();
            this.barButtonGroup1 = new DevExpress.XtraBars.BarButtonGroup();
            this.barButtonGroup2 = new DevExpress.XtraBars.BarButtonGroup();
            this.skinGalleryBarItem = new DevExpress.XtraBars.RibbonGalleryBarItem();
            this.ribbonPage1 = new DevExpress.XtraBars.Ribbon.RibbonPage();
            this.ribbonPageGroup3 = new DevExpress.XtraBars.Ribbon.RibbonPageGroup();
            this.ribbonPageGroup1 = new DevExpress.XtraBars.Ribbon.RibbonPageGroup();
            this.ribbonPageGroup2 = new DevExpress.XtraBars.Ribbon.RibbonPageGroup();
            this.ribbonPageGroup5 = new DevExpress.XtraBars.Ribbon.RibbonPageGroup();
            this.ribbonStatusBar1 = new DevExpress.XtraBars.Ribbon.RibbonStatusBar();
            this.splitContainerControl1 = new DevExpress.XtraEditors.SplitContainerControl();
            this.xtraTabControl1 = new DevExpress.XtraTab.XtraTabControl();
            this.xtraTabPage1 = new DevExpress.XtraTab.XtraTabPage();
            this.grdTransaction = new DevExpress.XtraGrid.GridControl();
            this.gridView2 = new DevExpress.XtraGrid.Views.Grid.GridView();
            this.gridColumn1 = new DevExpress.XtraGrid.Columns.GridColumn();
            this.gridColumn8 = new DevExpress.XtraGrid.Columns.GridColumn();
            this.gridColumn2 = new DevExpress.XtraGrid.Columns.GridColumn();
            this.gridColumn3 = new DevExpress.XtraGrid.Columns.GridColumn();
            this.gridColumn6 = new DevExpress.XtraGrid.Columns.GridColumn();
            this.gridColumn4 = new DevExpress.XtraGrid.Columns.GridColumn();
            this.gridColumn5 = new DevExpress.XtraGrid.Columns.GridColumn();
            this.gridColumn7 = new DevExpress.XtraGrid.Columns.GridColumn();
            this.gridColumn10 = new DevExpress.XtraGrid.Columns.GridColumn();
            this.gridColumn11 = new DevExpress.XtraGrid.Columns.GridColumn();
            this.gridColumn12 = new DevExpress.XtraGrid.Columns.GridColumn();
            this.gridColumn9 = new DevExpress.XtraGrid.Columns.GridColumn();
            this.gridColumn14 = new DevExpress.XtraGrid.Columns.GridColumn();
            this.gridColumn15 = new DevExpress.XtraGrid.Columns.GridColumn();
            this.gridColumn13 = new DevExpress.XtraGrid.Columns.GridColumn();
            this.panelControl3 = new DevExpress.XtraEditors.PanelControl();
            this.panelControl4 = new DevExpress.XtraEditors.PanelControl();
            this.xtraTabPage3 = new DevExpress.XtraTab.XtraTabPage();
            this.btnStatement = new DevExpress.XtraEditors.SimpleButton();
            this.btnBetList = new DevExpress.XtraEditors.SimpleButton();
            this.cbeSignatureTemplate = new DevExpress.XtraEditors.ComboBoxEdit();
            this.panelControl1 = new DevExpress.XtraEditors.PanelControl();
            this.webBrowser2 = new System.Windows.Forms.WebBrowser();
            this.splitter1 = new System.Windows.Forms.Splitter();
            this.webBrowser1 = new System.Windows.Forms.WebBrowser();
            this.xtraTabPage5 = new DevExpress.XtraTab.XtraTabPage();
            this.panelControl2 = new DevExpress.XtraEditors.PanelControl();
            this.textEdit4 = new DevExpress.XtraEditors.MemoEdit();
            this.chkSCloud = new DevExpress.XtraEditors.CheckEdit();
            this.simpleButton2 = new DevExpress.XtraEditors.SimpleButton();
            this.textEdit3 = new DevExpress.XtraEditors.TextEdit();
            this.textEdit2 = new DevExpress.XtraEditors.TextEdit();
            this.textEdit1 = new DevExpress.XtraEditors.TextEdit();
            this.simpleButton1 = new DevExpress.XtraEditors.SimpleButton();
            this.label4 = new System.Windows.Forms.Label();
            this.label3 = new System.Windows.Forms.Label();
            this.label2 = new System.Windows.Forms.Label();
            this.label1 = new System.Windows.Forms.Label();
            this.chkRCloud = new DevExpress.XtraEditors.CheckEdit();
            this.btnSignMeIn = new DevExpress.XtraEditors.SimpleButton();
            this.txtServerIP = new DevExpress.XtraEditors.TextEdit();
            this.txtServerUserName = new DevExpress.XtraEditors.TextEdit();
            this.txtServerPassword = new DevExpress.XtraEditors.TextEdit();
            this.pictureEdit1 = new DevExpress.XtraEditors.PictureEdit();
            this.xtraTabControl2 = new DevExpress.XtraTab.XtraTabControl();
            this.xtraTabPage2 = new DevExpress.XtraTab.XtraTabPage();
            this.xtraTabPage4 = new DevExpress.XtraTab.XtraTabPage();
            this.ribbonPageGroup4 = new DevExpress.XtraBars.Ribbon.RibbonPageGroup();
            ((System.ComponentModel.ISupportInitialize)(this.ribbonControl1)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.repositoryItemTextEdit1)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.repositoryItemTextEdit2)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.repositoryItemPopupContainerEdit1)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.splitContainerControl1)).BeginInit();
            this.splitContainerControl1.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.xtraTabControl1)).BeginInit();
            this.xtraTabControl1.SuspendLayout();
            this.xtraTabPage1.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.grdTransaction)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.gridView2)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.panelControl3)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.panelControl4)).BeginInit();
            this.xtraTabPage3.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.cbeSignatureTemplate.Properties)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.panelControl1)).BeginInit();
            this.panelControl1.SuspendLayout();
            this.xtraTabPage5.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.panelControl2)).BeginInit();
            this.panelControl2.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.textEdit4.Properties)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.chkSCloud.Properties)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.textEdit3.Properties)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.textEdit2.Properties)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.textEdit1.Properties)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.chkRCloud.Properties)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.txtServerIP.Properties)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.txtServerUserName.Properties)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.txtServerPassword.Properties)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.pictureEdit1.Properties)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.xtraTabControl2)).BeginInit();
            this.xtraTabControl2.SuspendLayout();
            this.SuspendLayout();
            // 
            // ribbonControl1
            // 
            this.ribbonControl1.ApplicationButtonText = null;
            // 
            // 
            // 
            this.ribbonControl1.ExpandCollapseItem.Id = 0;
            this.ribbonControl1.ExpandCollapseItem.Name = "";
            this.ribbonControl1.Items.AddRange(new DevExpress.XtraBars.BarItem[] {
            this.ribbonControl1.ExpandCollapseItem,
            this.btnNewTerminal,
            this.btnNewTerminal2,
            this.btnNewTerminal3,
            this.btnStart,
            this.btnStop,
            this.btnClear,
            this.txtUsername,
            this.txtPassword,
            this.btnLogin,
            this.btnChangePassword,
            this.btnLogout,
            this.lblSystemTime,
            this.lblTotalTransaction,
            this.lblTotalTerminal,
            this.barEditItem1,
            this.ribbonGalleryBarItem1,
            this.barButtonGroup1,
            this.barButtonGroup2,
            this.skinGalleryBarItem});
            this.ribbonControl1.Location = new System.Drawing.Point(0, 0);
            this.ribbonControl1.MaxItemId = 22;
            this.ribbonControl1.Name = "ribbonControl1";
            this.ribbonControl1.Pages.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPage[] {
            this.ribbonPage1});
            this.ribbonControl1.RepositoryItems.AddRange(new DevExpress.XtraEditors.Repository.RepositoryItem[] {
            this.repositoryItemTextEdit1,
            this.repositoryItemTextEdit2,
            this.repositoryItemPopupContainerEdit1});
            this.ribbonControl1.RibbonStyle = DevExpress.XtraBars.Ribbon.RibbonControlStyle.Office2010;
            this.ribbonControl1.SelectedPage = this.ribbonPage1;
            this.ribbonControl1.ShowExpandCollapseButton = DevExpress.Utils.DefaultBoolean.False;
            this.ribbonControl1.ShowPageHeadersMode = DevExpress.XtraBars.Ribbon.ShowPageHeadersMode.Hide;
            this.ribbonControl1.ShowToolbarCustomizeItem = false;
            this.ribbonControl1.Size = new System.Drawing.Size(1056, 125);
            this.ribbonControl1.StatusBar = this.ribbonStatusBar1;
            this.ribbonControl1.Toolbar.ShowCustomizeItem = false;
            // 
            // btnNewTerminal
            // 
            this.btnNewTerminal.Caption = "ibet-3in1";
            this.btnNewTerminal.Enabled = false;
            this.btnNewTerminal.Id = 1;
            this.btnNewTerminal.LargeGlyph = global::iBet.App.Properties.Resources.i4;
            this.btnNewTerminal.Name = "btnNewTerminal";
            this.btnNewTerminal.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.btnNewTerminal_ItemClick);
            // 
            // btnNewTerminal2
            // 
            this.btnNewTerminal2.Caption = "ibet-sbo";
            this.btnNewTerminal2.Enabled = false;
            this.btnNewTerminal2.Id = 13;
            this.btnNewTerminal2.LargeGlyph = global::iBet.App.Properties.Resources.i9;
            this.btnNewTerminal2.Name = "btnNewTerminal2";
            this.btnNewTerminal2.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.btnNewTerminal2_ItemClick);
            // 
            // btnNewTerminal3
            // 
            this.btnNewTerminal3.Caption = "Follow Sub";
            this.btnNewTerminal3.Enabled = false;
            this.btnNewTerminal3.Id = 14;
            this.btnNewTerminal3.LargeGlyph = global::iBet.App.Properties.Resources.i10;
            this.btnNewTerminal3.Name = "btnNewTerminal3";
            this.btnNewTerminal3.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.btnNewTerminal3_ItemClick);
            // 
            // btnStart
            // 
            this.btnStart.Caption = "Start";
            this.btnStart.Enabled = false;
            this.btnStart.Id = 2;
            this.btnStart.LargeGlyph = global::iBet.App.Properties.Resources.i5;
            this.btnStart.Name = "btnStart";
            this.btnStart.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.btnStart_ItemClick);
            // 
            // btnStop
            // 
            this.btnStop.Caption = "Stop";
            this.btnStop.Enabled = false;
            this.btnStop.Id = 3;
            this.btnStop.LargeGlyph = global::iBet.App.Properties.Resources.i6;
            this.btnStop.Name = "btnStop";
            this.btnStop.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.btnStop_ItemClick);
            // 
            // btnClear
            // 
            this.btnClear.Caption = "Clear";
            this.btnClear.Enabled = false;
            this.btnClear.Glyph = global::iBet.App.Properties.Resources.i7;
            this.btnClear.Id = 4;
            this.btnClear.LargeGlyph = global::iBet.App.Properties.Resources.i7;
            this.btnClear.Name = "btnClear";
            this.btnClear.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.btnClear_ItemClick);
            // 
            // txtUsername
            // 
            this.txtUsername.Caption = "Username";
            this.txtUsername.Edit = this.repositoryItemTextEdit1;
            this.txtUsername.Id = 5;
            this.txtUsername.Name = "txtUsername";
            this.txtUsername.Width = 150;
            // 
            // repositoryItemTextEdit1
            // 
            this.repositoryItemTextEdit1.AutoHeight = false;
            this.repositoryItemTextEdit1.Name = "repositoryItemTextEdit1";
            // 
            // txtPassword
            // 
            this.txtPassword.Caption = "Password ";
            this.txtPassword.Edit = this.repositoryItemTextEdit2;
            this.txtPassword.Id = 6;
            this.txtPassword.Name = "txtPassword";
            this.txtPassword.Width = 150;
            // 
            // repositoryItemTextEdit2
            // 
            this.repositoryItemTextEdit2.AutoHeight = false;
            this.repositoryItemTextEdit2.Name = "repositoryItemTextEdit2";
            this.repositoryItemTextEdit2.PasswordChar = '*';
            // 
            // btnLogin
            // 
            this.btnLogin.Caption = "Login";
            this.btnLogin.Id = 7;
            this.btnLogin.LargeGlyph = global::iBet.App.Properties.Resources.i1;
            this.btnLogin.Name = "btnLogin";
            this.btnLogin.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.btnLogin_ItemClick);
            // 
            // btnChangePassword
            // 
            this.btnChangePassword.Caption = "Change Password";
            this.btnChangePassword.Enabled = false;
            this.btnChangePassword.Id = 8;
            this.btnChangePassword.LargeGlyph = global::iBet.App.Properties.Resources.i3;
            this.btnChangePassword.Name = "btnChangePassword";
            this.btnChangePassword.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.btnChangePassword_ItemClick);
            // 
            // btnLogout
            // 
            this.btnLogout.Caption = "Logout";
            this.btnLogout.Enabled = false;
            this.btnLogout.Id = 9;
            this.btnLogout.LargeGlyph = global::iBet.App.Properties.Resources.i2;
            this.btnLogout.Name = "btnLogout";
            this.btnLogout.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.btnLogout_ItemClick);
            // 
            // lblSystemTime
            // 
            this.lblSystemTime.Alignment = DevExpress.XtraBars.BarItemLinkAlignment.Right;
            this.lblSystemTime.Id = 10;
            this.lblSystemTime.Name = "lblSystemTime";
            this.lblSystemTime.TextAlignment = System.Drawing.StringAlignment.Near;
            // 
            // lblTotalTransaction
            // 
            this.lblTotalTransaction.Caption = "Total transaction(s): 0";
            this.lblTotalTransaction.Id = 11;
            this.lblTotalTransaction.Name = "lblTotalTransaction";
            this.lblTotalTransaction.TextAlignment = System.Drawing.StringAlignment.Near;
            // 
            // lblTotalTerminal
            // 
            this.lblTotalTerminal.Caption = "Total Terminal(s): 0";
            this.lblTotalTerminal.Id = 12;
            this.lblTotalTerminal.Name = "lblTotalTerminal";
            this.lblTotalTerminal.TextAlignment = System.Drawing.StringAlignment.Near;
            // 
            // barEditItem1
            // 
            this.barEditItem1.Caption = "barEditItem1";
            this.barEditItem1.Edit = this.repositoryItemPopupContainerEdit1;
            this.barEditItem1.Id = 15;
            this.barEditItem1.Name = "barEditItem1";
            // 
            // repositoryItemPopupContainerEdit1
            // 
            this.repositoryItemPopupContainerEdit1.AutoHeight = false;
            this.repositoryItemPopupContainerEdit1.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
            this.repositoryItemPopupContainerEdit1.Name = "repositoryItemPopupContainerEdit1";
            // 
            // ribbonGalleryBarItem1
            // 
            this.ribbonGalleryBarItem1.Caption = "ribbonGalleryBarItem1";
            this.ribbonGalleryBarItem1.Id = 17;
            this.ribbonGalleryBarItem1.Name = "ribbonGalleryBarItem1";
            // 
            // barButtonGroup1
            // 
            this.barButtonGroup1.Caption = "barButtonGroup1";
            this.barButtonGroup1.Id = 18;
            this.barButtonGroup1.Name = "barButtonGroup1";
            // 
            // barButtonGroup2
            // 
            this.barButtonGroup2.Caption = "barButtonGroup2";
            this.barButtonGroup2.Id = 19;
            this.barButtonGroup2.Name = "barButtonGroup2";
            // 
            // skinGalleryBarItem
            // 
            this.skinGalleryBarItem.Caption = "skinGalleryBarItem";
            // 
            // skinGalleryBarItem
            // 
            this.skinGalleryBarItem.Gallery.AllowHoverImages = true;
            this.skinGalleryBarItem.Gallery.FixedHoverImageSize = false;
            galleryItemGroup1.Caption = "Standard";
            galleryItemGroup2.Caption = "Bonus";
            galleryItemGroup2.Visible = false;
            galleryItemGroup3.Caption = "Office";
            galleryItemGroup3.Visible = false;
            this.skinGalleryBarItem.Gallery.Groups.AddRange(new DevExpress.XtraBars.Ribbon.GalleryItemGroup[] {
            galleryItemGroup1,
            galleryItemGroup2,
            galleryItemGroup3});
            this.skinGalleryBarItem.Gallery.ImageSize = new System.Drawing.Size(58, 43);
            this.skinGalleryBarItem.Gallery.ItemCheckMode = DevExpress.XtraBars.Ribbon.Gallery.ItemCheckMode.SingleRadio;
            this.skinGalleryBarItem.Id = 1;
            this.skinGalleryBarItem.Name = "skinGalleryBarItem";
            // 
            // ribbonPage1
            // 
            this.ribbonPage1.Groups.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPageGroup[] {
            this.ribbonPageGroup3,
            this.ribbonPageGroup1,
            this.ribbonPageGroup2,
            this.ribbonPageGroup5});
            this.ribbonPage1.Name = "ribbonPage1";
            this.ribbonPage1.Text = "Terminal";
            // 
            // ribbonPageGroup3
            // 
            this.ribbonPageGroup3.ItemLinks.Add(this.txtUsername);
            this.ribbonPageGroup3.ItemLinks.Add(this.txtPassword);
            this.ribbonPageGroup3.ItemLinks.Add(this.btnLogin);
            this.ribbonPageGroup3.ItemLinks.Add(this.btnChangePassword);
            this.ribbonPageGroup3.ItemLinks.Add(this.btnLogout);
            this.ribbonPageGroup3.Name = "ribbonPageGroup3";
            this.ribbonPageGroup3.ShowCaptionButton = false;
            this.ribbonPageGroup3.Text = "Authentication";
            // 
            // ribbonPageGroup1
            // 
            this.ribbonPageGroup1.ItemLinks.Add(this.btnNewTerminal);
            this.ribbonPageGroup1.ItemLinks.Add(this.btnNewTerminal2);
            this.ribbonPageGroup1.ItemLinks.Add(this.btnNewTerminal3);
            this.ribbonPageGroup1.ItemLinks.Add(this.btnStart);
            this.ribbonPageGroup1.ItemLinks.Add(this.btnStop);
            this.ribbonPageGroup1.Name = "ribbonPageGroup1";
            this.ribbonPageGroup1.ShowCaptionButton = false;
            this.ribbonPageGroup1.Text = "Terminal";
            // 
            // ribbonPageGroup2
            // 
            this.ribbonPageGroup2.ItemLinks.Add(this.btnClear);
            this.ribbonPageGroup2.Name = "ribbonPageGroup2";
            this.ribbonPageGroup2.ShowCaptionButton = false;
            this.ribbonPageGroup2.Text = "Tracking";
            // 
            // ribbonPageGroup5
            // 
            this.ribbonPageGroup5.ItemLinks.Add(this.skinGalleryBarItem);
            this.ribbonPageGroup5.Name = "ribbonPageGroup5";
            this.ribbonPageGroup5.Text = "Skins";
            // 
            // ribbonStatusBar1
            // 
            this.ribbonStatusBar1.ItemLinks.Add(this.lblSystemTime);
            this.ribbonStatusBar1.ItemLinks.Add(this.lblTotalTerminal);
            this.ribbonStatusBar1.ItemLinks.Add(this.lblTotalTransaction);
            this.ribbonStatusBar1.Location = new System.Drawing.Point(0, 617);
            this.ribbonStatusBar1.Name = "ribbonStatusBar1";
            this.ribbonStatusBar1.Ribbon = this.ribbonControl1;
            this.ribbonStatusBar1.Size = new System.Drawing.Size(1056, 31);
            // 
            // splitContainerControl1
            // 
            this.splitContainerControl1.Dock = System.Windows.Forms.DockStyle.Fill;
            this.splitContainerControl1.FixedPanel = DevExpress.XtraEditors.SplitFixedPanel.Panel2;
            this.splitContainerControl1.Horizontal = false;
            this.splitContainerControl1.Location = new System.Drawing.Point(0, 125);
            this.splitContainerControl1.Name = "splitContainerControl1";
            this.splitContainerControl1.Panel1.Controls.Add(this.xtraTabControl1);
            this.splitContainerControl1.Panel1.Text = "Panel1";
            this.splitContainerControl1.Panel2.Controls.Add(this.xtraTabControl2);
            this.splitContainerControl1.Panel2.Text = "Panel2";
            this.splitContainerControl1.Size = new System.Drawing.Size(1056, 492);
            this.splitContainerControl1.SplitterPosition = 44;
            this.splitContainerControl1.TabIndex = 1;
            this.splitContainerControl1.Text = "splitContainerControl1";
            // 
            // xtraTabControl1
            // 
            this.xtraTabControl1.Dock = System.Windows.Forms.DockStyle.Fill;
            this.xtraTabControl1.Location = new System.Drawing.Point(0, 0);
            this.xtraTabControl1.Name = "xtraTabControl1";
            this.xtraTabControl1.SelectedTabPage = this.xtraTabPage1;
            this.xtraTabControl1.Size = new System.Drawing.Size(1056, 443);
            this.xtraTabControl1.TabIndex = 0;
            this.xtraTabControl1.TabPages.AddRange(new DevExpress.XtraTab.XtraTabPage[] {
            this.xtraTabPage1,
            this.xtraTabPage3,
            this.xtraTabPage5});
            // 
            // xtraTabPage1
            // 
            this.xtraTabPage1.Controls.Add(this.grdTransaction);
            this.xtraTabPage1.Controls.Add(this.panelControl3);
            this.xtraTabPage1.Controls.Add(this.panelControl4);
            this.xtraTabPage1.Name = "xtraTabPage1";
            this.xtraTabPage1.Size = new System.Drawing.Size(1050, 417);
            this.xtraTabPage1.Text = "Transactions";
            // 
            // grdTransaction
            // 
            this.grdTransaction.Dock = System.Windows.Forms.DockStyle.Fill;
            this.grdTransaction.EmbeddedNavigator.ShowToolTips = false;
            this.grdTransaction.Location = new System.Drawing.Point(0, 0);
            this.grdTransaction.MainView = this.gridView2;
            this.grdTransaction.Name = "grdTransaction";
            this.grdTransaction.Size = new System.Drawing.Size(1050, 417);
            this.grdTransaction.TabIndex = 7;
            this.grdTransaction.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
            this.gridView2});
            // 
            // gridView2
            // 
            this.gridView2.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] {
            this.gridColumn1,
            this.gridColumn8,
            this.gridColumn2,
            this.gridColumn3,
            this.gridColumn6,
            this.gridColumn4,
            this.gridColumn5,
            this.gridColumn7,
            this.gridColumn10,
            this.gridColumn11,
            this.gridColumn12,
            this.gridColumn9,
            this.gridColumn14,
            this.gridColumn15,
            this.gridColumn13});
            this.gridView2.FocusRectStyle = DevExpress.XtraGrid.Views.Grid.DrawFocusRectStyle.RowFocus;
            this.gridView2.GridControl = this.grdTransaction;
            this.gridView2.Name = "gridView2";
            this.gridView2.OptionsBehavior.Editable = false;
            this.gridView2.OptionsCustomization.AllowGroup = false;
            this.gridView2.OptionsMenu.EnableColumnMenu = false;
            this.gridView2.OptionsMenu.EnableFooterMenu = false;
            this.gridView2.OptionsMenu.EnableGroupPanelMenu = false;
            this.gridView2.OptionsView.HeaderFilterButtonShowMode = DevExpress.XtraEditors.Controls.FilterButtonShowMode.Button;
            this.gridView2.OptionsView.ShowAutoFilterRow = true;
            this.gridView2.OptionsView.ShowGroupPanel = false;
            this.gridView2.OptionsView.ShowPreview = true;
            this.gridView2.PreviewFieldName = "Note";
            this.gridView2.ShowButtonMode = DevExpress.XtraGrid.Views.Base.ShowButtonModeEnum.ShowForFocusedRow;
            this.gridView2.SortInfo.AddRange(new DevExpress.XtraGrid.Columns.GridColumnSortInfo[] {
            new DevExpress.XtraGrid.Columns.GridColumnSortInfo(this.gridColumn13, DevExpress.Data.ColumnSortOrder.Descending)});
            // 
            // gridColumn1
            // 
            this.gridColumn1.Caption = "ID";
            this.gridColumn1.FieldName = "ID";
            this.gridColumn1.Name = "gridColumn1";
            this.gridColumn1.OptionsColumn.AllowFocus = false;
            this.gridColumn1.OptionsColumn.AllowMove = false;
            this.gridColumn1.OptionsColumn.AllowSize = false;
            this.gridColumn1.OptionsColumn.FixedWidth = true;
            this.gridColumn1.Visible = true;
            this.gridColumn1.VisibleIndex = 0;
            this.gridColumn1.Width = 30;
            // 
            // gridColumn8
            // 
            this.gridColumn8.Caption = "Account Pair";
            this.gridColumn8.FieldName = "AccountPair";
            this.gridColumn8.Name = "gridColumn8";
            this.gridColumn8.OptionsColumn.AllowFocus = false;
            this.gridColumn8.OptionsColumn.FixedWidth = true;
            this.gridColumn8.Visible = true;
            this.gridColumn8.VisibleIndex = 1;
            this.gridColumn8.Width = 120;
            // 
            // gridColumn2
            // 
            this.gridColumn2.Caption = "Home Team";
            this.gridColumn2.FieldName = "HomeTeamName";
            this.gridColumn2.Name = "gridColumn2";
            this.gridColumn2.OptionsColumn.AllowFocus = false;
            this.gridColumn2.UnboundType = DevExpress.Data.UnboundColumnType.String;
            this.gridColumn2.Visible = true;
            this.gridColumn2.VisibleIndex = 2;
            this.gridColumn2.Width = 107;
            // 
            // gridColumn3
            // 
            this.gridColumn3.Caption = "Away Team";
            this.gridColumn3.FieldName = "AwayTeamName";
            this.gridColumn3.Name = "gridColumn3";
            this.gridColumn3.OptionsColumn.AllowFocus = false;
            this.gridColumn3.UnboundType = DevExpress.Data.UnboundColumnType.String;
            this.gridColumn3.Visible = true;
            this.gridColumn3.VisibleIndex = 3;
            this.gridColumn3.Width = 119;
            // 
            // gridColumn6
            // 
            this.gridColumn6.Caption = "Type";
            this.gridColumn6.FieldName = "OddType";
            this.gridColumn6.Name = "gridColumn6";
            this.gridColumn6.OptionsColumn.AllowFocus = false;
            this.gridColumn6.OptionsColumn.FixedWidth = true;
            this.gridColumn6.UnboundType = DevExpress.Data.UnboundColumnType.String;
            this.gridColumn6.Visible = true;
            this.gridColumn6.VisibleIndex = 4;
            this.gridColumn6.Width = 150;
            // 
            // gridColumn4
            // 
            this.gridColumn4.Caption = "Odd";
            this.gridColumn4.FieldName = "OddKindValue";
            this.gridColumn4.Name = "gridColumn4";
            this.gridColumn4.OptionsColumn.AllowFocus = false;
            this.gridColumn4.OptionsColumn.FixedWidth = true;
            this.gridColumn4.UnboundType = DevExpress.Data.UnboundColumnType.String;
            this.gridColumn4.Visible = true;
            this.gridColumn4.VisibleIndex = 5;
            this.gridColumn4.Width = 60;
            // 
            // gridColumn5
            // 
            this.gridColumn5.Caption = "Value";
            this.gridColumn5.FieldName = "OddValue";
            this.gridColumn5.Name = "gridColumn5";
            this.gridColumn5.OptionsColumn.AllowFocus = false;
            this.gridColumn5.OptionsColumn.FixedWidth = true;
            this.gridColumn5.UnboundType = DevExpress.Data.UnboundColumnType.String;
            this.gridColumn5.Visible = true;
            this.gridColumn5.VisibleIndex = 6;
            this.gridColumn5.Width = 60;
            // 
            // gridColumn7
            // 
            this.gridColumn7.Caption = "Stake";
            this.gridColumn7.FieldName = "Stake";
            this.gridColumn7.Name = "gridColumn7";
            this.gridColumn7.OptionsColumn.AllowFocus = false;
            this.gridColumn7.OptionsColumn.FixedWidth = true;
            this.gridColumn7.UnboundType = DevExpress.Data.UnboundColumnType.String;
            this.gridColumn7.Visible = true;
            this.gridColumn7.VisibleIndex = 7;
            this.gridColumn7.Width = 60;
            // 
            // gridColumn10
            // 
            this.gridColumn10.Caption = "I";
            this.gridColumn10.FieldName = "IBETTrade";
            this.gridColumn10.Name = "gridColumn10";
            this.gridColumn10.OptionsColumn.AllowFocus = false;
            this.gridColumn10.OptionsColumn.FixedWidth = true;
            this.gridColumn10.UnboundType = DevExpress.Data.UnboundColumnType.Boolean;
            this.gridColumn10.Visible = true;
            this.gridColumn10.VisibleIndex = 8;
            this.gridColumn10.Width = 30;
            // 
            // gridColumn11
            // 
            this.gridColumn11.Caption = "3";
            this.gridColumn11.FieldName = "THREEIN1Trade";
            this.gridColumn11.Name = "gridColumn11";
            this.gridColumn11.OptionsColumn.AllowFocus = false;
            this.gridColumn11.OptionsColumn.FixedWidth = true;
            this.gridColumn11.UnboundType = DevExpress.Data.UnboundColumnType.Boolean;
            this.gridColumn11.Visible = true;
            this.gridColumn11.VisibleIndex = 9;
            this.gridColumn11.Width = 30;
            // 
            // gridColumn12
            // 
            this.gridColumn12.Caption = "3 Re";
            this.gridColumn12.FieldName = "THREEIN1ReTrade";
            this.gridColumn12.Name = "gridColumn12";
            this.gridColumn12.OptionsColumn.AllowFocus = false;
            this.gridColumn12.OptionsColumn.FixedWidth = true;
            this.gridColumn12.UnboundType = DevExpress.Data.UnboundColumnType.Boolean;
            this.gridColumn12.Visible = true;
            this.gridColumn12.VisibleIndex = 11;
            this.gridColumn12.Width = 30;
            // 
            // gridColumn9
            // 
            this.gridColumn9.Caption = "I Re";
            this.gridColumn9.FieldName = "IBETReTrade";
            this.gridColumn9.Name = "gridColumn9";
            this.gridColumn9.OptionsColumn.AllowFocus = false;
            this.gridColumn9.OptionsColumn.FixedWidth = true;
            this.gridColumn9.Visible = true;
            this.gridColumn9.VisibleIndex = 12;
            this.gridColumn9.Width = 30;
            // 
            // gridColumn14
            // 
            this.gridColumn14.Caption = "B";
            this.gridColumn14.FieldName = "SBOBETTrade";
            this.gridColumn14.Name = "gridColumn14";
            this.gridColumn14.OptionsColumn.AllowFocus = false;
            this.gridColumn14.OptionsColumn.FixedWidth = true;
            this.gridColumn14.UnboundType = DevExpress.Data.UnboundColumnType.Boolean;
            this.gridColumn14.Visible = true;
            this.gridColumn14.VisibleIndex = 10;
            this.gridColumn14.Width = 30;
            // 
            // gridColumn15
            // 
            this.gridColumn15.Caption = "B Re";
            this.gridColumn15.FieldName = "SBOBETReTrade";
            this.gridColumn15.Name = "gridColumn15";
            this.gridColumn15.OptionsColumn.AllowFocus = false;
            this.gridColumn15.OptionsColumn.FixedWidth = true;
            this.gridColumn15.UnboundType = DevExpress.Data.UnboundColumnType.Boolean;
            this.gridColumn15.Visible = true;
            this.gridColumn15.VisibleIndex = 13;
            this.gridColumn15.Width = 30;
            // 
            // gridColumn13
            // 
            this.gridColumn13.Caption = "DateTime";
            this.gridColumn13.DisplayFormat.FormatString = "dd/MM/yyyy hh:mm:ss";
            this.gridColumn13.DisplayFormat.FormatType = DevExpress.Utils.FormatType.DateTime;
            this.gridColumn13.FieldName = "DateTime";
            this.gridColumn13.Name = "gridColumn13";
            this.gridColumn13.OptionsColumn.AllowFocus = false;
            this.gridColumn13.OptionsColumn.FixedWidth = true;
            this.gridColumn13.SortMode = DevExpress.XtraGrid.ColumnSortMode.Value;
            this.gridColumn13.Summary.AddRange(new DevExpress.XtraGrid.GridSummaryItem[] {
            new DevExpress.XtraGrid.GridColumnSummaryItem(DevExpress.Data.SummaryItemType.Count)});
            this.gridColumn13.UnboundType = DevExpress.Data.UnboundColumnType.DateTime;
            this.gridColumn13.Visible = true;
            this.gridColumn13.VisibleIndex = 14;
            this.gridColumn13.Width = 150;
            // 
            // panelControl3
            // 
            this.panelControl3.Location = new System.Drawing.Point(0, 0);
            this.panelControl3.Name = "panelControl3";
            this.panelControl3.Size = new System.Drawing.Size(200, 100);
            this.panelControl3.TabIndex = 8;
            // 
            // panelControl4
            // 
            this.panelControl4.Location = new System.Drawing.Point(0, 0);
            this.panelControl4.Name = "panelControl4";
            this.panelControl4.Size = new System.Drawing.Size(200, 100);
            this.panelControl4.TabIndex = 9;
            // 
            // xtraTabPage3
            // 
            this.xtraTabPage3.Controls.Add(this.btnStatement);
            this.xtraTabPage3.Controls.Add(this.btnBetList);
            this.xtraTabPage3.Controls.Add(this.cbeSignatureTemplate);
            this.xtraTabPage3.Controls.Add(this.panelControl1);
            this.xtraTabPage3.Name = "xtraTabPage3";
            this.xtraTabPage3.Size = new System.Drawing.Size(1050, 417);
            this.xtraTabPage3.Text = "Bet List - Statement";
            // 
            // btnStatement
            // 
            this.btnStatement.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
            this.btnStatement.Location = new System.Drawing.Point(295, 391);
            this.btnStatement.Name = "btnStatement";
            this.btnStatement.Size = new System.Drawing.Size(99, 23);
            this.btnStatement.TabIndex = 7;
            this.btnStatement.Text = "Statement";
            this.btnStatement.Click += new System.EventHandler(this.btnStatement_Click);
            // 
            // btnBetList
            // 
            this.btnBetList.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
            this.btnBetList.Location = new System.Drawing.Point(198, 391);
            this.btnBetList.Name = "btnBetList";
            this.btnBetList.Size = new System.Drawing.Size(91, 23);
            this.btnBetList.TabIndex = 6;
            this.btnBetList.Text = "Refresh";
            this.btnBetList.Click += new System.EventHandler(this.btnRefresh_Click);
            // 
            // cbeSignatureTemplate
            // 
            this.cbeSignatureTemplate.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
            this.cbeSignatureTemplate.EditValue = "Select account pair";
            this.cbeSignatureTemplate.Location = new System.Drawing.Point(3, 394);
            this.cbeSignatureTemplate.Name = "cbeSignatureTemplate";
            this.cbeSignatureTemplate.Properties.AllowNullInput = DevExpress.Utils.DefaultBoolean.False;
            this.cbeSignatureTemplate.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
            this.cbeSignatureTemplate.Properties.DropDownRows = 10;
            this.cbeSignatureTemplate.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor;
            this.cbeSignatureTemplate.Size = new System.Drawing.Size(189, 20);
            this.cbeSignatureTemplate.TabIndex = 5;
            // 
            // panelControl1
            // 
            this.panelControl1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
            | System.Windows.Forms.AnchorStyles.Left) 
            | System.Windows.Forms.AnchorStyles.Right)));
            this.panelControl1.Controls.Add(this.webBrowser2);
            this.panelControl1.Controls.Add(this.splitter1);
            this.panelControl1.Controls.Add(this.webBrowser1);
            this.panelControl1.Location = new System.Drawing.Point(2, 3);
            this.panelControl1.Name = "panelControl1";
            this.panelControl1.Size = new System.Drawing.Size(1044, 382);
            this.panelControl1.TabIndex = 3;
            // 
            // webBrowser2
            // 
            this.webBrowser2.Dock = System.Windows.Forms.DockStyle.Fill;
            this.webBrowser2.Location = new System.Drawing.Point(364, 2);
            this.webBrowser2.MinimumSize = new System.Drawing.Size(20, 20);
            this.webBrowser2.Name = "webBrowser2";
            this.webBrowser2.Size = new System.Drawing.Size(678, 378);
            this.webBrowser2.TabIndex = 2;
            this.webBrowser2.Url = new System.Uri("", System.UriKind.Relative);
            // 
            // splitter1
            // 
            this.splitter1.Location = new System.Drawing.Point(361, 2);
            this.splitter1.Name = "splitter1";
            this.splitter1.Size = new System.Drawing.Size(3, 378);
            this.splitter1.TabIndex = 1;
            this.splitter1.TabStop = false;
            // 
            // webBrowser1
            // 
            this.webBrowser1.Dock = System.Windows.Forms.DockStyle.Left;
            this.webBrowser1.Location = new System.Drawing.Point(2, 2);
            this.webBrowser1.MinimumSize = new System.Drawing.Size(20, 20);
            this.webBrowser1.Name = "webBrowser1";
            this.webBrowser1.Size = new System.Drawing.Size(359, 378);
            this.webBrowser1.TabIndex = 0;
            this.webBrowser1.Url = new System.Uri("", System.UriKind.Relative);
            // 
            // xtraTabPage5
            // 
            this.xtraTabPage5.Controls.Add(this.panelControl2);
            this.xtraTabPage5.Name = "xtraTabPage5";
            this.xtraTabPage5.Size = new System.Drawing.Size(1050, 417);
            this.xtraTabPage5.Text = "Settings";
            // 
            // panelControl2
            // 
            this.panelControl2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
            | System.Windows.Forms.AnchorStyles.Left) 
            | System.Windows.Forms.AnchorStyles.Right)));
            this.panelControl2.Controls.Add(this.textEdit4);
            this.panelControl2.Controls.Add(this.chkSCloud);
            this.panelControl2.Controls.Add(this.simpleButton2);
            this.panelControl2.Controls.Add(this.textEdit3);
            this.panelControl2.Controls.Add(this.textEdit2);
            this.panelControl2.Controls.Add(this.textEdit1);
            this.panelControl2.Controls.Add(this.simpleButton1);
            this.panelControl2.Controls.Add(this.label4);
            this.panelControl2.Controls.Add(this.label3);
            this.panelControl2.Controls.Add(this.label2);
            this.panelControl2.Controls.Add(this.label1);
            this.panelControl2.Controls.Add(this.chkRCloud);
            this.panelControl2.Controls.Add(this.btnSignMeIn);
            this.panelControl2.Controls.Add(this.txtServerIP);
            this.panelControl2.Controls.Add(this.txtServerUserName);
            this.panelControl2.Controls.Add(this.txtServerPassword);
            this.panelControl2.Controls.Add(this.pictureEdit1);
            this.panelControl2.Location = new System.Drawing.Point(3, 3);
            this.panelControl2.Name = "panelControl2";
            this.panelControl2.Size = new System.Drawing.Size(1044, 497);
            this.panelControl2.TabIndex = 0;
            // 
            // textEdit4
            // 
            this.textEdit4.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
            | System.Windows.Forms.AnchorStyles.Left) 
            | System.Windows.Forms.AnchorStyles.Right)));
            this.textEdit4.Location = new System.Drawing.Point(244, 5);
            this.textEdit4.Name = "textEdit4";
            this.textEdit4.Size = new System.Drawing.Size(408, 406);
            this.textEdit4.TabIndex = 18;
            // 
            // chkSCloud
            // 
            this.chkSCloud.EditValue = true;
            this.chkSCloud.Location = new System.Drawing.Point(13, 27);
            this.chkSCloud.Name = "chkSCloud";
            this.chkSCloud.Properties.Caption = "S cloud";
            this.chkSCloud.Size = new System.Drawing.Size(86, 19);
            this.chkSCloud.TabIndex = 17;
            // 
            // simpleButton2
            // 
            this.simpleButton2.Location = new System.Drawing.Point(130, 307);
            this.simpleButton2.Name = "simpleButton2";
            this.simpleButton2.Size = new System.Drawing.Size(97, 23);
            this.simpleButton2.TabIndex = 16;
            this.simpleButton2.Text = "Set";
            this.simpleButton2.Click += new System.EventHandler(this.simpleButton2_Click);
            // 
            // textEdit3
            // 
            this.textEdit3.EditValue = "0";
            this.textEdit3.Location = new System.Drawing.Point(94, 216);
            this.textEdit3.Name = "textEdit3";
            this.textEdit3.Size = new System.Drawing.Size(142, 20);
            this.textEdit3.TabIndex = 15;
            // 
            // textEdit2
            // 
            this.textEdit2.Location = new System.Drawing.Point(94, 268);
            this.textEdit2.Name = "textEdit2";
            this.textEdit2.Size = new System.Drawing.Size(142, 20);
            this.textEdit2.TabIndex = 14;
            // 
            // textEdit1
            // 
            this.textEdit1.Location = new System.Drawing.Point(94, 241);
            this.textEdit1.Name = "textEdit1";
            this.textEdit1.Size = new System.Drawing.Size(142, 20);
            this.textEdit1.TabIndex = 13;
            // 
            // simpleButton1
            // 
            this.simpleButton1.Location = new System.Drawing.Point(18, 307);
            this.simpleButton1.Name = "simpleButton1";
            this.simpleButton1.Size = new System.Drawing.Size(97, 23);
            this.simpleButton1.TabIndex = 12;
            this.simpleButton1.Text = "Get";
            this.simpleButton1.Click += new System.EventHandler(this.simpleButton1_Click);
            // 
            // label4
            // 
            this.label4.AutoSize = true;
            this.label4.Location = new System.Drawing.Point(12, 176);
            this.label4.Name = "label4";
            this.label4.Size = new System.Drawing.Size(0, 13);
            this.label4.TabIndex = 11;
            // 
            // label3
            // 
            this.label3.AutoSize = true;
            this.label3.Location = new System.Drawing.Point(11, 140);
            this.label3.Name = "label3";
            this.label3.Size = new System.Drawing.Size(53, 13);
            this.label3.TabIndex = 10;
            this.label3.Text = "Password";
            // 
            // label2
            // 
            this.label2.AutoSize = true;
            this.label2.Location = new System.Drawing.Point(11, 113);
            this.label2.Name = "label2";
            this.label2.Size = new System.Drawing.Size(55, 13);
            this.label2.TabIndex = 9;
            this.label2.Text = "Username";
            // 
            // label1
            // 
            this.label1.AutoSize = true;
            this.label1.Location = new System.Drawing.Point(11, 86);
            this.label1.Name = "label1";
            this.label1.Size = new System.Drawing.Size(81, 13);
            this.label1.TabIndex = 8;
            this.label1.Text = "Server Address";
            // 
            // chkRCloud
            // 
            this.chkRCloud.EditValue = true;
            this.chkRCloud.Location = new System.Drawing.Point(12, 53);
            this.chkRCloud.Name = "chkRCloud";
            this.chkRCloud.Properties.Caption = "R cloud";
            this.chkRCloud.Size = new System.Drawing.Size(86, 19);
            this.chkRCloud.TabIndex = 7;
            this.chkRCloud.CheckedChanged += new System.EventHandler(this.chbCloud_CheckedChanged);
            // 
            // btnSignMeIn
            // 
            this.btnSignMeIn.Location = new System.Drawing.Point(154, 171);
            this.btnSignMeIn.Name = "btnSignMeIn";
            this.btnSignMeIn.Size = new System.Drawing.Size(75, 23);
            this.btnSignMeIn.TabIndex = 3;
            this.btnSignMeIn.Text = "Sign me in";
            this.btnSignMeIn.Click += new System.EventHandler(this.btnSignMeIn_Click);
            // 
            // txtServerIP
            // 
            this.txtServerIP.EditValue = "115.84.178.100";
            this.txtServerIP.Location = new System.Drawing.Point(95, 83);
            this.txtServerIP.Name = "txtServerIP";
            this.txtServerIP.Size = new System.Drawing.Size(142, 20);
            this.txtServerIP.TabIndex = 4;
            // 
            // txtServerUserName
            // 
            this.txtServerUserName.EditValue = "tuns";
            this.txtServerUserName.Location = new System.Drawing.Point(95, 110);
            this.txtServerUserName.Name = "txtServerUserName";
            this.txtServerUserName.Size = new System.Drawing.Size(142, 20);
            this.txtServerUserName.TabIndex = 5;
            // 
            // txtServerPassword
            // 
            this.txtServerPassword.EditValue = "anhkomuonradi";
            this.txtServerPassword.Location = new System.Drawing.Point(95, 137);
            this.txtServerPassword.Name = "txtServerPassword";
            this.txtServerPassword.Properties.UseSystemPasswordChar = true;
            this.txtServerPassword.Size = new System.Drawing.Size(142, 20);
            this.txtServerPassword.TabIndex = 6;
            // 
            // pictureEdit1
            // 
            this.pictureEdit1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
            this.pictureEdit1.EditValue = ((object)(resources.GetObject("pictureEdit1.EditValue")));
            this.pictureEdit1.Location = new System.Drawing.Point(658, 5);
            this.pictureEdit1.Name = "pictureEdit1";
            this.pictureEdit1.Properties.AllowFocused = false;
            this.pictureEdit1.Properties.Appearance.BackColor = System.Drawing.Color.Transparent;
            this.pictureEdit1.Properties.Appearance.Options.UseBackColor = true;
            this.pictureEdit1.Properties.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder;
            this.pictureEdit1.Properties.PictureAlignment = System.Drawing.ContentAlignment.TopLeft;
            this.pictureEdit1.Properties.ShowMenu = false;
            this.pictureEdit1.Size = new System.Drawing.Size(382, 448);
            this.pictureEdit1.TabIndex = 2;
            // 
            // xtraTabControl2
            // 
            this.xtraTabControl2.Dock = System.Windows.Forms.DockStyle.Fill;
            this.xtraTabControl2.Location = new System.Drawing.Point(0, 0);
            this.xtraTabControl2.Name = "xtraTabControl2";
            this.xtraTabControl2.SelectedTabPage = this.xtraTabPage2;
            this.xtraTabControl2.Size = new System.Drawing.Size(1056, 44);
            this.xtraTabControl2.TabIndex = 1;
            this.xtraTabControl2.TabPages.AddRange(new DevExpress.XtraTab.XtraTabPage[] {
            this.xtraTabPage2,
            this.xtraTabPage4});
            // 
            // xtraTabPage2
            // 
            this.xtraTabPage2.Name = "xtraTabPage2";
            this.xtraTabPage2.Size = new System.Drawing.Size(1050, 18);
            this.xtraTabPage2.Text = "Waiting list";
            // 
            // xtraTabPage4
            // 
            this.xtraTabPage4.Name = "xtraTabPage4";
            this.xtraTabPage4.Size = new System.Drawing.Size(1050, 18);
            this.xtraTabPage4.Text = "Clones monitor";
            // 
            // ribbonPageGroup4
            // 
            this.ribbonPageGroup4.ItemLinks.Add(this.btnClear);
            this.ribbonPageGroup4.Name = "ribbonPageGroup4";
            this.ribbonPageGroup4.ShowCaptionButton = false;
            this.ribbonPageGroup4.Text = "Tracking";
            // 
            // MainForm
            // 
            this.AutoHideRibbon = false;
            this.ClientSize = new System.Drawing.Size(1056, 648);
            this.Controls.Add(this.splitContainerControl1);
            this.Controls.Add(this.ribbonStatusBar1);
            this.Controls.Add(this.ribbonControl1);
            this.Icon = global::iBet.App.Properties.Resources.BetBrokerLogo;
            this.Name = "MainForm";
            this.Ribbon = this.ribbonControl1;
            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
            this.StatusBar = this.ribbonStatusBar1;
            this.Text = "Bet Broker";
            this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
            ((System.ComponentModel.ISupportInitialize)(this.ribbonControl1)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.repositoryItemTextEdit1)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.repositoryItemTextEdit2)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.repositoryItemPopupContainerEdit1)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.splitContainerControl1)).EndInit();
            this.splitContainerControl1.ResumeLayout(false);
            ((System.ComponentModel.ISupportInitialize)(this.xtraTabControl1)).EndInit();
            this.xtraTabControl1.ResumeLayout(false);
            this.xtraTabPage1.ResumeLayout(false);
            ((System.ComponentModel.ISupportInitialize)(this.grdTransaction)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.gridView2)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.panelControl3)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.panelControl4)).EndInit();
            this.xtraTabPage3.ResumeLayout(false);
            ((System.ComponentModel.ISupportInitialize)(this.cbeSignatureTemplate.Properties)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.panelControl1)).EndInit();
            this.panelControl1.ResumeLayout(false);
            this.xtraTabPage5.ResumeLayout(false);
            ((System.ComponentModel.ISupportInitialize)(this.panelControl2)).EndInit();
            this.panelControl2.ResumeLayout(false);
            this.panelControl2.PerformLayout();
            ((System.ComponentModel.ISupportInitialize)(this.textEdit4.Properties)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.chkSCloud.Properties)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.textEdit3.Properties)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.textEdit2.Properties)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.textEdit1.Properties)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.chkRCloud.Properties)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.txtServerIP.Properties)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.txtServerUserName.Properties)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.txtServerPassword.Properties)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.pictureEdit1.Properties)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.xtraTabControl2)).EndInit();
            this.xtraTabControl2.ResumeLayout(false);
            this.ResumeLayout(false);

		}
예제 #40
0
        private static BarEditItem AddTuyBienCot(BarManager barManager, LinksInfo linksInfo, string caption,
            GridView gridView, GridColumn[] excludeColumns,
            params string[] defaultColumns)
        {
            var repositoryItemCheckedCotHienThi = new RepositoryItemCheckedComboBoxEdit
                                                      {
                                                          AutoHeight = false,
                                                          BestFitWidth = 180,
                                                          Name = "repositoryItemCheckedCotHienThi"
                                                      };
            //
            // repositoryItemCheckedCotHienThi
            //

            //
            var barEditItemCotHienThi = new BarEditItem
                                            {
                                                Caption = string.IsNullOrEmpty(caption) ? "&Cột hiển thị" : caption,
                                                Edit = repositoryItemCheckedCotHienThi,
                                                Name = "barEditItem1",
                                                PaintStyle = BarItemPaintStyle.CaptionGlyph,
                                                Width = 200
                                            };
            //
            // barEditItemCotHienThi
            //
            //
            barManager.Items.Add(barEditItemCotHienThi);
            barManager.RepositoryItems.AddRange(new RepositoryItem[]
                                                    {
                                                        repositoryItemCheckedCotHienThi
                                                    });
            //
            linksInfo.Add(new LinkPersistInfo(barEditItemCotHienThi, true));
            //Gán. các cột vào CheckedComboBox
            var columns = gridView.Columns.Cast<GridColumn>().OrderBy(cl => cl.Caption);
            if (excludeColumns == null || excludeColumns.Length == 0)
            {
                foreach (GridColumn column in columns)
                {
                    //repositoryItemCheckedCotHienThi.Items.Add(column.Name, column.Caption);
                    repositoryItemCheckedCotHienThi.Items.Add(column,
                                                              !string.IsNullOrEmpty(column.CustomizationCaption)
                                                                  ? column.CustomizationCaption
                                                                  : column.Caption);
                }
            }
            else
            {
                var listExcludeCol = new List<GridColumn>(excludeColumns);
                foreach (GridColumn column in columns)
                {
                    if (listExcludeCol.Any(c => c.Name == column.Name))
                    {
                        column.Visible = false;
                        column.OptionsColumn.AllowShowHide = false;
                        continue;
                    }
                    //repositoryItemCheckedCotHienThi.Items.Add(column.Name, column.Caption);
                    repositoryItemCheckedCotHienThi.Items.Add(column,
                                                              !string.IsNullOrEmpty(column.CustomizationCaption)
                                                                  ? column.CustomizationCaption
                                                                  : column.Caption);

                }
            }

            //-------------------------------
            //
            repositoryItemCheckedCotHienThi.CloseUp += delegate(object sender, CloseUpEventArgs e)
                                                           {
                                                               var value = new StringBuilder();
                                                               foreach (
                                                                   CheckedListBoxItem item in
                                                                       (sender as CheckedComboBoxEdit).Properties.Items)
                                                               {
                                                                   if (item.CheckState == CheckState.Checked)
                                                                   {
                                                                       value.Append(" " + item.Description +
                                                                                    (sender as CheckedComboBoxEdit).
                                                                                        Properties.SeparatorChar.
                                                                                        ToString());
                                                                       ((GridColumn)item.Value).Visible = true;
                                                                   }
                                                                   else
                                                                   {
                                                                       ((GridColumn)item.Value).Visible = false;
                                                                   }
                                                               }
                                                               e.Value = value.Length > 0
                                                                             ? value.ToString().Remove(value.Length - 1)
                                                                             : string.Empty;
                                                               gridView.BestFitColumns();
                                                           };
            //
            //Kiểm tra đã tồn tại layout cho gridView
            var str = new StringBuilder(FrameworkParams.currentUser.username);
            str.Append(gridView.GridControl.FindForm().Name + gridView.GridControl.Name +
                       gridView.Name);
            var listFile = new List<FileInfo>(new DirectoryInfo(FrameworkParams.LAYOUT_FOLDER).GetFiles());
            if (listFile.Exists(delegate(FileInfo e)
                                    {
                                        if (e.Name.Length >= str.Length)
                                            return
                                                String.CompareOrdinal(str.ToString(), e.Name.Substring(0, str.Length)) ==
                                                0;
                                        return false;
                                    }))
            {
                defaultColumns = null;
                gridView.GridControl.Load += delegate
                                                 {
                                                     var displayText = new StringBuilder();
                                                     var listDefaultColumn =
                                                         (from GridColumn column in gridView.Columns
                                                          where column.Visible || column.GroupIndex >= 0
                                                          select column.Name).ToList();
                                                     for (int i = 0;
                                                          i < repositoryItemCheckedCotHienThi.Items.Count;
                                                          i++)
                                                     {
                                                         var temp =
                                                             (GridColumn)repositoryItemCheckedCotHienThi.Items[i].Value;
                                                         if (listDefaultColumn.Contains(temp.Name))
                                                         {
                                                             repositoryItemCheckedCotHienThi.Items[i].CheckState =
                                                                 CheckState.Checked;
                                                             displayText.Append(" " +
                                                                                repositoryItemCheckedCotHienThi.Items[i]
                                                                                    .Description +
                                                                                repositoryItemCheckedCotHienThi.
                                                                                    SeparatorChar.ToString());
                                                             temp.Visible = true;
                                                         }
                                                         else temp.Visible = false;
                                                     }
                                                     if (displayText.ToString() != string.Empty)
                                                         barEditItemCotHienThi.EditValue =
                                                             displayText.ToString().Remove(displayText.Length - 1);
                                                     repositoryItemCheckedCotHienThi.
                                                         SynchronizeEditValueWithCheckedItems = false;
                                                 };
            }
            //------------------------------
            //Set các cột hiển thị mặc định
            if (defaultColumns != null)
            {
                var listDefaultColumn = new List<string>(defaultColumns);
                var displayText = new StringBuilder();
                for (int i = 0; i < repositoryItemCheckedCotHienThi.Items.Count; i++)
                {
                    var temp = (GridColumn)repositoryItemCheckedCotHienThi.Items[i].Value;
                    if (listDefaultColumn.Contains(temp.Name))
                    {
                        repositoryItemCheckedCotHienThi.Items[i].CheckState = CheckState.Checked;
                        displayText.Append(" " + repositoryItemCheckedCotHienThi.Items[i].Description +
                                           repositoryItemCheckedCotHienThi.SeparatorChar.ToString());
                        temp.Visible = true;
                    }
                    else temp.Visible = false;
                }
                if (displayText.ToString() != string.Empty)
                    barEditItemCotHienThi.EditValue = displayText.ToString().Remove(displayText.Length - 1);
                repositoryItemCheckedCotHienThi.SynchronizeEditValueWithCheckedItems = false;

                // DisplayTheoTuyBienCot(gridView, repositoryItemCheckedCotHienThi);
            }
            gridView.ColumnPositionChanged += delegate(object sender, EventArgs e)
                                                  {
                                                      var col = (GridColumn)sender;
                                                      CheckedListBoxItem item =
                                                          repositoryItemCheckedCotHienThi.Items[col];
                                                      if (item == null) return;
                                                      item.CheckState = col.Visible
                                                                            ? CheckState.Checked
                                                                            : CheckState.Unchecked;
                                                      barEditItemCotHienThi.EditValue =
                                                          repositoryItemCheckedCotHienThi.GetCheckedItems().ToString();
                                                  };

            return barEditItemCotHienThi;
        }
예제 #41
0
 public ZoomManager(RibbonControl ribbon, ModulesNavigator modulesNavigator, BarEditItem beItem)
 {
     this.ribbon = ribbon;
     this.modulesNavigator = modulesNavigator;
     this.beiZoom = beItem;
     this.beiZoom.HiddenEditor += new DevExpress.XtraBars.ItemClickEventHandler(this.beiZoom_HiddenEditor);
     this.beiZoom.ShownEditor += new DevExpress.XtraBars.ItemClickEventHandler(this.beiZoom_ShownEditor);
 }
예제 #42
0
        public static RepositoryItemCheckedComboBoxEdit AddTuyBienCot(BarManager barManager, Bar menuBar, PivotGridControl pivot,PivotGridField[] choseFields, bool[] defaultCheck)
        {
            RepositoryItemCheckedComboBoxEdit repositoryItemCheckedCotHienThi = new RepositoryItemCheckedComboBoxEdit();
            //
            // repositoryItemCheckedCotHienThi
            //
            repositoryItemCheckedCotHienThi.AutoHeight = false;
            repositoryItemCheckedCotHienThi.BestFitWidth = 180;
            repositoryItemCheckedCotHienThi.Name = "repositoryItemCheckedCotHienThi";
            //
            BarEditItem barEditItemCotHienThi = new BarEditItem();
            //
            // barEditItemCotHienThi
            //
            barEditItemCotHienThi.Caption = "&Cột hiển thị";
            barEditItemCotHienThi.Edit = repositoryItemCheckedCotHienThi;
            barEditItemCotHienThi.Name = "barEditItem1";
            barEditItemCotHienThi.PaintStyle = DevExpress.XtraBars.BarItemPaintStyle.CaptionGlyph;
            barEditItemCotHienThi.Width = 200;
            //
            barManager.Items.Add(barEditItemCotHienThi);
            barManager.RepositoryItems.AddRange(new DevExpress.XtraEditors.Repository.RepositoryItem[] {
            repositoryItemCheckedCotHienThi});
            //
            menuBar.LinksPersistInfo.Add(new DevExpress.XtraBars.LinkPersistInfo(barEditItemCotHienThi, true));
            //Gán các cột vào CheckedComboBox
            PivotGridField field = null;
            StringBuilder text = new StringBuilder();
            for (int i = 0; i < choseFields.Length; i++)
            {
                field = choseFields[i];
                if (defaultCheck[i])
                {
                    repositoryItemCheckedCotHienThi.Items.Add(field.Name, field.Caption, CheckState.Checked, true);
                    field.Visible = true;
                    text.Append(" " + field.Caption + repositoryItemCheckedCotHienThi.SeparatorChar);

                }
                else
                {
                    repositoryItemCheckedCotHienThi.Items.Add(field.Name, field.Caption, CheckState.Unchecked, true);
                    field.Visible = false;
                }
            }
            repositoryItemCheckedCotHienThi.SynchronizeEditValueWithCheckedItems = false;
            barEditItemCotHienThi.EditValue = text.ToString().TrimEnd(repositoryItemCheckedCotHienThi.SeparatorChar);

            //-------------------------------
            //
            repositoryItemCheckedCotHienThi.CloseUp += delegate(object sender, DevExpress.XtraEditors.Controls.CloseUpEventArgs e)
            {
                StringBuilder value = new StringBuilder();
                foreach (CheckedListBoxItem item in (sender as CheckedComboBoxEdit).Properties.Items)
                {
                    if (item.CheckState == System.Windows.Forms.CheckState.Checked)
                    {
                        value.Append(" " + item.Description + (sender as CheckedComboBoxEdit).Properties.SeparatorChar.ToString());
                    }
                }
                if (value.Length > 0)
                    e.Value = value.ToString().Remove(value.Length - 1);
                else e.Value = string.Empty;
            };
            //Set các cột hiển thị mặc định
            //if (choseFields != null)
            //{
            //    List<string> listDefaultField = new List<string>(choseFields);
            //    StringBuilder displayText = new StringBuilder();
            //    for (int i = 0; i < repositoryItemCheckedCotHienThi.Items.Count; i++)
            //    {
            //        if (listDefaultField.Contains(repositoryItemCheckedCotHienThi.Items[i].Value.ToString()))
            //        {
            //            repositoryItemCheckedCotHienThi.Items[i].CheckState = System.Windows.Forms.CheckState.Checked;
            //            displayText.Append(" " + repositoryItemCheckedCotHienThi.Items[i].Description + repositoryItemCheckedCotHienThi.SeparatorChar.ToString());
            //        }
            //    }
            //    if (displayText.ToString() != string.Empty)
            //        barEditItemCotHienThi.EditValue = displayText.ToString().Remove(displayText.Length - 1);
            //    repositoryItemCheckedCotHienThi.SynchronizeEditValueWithCheckedItems = false;

            //    DisplayTheoTuyBienCot(gridView, repositoryItemCheckedCotHienThi);
            //}
            return repositoryItemCheckedCotHienThi;
        }
예제 #43
0
        private void InitRowMenu(int handel, DataRow rowHandel)
        {
            barManager1.RepositoryItems.Clear();
            barManager1.Items.Clear();
            popupMenu1.ItemLinks.Clear();

            DataRow cr = gridViewDetail.GetDataRow(handel);

            var itemCopy = new BarButtonItem(barManager1, "Sao chép dòng này")
                               {
                                   Glyph = HelpImage.getImage2020("copy.png"),
                                   ItemShortcut = new BarShortcut(Shortcut.CtrlC)
                               }; //, -1, new BarShortcut(Shortcut.CtrlC));
            var itemCut = new BarButtonItem(barManager1, "Cắt dòng này")
                              {
                                  Glyph = HelpImage.getImage2020("cut.png"),
                                  ItemShortcut = new BarShortcut(Shortcut.CtrlX)
                              };
            var itemPaste = new BarButtonItem(barManager1, "Dán tại dòng này")
                                {
                                    Glyph = HelpImage.getImage2020("paste.png"),
                                    ItemShortcut = new BarShortcut(Shortcut.CtrlV)
                                };
            var itemDelete = new BarButtonItem(barManager1, "Xóa dòng này")
                                 {
                                     Glyph = HelpImage.getImage2020("delete.png"),
                                     ItemShortcut = new BarShortcut(Shortcut.CtrlDel)
                                 };
            var itemDeleteAll = new BarButtonItem(barManager1, "Xóa cả vệt giờ này")
                                    {
                                        Glyph = HelpImage.getImage2020("deleteall.png"),
                                        ItemShortcut = new BarShortcut(Shortcut.ShiftDel)
                                    };
            var itemCopyTo = new BarSubItem(barManager1, "Sao chép dòng này đến") { Glyph = HelpImage.getImage2020("copyto.png") };
            var itemMoveTo = new BarSubItem(barManager1, "Di chuyển dòng này đến") { Glyph = HelpImage.getImage2020("moveto.png") };
            var itemCopyAllTo = new BarSubItem(barManager1,
                                               "Sao chép cả vệt " +
                                               ((DateTime)cr[KE_HOACH_LPS_CT.GIO_PHAT_SONG]).ToString("HH:mm") + " đến")
                                    {
                                        Glyph = HelpImage.getImage2020("copyallto.png")

                                    };
            var itemMoveAllTo = new BarSubItem(barManager1,
                                               "Di chuyển cả vệt " +
                                               ((DateTime)cr[KE_HOACH_LPS_CT.GIO_PHAT_SONG]).ToString("HH:mm") + " đến")
                                    {
                                        Glyph = HelpImage.getImage2020("moveallto.png")

                                    };
            var itemOpen = new BarButtonItem(barManager1, "Mở chương trình")
            {
                Glyph = FWImageDic.VIEW_IMAGE20,
                ItemShortcut = new BarShortcut(Shortcut.CtrlO)
            };
            var itemRefresh = new BarButtonItem(barManager1, "Làm mới")
            {
                Glyph = HelpImage.getImage2020("Restore.png"),
                ItemShortcut = new BarShortcut(Shortcut.F5)
            };
            var itemCopyClipboard = new BarButtonItem(barManager1, "Sao chép dòng này đến Clipboard")
                                        {

                                            Glyph = HelpImage.getImage2020("clipboard.png"),
                                            ItemShortcut = new BarShortcut(Shortcut.CtrlShiftC)
                                        };
            var itemCopyVetClipboard = new BarButtonItem(barManager1, "Sao chép cả vệt " +
                                                                      ((DateTime) cr[KE_HOACH_LPS_CT.GIO_PHAT_SONG]).
                                                                          ToString("HH:mm") + " đến Clipboard")
                                           {
                                               Glyph = HelpImage.getImage2020("clipboard.png"),
                                               ItemShortcut = new BarShortcut(Shortcut.CtrlShiftV)
                                           };
            var itemCopyAllClipboard = new BarButtonItem(barManager1, "Sao chép cả lưới đến Clipboard")
            {
                Glyph = HelpImage.getImage2020("clipboard.png"),
                ItemShortcut = new BarShortcut(Shortcut.CtrlShiftA)
            };

            //, -1, new BarShortcut(Shortcut.CtrlC));

            var timeEdit = new RepositoryItemTimeEdit();
            timeEdit.Mask.EditMask = "HH:mm";
            timeEdit.Mask.UseMaskAsDisplayFormat = true;

            var timeItem = new BarEditItem(barManager1, timeEdit) { PaintStyle = BarItemPaintStyle.Standard };

            itemCopyAllTo.AddItem(timeItem);
            itemCopyTo.AddItem(timeItem);
            itemMoveAllTo.AddItem(timeItem);
            itemMoveTo.AddItem(timeItem);

            timeItem.Width = 60;

            timeItem.Edit.DoubleClick += delegate
                                             {

                                                 BarItemLink link = barManager1.ActiveEditItemLink;
                                                 object obj = barManager1.ActiveEditor.EditValue;
                                                 if (obj == null || !(obj is DateTime)) return;
                                                 DataRow r = gridViewDetail.GetDataRow(handel);
                                                 var time = (DateTime)obj;
                                                 time = new DateTime(1900, 1, 1, time.Hour, time.Minute, 0);
                                                 if (link.OwnerItem == itemCopyTo)
                                                 {
                                                     CutCopyTo(r, time, true);
                                                 }
                                                 else if (link.OwnerItem == itemMoveTo)
                                                 {
                                                     CutCopyTo(r, time, false);
                                                 }
                                                 else if (link.OwnerItem == itemCopyAllTo)
                                                 {
                                                     CutCopyAllTo((DateTime)r[KE_HOACH_LPS_CT.GIO_PHAT_SONG], time,
                                                                  true);
                                                 }
                                                 else if (link.OwnerItem == itemMoveAllTo)
                                                 {
                                                     CutCopyAllTo((DateTime)r[KE_HOACH_LPS_CT.GIO_PHAT_SONG], time,
                                                                  false);
                                                 }
                                                 popupMenu1.HidePopup();

                                             };
            timeItem.ItemDoubleClick += delegate(object sender, ItemClickEventArgs e)
                                            {
                                                DataRow r = gridViewDetail.GetDataRow(handel);
                                                object obj = barManager1.ActiveEditor.EditValue;
                                                if (obj == null || !(obj is DateTime)) return;
                                                var time = (DateTime)obj;
                                                time = new DateTime(1900, 1, 1, time.Hour, time.Minute, 0);
                                                if (e.Link.OwnerItem == itemCopyTo)
                                                {
                                                    CutCopyTo(r, time, true);
                                                }
                                                else if (e.Link.OwnerItem == itemMoveTo)
                                                {
                                                    CutCopyTo(r, time, false);
                                                }
                                                else if (e.Link.OwnerItem == itemCopyAllTo)
                                                {
                                                    CutCopyAllTo((DateTime)r[KE_HOACH_LPS_CT.GIO_PHAT_SONG], time, true);
                                                }
                                                else if (e.Link.OwnerItem == itemMoveAllTo)
                                                {
                                                    CutCopyAllTo((DateTime)r[KE_HOACH_LPS_CT.GIO_PHAT_SONG], time,
                                                                 false);
                                                }
                                                popupMenu1.HidePopup();
                                            };
            if (_dtGioPhat != null)
            {
                foreach (DataRow rTime in _dtGioPhat.Rows)
                {

                    if (rTime[KE_HOACH_LPS_CT.GIO_PHAT_SONG] is DBNull
                        || rTime[KE_HOACH_LPS_CT.GIO_PHAT_SONG].Equals(rowHandel[KE_HOACH_LPS_CT.GIO_PHAT_SONG]))
                        continue;
                    var time = (DateTime)rTime[KE_HOACH_LPS_CT.GIO_PHAT_SONG];
                    var item = new BarButtonItem(barManager1, time.ToString("HH:mm")) { PaintStyle = BarItemPaintStyle.Standard, Tag = time };
                    itemCopyAllTo.AddItem(item);
                    itemCopyTo.AddItem(item);
                    itemMoveAllTo.AddItem(item);
                    itemMoveTo.AddItem(item);
                    item.ItemClick += delegate(object sender, ItemClickEventArgs e)
                                          {
                                              DataRow r = gridViewDetail.GetDataRow(handel);
                                              if (e.Link.OwnerItem == itemCopyTo)
                                              {
                                                  CutCopyTo(r, time, true);
                                              }
                                              else if (e.Link.OwnerItem == itemMoveTo)
                                              {
                                                  CutCopyTo(r, time, false);
                                              }
                                              else if (e.Link.OwnerItem == itemCopyAllTo)
                                              {
                                                  CutCopyAllTo((DateTime)r[KE_HOACH_LPS_CT.GIO_PHAT_SONG], time, true);
                                              }
                                              else if (e.Link.OwnerItem == itemMoveAllTo)
                                              {
                                                  CutCopyAllTo((DateTime)r[KE_HOACH_LPS_CT.GIO_PHAT_SONG], time, false);
                                              }
                                          };

                }
            }
            // ReSharper disable ImplicitlyCapturedClosure
            itemCopy.ItemClick += (sender, e) =>
                                      {
                                          _rowCut = null;
                                          _rowCopy = gridViewDetail.GetDataRow(handel);
                                      };

            itemCut.ItemClick += (sender, args) =>
                                     {
                                         _rowCopy = null;
                                         _rowCut = gridViewDetail.GetDataRow(handel);
                                     };

            itemPaste.ItemClick += (sender, e) => Paste(handel);
            itemDelete.ItemClick += (sender, e) => DeleteRow(handel);
            itemDeleteAll.ItemClick += (sender, e) => DeleteVetGio(handel);
            itemRefresh.ItemClick += (sender, e) =>
                                         {
                                             gridViewDetail.RefreshData();
                                             gridViewDetail.UpdateGroupSummary();
                                         };
            itemOpen.ItemClick += (sender, e) =>
                                      {
                                          long ctID = HelpNumber.ParseInt64(cr[KE_HOACH_LPS_CT.CT_ID]);
                                          if (
                                              ChuongTrinhPermission.I._CheckPerChuongTrinh(RES_PERMISSION_TYPE.READ,
                                                                                           ctID) == false)
                                          {
                                              HelpMsgBox.ShowNotificationMessage(
                                                  "Bạn không được phép xem chương trình này!");
                                              return;
                                          }
                                          var frm = new FrmChuongTrinh(ctID, null);
                                          HelpProtocolForm.ShowModalDialog(this, frm);
                                      };
            itemCopyClipboard.ItemClick += (sender, e) =>
                                               {
                                                   gridViewDetail.BeginSelection();
                                                   gridViewDetail.ClearSelection();
                                                   gridViewDetail.SelectRow(handel);
                                                   gridViewDetail.EndSelection();
                                                   gridViewDetail.CopyToClipboard();
                                               };
            itemCopyAllClipboard.ItemClick += (sender, e) => CopyClipboard(null);

             itemCopyVetClipboard.ItemClick += (sender, e) => CopyClipboard((DateTime)cr[KE_HOACH_LPS_CT.GIO_PHAT_SONG]);

            // ReSharper restore ImplicitlyCapturedClosure
            if (IsAdd == null)
            {
                popupMenu1.ItemLinks.AddRange(new BarItem[]
                                                  {
                                                      itemOpen,itemCopyClipboard,itemCopyVetClipboard,itemCopyAllClipboard, itemRefresh
                                                  });
                popupMenu1.ItemLinks[1].BeginGroup = true;
                popupMenu1.ItemLinks[4].BeginGroup = true;
            }
            else
            {

                popupMenu1.ItemLinks.AddRange(new BarItem[]
                                                  {
                                                      itemCopy, itemCut, itemPaste, itemDelete, itemDeleteAll,
                                                      itemCopyTo,
                                                      itemMoveTo, itemCopyAllTo, itemMoveAllTo, itemOpen,itemCopyClipboard,itemCopyVetClipboard,itemCopyAllClipboard, itemRefresh
                                                  });
                popupMenu1.ItemLinks[5].BeginGroup = true;
                popupMenu1.ItemLinks[7].BeginGroup = true;
                popupMenu1.ItemLinks[9].BeginGroup = true;
                popupMenu1.ItemLinks[10].BeginGroup = true;
                popupMenu1.ItemLinks[13].BeginGroup = true;
            }

            itemPaste.Enabled = _rowCopy != null || _rowCut != null;
        }
 private void Init(bool multiSelect)
 {
     InitializeComponent();
     this.MultiSelect = multiSelect;
     TimKiem = new AppBienMucGridTemplate(gridViewMaster);
     IDField = BIEN_MUC.BM_ID;
     new TimPopupBandedFix(this);
     AppCtrl.SetAutoHideEmptyBand(gridViewMaster);
     checkListCol = TimKiem.AddTuyBienCotSeachPopup(barManager1, MainBar);
     AppCtrl.InitPrintGrid(this, false);
     AppCtrl.SetMaskNam(NamSXTu, NamSXDen);
     //AppCtrl.SetTenYear(NamSXTu, NamSXDen);
     AppCtrl.FormatButtonTimKiem(this);
     AppCtrl.AddXemTatCa(this,BIEN_MUC.FILTER_STRING);
     AppCtrl.AddRefresh(this);
     this.WindowState = System.Windows.Forms.FormWindowState.Normal;
     this.MinimumSize = new System.Drawing.Size(400, 300);
     this.Size = new System.Drawing.Size(800, 500);
 }
예제 #45
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="barManager"></param>
        /// <param name="menuBar"></param>
        /// <param name="gridView"></param>
        /// <param name="defaultColumns"></param>
        /// <returns></returns>
        public static RepositoryItemCheckedComboBoxEdit AddTuyBienCot(BarManager barManager, Bar menuBar, GridView gridView,GridColumn[] excludeColumns, params string[] defaultColumns)
        {
            RepositoryItemCheckedComboBoxEdit repositoryItemCheckedCotHienThi = new RepositoryItemCheckedComboBoxEdit();
            //
            // repositoryItemCheckedCotHienThi
            //
            repositoryItemCheckedCotHienThi.AutoHeight = false;
            repositoryItemCheckedCotHienThi.BestFitWidth = 180;
            repositoryItemCheckedCotHienThi.Name = "repositoryItemCheckedCotHienThi";
            //
            BarEditItem barEditItemCotHienThi = new BarEditItem();
            //
            // barEditItemCotHienThi
            //
            barEditItemCotHienThi.Caption = "&Cột hiển thị";
            barEditItemCotHienThi.Edit = repositoryItemCheckedCotHienThi;
            barEditItemCotHienThi.Name = "barEditItem1";
            barEditItemCotHienThi.PaintStyle = DevExpress.XtraBars.BarItemPaintStyle.CaptionGlyph;
            barEditItemCotHienThi.Width = 200;
            //
            barManager.Items.Add(barEditItemCotHienThi);
            barManager.RepositoryItems.AddRange(new DevExpress.XtraEditors.Repository.RepositoryItem[] {
            repositoryItemCheckedCotHienThi});
            //
            menuBar.LinksPersistInfo.Add(new DevExpress.XtraBars.LinkPersistInfo(barEditItemCotHienThi, true));
            //Gán các cột vào CheckedComboBox
            if (excludeColumns == null||excludeColumns.Length==0)
            {
                foreach (GridColumn column in gridView.Columns)
                {
                    repositoryItemCheckedCotHienThi.Items.Add(column.Name, column.Caption);
                }
            }
            else
            {
                List<GridColumn> listExcludeCol = new List<GridColumn>(excludeColumns);
                foreach (GridColumn column in gridView.Columns)
                {
                    if (listExcludeCol.Contains(column))
                    {
                        column.Visible = false;
                        column.OptionsColumn.AllowShowHide = false;
                        continue;
                    }
                    repositoryItemCheckedCotHienThi.Items.Add(column.Name, column.Caption);
                }
            }
            //-------------------------------
            //
            repositoryItemCheckedCotHienThi.CloseUp += delegate(object sender, DevExpress.XtraEditors.Controls.CloseUpEventArgs e)
            {
                StringBuilder value = new StringBuilder();
                foreach (CheckedListBoxItem item in (sender as CheckedComboBoxEdit).Properties.Items)
                {
                    if (item.CheckState == System.Windows.Forms.CheckState.Checked)
                    {
                        value.Append(" " + item.Description + (sender as CheckedComboBoxEdit).Properties.SeparatorChar.ToString());
                    }
                }
                if (value.Length > 0)
                    e.Value = value.ToString().Remove(value.Length - 1);
                else e.Value = string.Empty;
            };
            //
            //Kiểm tra đã tồn tại layout cho gridView
            StringBuilder str = new StringBuilder(FrameworkParams.currentUser.username);
            str.Append(gridView.GridControl.FindForm().Name + gridView.GridControl.Name +
                gridView.Name);
            List<FileInfo> listFile = new List<FileInfo>(new DirectoryInfo(FrameworkParams.LAYOUT_FOLDER).GetFiles());
            if(listFile.Exists(delegate (FileInfo e){
                if (e.Name.Length >= str.Length)
                    return string.Compare(str.ToString(), e.Name.Substring(0, str.Length)) == 0;
                return false;
            }))
            {
                defaultColumns = null;
                gridView.GridControl.Load += delegate(object sender, EventArgs e)
                {
                    List<string> listDefaultColumn = new List<string>();
                    StringBuilder displayText = new StringBuilder();
                    foreach (GridColumn column in gridView.Columns) {
                        if (column.Visible || column.GroupIndex >= 0) listDefaultColumn.Add(column.Name);
                    }
                    for (int i = 0; i < repositoryItemCheckedCotHienThi.Items.Count; i++)
                    {
                        if (listDefaultColumn.Contains(repositoryItemCheckedCotHienThi.Items[i].Value.ToString()))
                        {
                            repositoryItemCheckedCotHienThi.Items[i].CheckState = System.Windows.Forms.CheckState.Checked;
                            displayText.Append(" " + repositoryItemCheckedCotHienThi.Items[i].Description + repositoryItemCheckedCotHienThi.SeparatorChar.ToString());
                        }
                    }
                    if (displayText.ToString() != string.Empty)
                        barEditItemCotHienThi.EditValue = displayText.ToString().Remove(displayText.Length - 1);
                    repositoryItemCheckedCotHienThi.SynchronizeEditValueWithCheckedItems = false;
                };
            }
            //------------------------------
            //Set các cột hiển thị mặc định
            if (defaultColumns != null)
            {
                List<string> listDefaultColumn = new List<string>(defaultColumns);
                StringBuilder displayText = new StringBuilder();
                for (int i = 0; i < repositoryItemCheckedCotHienThi.Items.Count; i++)
                {
                    if(listDefaultColumn.Contains(repositoryItemCheckedCotHienThi.Items[i].Value.ToString())){
                        repositoryItemCheckedCotHienThi.Items[i].CheckState = System.Windows.Forms.CheckState.Checked;
                        displayText.Append(" " + repositoryItemCheckedCotHienThi.Items[i].Description + repositoryItemCheckedCotHienThi.SeparatorChar.ToString());
                    }
                }
                if (displayText.ToString() != string.Empty)
                    barEditItemCotHienThi.EditValue = displayText.ToString().Remove(displayText.Length - 1);
                repositoryItemCheckedCotHienThi.SynchronizeEditValueWithCheckedItems = false;

                DisplayTheoTuyBienCot(gridView, repositoryItemCheckedCotHienThi);
            }
            return repositoryItemCheckedCotHienThi;
        }
예제 #46
0
        public static RepositoryItemCheckedComboBoxEdit AddTuyBienCot(BarManager barManager, Bar menuBar,
            PivotGridField[] choseFields, bool[] defaultCheck)
        {
            var repositoryItemCheckedCotHienThi = new RepositoryItemCheckedComboBoxEdit
                                                      {
                                                          AutoHeight = false,
                                                          BestFitWidth = 180,
                                                          Name = "repositoryItemCheckedCotHienThi"
                                                      };
            //
            // repositoryItemCheckedCotHienThi
            //
            //
            var barEditItemCotHienThi = new BarEditItem
                                            {
                                                Caption = "&Cột hiển thị",
                                                Edit = repositoryItemCheckedCotHienThi,
                                                Name = "barEditItemHienThi",
                                                PaintStyle = BarItemPaintStyle.CaptionGlyph,
                                                Width = 200
                                            };
            //
            // barEditItemCotHienThi
            //
            //
            barManager.Items.Add(barEditItemCotHienThi);
            barManager.RepositoryItems.AddRange(new RepositoryItem[]
                                                    {
                                                        repositoryItemCheckedCotHienThi
                                                    });
            //
            menuBar.LinksPersistInfo.Add(new LinkPersistInfo(barEditItemCotHienThi, true));
            //Gán các cột vào CheckedComboBox
            // choseFields = choseFields.OrderBy(f => f.Caption).ToArray();
            var checkedListItems = new CheckedListBoxItem[choseFields.Length];
            for (int i = 0; i < choseFields.Length; i++)
            {
                PivotGridField field = choseFields[i];
                var ischeck = defaultCheck[i];
                var item = new CheckedListBoxItem(field, field.Caption, ischeck ? CheckState.Checked : CheckState.Unchecked);
                checkedListItems[i] = item;

            }
            var list = checkedListItems.OrderBy(c => c.Description);
            repositoryItemCheckedCotHienThi.Items.AddRange(list.ToArray());
            var checkedItems = list.Where(l => l.CheckState == CheckState.Checked);
            var text = checkedItems.Aggregate("",
                                              (current, item) =>
                                              current +
                                              (" " + item.Description + repositoryItemCheckedCotHienThi.SeparatorChar));
            repositoryItemCheckedCotHienThi.SynchronizeEditValueWithCheckedItems = false;
            barEditItemCotHienThi.Hint = text.TrimEnd(repositoryItemCheckedCotHienThi.SeparatorChar);
            barEditItemCotHienThi.EditValue = barEditItemCotHienThi.Hint;

            //-------------------------------
            //
            repositoryItemCheckedCotHienThi.CloseUp += delegate(object sender, CloseUpEventArgs e)
                                                           {
                                                               var value = new StringBuilder();
                                                               foreach (
                                                                   CheckedListBoxItem item in
                                                                       (sender as CheckedComboBoxEdit).Properties.Items)
                                                               {
                                                                   if (item.CheckState == CheckState.Checked)
                                                                   {
                                                                       value.Append(" " + item.Description +
                                                                                    (sender as CheckedComboBoxEdit).
                                                                                        Properties.SeparatorChar.
                                                                                        ToString());
                                                                       ((PivotGridField)item.Value).Visible = true;
                                                                   }
                                                                   else
                                                                   {
                                                                       ((PivotGridField)item.Value).Visible = false;

                                                                   }
                                                               }
                                                               var description = value.Length > 0
                                                                             ? value.ToString().Remove(value.Length - 1)
                                                                             : string.Empty;
                                                               e.Value = text;
                                                               barEditItemCotHienThi.Hint = description;
                                                           };
            //Set các cột hiển thị mặc định
            //if (choseFields != null)
            //{
            //    List<string> listDefaultField = new List<string>(choseFields);
            //    StringBuilder displayText = new StringBuilder();
            //    for (int i = 0; i < repositoryItemCheckedCotHienThi.Items.Count; i++)
            //    {
            //        if (listDefaultField.Contains(repositoryItemCheckedCotHienThi.Items[i].Value.ToString()))
            //        {
            //            repositoryItemCheckedCotHienThi.Items[i].CheckState = CheckState.Checked;
            //            displayText.Append(" " + repositoryItemCheckedCotHienThi.Items[i].Description + repositoryItemCheckedCotHienThi.SeparatorChar.ToString());
            //        }
            //    }
            //    if (displayText.ToString() != string.Empty)
            //        barEditItemCotHienThi.EditValue = displayText.ToString().Remove(displayText.Length - 1);
            //    repositoryItemCheckedCotHienThi.SynchronizeEditValueWithCheckedItems = false;

            //    DisplayTheoTuyBienCot(gridView, repositoryItemCheckedCotHienThi);
            //}
            return repositoryItemCheckedCotHienThi;
        }
예제 #47
0
 protected virtual void CustomMenuPopupMenuShowing(object sender, PopupMenuShowingEventArgs e)
 {
     //При вызове обычного меню на клике по строке
     switch (e.MenuType)
     {
         case GridMenuType.User:
         case GridMenuType.Row:
             RepositoryItem repository = null;
             //Показать меню для выбора значения выделенных строк
             if (OptionsBehavior.Editable && OptionsCustomization.ShowSelectedRowMenu && FocusedColumn != null &&
                 FocusedColumn.OptionsColumn.ShowEditorInPopupMenu && FocusedColumn.OptionsColumn.AllowEdit &&
                 !FocusedColumn.OptionsColumn.ReadOnly && SelectedRowsCount > 1)
             {
                 repository = DXCustomMenuCreator.DXCreateBarItemByFocusedColumn(FocusedColumn);
                 var buttonRepository = repository as RepositoryItemButtonEdit;
                 if (buttonRepository != null && buttonRepository.Buttons.Count > 1)
                 {
                     buttonRepository.ButtonClick += ClearSelectedRowsFromMenu;
                 }
             }
             if (CustomPopupMenu != null)
             {
                 AddButtonInPopupMenu();
                 DeleteButtonInPopupMenu();
                 var link = CustomPopupMenu.ItemLinks
                     .OfType<BarEditItemLink>()
                     .FirstOrDefault(bei => bei.Item.Id == -1);
                 if (link != null)
                 {
                     CustomPopupMenu.RemoveLink(link);
                 }
                 if (repository != null)
                 {
                     var bei = new BarEditItem
                     {
                         Edit = repository,
                         Id = -1,
                         Tag = FocusedColumn
                     };
                     bei.EditValueChanged += SelectedRowEditValueChanged;
                     CustomPopupMenu.AddItem(bei);
                 }
             }
             else
             {
                 var dxmAdd = new DXMenuItem(AddCaption, AddRow, Resources.Add);
                 var dxmRemove = new DXMenuItem(RemoveCaption, RemoveRows, Resources.Remove);
                 if (e.MenuType == GridMenuType.User && e.Menu == null)
                     e.Menu = new GridViewMenu(this);
                 if (OptionsCustomization.AllowAdd)
                     e.Menu.Items.Add(dxmAdd);
                 if (OptionsCustomization.AllowDelete)
                 {
                     e.Menu.Items.Add(dxmRemove);
                     dxmRemove.Enabled = SelectedRowsCount != 0;
                 }
                 if (repository != null)
                 {
                     var bei = new DXEditMenuItem
                     {
                         Edit = repository,
                         Tag = FocusedColumn
                     };
                     bei.EditValueChanged += SelectedRowEditValueChanged;
                     e.Menu.Items.Add(bei);
                 }
             }
             break;
         case GridMenuType.Column:
             DXPopupMenu menu = e.Menu as GridViewColumnMenu;
             if (menu == null)
             {
                 return;
             }
             DXCustomMenuCreator.HideCustomizationColumns(menu);
             DXCustomMenuCreator.DXCreateSelectSelectionMenu(menu, CustomItemClick, RowItemClick, CheckboxColumnItemClick);
             DXCustomMenuCreator.DXCreateLayoutMenuItems(GridControl, ref menu);
             break;
     }
 }
		private void InitContextMenu()
		{
			_barManager.BeginInit();

			var colorEditor = new RepositoryItemHtmlColorEdit
			{
				AutoHeight = false,
			};
			colorEditor.Buttons.Clear();
			colorEditor.Buttons.AddRange(new[] { new EditorButton(ButtonPredefines.Ellipsis) });
			colorEditor.OnColorSelected += (o, e) =>
			{
				_barManager.CloseMenus();
			};

			var maxId = _barManager.MaxItemId++;

			ItemBoldFont = new BarCheckItem
			{
				Id = maxId,
				Caption = "Bold",
				CheckBoxVisibility = CheckBoxVisibility.AfterText
			};

			var boldFont = new Font(ItemBoldFont.ItemInMenuAppearance.Normal.Font.Name,
				ItemBoldFont.ItemInMenuAppearance.Normal.Font.Size, FontStyle.Bold);
			ItemBoldFont.ItemInMenuAppearance.Normal.Font = boldFont;
			ItemBoldFont.ItemInMenuAppearance.Pressed.Font = boldFont;
			ItemBoldFont.ItemInMenuAppearance.Hovered.Font = boldFont;

			ItemBoldFont.CheckedChanged += (o, e) => LibraryObjectLoader.OnFontChanged();
			maxId++;

			ItemItalicFont = new BarCheckItem
			{
				Id = maxId,
				Caption = "Italics",
				CheckBoxVisibility = CheckBoxVisibility.AfterText
			};

			var italicFont = new Font(ItemItalicFont.ItemInMenuAppearance.Normal.Font.Name,
				ItemItalicFont.ItemInMenuAppearance.Normal.Font.Size, FontStyle.Italic);
			ItemItalicFont.ItemInMenuAppearance.Normal.Font = italicFont;
			ItemItalicFont.ItemInMenuAppearance.Pressed.Font = italicFont;
			ItemItalicFont.ItemInMenuAppearance.Hovered.Font = italicFont;

			ItemItalicFont.CheckedChanged += (o, e) => LibraryObjectLoader.OnFontChanged();
			maxId++;

			ItemUnderlinedFont = new BarCheckItem
			{
				Id = maxId,
				Caption = "Underline",
				CheckBoxVisibility = CheckBoxVisibility.AfterText
			};

			var underlineFont = new Font(ItemUnderlinedFont.ItemInMenuAppearance.Normal.Font.Name,
				ItemUnderlinedFont.ItemInMenuAppearance.Normal.Font.Size, FontStyle.Underline);
			ItemUnderlinedFont.ItemInMenuAppearance.Normal.Font = underlineFont;
			ItemUnderlinedFont.ItemInMenuAppearance.Pressed.Font = underlineFont;
			ItemUnderlinedFont.ItemInMenuAppearance.Hovered.Font = underlineFont;

			ItemUnderlinedFont.CheckedChanged += (o, e) => LibraryObjectLoader.OnFontChanged();
			maxId++;

			ItemFontColor = new BarEditItem
			{
				Id = maxId,
				Caption = "Font Color  ",
				Edit = colorEditor,
				Width = 150
			};
			maxId++;
			ItemFontColor.EditValueChanged += (o, e) =>
			{
				LibraryObjectLoader.OnColorChanged();
				_barManager.CloseMenus();
			};

			_barManager.Items.Add(ItemBoldFont);
			_barManager.Items.Add(ItemItalicFont);
			_barManager.Items.Add(ItemUnderlinedFont);
			_barManager.Items.Add(ItemFontColor);
			_barManager.MaxItemId = maxId;

			_barManager.EndInit();
		}
		private void InitContextMenu()
		{
			_barManager.BeginInit();

			var buttonEditor = new RepositoryItemButtonEdit { AutoHeight = false };
			buttonEditor.Buttons.Clear();
			buttonEditor.Buttons.AddRange(new[]
			{
				new EditorButton(ButtonPredefines.Delete)
			});
			buttonEditor.ButtonClick += (o, e) =>
			{
				((ButtonEdit)o).EditValue = null;
			};

			var colorEditor = new RepositoryItemHtmlColorEdit
			{
				AutoHeight = false,
			};
			colorEditor.Buttons.Clear();
			colorEditor.Buttons.AddRange(new[] { new EditorButton(ButtonPredefines.Ellipsis) });
			colorEditor.OnColorSelected += (o, e) =>
			{
				_barManager.CloseMenus();
			};

			var maxId = _barManager.MaxItemId++;

			var linkNoteControlButtonCollection = new List<BarItem>();
			ItemLinkNoteCustom = new BarEditItem
			{
				Id = maxId,
				Caption = "Custom",
				Edit = buttonEditor,
				Width = 150
			};
			ItemLinkNoteCustom.EditValueChanged += (o, e) => LibraryObjectLoader.OnNoteChanged();
			maxId++;
			foreach (var noteText in LibraryObjectNotesLoader.PredefinedNotes)
			{
				var itemLinkNote = new BarButtonItem
				{
					Caption = noteText,
					Id = maxId,
					Tag = noteText
				};
				maxId++;
				itemLinkNote.ItemClick += (o, e) =>
				{
					var itemNoteText = e.Item.Tag as String;
					ItemLinkNoteCustom.EditValue = itemNoteText;
				};
				linkNoteControlButtonCollection.Add(itemLinkNote);
			}
			linkNoteControlButtonCollection.Add(ItemLinkNoteCustom);
			ItemLinkNote = new BarSubItem();
			ItemLinkNote.Caption = "Link Note";
			ItemLinkNote.Id = maxId;
			_barManager.Items.AddRange(linkNoteControlButtonCollection.ToArray());
			ItemLinkNote.LinksPersistInfo.AddRange(linkNoteControlButtonCollection
				.Select(barItem => new LinkPersistInfo(barItem)).ToArray());
			maxId++;

			ItemHoverNote = new BarEditItem
			{
				Id = maxId,
				Caption = "Hover Note",
				Edit = buttonEditor,
				Width = 150
			};
			maxId++;
			ItemHoverNote.EditValueChanged += (o, e) => LibraryObjectLoader.OnHoverChanged();

			_barManager.Items.Add(ItemLinkNote);
			_barManager.Items.Add(ItemHoverNote);
			_barManager.MaxItemId = maxId;

			_barManager.EndInit();
		}
 public ProjectSelectController(BarEditItem barEditItemProject)
 {
     this.barEditItemProject = barEditItemProject;
 }