当前位置: 首页>>代码示例>>C#>>正文


C# ILayout类代码示例

本文整理汇总了C#中ILayout的典型用法代码示例。如果您正苦于以下问题:C# ILayout类的具体用法?C# ILayout怎么用?C# ILayout使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ILayout类属于命名空间,在下文中一共展示了ILayout类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: LayoutSettingsControl

        public LayoutSettingsControl(LiveSplit.UI.LayoutSettings settings, ILayout layout)
        {
            InitializeComponent();
            Settings = settings;
            Layout = layout;
            chkBestSegments.DataBindings.Add("Checked", Settings, "ShowBestSegments", false, DataSourceUpdateMode.OnPropertyChanged);
            chkAlwaysOnTop.DataBindings.Add("Checked", Settings, "AlwaysOnTop", false, DataSourceUpdateMode.OnPropertyChanged);
            chkAntiAliasing.DataBindings.Add("Checked", Settings, "AntiAliasing", false, DataSourceUpdateMode.OnPropertyChanged);
            chkDropShadows.DataBindings.Add("Checked", Settings, "DropShadows", false, DataSourceUpdateMode.OnPropertyChanged);
            chkRainbow.DataBindings.Add("Checked", Settings, "UseRainbowColor", false, DataSourceUpdateMode.OnPropertyChanged);
            btnTextColor.DataBindings.Add("BackColor", Settings, "TextColor", false, DataSourceUpdateMode.OnPropertyChanged);
            btnBackground.DataBindings.Add("BackColor", Settings, "BackgroundColor", false, DataSourceUpdateMode.OnPropertyChanged);
            btnBackground2.DataBindings.Add("BackColor", Settings, "BackgroundColor2", false, DataSourceUpdateMode.OnPropertyChanged);
            btnThinSep.DataBindings.Add("BackColor", Settings, "ThinSeparatorsColor", false, DataSourceUpdateMode.OnPropertyChanged);
            btnSeparators.DataBindings.Add("BackColor", Settings, "SeparatorsColor", false, DataSourceUpdateMode.OnPropertyChanged);
            btnPB.DataBindings.Add("BackColor", Settings, "PersonalBestColor", false, DataSourceUpdateMode.OnPropertyChanged);
            btnGlod.DataBindings.Add("BackColor", Settings, "BestSegmentColor", false, DataSourceUpdateMode.OnPropertyChanged);
            btnAheadGaining.DataBindings.Add("BackColor", Settings, "AheadGainingTimeColor", false, DataSourceUpdateMode.OnPropertyChanged);
            btnAheadLosing.DataBindings.Add("BackColor", Settings, "AheadLosingTimeColor", false, DataSourceUpdateMode.OnPropertyChanged);
            btnBehindGaining.DataBindings.Add("BackColor", Settings, "BehindGainingTimeColor", false, DataSourceUpdateMode.OnPropertyChanged);
            btnBehindLosing.DataBindings.Add("BackColor", Settings, "BehindLosingTimeColor", false, DataSourceUpdateMode.OnPropertyChanged);
            btnNotRunning.DataBindings.Add("BackColor", Settings, "NotRunningColor", false, DataSourceUpdateMode.OnPropertyChanged);
            btnPausedColor.DataBindings.Add("BackColor", Settings, "PausedColor", false, DataSourceUpdateMode.OnPropertyChanged);
            btnShadowsColor.DataBindings.Add("BackColor", Settings, "ShadowsColor", false, DataSourceUpdateMode.OnPropertyChanged);
            lblTimer.DataBindings.Add("Text", this, "TimerFont", false, DataSourceUpdateMode.OnPropertyChanged);
            lblText.DataBindings.Add("Text", this, "SplitNamesFont", false, DataSourceUpdateMode.OnPropertyChanged);
            lblTimes.DataBindings.Add("Text", this, "MainFont", false, DataSourceUpdateMode.OnPropertyChanged);
            trkOpacity.DataBindings.Add("Value", this, "Opacity", false, DataSourceUpdateMode.OnPropertyChanged);
            trkImageOpacity.DataBindings.Add("Value", this, "ImageOpacity", false, DataSourceUpdateMode.OnPropertyChanged);
            trkBlur.DataBindings.Add("Value", this, "ImageBlur", false, DataSourceUpdateMode.OnPropertyChanged);

            cmbBackgroundType.SelectedItem = GetBackgroundTypeString(Settings.BackgroundType);
            originalBackgroundImage = Settings.BackgroundImage;
        }
开发者ID:Jiiks,项目名称:LiveSplit,代码行数:34,代码来源:LayoutSettingsControl.cs

示例2: ApplyLayout

 /// Apply a layout to a set of game objects
 public static void ApplyLayout(ILayout layout, IEnumerable<GameObject> objects)
 {
     foreach (var lp in layout.Layout(objects))
     {
         ApplyLayout(lp);
     }
 }
开发者ID:StirfireStudios,项目名称:SymphonyMachine,代码行数:8,代码来源:LayoutManager.cs

示例3: AddRange

 /// <summary>
 /// Adds the elements of an array to the end of this LayoutCollection.
 /// </summary>
 /// <param name="items">
 /// The array whose elements are to be added to the end of this LayoutCollection.
 /// </param>
 public virtual void AddRange(ILayout[]items)
 {
     foreach (ILayout item in items)
     {
         this.List.Add(item);
     }
 }
开发者ID:KroneckerX,项目名称:WCell,代码行数:13,代码来源:LayoutCollection.cs

示例4: LayoutSettingsControl

 public LayoutSettingsControl(Options.LayoutSettings settings, ILayout layout)
 {
     InitializeComponent();
     Settings = settings;
     Layout = layout;
     chkBestSegments.DataBindings.Add("Checked", this, "ShowBestSegments", false, DataSourceUpdateMode.OnPropertyChanged);
     chkAlwaysOnTop.DataBindings.Add("Checked", this, "AlwaysOnTop", false, DataSourceUpdateMode.OnPropertyChanged);
     chkAntiAliasing.DataBindings.Add("Checked", this, "AntiAliasing", false, DataSourceUpdateMode.OnPropertyChanged);
     chkDropShadows.DataBindings.Add("Checked", this, "DropShadows", false, DataSourceUpdateMode.OnPropertyChanged);
     btnTextColor.DataBindings.Add("BackColor", this, "TextColor", false, DataSourceUpdateMode.OnPropertyChanged);
     btnBackground.DataBindings.Add("BackColor", this, "BackgroundColor", false, DataSourceUpdateMode.OnPropertyChanged);
     btnBackground2.DataBindings.Add("BackColor", this, "BackgroundColor2", false, DataSourceUpdateMode.OnPropertyChanged);
     btnThinSep.DataBindings.Add("BackColor", this, "ThinSeparatorsColor", false, DataSourceUpdateMode.OnPropertyChanged);
     btnSeparators.DataBindings.Add("BackColor", this, "SeparatorsColor", false, DataSourceUpdateMode.OnPropertyChanged);
     btnPB.DataBindings.Add("BackColor", this, "PersonalBestColor", false, DataSourceUpdateMode.OnPropertyChanged);
     btnAheadGaining.DataBindings.Add("BackColor", this, "AheadGainingTimeColor", false, DataSourceUpdateMode.OnPropertyChanged);
     btnAheadLosing.DataBindings.Add("BackColor", this, "AheadLosingTimeColor", false, DataSourceUpdateMode.OnPropertyChanged);
     btnBehindGaining.DataBindings.Add("BackColor", this, "BehindGainingTimeColor", false, DataSourceUpdateMode.OnPropertyChanged);
     btnBehindLosing.DataBindings.Add("BackColor", this, "BehindLosingTimeColor", false, DataSourceUpdateMode.OnPropertyChanged);
     btnGlod.DataBindings.Add("BackColor", this, "BestSegmentColor", false, DataSourceUpdateMode.OnPropertyChanged);
     btnNotRunning.DataBindings.Add("BackColor", this, "NotRunningColor", false, DataSourceUpdateMode.OnPropertyChanged);
     btnPausedColor.DataBindings.Add("BackColor", this, "PausedColor", false, DataSourceUpdateMode.OnPropertyChanged);
     btnShadowsColor.DataBindings.Add("BackColor", this, "ShadowsColor", false, DataSourceUpdateMode.OnPropertyChanged);
     lblTimer.DataBindings.Add("Text", this, "TimerFont", false, DataSourceUpdateMode.OnPropertyChanged);
     lblText.DataBindings.Add("Text", this, "SplitNamesFont", false, DataSourceUpdateMode.OnPropertyChanged);
     lblTimes.DataBindings.Add("Text", this, "MainFont", false, DataSourceUpdateMode.OnPropertyChanged);
     trkOpacity.DataBindings.Add("Value", this, "Opacity", false, DataSourceUpdateMode.OnPropertyChanged);
     cmbGradientType.DataBindings.Add("SelectedItem", this, "GradientString", false, DataSourceUpdateMode.OnPropertyChanged);
     cmbGradientType.SelectedIndexChanged += cmbGradientType_SelectedIndexChanged;
 }
开发者ID:xarrez,项目名称:LiveSplit,代码行数:30,代码来源:LayoutSettingsControl.cs

示例5: CanAccept

		public bool CanAccept(ILayout layout, IView view)
		{
			IEnumerable<string> acceptableViewNames = (IEnumerable<string>)acceptableViewNamesPerLayout[layout.Name];
			if (acceptableViewNames == null)
				return layout.Name == view.Name;
			return acceptableViewNames.Contains(view.Name);
		}
开发者ID:JackWangCUMT,项目名称:rhino-tools,代码行数:7,代码来源:DefaultLayoutSelector.cs

示例6: CreateLayoutNode

        public int CreateLayoutNode(XmlDocument document, XmlElement parent, ILayout layout)
        {
            XmlElement element = null, components = null;
            if (document != null)
            {
                element = document.CreateElement("Settings");
                components = document.CreateElement("Components");
            }

            var hashCode = SettingsHelper.CreateSetting(document, parent, "Mode", layout.Mode)
                ^ SettingsHelper.CreateSetting(document, parent, "X", layout.X)
                ^ SettingsHelper.CreateSetting(document, parent, "Y", layout.Y)
                ^ SettingsHelper.CreateSetting(document, parent, "VerticalWidth", layout.VerticalWidth)
                ^ SettingsHelper.CreateSetting(document, parent, "VerticalHeight", layout.VerticalHeight) * 1000
                ^ SettingsHelper.CreateSetting(document, parent, "HorizontalWidth", layout.HorizontalWidth)
                ^ SettingsHelper.CreateSetting(document, parent, "HorizontalHeight", layout.HorizontalHeight) * 1000
                ^ ToElement(document, element, layout.Settings);

            if (document != null)
            {
                parent.AppendChild(element);
                parent.AppendChild(components);
            }

            var layoutComponents = new List<ILayoutComponent>(layout.LayoutComponents);
            var count = 1;

            foreach (var component in layoutComponents)
            {
                try
                {
                    if (document != null)
                    {
                        var componentElement = document.CreateElement("Component");
                        components.AppendChild(componentElement);
                        SettingsHelper.CreateSetting(document, componentElement, "Path", component.Path);
                        var settings = document.CreateElement("Settings");

                        settings.InnerXml = component.Component.GetSettings(document).InnerXml;

                        componentElement.AppendChild(settings);
                    }
                    else
                    {
                        var type = component.Component.GetType();
                        if (type.GetMethod("GetSettingsHashCode") != null)
                            hashCode ^= ((dynamic)component.Component).GetSettingsHashCode() ^ component.GetHashCode() * count;
                        else
                            hashCode ^= component.Component.GetSettings(new XmlDocument()).InnerXml.GetHashCode() ^ component.GetHashCode() * count;
                    }
                }
                catch (Exception e)
                {
                    Log.Error(e);
                }
                count++;
            }

            return hashCode;
        }
开发者ID:PrototypeAlpha,项目名称:LiveSplit,代码行数:60,代码来源:XMLLayoutSaver.cs

示例7: TextBoxBaseAppender

        public TextBoxBaseAppender(ThreadSafeTextBoxWrapper textboxWrapper, ILayout layout)
        {
            if (textboxWrapper == null) throw new ArgumentNullException("textboxWrapper");
            controlWrapper = textboxWrapper;
            isRichTextBox = (controlWrapper is ThreadSafeRichTextBoxWrapper);

            base.Layout = layout ?? new PatternLayout(defaultLayout);
        }
开发者ID:sagar1589,项目名称:Delta.Cryptography,代码行数:8,代码来源:TextBoxBaseAppender.cs

示例8: RepeatedObject

		/// <summary>
		/// Constructs a group of objects to a layout
		/// </summary>
		/// <param name="layout">Layout used to print objects</param>
		/// <param name="obj">Object to print</param>
		/// <param name="times">Times to print</param>
		public RepeatedObject(ILayout layout, object obj, int times) : base(layout)
		{
			if (times < 0)
				throw new ArgumentException("Times cannot be negative!", "times");

			this.obj   = obj;
			this.times = times;
		}
开发者ID:andrepontesmelo,项目名称:imjoias,代码行数:14,代码来源:RepeatedObject.cs

示例9: LayoutViewModel

 public LayoutViewModel(ILayout entity)
 {
     HeadHtml = entity.HeadHtml;
     HeadStyles = entity.HeadStyles;
     HeadScripts = entity.HeadScripts;
     BodyHtmlPreContent = entity.BodyHtmlPreContent;
     BodyHtmlPostContent = entity.BodyHtmlPostContent;
     BodyScripts = entity.BodyScripts;
 }
开发者ID:typeset,项目名称:typeset,代码行数:9,代码来源:LayoutViewModel.cs

示例10: SetLayout

 public void SetLayout(ILayout newLayout)
 {
     _layout = newLayout;
     foreach (IWindow window in Windows)
     {
         _layout.AddWindowsWithoutTile(window);
     }
     _layout.Domain = Domain;
     _layout.Tile();
 }
开发者ID:TomPeters,项目名称:paneless,代码行数:10,代码来源:Tag.cs

示例11: Save

        public void Save(ILayout layout, Stream stream)
        {
            var document = new XmlDocument();

            XmlNode docNode = document.CreateXmlDeclaration("1.0", "UTF-8", null);
            document.AppendChild(docNode);

            document.AppendChild(GetLayoutNode(document, layout));

            document.Save(stream);
        }
开发者ID:0xwas,项目名称:LiveSplit,代码行数:11,代码来源:XMLLayoutSaver.cs

示例12: Layout

		protected Layout (Generator g, Container container, Type type, bool initialize = true)
			: base(g, type, false)
		{
			handler = (ILayout)Handler;
			this.container = container;
			if (initialize) {
				Initialize ();
				if (this.Container != null)
					this.Container.Layout = this;
			}
		}
开发者ID:majorsilence,项目名称:Eto,代码行数:11,代码来源:Layout.cs

示例13: ArrangeLimit

		private static void ArrangeLimit(ILayout limit, Action<Rect<double>> setPosition, Point<double> boxCompositionOrigin, Unit fs, List<Point<double>> positions, NonoverlappingRectangleCollectiοn resultLayout_fs)
		{
			Contract.Requires(limit != null);

			NonoverlappingRectangleCollectiοn limitLayout = limit.Layout;
			Rect<double> limitRect = limitLayout.Bounds.ToReferenceFramesRect(fs, positions.Count == 1 ? "lower limit" : "upper limit");
			setPosition(limitRect);
			Contract.Assert(limitRect.IsAssociatedWith(boxCompositionOrigin));
			positions.Add(limitRect.TopLeft);
			resultLayout_fs.Add(limitLayout, limitRect.HorizontalOrigin[boxCompositionOrigin.X][fs], limitRect.VerticalOrigin[boxCompositionOrigin.Y][fs]);
		}
开发者ID:JeroenBos,项目名称:ASDE,代码行数:11,代码来源:NaryOperatorView.cs

示例14: GetXmlString

        internal static string GetXmlString(this LoggingEvent loggingEvent, ILayout layout = null)
        {
            string message = loggingEvent.RenderedMessage + Environment.NewLine + loggingEvent.GetExceptionString();
            if (layout != null)
            {
                using (var w = new StringWriter())
                {
                    layout.Format(w, loggingEvent);
                    message = w.ToString();
                }
            }

            var logXml = new XElement(
                "LogEntry",
                new XElement("UserName", loggingEvent.UserName),
                new XElement("TimeStamp",
                    loggingEvent.TimeStamp.ToString(CultureInfo.InvariantCulture)),
                new XElement("ThreadName", loggingEvent.ThreadName),
                new XElement("LoggerName", loggingEvent.LoggerName),
                new XElement("Level", loggingEvent.Level),
                new XElement("Identity", loggingEvent.Identity),
                new XElement("Domain", loggingEvent.Domain),
                new XElement("CreatedOn", DateTime.UtcNow.ToString(CultureInfo.InvariantCulture)),
                new XElement("RenderedMessage", message),
                new XElement("Location", loggingEvent.LocationInformation.FullInfo)
                );

            if (loggingEvent.Properties != null && loggingEvent.Properties.Count > 0)
            {
                var props = loggingEvent.Properties;
                if (props.Contains("AddPropertiesToXml"))
                {
                    foreach (var k in props.GetKeys())
                    {
                        var key = k.Replace(":", "_")
                                   .Replace("@", "_")
                                   .Replace(".", "_");
                        logXml.Add(new XElement(key, props[k].ToString()));
                    }
                }
            }

            if (loggingEvent.ExceptionObject != null)
            {
                logXml.Add(new XElement("Exception", loggingEvent.ExceptionObject.ToString()));
            }

            return logXml.ToString();
        }
开发者ID:stemarie,项目名称:log4net.Azure,代码行数:49,代码来源:LoggingEventExtensions.cs

示例15: WindowManager

        public WindowManager(PositionMarkerWindow positionMarkerWindow, ILayout layout)
        {
            this.layout = layout;
            this.positionMarkerWindow = positionMarkerWindow;

            WinEventWatcher.WindowMoving += OnWindowMoving;
            WinEventWatcher.WindowMoveEnd += OnWindowMoveEnd;
            WinEventWatcher.WindowClosed += OnWindowClosed;
            WinEventWatcher.WindowMinimized += OnWindowMinimized;
            WinEventWatcher.WindowRestored += OnWindowRestored;

            WinEventWatcher.WindowSizing += OnWindowSizing;

            MouseHelper.MouseMoved += OnMouseMoved;
        }
开发者ID:ngollon,项目名称:snaptiler,代码行数:15,代码来源:WindowManager.cs


注:本文中的ILayout类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。