/// <summary> /// Adds all layouts used by this target to the specified collection. /// </summary> /// <param name="layouts">The collection to add layouts to.</param> public override void PopulateLayouts(LayoutCollection layouts) { base.PopulateLayouts(layouts); if (DBHostLayout != null) { DBHostLayout.PopulateLayouts(layouts); } if (DBUserNameLayout != null) { DBUserNameLayout.PopulateLayouts(layouts); } if (DBDatabaseLayout != null) { DBDatabaseLayout.PopulateLayouts(layouts); } if (DBPasswordLayout != null) { DBPasswordLayout.PopulateLayouts(layouts); } if (CommandTextLayout != null) { CommandTextLayout.PopulateLayouts(layouts); } for (int i = 0; i < Parameters.Count; ++i) { if (Parameters[i].CompiledLayout != null) { Parameters[i].CompiledLayout.PopulateLayouts(layouts); } } }
public void Setup() { _iso = LoadIsisSingleObject(); _layout = GetLayout(); _collLayout = _layout.row[1].cols[1].col.tabGroup[0].tab[0].row[0].cols[0].col.collection[0]; Assert.AreEqual("contactNumbers", _collLayout.id); }
public static void Save(string name, string txtEditor) { string oldName = Args.Layout.Name; Args.Layout.Name = name; LayoutCollection list = LayoutCollection.GetAllLayout(); PSCPortal.Engine.ArticleArgs articleArgs = new PSCPortal.Engine.ArticleArgs(); string newpath = HttpContext.Current.Server.MapPath(System.Configuration.ConfigurationManager.AppSettings["ArticleDisplay"] + name + ".ascx"); if (Args.IsEdit) { string oldPath = HttpContext.Current.Server.MapPath(System.Configuration.ConfigurationManager.AppSettings["ArticleDisplay"] + oldName + ".ascx"); File.Move(oldPath, newpath); } else { string defaultPath = HttpContext.Current.Server.MapPath(articleArgs.Path); if (list.Where(a => a.Name.Equals(name)).Count() > 0) { return; } File.Copy(defaultPath, newpath); } File.WriteAllText(newpath, txtEditor); }
/// <summary> /// Adds all layouts used by this expression to the specified collection. /// </summary> /// <param name="layouts">The collection to add layouts to.</param> public override void PopulateLayouts(LayoutCollection layouts) { foreach (ConditionExpression expr in _parameters) { expr.PopulateLayouts(layouts); } }
public void LoadLayout() { string LayoutsLocation; if (SceneManager.GetActiveScene().name == "Multiplayer") { LayoutsLocation = Application.persistentDataPath + "/Online/" + game.getGame().getName() + "/Layouts/"; } else { LayoutsLocation = Application.persistentDataPath + "/Game/" + game.getGame().getName() + "/Layouts/"; } DirectoryInfo dirInf = new DirectoryInfo(LayoutsLocation); Debug.Log(dirInf.ToString()); if (dirInf.Exists) { Debug.Log("LayoutsLocation: " + LayoutsLocation); Debug.Log("dirExists"); FileInfo[] files = dirInf.GetFiles("*.layout"); foreach (FileInfo file in files) { if (file.Name.Contains("player1")) { layoutsForPlayer1 = JsonUtility.FromJson <LayoutCollection>(File.ReadAllText(file.FullName)); } else { layoutsForPlayer2 = JsonUtility.FromJson <LayoutCollection>(File.ReadAllText(file.FullName)); } } } }
public static int StartCore() { IZoneRenderer.ActiveZoneColor = Color.FromArgb(Int32.Parse(DropZone.Settings.ActiveColor.TrimStart('#'), System.Globalization.NumberStyles.HexNumber)); // IZoneRenderer.BackgroundOpacity = DropZone.Settings.BackgroundOpacity; IZoneRenderer.LabelColor = Color.FromArgb(Int32.Parse(DropZone.Settings.LabelColor.TrimStart('#'), System.Globalization.NumberStyles.HexNumber)); var dic = ScreenInfo.GetDisplays(); LayoutCollection = DropZone.Settings.Zones; renderer = new ZoneRenderer.GDI.GDIZone(LayoutCollection.ActiveLayout); var t = new SystemTray.TrayIcon(Process.GetCurrentProcess().Handle, "Exit Drop Zone", GetDropZoneIcon().GetHicon()); t.Events[SystemTray.TrayIcon.MouseMessages.WM_LBUTTONDOWN] += (s, e) => { System.Diagnostics.Process.Start(System.Reflection.Assembly.GetExecutingAssembly().Location, "management"); }; t.Events[SystemTray.TrayIcon.MouseMessages.WM_LBUTTONDBLCLK] += (s, e) => { System.Diagnostics.Process.Start(System.Reflection.Assembly.GetExecutingAssembly().Location, "management"); }; if (!Environment.GetCommandLineArgs().Any(x => x == "Silent")) { t.PostInfo("DropZone Running", "DropZone will run in the background, click the system try icon to close the process"); } #if DEBUG ShowConsole(); #else HideConsole(); #endif RegisterInputHooks(); return(MessagePump.Pump.Start((str, ex) => { t.PostInfo("DropZone Error", str); })); }
/// <summary> /// Adds all layouts used by this target and sub-targets. /// </summary> /// <param name="layouts">The collection to add layouts to.</param> public override void PopulateLayouts(LayoutCollection layouts) { base.PopulateLayouts(layouts); foreach (Target t in Targets) { t.PopulateLayouts(layouts); } }
/// <summary> /// Adds all layouts used by this target and sub-targets. /// </summary> /// <param name="layouts">The collection to add layouts to.</param> public override void PopulateLayouts(LayoutCollection layouts) { base.PopulateLayouts (layouts); foreach (Target t in Targets) { t.PopulateLayouts(layouts); } }
/// <summary> /// Adds all layouts used by this target to the specified collection. /// </summary> /// <param name="layouts">The collection to add layouts to.</param> public override void PopulateLayouts(LayoutCollection layouts) { base.PopulateLayouts(layouts); for (int i = 0; i < Parameters.Count; ++i) { Parameters[i].CompiledLayout.PopulateLayouts(layouts); } }
public void CloneCollectionPerformance() { var c = new LayoutCollection <IItemInstance>(16, 4); BenchmarkUtility.Profile("Clone collection of 4x4", 10000, () => { var clone = c.Clone(); }); }
public string GetFormContent() { Layout layout = LayoutCollection.GetLayOut("4").SingleOrDefault(); System.Web.Script.Serialization.JavaScriptSerializer js = new System.Web.Script.Serialization.JavaScriptSerializer(); string s = js.Serialize(layout); return(s); }
/// <summary> /// Adds all layouts used by this target to the specified collection. /// </summary> /// <param name="layouts">The collection to add layouts to.</param> public override void PopulateLayouts(LayoutCollection layouts) { base.PopulateLayouts(layouts); foreach (FilteringRule fr in Rules) { fr.FilterCondition.PopulateLayouts(layouts); fr.ExistsCondition.PopulateLayouts(layouts); } _defaultFilter.PopulateLayouts(layouts); }
public Template(string name) { Require.NotNullOrEmpty(name, "name"); Name = name; DisplayName = new LocalizableText(String.Format("{{ Template={0}, Key={1} }}", name, name)); Skins = new TemplateSkinCollection(this); Layouts = new LayoutCollection(this); ResourcesFolder = new ResourceFolder(HostingEnvironment.MapPath(ResourceFolderVirtualPath)); }
public static void PageCopy(Guid id) { PSCPortal.Engine.Page page = PageList.Where(p => p.Id == id).Single(); PSCPortal.Engine.Page item = new PSCPortal.Engine.Page(); item.Id = Guid.NewGuid(); item.Template = page.Template; item.Language = page.Language; item.LayoutId = LayoutCollection.GetPageLayOut(page.Id).Single().Id; PSCDialog.DataShare = new PageArgs(item, false); }
public CollectionLayoutFilter(IsisSingleObject iso, LayoutCollection layout) { _iso = iso; _layout = layout; Actions = from action in iso.ro.Actions join layoutAction in _layout.action on action.id equals layoutAction.id select action; Collection = iso.ro.collection.FirstOrDefault(x => x.id == _layout.id); }
public void SimulationCollectionTest() { var c = new LayoutCollection <IItemInstance>(16, 4); BenchmarkUtility.Profile("Simulation collection of size 4x4", 10000, () => { using (new CollectionSimulation <LayoutCollection <IItemInstance> >(c)) { // Do something... } }); }
private static void SwapButtonDown(MSLLHOOKSTRUCT m) { if (HotkeyState.HasFlag(state.active)) { new System.Threading.Tasks.Task(() => { renderer.UpdateZones(LayoutCollection.ActivateNextZone()); renderer.ActivateSector(null); renderer.ActivateSector(LayoutCollection.ActiveLayout.GetActiveZoneFromPoint(m.pt.x, m.pt.y)); }).Start(); } }
/// <summary> /// Add this layout and all sub-layouts to the specified collection.. /// </summary> /// <param name="layouts">The collection of layouts.</param> public void PopulateLayouts(LayoutCollection layouts) { layouts.Add(this); Layout.PopulateLayouts(layouts); if (Header != null) { Header.PopulateLayouts(layouts); } if (Footer != null) { Footer.PopulateLayouts(layouts); } }
public void GetCanAddAmountTest() { var itemDef = new ItemDefinition(Guid.NewGuid()) { maxStackSize = 50 }; var item = new ItemInstance(Guid.NewGuid(), itemDef); var c = new LayoutCollection <IItemInstance>(16, 4); BenchmarkUtility.Profile("Simulation collection of size 4x4", 10000, () => { var amount = c.GetCanAddAmount(item); }); }
public void AddItemToCollectionPerformance() { var itemDef = new ItemDefinition(Guid.NewGuid()) { maxStackSize = 999 }; var item = new ItemInstance(Guid.NewGuid(), itemDef); var c = new LayoutCollection <IItemInstance>(16, 4); BenchmarkUtility.Profile("Add item to collection of 4x4", 10000, () => { var added = c.Add((IItemInstance)item.Clone(), 1); }); }
public void RemoveItemFromCollectionTest() { var itemDef = new ItemDefinition(Guid.NewGuid()) { maxStackSize = 999 }; var item = new ItemInstance(Guid.NewGuid(), itemDef); var c = new LayoutCollection <IItemInstance>(16, 4); c.Add(item, 10000); BenchmarkUtility.Profile("Remove item to collection of 4x4", 10000, () => { var removed = c.Remove(item, 1); }); }
public static void Main() { string dataDir = Path.GetFullPath("../../../Data/"); Document doc = new Document(dataDir + "TestFile.docx"); // This sample introduces the RenderedDocument class and other related classes which provide an API wrapper for // the LayoutEnumerator. This allows you to access the layout entities of a document using a DOM style API. // Create a new RenderedDocument class from a Document object. RenderedDocument layoutDoc = new RenderedDocument(doc); // The following examples demonstrate how to use the wrapper API. // This snippet returns the third line of the first page and prints the line of text to the console. RenderedLine line = layoutDoc.Pages[0].Columns[0].Lines[2]; Console.WriteLine("Line: " + line.Text); // With a rendered line the original paragraph in the document object model can be returned. Paragraph para = line.Paragraph; Console.WriteLine("Paragraph text: " + para.Range.Text); // Retrieve all the text that appears of the first page in plain text format (including headers and footers). string pageText = layoutDoc.Pages[0].Text; Console.WriteLine(); // Loop through each page in the document and print how many lines appear on each page. foreach (RenderedPage page in layoutDoc.Pages) { LayoutCollection <LayoutEntity> lines = page.GetChildEntities(LayoutEntityType.Line, true); Console.WriteLine("Page {0} has {1} lines.", page.PageIndex, lines.Count); } // This method provides a reverse lookup of layout entities for any given node (with the exception of runs and nodes in the // header and footer). Console.WriteLine(); Console.WriteLine("The lines of the second paragraph:"); foreach (RenderedLine paragraphLine in layoutDoc.GetLayoutEntitiesOfNode(doc.FirstSection.Body.Paragraphs[1])) { Console.WriteLine(string.Format("\"{0}\"", paragraphLine.Text.Trim())); Console.WriteLine(paragraphLine.Rectangle.ToString()); Console.WriteLine(); } }
protected void Page_Load(object sender, EventArgs e) { txtId.Text = Args.Layout.Id.ToString(); txtName.Text = Args.Layout.Name; if (Args.IsEdit) { Layout layout = LayoutCollection.GetLayOut(Args.Layout.Id.ToString()).SingleOrDefault(); //string newPath = HttpContext.Current.Server.MapPath(System.Configuration.ConfigurationManager.AppSettings["ArticleDisplay"] + layout.Name + ".ascx"); string newPath = HttpContext.Current.Server.MapPath(layout.NavigationUrl); editorForm.Value = File.ReadAllText(newPath); } else { PSCPortal.Engine.ArticleArgs articleArgs = new PSCPortal.Engine.ArticleArgs(); string defaultPath = HttpContext.Current.Server.MapPath(articleArgs.Path); editorForm.Value = File.ReadAllText(defaultPath); } }
/// <summary> /// Adds all layouts used by this target to the specified collection. /// </summary> /// <param name="layouts">The collection to add layouts to.</param> public override void PopulateLayouts(LayoutCollection layouts) { base.PopulateLayouts(layouts); if (_from != null) { _from.PopulateLayouts(layouts); } if (_to != null) { _to.PopulateLayouts(layouts); } if (_cc != null) { _cc.PopulateLayouts(layouts); } if (_bcc != null) { _bcc.PopulateLayouts(layouts); } if (_subject != null) { _subject.PopulateLayouts(layouts); } }
/// <summary> /// Adds all layouts used by this target to the specified collection. /// </summary> /// <param name="layouts">The collection to add layouts to.</param> public override void PopulateLayouts(LayoutCollection layouts) { base.PopulateLayouts (layouts); _queue.PopulateLayouts(layouts); _label.PopulateLayouts(layouts); }
/// <summary> /// Adds all layouts used by this target to the specified collection. /// </summary> /// <param name="layouts">The collection to add layouts to.</param> public override void PopulateLayouts(LayoutCollection layouts) { base.PopulateLayouts(layouts); _queue.PopulateLayouts(layouts); _label.PopulateLayouts(layouts); }
/// <summary> /// Adds all layouts used by this target to the specified collection. /// </summary> /// <param name="layouts">The collection to add layouts to.</param> public override void PopulateLayouts(LayoutCollection layouts) { base.PopulateLayouts (layouts); if (_from != null) _from.PopulateLayouts(layouts); if (_to != null) _to.PopulateLayouts(layouts); if (_cc != null) _cc.PopulateLayouts(layouts); if (_bcc != null) _bcc.PopulateLayouts(layouts); if (_subject != null) _subject.PopulateLayouts(layouts); }
/// <summary> /// Add this layout and all sub-layouts to the specified collection.. /// </summary> /// <param name="layouts">The collection of layouts.</param> public void PopulateLayouts(LayoutCollection layouts) { layouts.Add(this); }
/// <summary> /// Adds all layouts used by this expression to the specified collection. /// </summary> /// <param name="layouts">The collection to add layouts to.</param> public override void PopulateLayouts(LayoutCollection layouts) { Left.PopulateLayouts(layouts); Right.PopulateLayouts(layouts); }
/// <summary> /// Add this layout and all sub-layouts to the specified collection.. /// </summary> /// <param name="layouts">The collection of layouts.</param> public void PopulateLayouts(LayoutCollection layouts) { throw new Exception("The method or operation is not implemented."); }
/// <summary> /// Adds all layouts used by this expression to the specified collection. /// </summary> /// <param name="layouts">The collection to add layouts to.</param> public override void PopulateLayouts(LayoutCollection layouts) { expr.PopulateLayouts(layouts); }
/// <summary> /// Initialize a new instance of the MetaPanelBase class. /// </summary> public MetaPanelBase() { // List used to collect entries that are to be removed from panel _removeList = new MetaElementStateList(); // Use dictionary to associate each element with its animation state _stateDict = new MetaElementStateDict(); // Create and monitor changes in the layout collection _layoutCollection = new LayoutCollection(this); _layoutCollection.NeedMeasure += new EventHandler(OnNeedMeasure); _layoutCollection.CollectionChanged += new EventHandler(OnNeedMeasure); MonitorExtendElement(_layoutCollection); // Create and monitor changes in the animate collection _animateCollection = new AnimateDefinitions(this); _animateCollection.NeedMeasure += new EventHandler(OnNeedMeasure); MonitorExtendElement(_animateCollection); // Default layout/animate to be applied as the default in case collections are empty or not applied _defaultLayout = new StretchLayout(); _defaultAnimate = new NullAnimate(); // Let the Silverlight/WPF specific construction take place PlatformConstructor(); }
/// <summary> /// Adds all layouts used by this target to the specified collection. /// </summary> /// <param name="layouts">The collection to add layouts to.</param> public override void PopulateLayouts(LayoutCollection layouts) { base.PopulateLayouts(layouts); AddressLayout.PopulateLayouts(layouts); }
/// <summary> /// Adds all layouts used by this expression to the specified collection. /// </summary> /// <param name="layouts">The collection to add layouts to.</param> public virtual void PopulateLayouts(LayoutCollection layouts) { }
/// <summary> /// Adds all layouts used by this target to the specified collection. /// </summary> /// <param name="layouts">The collection to add layouts to.</param> public override void PopulateLayouts(LayoutCollection layouts) { base.PopulateLayouts (layouts); if (DBHostLayout != null) DBHostLayout.PopulateLayouts(layouts); if (DBUserNameLayout != null) DBUserNameLayout.PopulateLayouts(layouts); if (DBDatabaseLayout != null) DBDatabaseLayout.PopulateLayouts(layouts); if (DBPasswordLayout != null) DBPasswordLayout.PopulateLayouts(layouts); if (CommandTextLayout != null) CommandTextLayout.PopulateLayouts(layouts); for (int i = 0; i < Parameters.Count; ++i) { if (Parameters[i].CompiledLayout != null) Parameters[i].CompiledLayout.PopulateLayouts(layouts); } }
public static string GetLayoutList(int startIndex, int maximumRows, string sortExpressions) { LayoutList = LayoutCollection.GetAllLayout(); System.Web.Script.Serialization.JavaScriptSerializer js = new System.Web.Script.Serialization.JavaScriptSerializer(); return(js.Serialize(LayoutList.GetSegment(startIndex, maximumRows, sortExpressions).Where(a => a.Id != Guid.Empty).ToList())); }
/// <summary> /// Adds all layouts used by this target to the specified collection. /// </summary> /// <param name="layouts">The collection to add layouts to.</param> public override void PopulateLayouts(LayoutCollection layouts) { base.PopulateLayouts(layouts); _condition.PopulateLayouts(layouts); }
/// <summary> /// Adds all layouts used by this expression to the specified collection. /// </summary> /// <param name="layouts">The collection to add layouts to.</param> public override void PopulateLayouts(LayoutCollection layouts) { par1.PopulateLayouts(layouts); par2.PopulateLayouts(layouts); }
/// <summary> /// Adds all layouts used by this target to the specified collection. /// </summary> /// <param name="layouts">The collection to add layouts to.</param> public override void PopulateLayouts(LayoutCollection layouts) { base.PopulateLayouts(layouts); _streamNameLayout.PopulateLayouts(layouts); }
/// <summary> /// Adds all layouts used by this expression to the specified collection. /// </summary> /// <param name="layouts">The collection to add layouts to.</param> public override void PopulateLayouts(LayoutCollection layouts) { _layout.PopulateLayouts(layouts); }
/// <summary> /// Adds all layouts used by this target to the specified collection. /// </summary> /// <param name="layouts">The collection to add layouts to.</param> public override void PopulateLayouts(LayoutCollection layouts) { base.PopulateLayouts (layouts); for (int i = 0; i < Parameters.Count; ++i) Parameters[i].CompiledLayout.PopulateLayouts(layouts); }
/// <summary> /// Add this layout and all sub-layouts to the specified collection.. /// </summary> /// <param name="layouts">The collection of layouts.</param> public void PopulateLayouts(LayoutCollection layouts) { layouts.Add(this); Layout.PopulateLayouts(layouts); if (Header != null) Header.PopulateLayouts(layouts); if (Footer != null) Footer.PopulateLayouts(layouts); }