public void ShowDesigner(bool haveDesignRight) { DesignerReport.ShowDesigner(this, haveDesignRight); //if (!haveDesignRight) //{ // DesignerReport //} }
public static ArrayList GetSelectedComponentNames(DesignerReport report) { ArrayList names = new ArrayList(); foreach (Control component in report.GetSelectedComponents()) { names.Add(component); } return(names); }
public static DialogResult ShowDialog(Report report, DesignerReport parentform) { if (formgroup == null) { formgroup = new FormGroup(); } formgroup.currentReport = report; formgroup.parent = parentform; formgroup.Inicialize(); return(formgroup.ShowDialog()); }
public void Attach(DesignerReport report) { this.report = report; AddComponentChangeEvents(); // IComponentChangeService report = (IComponentChangeService)((Report)report).GetService(typeof(IComponentChangeService)); // report.ComponentChanged += new ComponentChangedEventHandler(ComponentChanged); // report.ComponentAdded += new ComponentEventHandler(ComponentAdded); // report.ComponentRemoved += new ComponentEventHandler(ComponentRemoved); report.TransactionOpened += new EventHandler(TransactionOpened); report.TransactionClosed += new DesignerTransactionCloseEventHandler(TransactionClosed); }
public ComponentRemovedUndoAction(DesignerReport report, ComponentEventArgs cea) { this.report = report; oldComponent = (Control)cea.Component; componentType = cea.Component.GetType(); cx = oldComponent.Location.X; cy = oldComponent.Location.Y; width = oldComponent.Width; heigh = oldComponent.Height; if (oldComponent is System.Windows.Forms.Label) { strFormat = report.GetPropertyValue(oldComponent.Name, "Format"); } }
public static void SetBandsLocation(DesignerReport report, ArrayList names) { if (names == null) { return; } ArrayList components = new ArrayList(); foreach (object component in names) { components.Add(component); } report.SetBandsLocation(components); }
public static void SetSelectedComponentsPerName(DesignerReport report, ArrayList names) { if (names == null) { return; } ArrayList components = new ArrayList(); foreach (Control component in names) { components.Add(component); } report.SetSelectedComponents(components); }
public ReportDesignerTransaction(DesignerReport report, string description) : base(description) { this.report = report; // The report keeps a string stack of the transaction descriptions. report.TransactionDescriptions.Push(description); // If this is first transaction to be opened, have the report raise // opening/opened events. // if (report.TransactionCount++ == 0) { report.OnTransactionOpening(EventArgs.Empty); report.OnTransactionOpened(EventArgs.Empty); } }
protected override void OnCommit() { if (report != null) { Debug.Assert(report.TransactionDescriptions != null, "End batch operation with no desription?!?"); // If this is the last transaction to be closed, have the report raise // closing/closed events. // if (--report.TransactionCount == 0) { DesignerTransactionCloseEventArgs dtc = new DesignerTransactionCloseEventArgs(true); report.OnTransactionClosing(dtc); report.OnTransactionClosed(dtc); } string s = (string)report.TransactionDescriptions.Pop(); report = null; } }
public ComponentAddedUndoAction(DesignerReport report, ComponentEventArgs cea) { this.report = report; this.componentType = cea.Component.GetType(); this.oldComponent = cea.Component; if (oldComponent is Control) { Control con = oldComponent as Control; this.componentName = con.Name; cx = con.Location.X; cy = con.Location.Y; width = con.Width; heigh = con.Height; parentComponent = null; } else { //parentComponent = report.PrimarySelection; } }
//MemberDescriptor member; public BandsChangedUndoAction(DesignerReport report, ArrayList oldComponentNames) { this.report = report; this.oldComponentNames = oldComponentNames; }
public ComponentChangedUndoAction(DesignerReport report, ComponentChangedEventArgs ea) { this.report = report; this.oldcomponent = ea.Component; if (this.oldcomponent is Control) { this.componentName = ((Control)oldcomponent).Name; } this.member = ea.Member; this.PropName = ea.Member.Name; if (ea.Component is PictureBox && PropName == "Image") { PictureBox pictureBox = ea.Component as PictureBox; if (pictureBox != null) { oldImagePath = report.GetPropertyValue(pictureBox.Name, "Image"); } } fieldName = staticfieldName; objName = staticobjName; XmlPropName = staticXmlPropName; isCollection = ea.NewValue is IList; if (isCollection) { IList oldCol = (IList)ea.OldValue; IList newCol = (IList)ea.NewValue; object[] newArray = new object[newCol.Count]; isComponentCollection = false; if (newCol.Count > 0) { isComponentCollection = newCol[0] is IComponent; } if (oldCol != null) { object[] oldArray = new object[oldCol.Count]; if (isComponentCollection) { int idx = 0; foreach (IComponent cmp in oldCol) { oldArray[idx++] = cmp.Site.Name; } } else { oldCol.CopyTo(oldArray, 0); } this.oldValue = oldArray; } if (isComponentCollection) { int idx = 0; foreach (IComponent cmp in newCol) { newArray[idx++] = cmp.Site.Name; } } else { newCol.CopyTo(newArray, 0); } this.newValue = newArray; } else { this.oldValue = ea.OldValue; this.newValue = ea.NewValue; } }
public SelectComponentsUndoAction(DesignerReport report, ArrayList oldComponentNames) { this.report = report; this.oldComponentNames = oldComponentNames; }