public void DesignSurface_Flush_InvokeWithHostWithoutLoader_Nop() { var surface = new DesignSurface(); surface.Flush(); // Flush again. surface.Flush(); }
public void DesignSurface_Flush_InvokeDisposed_Nop() { var surface = new DesignSurface(); surface.Dispose(); surface.Flush(); // Flush again. surface.Flush(); }
private void MergeFormChanges() { LoggingService.Info("MergeFormChanges()"); designSurface.Flush(); generator.MergeFormChanges(null); LoggingService.Info("Finished merging form changes"); hasUnmergedChanges = false; }
public void Save() { if (_loaded && _modified) { _surface.Flush(); _modified = false; } }
public void DesignSurface_Flush_InvokeWithFlushed_CallsHandler() { var surface = new DesignSurface(); int callCount = 0; surface.Flushed += (sender, e) => { Assert.Same(surface, sender); Assert.Same(EventArgs.Empty, e); callCount++; }; surface.Flush(); Assert.Equal(1, callCount); // Fush again. surface.Flush(); Assert.Equal(2, callCount); // Fush when disposed. surface.Dispose(); surface.Flush(); Assert.Equal(3, callCount); }
public virtual void MergeFormChanges() { if (this.HasLoadError || this.designSurface == null) { LoggingService.Debug("Forms designer: Cannot merge form changes because the designer is not loaded successfully or not loaded at all"); return; } else if (this.DesignerCodeFile == null) { throw new InvalidOperationException("Cannot merge form changes without a designer code file."); } bool isDirty = this.DesignerCodeFile.IsDirty; LoggingService.Info("Merging form changes..."); designSurface.Flush(); this.resourceStore.CommitAllResourceChanges(); LoggingService.Info("Finished merging form changes"); hasUnmergedChanges = false; this.DesignerCodeFile.IsDirty = isDirty; }
public virtual void MergeFormChanges() { designSurface.Flush(); hasUnmergedChanges = false; }
/// <summary> /// Save the current workflow /// </summary> /// <param name="markupFileName"></param> /// <returns></returns> public Boolean SaveWorkflow(String markupFileName) { _wfLoader.MarkupFileName = markupFileName; _designSurface.Flush(); return(true); }