Ejemplo n.º 1
0
        private void Complete(IAsyncResult results)
        {
            if (!this.IsDisposed)
            {
                if (this.InvokeRequired)
                {
                    this.Invoke(new cWaitWindow.MethodInvoker <IAsyncResult>(this.Complete), results);
                }
                else
                {
                    //	Capture the result
                    try
                    {
                        this._Result = ((FunctionInvoker <object>)results.AsyncState).EndInvoke(results);
                        if (_ProcessFailure)
                        {
                        }
                        else
                        {
                            this.progressPanel1.Caption = "Completed";
                            DevExpress.Skins.Skin        commonSkin = DevExpress.Skins.CommonSkins.GetSkin(DevExpress.LookAndFeel.UserLookAndFeel.Default.ActiveLookAndFeel);
                            DevExpress.Skins.SkinElement loadingBig = commonSkin["LoadingBig"];
                            loadingBig.Image.SetImage(Properties.Resources.State_Validation_Valid_48x48, Color.Empty);
                            loadingBig.Properties.RemoveProperty(DevExpress.Skins.CommonSkins.OptFrameCount);
                            loadingBig.Properties.RemoveProperty(DevExpress.Skins.CommonSkins.OptFrameDelay);
                            DevExpress.LookAndFeel.LookAndFeelHelper.ForceDefaultLookAndFeelChanged();
                        }

                        this.progressPanel1.Description = string.Empty;
                        //this.progressPanel1.

                        //this.progressPanel1.
                        layoutpnlButtons.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Always;

                        Form owner = Application.OpenForms.Cast <Form>().FirstOrDefault(f => f.Name == "frmMain");
                        this.Location      = new Point(owner.Location.X + owner.Width / 2 - this.Width / 2, owner.Location.Y + owner.Height / 2 - this.Height / 2);
                        this.UseWaitCursor = false;
                    }
                    catch (Exception ex)
                    {
                        //	Grab the Exception for rethrowing after the WaitWindow has closed.
                        this._Error = ex;
                    }
                }
            }
        }
Ejemplo n.º 2
0
 public MyInplaceEditor(SchedulerInplaceEditorEventArgs inplaceEditorArgs)
 {
     InitializeComponent();
     this.Text             = string.Empty;
     this.ControlBox       = false;
     this.FormBorderStyle  = System.Windows.Forms.FormBorderStyle.None;
     this.FormBorderEffect = DevExpress.XtraEditors.FormBorderEffect.None;
     SubscribeKeyDownEvents();
     this.control = inplaceEditorArgs.Control;
     if (inplaceEditorArgs.UseFullCellEditor)
     {
         this.Bounds = control.RectangleToScreen(inplaceEditorArgs.Bounds);
         DevExpress.Skins.Skin        currentSkin = DevExpress.Skins.SchedulerSkins.GetSkin(control.LookAndFeel);
         DevExpress.Skins.SkinElement element     = currentSkin[DevExpress.Skins.SchedulerSkins.SkinAllDayAreaSelected];
         this.BackColor = element.Color.BackColor;
         this.ForeColor = Color.White;
     }
     else
     {
         this.Bounds    = AdjustEditorBounds(inplaceEditorArgs.Bounds);
         this.BackColor = inplaceEditorArgs.BackColor;
     }
 }
Ejemplo n.º 3
0
		/// <summary>
		/// Set the layout back color
		/// </summary>
		private void SetLayoutBackColor()
		{
			DevExpress.Skins.Skin currentSkin = null;
			DevExpress.Skins.Skin tabSkin = null;
			DevExpress.Skins.Skin navBarSkin = null;
			DevExpress.Skins.Skin formSkin = null;

			DevExpress.Skins.SkinElement elementForm, elementPanel, elementPanelNoBorder, layoutItem;
			DevExpress.Skins.SkinElement panelBottom, panelTop, panelLeft, panelRight;
			DevExpress.Skins.SkinElement layoutItemPadding, layoutGroupPadding, layoutRootGroupPadding;
			DevExpress.Skins.SkinElement layoutGroupWithoutBordersPadding, layoutRootGroupWithoutBordersPadding;

			DevExpress.LookAndFeel.DefaultLookAndFeel df = new DevExpress.LookAndFeel.DefaultLookAndFeel();
			df.LookAndFeel.SkinName = "Black";
			currentSkin = DevExpress.Skins.CommonSkins.GetSkin(df.LookAndFeel);
			tabSkin = DevExpress.Skins.TabSkins.GetSkin(df.LookAndFeel);
			navBarSkin = DevExpress.Skins.NavBarSkins.GetSkin(df.LookAndFeel);
			formSkin = DevExpress.Skins.FormSkins.GetSkin(df.LookAndFeel);

			elementForm = currentSkin[DevExpress.Skins.CommonSkins.SkinForm];
			elementPanel = currentSkin[DevExpress.Skins.CommonSkins.SkinGroupPanel];
			elementPanelNoBorder = currentSkin[DevExpress.Skins.CommonSkins.SkinGroupPanelNoBorder];
			layoutItem = currentSkin[DevExpress.Skins.CommonSkins.SkinLayoutItemBackground];
			panelBottom = currentSkin[DevExpress.Skins.CommonSkins.SkinGroupPanelBottom];
			panelTop = currentSkin[DevExpress.Skins.CommonSkins.SkinGroupPanelTop];
			panelLeft = currentSkin[DevExpress.Skins.CommonSkins.SkinGroupPanelLeft];
			panelRight = currentSkin[DevExpress.Skins.CommonSkins.SkinGroupPanelRight];

			layoutItemPadding = currentSkin[DevExpress.Skins.CommonSkins.SkinLayoutItemPadding];
			layoutGroupPadding = currentSkin[DevExpress.Skins.CommonSkins.SkinLayoutGroupPadding];
			layoutRootGroupPadding = currentSkin[DevExpress.Skins.CommonSkins.SkinLayoutRootGroupPadding];
			layoutGroupWithoutBordersPadding = currentSkin[DevExpress.Skins.CommonSkins.SkinLayoutGroupWithoutBordersPadding];
			layoutRootGroupWithoutBordersPadding = currentSkin[DevExpress.Skins.CommonSkins.SkinLayoutRootGroupWithoutBordersPadding];

			// Change the padding on elements
			//layoutItemPadding.ContentMargins.All = 5;
			//layoutGroupPadding.ContentMargins.All = 0;
			//layoutRootGroupPadding.ContentMargins.All = 0;
			//layoutGroupWithoutBordersPadding.ContentMargins.All = 0;
			//layoutRootGroupWithoutBordersPadding.ContentMargins.All = 0;

			if (elementPanel.Image.Image != null)
			{
				elementPanel.Image.Image = null;
			}

			DevExpress.Skins.SkinElement element;
			element = tabSkin[DevExpress.Skins.TabSkins.SkinTabPane];

			DevExpress.Skins.SkinElement navbar = navBarSkin[DevExpress.Skins.NavBarSkins.SkinBackground];

			layoutItem.Color.BackColor =
				elementForm.Color.BackColor =
				elementPanel.Color.BackColor =
				elementPanelNoBorder.Color.BackColor =
				panelBottom.Color.SolidImageCenterColor =
				panelTop.Color.SolidImageCenterColor =
				panelLeft.Color.SolidImageCenterColor =
				panelRight.Color.SolidImageCenterColor =
				element.Color.SolidImageCenterColor =
				navbar.Color.BackColor =
				base.BackColor;

			if (elementPanel.Image.Image != null)
			{
				elementPanel.Image.Image = null;
			}
		}
Ejemplo n.º 4
0
		public mgLayoutControl()
			: base()
		{
			this.Root.GroupBordersVisible = false;

			DevExpress.Skins.Skin currentSkin = null;
			DevExpress.Skins.Skin tabSkin = null;
			DevExpress.Skins.Skin navBarSkin = null;
			DevExpress.Skins.Skin formSkin = null;

			DevExpress.Skins.SkinElement elementForm, elementPanel, elementPanelNoBorder,layoutItem;
			DevExpress.Skins.SkinElement panelBottom, panelTop, panelLeft, panelRight;
			DevExpress.Skins.SkinElement layoutItemPadding, layoutGroupPadding, layoutRootGroupPadding;
			DevExpress.Skins.SkinElement layoutGroupWithoutBordersPadding, layoutRootGroupWithoutBordersPadding;
			
            DevExpress.LookAndFeel.DefaultLookAndFeel df = new DevExpress.LookAndFeel.DefaultLookAndFeel();
            df.LookAndFeel.SkinName = "Black";
            currentSkin = DevExpress.Skins.CommonSkins.GetSkin(df.LookAndFeel);
			tabSkin = DevExpress.Skins.TabSkins.GetSkin(df.LookAndFeel);
			navBarSkin = DevExpress.Skins.NavBarSkins.GetSkin(df.LookAndFeel);
			formSkin = DevExpress.Skins.FormSkins.GetSkin(df.LookAndFeel);

			elementForm = currentSkin[DevExpress.Skins.CommonSkins.SkinForm];
            elementPanel = currentSkin[DevExpress.Skins.CommonSkins.SkinGroupPanel];
            elementPanelNoBorder = currentSkin[DevExpress.Skins.CommonSkins.SkinGroupPanelNoBorder];
            layoutItem = currentSkin[DevExpress.Skins.CommonSkins.SkinLayoutItemBackground];
			panelBottom = currentSkin[DevExpress.Skins.CommonSkins.SkinGroupPanelBottom];
			panelTop = currentSkin[DevExpress.Skins.CommonSkins.SkinGroupPanelTop];
			panelLeft = currentSkin[DevExpress.Skins.CommonSkins.SkinGroupPanelLeft];
			panelRight = currentSkin[DevExpress.Skins.CommonSkins.SkinGroupPanelRight];

			layoutItemPadding = currentSkin[DevExpress.Skins.CommonSkins.SkinLayoutItemPadding];
			layoutGroupPadding = currentSkin[DevExpress.Skins.CommonSkins.SkinLayoutGroupPadding];
			layoutRootGroupPadding = currentSkin[DevExpress.Skins.CommonSkins.SkinLayoutRootGroupPadding];
			layoutGroupWithoutBordersPadding = currentSkin[DevExpress.Skins.CommonSkins.SkinLayoutGroupWithoutBordersPadding];
			layoutRootGroupWithoutBordersPadding = currentSkin[DevExpress.Skins.CommonSkins.SkinLayoutRootGroupWithoutBordersPadding];

			// Change the padding on elements
			layoutItemPadding.ContentMargins.All = 5;
			layoutGroupPadding.ContentMargins.All = 0;
			layoutRootGroupPadding.ContentMargins.All = 0;
			layoutGroupWithoutBordersPadding.ContentMargins.All = 0;
			//layoutGroupWithoutBordersPadding.ContentMargins.Bottom = 12;
			layoutRootGroupWithoutBordersPadding.ContentMargins.All = 0;

			if (elementPanel.Image.Image != null)
			{
				elementPanel.Image.Image = null;
			}

			DevExpress.Skins.SkinElement element;
			element = tabSkin[DevExpress.Skins.TabSkins.SkinTabPane];

			DevExpress.Skins.SkinElement navbar = navBarSkin[DevExpress.Skins.NavBarSkins.SkinBackground];

			//layoutItem.Color.BackColor =
			//    elementForm.Color.BackColor =
			//    elementPanel.Color.BackColor =
			//    elementPanelNoBorder.Color.BackColor =
			//    panelBottom.Color.SolidImageCenterColor =
			//    panelTop.Color.SolidImageCenterColor =
			//    panelLeft.Color.SolidImageCenterColor =
			//    panelRight.Color.SolidImageCenterColor =
			//    element.Color.SolidImageCenterColor =
			//    navbar.Color.BackColor =
			//    Color.White;

			//if (elementPanel.Image.Image != null)
			//{
			//    elementPanel.Image.Image = null;
			//}

			this.BackColor = Color.White;
			SetLayoutBackColor();

            AllowCustomizationMenu = false;
		}