示例#1
0
        private void windowsUIButtonPanel1_ButtonChecked(object sender, DevExpress.XtraBars.Docking2010.ButtonEventArgs e)
        {
            DevExpress.XtraBars.Docking2010.WindowsUIButtonPanel tt = sender as DevExpress.XtraBars.Docking2010.WindowsUIButtonPanel;


            if (tt.Buttons[0].Properties.Checked == true)
            {
                tt.Buttons[1].Properties.Checked = false;
                tt.Buttons[0].Properties.Checked = false;



                if (transitionManager1.IsTransaction)
                {
                    transitionManager1.EndTransition();
                }

                transitionManager1.StartTransition(xtraTabPage1);
                try
                {
                    xtraTabPage1.PageVisible        = true;
                    xtraTabPage2.PageVisible        = false;
                    xtraTabControl1.SelectedTabPage = xtraTabPage1;
                    this.pol_instructionsTableAdapter.Fill_pol(deloDataSet1.pol_instructions, Globals.id_sl_pol_ins);
                }
                finally
                {
                    transitionManager1.EndTransition();
                }
            }

            if (tt.Buttons[1].Properties.Checked == true)
            {
                tt.Buttons[1].Properties.Checked = false;
                tt.Buttons[0].Properties.Checked = false;



                if (transitionManager1.IsTransaction)
                {
                    transitionManager1.EndTransition();
                }

                transitionManager1.StartTransition(xtraTabPage2);
                try
                {
                    xtraTabPage1.PageVisible        = false;
                    xtraTabPage2.PageVisible        = true;
                    xtraTabControl1.SelectedTabPage = xtraTabPage2;
                    this.pol_instructionsTableAdapter.Fill_instr(deloDataSet1.pol_instructions, Globals.id_sl_pol_ins);
                }
                finally
                {
                    transitionManager1.EndTransition();
                }
            }
        }
示例#2
0
 private void Main2_Load(object sender, EventArgs e)
 {
     // this.pol_instructionsTableAdapter.Fill_pol(deloDataSet1.pol_instructions, Globals.id_sl_pol_ins);
     // TODO: This line of code loads data into the 'deloDataSet1.doc_pol_ins_file' table. You can move, or remove it, as needed.
     // this.doc_pol_ins_fileTableAdapter.Fill(this.deloDataSet1.doc_pol_ins_file);
     xtraTabControl1.SelectedTabPage = xtraTabPage1;
     DevExpress.XtraBars.Docking2010.WindowsUIButtonPanel tt = sender as DevExpress.XtraBars.Docking2010.WindowsUIButtonPanel;
     Delegate.RemoveAll(Globals.en_delegate_pol_ins, Globals.en_delegate_pol_ins);
     Globals.en_delegate_pol_ins = visible_main;
 }
示例#3
0
        /// <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();
            this.gridControl = new DevExpress.XtraGrid.GridControl();
            this.gridView = new DevExpress.XtraGrid.Views.Grid.GridView();
            this.mvvmContext = new DevExpress.Utils.MVVM.MVVMContext(this.components);
            this.labelControl = new DevExpress.XtraEditors.LabelControl();
            this.windowsUIButtonPanel = new DevExpress.XtraBars.Docking2010.WindowsUIButtonPanel();
            this.layoutControl = new DevExpress.XtraLayout.LayoutControl();
            this.layoutControlGroup = new DevExpress.XtraLayout.LayoutControlGroup();
            this.itemLabel = new DevExpress.XtraLayout.LayoutControlItem();
            this.itemGrid = new DevExpress.XtraLayout.LayoutControlItem();
            ((System.ComponentModel.ISupportInitialize)(this.layoutControl)).BeginInit();
            this.layoutControl.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.gridControl)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.gridView)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.mvvmContext)).BeginInit();
            this.SuspendLayout();
            //
            // windowsUIButtonPanel
            //
            this.windowsUIButtonPanel.AppearanceButton.Hovered.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(130)))), ((int)(((byte)(130)))), ((int)(((byte)(130)))));
            this.windowsUIButtonPanel.AppearanceButton.Hovered.FontSizeDelta = -1;
            this.windowsUIButtonPanel.AppearanceButton.Hovered.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(130)))), ((int)(((byte)(130)))), ((int)(((byte)(130)))));
            this.windowsUIButtonPanel.AppearanceButton.Hovered.Options.UseBackColor = true;
            this.windowsUIButtonPanel.AppearanceButton.Hovered.Options.UseFont = true;
            this.windowsUIButtonPanel.AppearanceButton.Hovered.Options.UseForeColor = true;
            this.windowsUIButtonPanel.AppearanceButton.Normal.FontSizeDelta = -1;
            this.windowsUIButtonPanel.AppearanceButton.Normal.Options.UseFont = true;
            this.windowsUIButtonPanel.AppearanceButton.Pressed.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(159)))), ((int)(((byte)(159)))), ((int)(((byte)(159)))));
            this.windowsUIButtonPanel.AppearanceButton.Pressed.FontSizeDelta = -1;
            this.windowsUIButtonPanel.AppearanceButton.Pressed.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(159)))), ((int)(((byte)(159)))), ((int)(((byte)(159)))));
            this.windowsUIButtonPanel.AppearanceButton.Pressed.Options.UseBackColor = true;
            this.windowsUIButtonPanel.AppearanceButton.Pressed.Options.UseFont = true;
            this.windowsUIButtonPanel.AppearanceButton.Pressed.Options.UseForeColor = true;
            this.windowsUIButtonPanel.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(63)))), ((int)(((byte)(63)))));
            this.windowsUIButtonPanel.Dock = System.Windows.Forms.DockStyle.Bottom;
            this.windowsUIButtonPanel.EnableImageTransparency = true;
            this.windowsUIButtonPanel.ForeColor = System.Drawing.Color.White;
            this.windowsUIButtonPanel.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
            this.windowsUIButtonPanel.Name = "windowsUIButtonPanel";
            this.windowsUIButtonPanel.Text = "windowsUIButtonPanel";
            this.windowsUIButtonPanel.UseButtonBackgroundImages = false;
            this.windowsUIButtonPanel.MinimumSize = new System.Drawing.Size(60, 60);
            this.windowsUIButtonPanel.MaximumSize = new System.Drawing.Size(0, 60);
                                                                this.windowsUIButtonPanel.Buttons.Add(new DevExpress.XtraBars.Docking2010.WindowsUIButton("New", null, "New;Size32x32;GrayScaled"));

                                this.windowsUIButtonPanel.Buttons.Add(new DevExpress.XtraBars.Docking2010.WindowsUIButton("Edit", null, "Edit;Size32x32;GrayScaled"));

                                this.windowsUIButtonPanel.Buttons.Add(new DevExpress.XtraBars.Docking2010.WindowsUIButton("Delete", null, "Edit/Delete;Size32x32;GrayScaled"));

                                        this.windowsUIButtonPanel.Buttons.Add(new DevExpress.XtraBars.Docking2010.WindowsUIButton("Refresh", null, "Refresh;Size32x32;GrayScaled"));

            this.windowsUIButtonPanel.Buttons.Add(new DevExpress.XtraBars.Docking2010.WindowsUISeparator());
            this.windowsUIButtonPanel.Buttons.Add(new DevExpress.XtraBars.Docking2010.WindowsUIButton("Print", null, "Preview;Size32x32;GrayScaled"));
            //
            // labelControl
            //
            this.labelControl.AllowHtmlString = true;
            this.labelControl.Appearance.Font = new System.Drawing.Font("Segoe UI", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
            this.labelControl.Appearance.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(140)))), ((int)(((byte)(140)))), ((int)(((byte)(140)))));
            this.labelControl.Appearance.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Near;
            this.labelControl.AutoSizeMode = DevExpress.XtraEditors.LabelAutoSizeMode.Vertical;
            this.labelControl.Dock = System.Windows.Forms.DockStyle.Top;
            this.labelControl.Name = "labelControl";
            this.labelControl.Padding = new System.Windows.Forms.Padding(0, 3, 13, 6);
            this.labelControl.Text = "CustomersAttachment";
            //
            // gridControl
            //
            this.gridControl.Dock = System.Windows.Forms.DockStyle.Fill;
            this.gridControl.Location = new System.Drawing.Point(5, 116);
            this.gridControl.MainView = this.gridView;
            this.gridControl.Name = "gridControl";
            this.gridControl.Size = new System.Drawing.Size(779, 311);
            this.gridControl.TabIndex = 2;
            this.gridControl.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
            this.gridView});
            //
            // gridView
            //
            this.gridView.GridControl = this.gridControl;
            this.gridView.Name = "gridView";
            this.gridView.OptionsBehavior.Editable = false;
            this.gridView.OptionsCustomization.AllowColumnMoving = false;
            this.gridView.OptionsCustomization.AllowGroup = false;
            this.gridView.OptionsCustomization.AllowQuickHideColumns = false;
            this.gridView.OptionsMenu.EnableColumnMenu = false;
            this.gridView.OptionsSelection.EnableAppearanceFocusedCell = false;
            this.gridView.OptionsView.ShowFilterPanelMode = DevExpress.XtraGrid.Views.Base.ShowFilterPanelMode.Never;
            this.gridView.OptionsView.ShowGroupPanel = false;
            this.gridView.OptionsView.ShowIndicator = false;
            this.customersAttachmentCollectionViewBindingSource = new System.Windows.Forms.BindingSource(this.components);
            this.customersAttachmentCollectionViewBindingSource.DataSource = typeof(Building_Managment.MyCode.CustomersAttachment);
            this.gridControl.DataSource = customersAttachmentCollectionViewBindingSource;

            DevExpress.XtraGrid.Extensions.PopulateColumnsParameters parameters = new DevExpress.XtraGrid.Extensions.PopulateColumnsParameters();
                        //
            //Customer
            //
            DevExpress.XtraGrid.Extensions.PopulateColumnParameters CustomerPopulateColumnParameters = new DevExpress.XtraGrid.Extensions.PopulateColumnParameters();
            CustomerPopulateColumnParameters.FieldName = "Customer";
            CustomerPopulateColumnParameters.Path = "Customer.CustomerName";
            parameters.CustomColumnParameters.Add(CustomerPopulateColumnParameters);
                        DevExpress.XtraGrid.Extensions.PopulateColumnParameters CustomerPopulateColumnParameters_NotGenerate = new DevExpress.XtraGrid.Extensions.PopulateColumnParameters();
            CustomerPopulateColumnParameters_NotGenerate.FieldName = "CustomerID";
            CustomerPopulateColumnParameters_NotGenerate.ColumnVisible = false;
            parameters.CustomColumnParameters.Add(CustomerPopulateColumnParameters_NotGenerate);

            DevExpress.XtraGrid.Extensions.PopulateColumnParameters CustomerPopulateColumnParameters_NotVisible = new DevExpress.XtraGrid.Extensions.PopulateColumnParameters();
            CustomerPopulateColumnParameters_NotVisible.FieldName = "Customer";
            CustomerPopulateColumnParameters_NotVisible.ColumnVisible = false;
            parameters.CustomColumnParameters.Add(CustomerPopulateColumnParameters_NotVisible);

            this.gridView.PopulateColumns(typeof(Building_Managment.MyCode.CustomersAttachment),parameters);
            //
            // mvvmContext
            //
            this.mvvmContext.ContainerControl = this;
            this.mvvmContext.ViewModelType = typeof(Building_Managment.ViewModels.CustomersAttachmentCollectionViewModel);
            //
            // layoutControl
            //
            layoutControl.Controls.AddRange(new System.Windows.Forms.Control[] { this.labelControl, this.gridControl });
            this.layoutControl.AllowCustomization = false;
            this.layoutControl.Dock = System.Windows.Forms.DockStyle.Fill;
            this.layoutControl.Root = this.layoutControlGroup;
            //
            // itemLabel
            //
            this.itemLabel.Control = this.labelControl;
            this.itemLabel.TextVisible = false;
            this.itemLabel.Name = "itemLabel";
            this.itemLabel.Padding = new DevExpress.XtraLayout.Utils.Padding(0);
            //
            // itemGrid
            //
            this.itemGrid.Control = this.gridControl;
            this.itemGrid.TextVisible = false;
            this.itemGrid.Name = "itemGrid";
            this.itemGrid.Padding = new DevExpress.XtraLayout.Utils.Padding(0);
            //
            // layoutControlGroup
            //
            this.layoutControlGroup.GroupBordersVisible = false;
            this.layoutControlGroup.Add(itemLabel);
            this.layoutControlGroup.Add(itemGrid);
            this.layoutControlGroup.Name = "layoutControlGroup";
            this.layoutControlGroup.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True;
            this.layoutControlGroup.GroupBordersVisible = false;
            this.layoutControlGroup.TextVisible = false;
            this.layoutControlGroup.Padding = new DevExpress.XtraLayout.Utils.Padding(40, 40, 0, 0);
            //
            //CustomersAttachmentCollectionView
            //
            this.Appearance.BackColor = System.Drawing.Color.White;
            this.Appearance.Options.UseBackColor = true;
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.Controls.Add(this.layoutControl);
            this.Controls.Add(this.windowsUIButtonPanel);
            this.Size = new System.Drawing.Size(1024, 768);
            this.Name = "CustomersAttachmentCollectionView";
            ((System.ComponentModel.ISupportInitialize)(this.layoutControl)).EndInit();
            this.layoutControl.ResumeLayout(false);
            ((System.ComponentModel.ISupportInitialize)(this.gridControl)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.gridView)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.mvvmContext)).EndInit();
            this.ResumeLayout(false);
            this.PerformLayout();
        }
示例#4
0
文件: Main.cs 项目: saltunia/oplata
        private void windowsUIButtonPanel1_ButtonChecked(object sender, DevExpress.XtraBars.Docking2010.ButtonEventArgs e)
        {
            DevExpress.XtraBars.Docking2010.WindowsUIButtonPanel tt = sender as DevExpress.XtraBars.Docking2010.WindowsUIButtonPanel;


            if (tt.Buttons[0].Properties.Checked == true)
            {
                tt.Buttons[1].Properties.Checked = false;
                tt.Buttons[0].Properties.Checked = false;
                tt.Buttons[2].Properties.Checked = false;


                if (transitionManager1.IsTransition)
                {
                    transitionManager1.EndTransition();
                }

                transitionManager1.StartTransition(xtraTabPage1);
                try
                {
                    xtraTabPage1.PageVisible        = true;
                    xtraTabPage2.PageVisible        = false;
                    xtraTabPage3.PageVisible        = false;
                    xtraTabControl1.SelectedTabPage = xtraTabPage1;
                    //this.pol_instructionsTableAdapter.Fill_pol(deloDataSet1.pol_instructions, Globals.id_sl_pol_ins);
                    this.planTableAdapter.Fill(this.oplataDataSet.plan, god, mes);
                }
                finally
                {
                    transitionManager1.EndTransition();
                }
            }

            if (tt.Buttons[1].Properties.Checked == true)
            {
                tt.Buttons[1].Properties.Checked = false;
                tt.Buttons[0].Properties.Checked = false;
                tt.Buttons[2].Properties.Checked = false;


                if (transitionManager1.IsTransition)
                {
                    transitionManager1.EndTransition();
                }

                transitionManager1.StartTransition(xtraTabPage2);
                try
                {
                    xtraTabPage1.PageVisible        = false;
                    xtraTabPage3.PageVisible        = false;
                    xtraTabPage2.PageVisible        = true;
                    xtraTabControl1.SelectedTabPage = xtraTabPage2;
                }
                finally
                {
                    transitionManager1.EndTransition();
                }
            }

            if (tt.Buttons[2].Properties.Checked == true)
            {
                tt.Buttons[2].Properties.Checked = false;
                tt.Buttons[1].Properties.Checked = false;
                tt.Buttons[0].Properties.Checked = false;



                if (transitionManager1.IsTransition)
                {
                    transitionManager1.EndTransition();
                }


                try
                {
                    dateTimePicker1.Text = Convert.ToString(DateTime.Today);

                    xtraTabPage3.PageVisible = true;
                    xtraTabPage1.PageVisible = false;
                    xtraTabPage2.PageVisible = false;
                    DateTime now         = Convert.ToDateTime(dateTimePicker1.Value);
                    DateTime mes_naz     = now.AddMonths(-1);
                    DateTime god_naz     = now.AddYears(-1);
                    DateTime god_mes_naz = now.AddMonths(-1).AddYears(-1);

                    this.analyseTableAdapter.Fill(this.oplataDataSet.analyse, now, now.AddDays(-1));
                    this.analyse1TableAdapter.Fill(this.oplataDataSet.analyse1, mes_naz, mes_naz.AddDays(-1));
                    this.analyse2TableAdapter.Fill(this.oplataDataSet.analyse2, now, now.AddDays(-1));
                    this.analyse3TableAdapter.Fill(this.oplataDataSet.analyse3, mes_naz, mes_naz.AddDays(-1));
                    this.analyse4TableAdapter.Fill(this.oplataDataSet.analyse4, now, now.AddDays(-1));
                    this.analyse5TableAdapter.Fill(this.oplataDataSet.analyse5, mes_naz, mes_naz.AddDays(-1));

                    ReportParameter date1 = new ReportParameter("date1", now.ToString());
                    ReportParameter date2 = new ReportParameter("date2", mes_naz.ToString());
                    ReportParameter date3 = new ReportParameter("date3", god_naz.ToString());
                    ReportParameter date4 = new ReportParameter("date4", god_mes_naz.ToString());
                    reportViewer1.LocalReport.SetParameters(new ReportParameter[] { date1 });
                    reportViewer1.LocalReport.SetParameters(new ReportParameter[] { date2 });
                    reportViewer1.LocalReport.SetParameters(new ReportParameter[] { date3 });
                    reportViewer1.LocalReport.SetParameters(new ReportParameter[] { date4 });
                    this.reportViewer1.RefreshReport();
                }
                finally
                {
                    transitionManager1.EndTransition();
                }
            }
        }