Esempio n. 1
0
 private void BarButtonItem_ItemClick_4(object sender, DevExpress.Xpf.Bars.ItemClickEventArgs e)
 {
     foreach (DragThumb thumb in cvMain.SelectDragThumbs)
     {
         thumb.FontSize -= 5;
     }
 }
Esempio n. 2
0
        private void barButtonOverView_ItemClick(object sender, DevExpress.Xpf.Bars.ItemClickEventArgs e)
        {
            BarButtonItem bi  = sender as BarButtonItem;
            string        str = bi.Content.ToString();

            if (str == "设备总览")
            {
                bi.Content          = "退出总览";
                listBox1.Visibility = Visibility.Collapsed;
                listBox2.Visibility = Visibility.Visible;
                treeView.Visibility = Visibility.Collapsed;
                lv.Visibility       = Visibility.Visible;
                vm.InstruList       = vm.OverViewInstruList;
                var v = vm.InstruMgrList;
                vm.UpdateInstruMgrList();
            }
            else
            {
                bi.Content          = "设备总览";
                listBox1.Visibility = Visibility.Visible;
                listBox2.Visibility = Visibility.Collapsed;
                lv.Visibility       = Visibility.Collapsed;
                treeView.Visibility = Visibility.Visible;
                vm.InstruList       = vm.TempInstruList;
                vm.UpdateInstruMgrList();
            }
        }
Esempio n. 3
0
        private void barExtension_ItemClick(object sender, DevExpress.Xpf.Bars.ItemClickEventArgs e)
        {
            string     str    = (sender as BarButtonItem).Content.ToString();
            UITypeInfo uiInfo = TestStepFactory.UITypelist.Where(x => x.Att.DisplayName == str).FirstOrDefault();

            ActiveItem2(uiInfo.Att.UserControlTypeStr, uiInfo.Att.DisplayName, "扩展功能");
        }
Esempio n. 4
0
        private void ShowFilterPanelBarItem_ItemClick(object sender, DevExpress.Xpf.Bars.ItemClickEventArgs e)
        {
            var ctrl = sender as BarButtonItem;
            var view = ((TableView)((GridColumnMenuInfo)ctrl.DataContext).Grid.View);

            view.ShowAutoFilterRow = !view.ShowAutoFilterRow;
        }
Esempio n. 5
0
 private void Drag_ItemClick(object sender, DevExpress.Xpf.Bars.ItemClickEventArgs e)
 {
     _drawBase         = null;
     this.cmain.Cursor = Cursors.Hand;
     UnSelected();
     _slate.Start();
 }
Esempio n. 6
0
 private void Group_ItemClick(object sender, DevExpress.Xpf.Bars.ItemClickEventArgs e)
 {
     _drawBase       = new DrawGroup(_cap);
     _drawBase.CMain = this.cmain;
     DefaultCursor();
     this.bstatus.Content = "当前工具: 组合";
 }
        private void btnModify_ItemClick(object sender, DevExpress.Xpf.Bars.ItemClickEventArgs e)
        {
            Dashboard dashboard = new Dashboard();

            dashboard.LoadFromXDocument(dashboardControl.Dashboard.SaveToXDocument());

            dashboard.BeginUpdate();
            try
            {
                dashboard.Items["card1"].ParentContainer = dashboard.Items["list1"].ParentContainer;
            }
            catch (NullReferenceException) { };

            dashboard.Items.ForEach(delegate(DashboardItem item)
            {
                if (item is PieDashboardItem)
                {
                    ((PieDashboardItem)item).PieType = PieType.Donut;
                }
            });

            dashboard.DataLoading += Dashboard_DataLoading;
            // The RebuildLayout call is required because the WPF viewer control contains a dashboard whose layout is already built.
            // If the layout is null (dashboardControl.Dashboard = null or dashboardControl.Dashboard.LayoutRoot = null),
            // the RebuildLayout is called automatically after assigning a dashboard.
            dashboard.RebuildLayout();
            dashboard.EndUpdate();

            dashboardControl.Dashboard = dashboard;
        }
Esempio n. 8
0
        private void barButtonItem1_ItemClick(object sender, DevExpress.Xpf.Bars.ItemClickEventArgs e)
        {
            BarItem baritem = sender as BarItem;
            string  funstr  = baritem.Tag.ToString();

            DataBind(funstr);
        }
        private void btnCreate_ItemClick(object sender, DevExpress.Xpf.Bars.ItemClickEventArgs e)
        {
            Dashboard dashboard = new Dashboard();
            DashboardObjectDataSource dataSource = new DashboardObjectDataSource();

            dashboard.BeginUpdate();
            dashboard.DataSources.Add(dataSource);

            dashboard.Items.Add(DashboardItemGenerator.GenerateCardItem(dataSource, "card1"));
            dashboard.Items.Add(DashboardItemGenerator.GenerateGridItem(dataSource, "grid1"));
            dashboard.Items.Add(DashboardItemGenerator.GeneratePieItem(dataSource, "pie1"));
            dashboard.Items.Add(DashboardItemGenerator.GenerateListBoxItem(dataSource, "list1"));

            TabContainerDashboardItem tabContainer = new TabContainerDashboardItem();

            tabContainer.TabPages.Add(new DashboardTabPage()
            {
                Name = "Tab Page One", ComponentName = "page1"
            });
            tabContainer.TabPages["page1"].AddRange(dashboard.Items["grid1"], dashboard.Items["pie1"]);

            DashboardTabPage secondTabPage = tabContainer.CreateTabPage();

            secondTabPage.Name = "Tab Page Two";
            secondTabPage.Add(dashboard.Items["list1"]);
            secondTabPage.ShowItemAsTabPage = true;

            dashboard.Items.Add(tabContainer);

            dashboard.DataLoading += Dashboard_DataLoading;

            dashboard.EndUpdate();

            dashboardControl.Dashboard = dashboard;
        }
Esempio n. 10
0
        private void btnFontColor_ItemClick(object sender, DevExpress.Xpf.Bars.ItemClickEventArgs e)
        {
            PopupControlContainer pcc = (e.Item as DevExpress.Xpf.Bars.BarSplitButtonItem).PopupControl as PopupControlContainer;
            Color color = ((pcc.Content as UserControl).Content as ColorChooser).Color;

            MessageBox.Show("Color is applied: " + color.ToString());
        }
Esempio n. 11
0
 void biDatabaseSave_ItemClick(object sender, DevExpress.Xpf.Bars.ItemClickEventArgs e)
 {
     if (txtTitle.Text != "" && richEdit.Text != "")//Neu noi dung va tieu de khong trong
     {
         //Tao file stream
         IsolatedStorageFileStream fs = new IsolatedStorageFileStream("Temp.doc", FileMode.OpenOrCreate, FileAccess.ReadWrite, str);
         //Save noi dung vao filestream
         richEdit.SaveDocument(fs, DocumentFormat.Doc);
         fs.Close();
         fs.Dispose();
         //Chuyen noi dung thanh dang binary
         filesave = ReadFile();
         //Dua dang binary ve dang base64string
         noidungtam = Convert.ToBase64String(filesave);
         //Gui lenh luu xuong CSDL
         if (mathongbao == -1)//Nếu là thêm mới
         {
             ws.LuuThongBaoAsync(txtTitle.Text, noidungtam, Paradise5.MainPage.LoginID, mathongbao);
         }
         else//Nếu là cập nhật
         {
             Paradise5.ControlEXT.DialogResultCommon dialog = new Paradise5.ControlEXT.DialogResultCommon();
             dialog.setthongdiep("Thông báo bạn muốn tạo đã có. Bạn có muốn cập nhật");
             dialog.Closed += dialog_Closed;//Lay dialogresult khi dong form
             dialog.Show();
         }
     }
     else
     {
         Paradise5.ControlEXT.DialogResultCommon dialog = new Paradise5.ControlEXT.DialogResultCommon();
         dialog.setthongdiep("Lỗi");
         dialog.Show();
     }
 }
Esempio n. 12
0
        private void OnFileSave_Click(object sender, DevExpress.Xpf.Bars.ItemClickEventArgs e)
        {
            string controlTag = (string)e.Item.Tag;
            var    tableView  = FindTableView();

            if (tableView != null)
            {
                switch (controlTag)
                {
                case "csv":
                    SaveDataToCSV(tableView);
                    break;

                case "xls":
                    SaveDataToXLS(tableView);
                    break;

                case "xlsx":
                    SaveDataToXLSX(tableView);
                    break;

                default:
                    break;
                }
            }
        }
Esempio n. 13
0
        private void ccmInfo_ItemClick(object sender, DevExpress.Xpf.Bars.ItemClickEventArgs e)
        {
            PopupMenu menu = ((BarItem)sender).Parent as PopupMenu;

            object[] targetObjects = menu.Tag as object[];
            Series   series        = targetObjects[0] as Series;

            this.Title = series.DisplayName;
        }
Esempio n. 14
0
 private void BarCheckItem_ItemClick_2(object sender, DevExpress.Xpf.Bars.ItemClickEventArgs e)
 {
     //BarCheckItem bold = sender as BarCheckItem;
     //foreach (DragThumb thumb in cvMain.SelectDragThumbs)
     //{
     //    thumb = bold.IsChecked.Value ? FontStyles.Italic : FontStyles.Normal;
     //}
     //bold.IsChecked = !bold.IsChecked;
 }
Esempio n. 15
0
        private void ccmHide_ItemClick(object sender, DevExpress.Xpf.Bars.ItemClickEventArgs e)
        {
            PopupMenu menu = ((BarItem)sender).Parent as PopupMenu;

            object[] targetObjects = menu.Tag as object[];
            Series   series        = targetObjects[0] as Series;

            series.Visible = false;
        }
Esempio n. 16
0
        private void BarCheckItem_ItemClick_1(object sender, DevExpress.Xpf.Bars.ItemClickEventArgs e)
        {
            BarCheckItem bold = sender as BarCheckItem;

            foreach (DragThumb thumb in cvMain.SelectDragThumbs)
            {
                thumb.FontStyle = bold.IsChecked.Value ? FontStyles.Italic : FontStyles.Normal;
            }
            viewModel.IsItalic = !bold.IsChecked.Value;
        }
Esempio n. 17
0
        private void BarButtonItem_ItemClick_2(object sender, DevExpress.Xpf.Bars.ItemClickEventArgs e)
        {
            string filePath = Save("");

            if (filePath == "")
            {
                MessageBox.Show("保存失败,请核实.", "保存文件", MessageBoxButton.OK, MessageBoxImage.Error);
                return;
            }
            cvMain.SavePath = filePath;
        }
Esempio n. 18
0
 private void VerticalRulerCheckButton_ItemClick(object sender, DevExpress.Xpf.Bars.ItemClickEventArgs e)
 {
     if (VerticalRulerCheckButton.IsChecked == false)
     {
         RichTextBox.HorizontalRulerVisibility = Visibility.Hidden;
     }
     else
     {
         RichTextBox.HorizontalRulerVisibility = Visibility.Visible;
     }
 }
Esempio n. 19
0
 private void AutoBrightnessContextMenu_CheckedChanged(object sender, DevExpress.Xpf.Bars.ItemClickEventArgs e)
 {
     if (AutoBrightnessContextMenu.IsChecked == true)
     {
         AutoBrightnessToggle.IsChecked = true;
     }
     else
     {
         AutoBrightnessToggle.IsChecked = false;
     }
 }
Esempio n. 20
0
 private void removeBonus_ItemClick(object sender, DevExpress.Xpf.Bars.ItemClickEventArgs e)
 {
     if (sender is BarButtonItem)
     {
         FieldValueItem fieldValueItem = ((sender as BarButtonItem).Tag) as FieldValueItem;
         if (fieldValueItem != null && fieldValueItem.Field != null)
         {
             NamesController.UnRegisterAvailableName(fieldValueItem.Field.FieldName);
             pivotGrid.Fields.Remove(fieldValueItem.Field);
         }
     }
 }
Esempio n. 21
0
        //private void OnSettings_Click(object sender, RoutedEventArgs e)
        //{
        //    var window = new User_Interface.Windows.GlobalSettings();
        //    window.ShowDialog();
        //    //window.Show();
        //}

        private void OnAboutClick(object sender, DevExpress.Xpf.Bars.ItemClickEventArgs e)
        {
            try
            {
                var win1 = new About();
                win1.Show();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
                MessageBox.Show(ex.InnerException.ToString());
            }
        }
Esempio n. 22
0
 private void bbz_ItemClick(object sender, DevExpress.Xpf.Bars.ItemClickEventArgs e)
 {
     if (bbz.IsChecked == true)
     {
         this.bbz.Content      = "捕捉:开";
         CommonParam._isBuzhuo = true;
     }
     else
     {
         this.bbz.Content      = "捕捉:关";
         CommonParam._isBuzhuo = false;
     }
 }
Esempio n. 23
0
 private void bzj_ItemClick(object sender, DevExpress.Xpf.Bars.ItemClickEventArgs e)
 {
     if (bzj.IsChecked == true)
     {
         this.bzj.Content         = "正交:开";
         CommonParam._isZhengjiao = true;
     }
     else
     {
         this.bzj.Content         = "正交:关";
         CommonParam._isZhengjiao = false;
     }
 }
Esempio n. 24
0
        private void bAddPic_ItemClick(object sender, DevExpress.Xpf.Bars.ItemClickEventArgs e)
        {
            //添加图片
            Microsoft.Win32.OpenFileDialog dialog = new Microsoft.Win32.OpenFileDialog();
            dialog.Filter = "所有支持的图形文件|*.jpg;*.jpeg;*.bmp;*.png;*.gif|JPEG图形文件(*.jpg,*.jpeg)|*.jpg;*.jpeg|Windows Bitmap(*.bmp)|*.bmp|PNG文件(*.png)|*.png|GIF动图(*.gif)|*.gif|所有文件(*.*)|*.*";
            if (dialog.ShowDialog() == false)
            {
                return;
            }
            string picPath    = dialog.FileName;
            Brush  background = new SolidColorBrush((Color)ColorConverter.ConvertFromString("White"));

            cvMain.AddDragImage("", new Size(100, 100), new Point(50, 50), new BitmapImage(new Uri(picPath)), background, background);
        }
Esempio n. 25
0
        private void Reset_ItemClick(object sender, DevExpress.Xpf.Bars.ItemClickEventArgs e)
        {
            BarButtonItem bbi = sender as BarButtonItem;

            this.bstatus.Content = "当前工具: 无";
            if (_drawBase != null)
            {
                if (_drawBase.Step != 0 && this.cmain.Children.Count > 1)
                {
                    this.cmain.Children.RemoveAt(this.cmain.Children.Count - 1);
                }
                _drawBase = null;
            }
            DefaultCursor();
        }
Esempio n. 26
0
 private void Clear_ItemClick(object sender, DevExpress.Xpf.Bars.ItemClickEventArgs e)
 {
     if (_drawBase != null)
     {
         if (_drawBase.Step != 0)
         {
             _drawBase.Step = 0;
         }
     }
     while (cmain.Children.Count > CommonParam._defaultCount)
     {
         //永久保留默认的捕捉点和textblock、textbox
         cmain.Children.RemoveAt(CommonParam._defaultCount);
     }
     _cap.Points.Clear();
 }
Esempio n. 27
0
        private void BarButtonItem_ItemClick(object sender, DevExpress.Xpf.Bars.ItemClickEventArgs e)
        {
            MessageBoxResult msgBoxResult = WinUIMessageBox.Show("Are you sure you want to cancel without save?",
                                                                 "Warning", MessageBoxButton.YesNo, MessageBoxImage.Warning);

            if (msgBoxResult == MessageBoxResult.Yes)
            {
                Environment.Exit(0);
            }
            else
            {
                if (!SaveButton.IsEnabled)
                {
                    SaveBarButtonItem_ItemClick(SaveButton, new ItemClickEventArgs(SaveButton, e.Link));
                }
            }
        }
Esempio n. 28
0
        private void BarButtonItem_ItemClick(object sender, DevExpress.Xpf.Bars.ItemClickEventArgs e)
        {
            BarButtonItem barItem = sender as BarButtonItem;

            if (barItem == null)
            {
                return;
            }
            string groupName = barItem.Content as string;

            treeList.BeginDataUpdate();
            foreach (Employee empl in view.DataControl.SelectedItems)
            {
                empl.GroupName = groupName;
            }
            treeList.EndDataUpdate();
        }
Esempio n. 29
0
        private void BarButtonItem_ItemClick(object sender, DevExpress.Xpf.Bars.ItemClickEventArgs e)
        {
            Microsoft.Win32.OpenFileDialog dialog = new Microsoft.Win32.OpenFileDialog();
            dialog.Filter = "流程设计文件(*.lfd)|*.lfd|所有文件(*.*)|*.*";
            if (dialog.ShowDialog() == false)
            {
                return;
            }

            bool result = cvMain.LoadFile(dialog.FileName);  //加载

            if (!result)
            {
                MessageBox.Show("加载失败,请核实.", "打开文件", MessageBoxButton.OK, MessageBoxImage.Error);
                return;
            }
            cvMain.SavePath = dialog.FileName;
        }
Esempio n. 30
0
        private void NewBarButtonItem_ItemClick(object sender, DevExpress.Xpf.Bars.ItemClickEventArgs e)
        {
            OpenFileDialog openFileDialog = new OpenFileDialog();

            openFileDialog.Title           = "Open File";
            openFileDialog.Multiselect     = false;
            openFileDialog.CheckFileExists = true;
            openFileDialog.CheckPathExists = true;
            openFileDialog.Filter          =
                "All Supported Files (*.txt, *.rtf, *.doc, *.docx, *.htm, *.html, *.mht, *.odt, *.xml, *.epub|*.txt; *.rtf; *.doc; *.docx; *.htm; *.html; *.mht; *.odt; *.xml; *.epub|Text files (*.txt)|*.txt|Rich Text Format (*.rtf)|*.rtf|Microsoft Word 97-2003 (*.doc)|*.doc| Microsoft Word 2007 (*.docx)|*.docx|HTML (*.htm, *.html)|*.htm; *.html|WebArchive (*.mht)|*.mht|Open Document (*.odt)|*.odt|XML Document (*.xml)|*.xml|Electronic Publication (*.epub)|*.epub";

            if (openFileDialog.ShowDialog() == true)
            {
                openedFileLocation = openFileDialog.FileName;
                RichTextBox.Document.LoadDocument(openedFileLocation, DocumentFormat.Undefined);
                //isFileOpened = true;
            }
        }