• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# DisplayMode类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: Read

        public UInt16 Read(int address)
        {
            if (address == 0x21)
                _displayMode = DisplayMode.ColorStack; // FIX: this should only apply if vblank period 1

            return 0;
        }
开发者ID:faintpixel,项目名称:Intellivision-Emulator,代码行数:7,代码来源:AY_3_8900.cs


示例2: PlainSurfaceItem

        public PlainSurfaceItem(int maxWidth, int maxHeight, int widthRequest = 0, int heightRequest = 0, string label = null)
        {
            //Console.WriteLine ("PlainSurfaceItem");
            _label = label;
            this._evtBox = new EventBox ();
            this._draw = new global::Gtk.DrawingArea ();
            if(widthRequest > 0) {
                _draw.WidthRequest = widthRequest;
            }
            if(heightRequest > 0) {
                _draw.HeightRequest = heightRequest;
            }

            this._evtBox.Add (this._draw);

            maxWidth = Math.Max (maxWidth, widthRequest);
            maxHeight = Math.Max (maxHeight, heightRequest);
            this._height = Math.Max(_draw.Allocation.Height, heightRequest);
            this._width = Math.Max(_draw.Allocation.Width, widthRequest);
            this._mode = DisplayMode.Snapshot;
            this._surface = new ImageSurface(Format.Argb32, maxWidth, maxHeight);
            this._button = MouseButton.None;
            this._background = new Color (1.0, 1.0, 1.0);

            _draw.ExposeEvent += DrawExpose;
            _evtBox.ButtonPressEvent += DrawButtonPressEvent;
            _evtBox.ButtonReleaseEvent += DrawButtonReleaseEvent;
            _evtBox.MotionNotifyEvent += DrawMotionNotifyEvent;
        }
开发者ID:codingcave,项目名称:CoupledOdeViewer,代码行数:29,代码来源:PlainSurfaceItem.cs


示例3: ComparisonGraphLegend

        public ComparisonGraphLegend()
		{
			// Required to initialize variables
			InitializeComponent();

            mode = DisplayMode.Subpoints;
		}
开发者ID:LucasPeacecraft,项目名称:rawr,代码行数:7,代码来源:ComparisonGraphLegend.xaml.cs


示例4: InitForm

        private void InitForm(DisplayMode mode)
        {
            if (_transparent)
            {
                _view.Border3DStyle = Border3DStyle.Flat;
                _view.BorderStyle = BorderStyle.None;
                _view.GridLineColor = Color.Black;
                FormBorderStyle = FormBorderStyle.None;
                ShowInTaskbar = false;
                Opacity = 0.8D;
                TransparencyKey = Color.Transparent;
                _view.PrimarySelectionColor = Color.Transparent;
                _view.SecondarySelectionColor = Color.Transparent;
            }
            if (mode == DisplayMode.Dark)
            {
                BackColor = Color.FromArgb(1, 2, 3);
                ForeColor = Color.FromArgb(1, 2, 3);
                _view.BackColor = Color.Black;
            }
            if(mode ==DisplayMode.Light)
            {
                BackColor = Color.LightGray;
                TransparencyKey = Color.FromArgb(255, 254, 253);
                _view.BackColor = Color.LightGray;
            }

        }
开发者ID:jeroldhaas,项目名称:ContinuousTests,代码行数:28,代码来源:SequenceDiagram.cs


示例5: EnumAdapterModes

 public DisplayMode EnumAdapterModes(int adapter, Format format, int mode)
 {
     DisplayMode modeRef = new DisplayMode();
     int res = Interop.Calli(comPointer, adapter, (int)format, mode, (IntPtr)(void*)&modeRef,(*(IntPtr**)comPointer)[7]);
     if( res < 0 ) { throw new SharpDXException( res ); }
     return modeRef;
 }
开发者ID:Chameleonherman,项目名称:ClassicalSharp,代码行数:7,代码来源:Direct3D.cs


示例6: Driver

        /// <summary>
        ///		Default constructor.
        /// </summary>
        public Driver( GraphicsAdapter adapterDetails )
        {
#if SILVERLIGHT
            _desktopMode = new DisplayMode
                           {
                               Width = (int)XnaRenderWindow.DrawingSurface.Width,
                               Height = (int)XnaRenderWindow.DrawingSurface.Height,
                               Format = SurfaceFormat.Color
                           };
            _name = "Silverlight XNA";
            _description = "Silverlight XNA Device";
            _adapterNum = 0;
            _adapterIdentifier = new Guid(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
            _adapter = adapterDetails;

            _videoModeList = new VideoModeCollection
                             {
                                 new VideoMode( _desktopMode )
                             };
#else
            _desktopMode = adapterDetails.CurrentDisplayMode;
            _name = adapterDetails.DeviceName;
            _description = adapterDetails.Description;
            _adapterNum = adapterDetails.DeviceId;
            _adapterIdentifier = new Guid(adapterDetails.VendorId, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
            _adapter = adapterDetails;

            _videoModeList = new VideoModeCollection();
#endif
        }
开发者ID:ryan-bunker,项目名称:axiom3d,代码行数:33,代码来源:Driver.cs


示例7: AY_3_8900

 public AY_3_8900()
 {
     _displayMode = DisplayMode.ForegroundBackground_FGBG; // no idea if this should be the default
     _screenshotIndex = 0;
     _screenBuffer = new Color[196, 89];
     ClearScreenBuffer();
 }
开发者ID:faintpixel,项目名称:Intellivision-Emulator,代码行数:7,代码来源:AY_3_8900.cs


示例8: Main

        static void Main(string[] args)
        {
            Console.WriteLine("NCLDR Builder");
            Console.WriteLine("NCLDR Builder builds the NCLDR data file from CLDR data");
            Console.WriteLine(String.Empty);

            CommandArgumentsReader reader = new CommandArgumentsReader(args);
            string cldrPath = reader.GetArgumentValue("-CLDRPath");
            string ncldrPath = reader.GetArgumentValue("-NCLDRPath");
            displayMode = GetDisplayMode(reader.GetArgumentValue("-DisplayMode"));
            if (String.IsNullOrEmpty(cldrPath) || String.IsNullOrEmpty(ncldrPath))
            {
                Console.WriteLine("Syntax:");
                Console.WriteLine("NCldrBuilderCmd -CLDRPath:<CLDRPath> -NCLDRPath:<NCLDRPath> [-DisplayMode:Quiet|Verbose|Diagnostics]");
                Console.WriteLine("where:");
                Console.WriteLine(@"<CLDRPath> is the path to the CLDR root folder e.g. C:\CLDR\Release22.1");
                Console.WriteLine(@"<NCLDRPath> is the path to the NCLDR output folder e.g. C:\Projects\NCldr\Source\NCldr\NCldrData");
                Console.WriteLine(@"<DisplayMode> is either Quiet, Verbose or Diagnostics indicating the volume of progress information displayed");
            }
            else if (!Directory.Exists(cldrPath))
            {
                Console.WriteLine(String.Format("CLDRPath '{0}' does not exist", cldrPath));
            }
            else if (!Directory.Exists(ncldrPath))
            {
                Console.WriteLine(String.Format("NCLDRPath '{0}' does not exist", ncldrPath));
            }
            else
            {
                Console.WriteLine(String.Empty);
                NCldrBuilder.Build(cldrPath, ncldrPath, new NCldrBuilderProgressEventHandler(Progress));
                Console.WriteLine(String.Empty);
                Console.WriteLine("Done.");
            }
        }
开发者ID:srl295,项目名称:NCLDR,代码行数:35,代码来源:Program.cs


示例9: MolMovementEntity

        public MolMovementEntity(DisplayMode displayMode, AtomEntity[] atoms)
        {
            this.displayMode = displayMode;
            this.atoms = atoms;

            // calc bounding box
            Vector3 min = new Vector3(float.MaxValue, float.MaxValue, float.MaxValue);
            Vector3 max = new Vector3(float.MinValue, float.MinValue, float.MinValue);
            foreach (AtomEntity item in atoms)
            {
                if (item.BoundingBox.Centre.X - item.ItemRadius < min.X)
                    min.X = item.BoundingBox.Centre.X - item.ItemRadius;
                if (item.BoundingBox.Centre.X + item.ItemRadius > max.X)
                    max.X = item.BoundingBox.Centre.X + item.ItemRadius;

                if (item.BoundingBox.Centre.Y - item.ItemRadius < min.Y)
                    min.Y = item.BoundingBox.Centre.Y - item.ItemRadius;
                if (item.BoundingBox.Centre.Y + item.ItemRadius > max.Y)
                    max.Y = item.BoundingBox.Centre.Y + item.ItemRadius;

                if (item.BoundingBox.Centre.Z - item.ItemRadius < min.Z)
                    min.Z = item.BoundingBox.Centre.Z - item.ItemRadius;
                if (item.BoundingBox.Centre.Z + item.ItemRadius > max.Z)
                    max.Z = item.BoundingBox.Centre.Z + item.ItemRadius;
            }
            bBox = new BoundingBox(min, max);
        }
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:27,代码来源:MolMovementEntity.cs


示例10: LCDWrapper

 public LCDWrapper(GPIOPins rs, GPIOPins enable, GPIOPins d0, GPIOPins d1, GPIOPins d2, GPIOPins d3, GPIOPins d4, GPIOPins d5, GPIOPins d6, GPIOPins d7, int columns = 40, int rows = 2, DisplayMode displayMode = DisplayMode.LCD_ONLY)
 {
     DisplayMode = displayMode;
     Columns = columns;
     Rows = rows;
     if (DisplayMode != DisplayMode.CONSOLE_ONLY) {
         transferProvider = new RaspPiGPIOMemLcdTransferProvider(
             fourBitMode: false,
             rs: rs,
             rw: GPIOPins.GPIO_NONE,
             enable: enable,
             d0: d0,
             d1: d1,
             d2: d2,
             d3: d3,
             d4: d4,
             d5: d5,
             d6: d6,
             d7: d7
         );
         lcd = new Lcd(transferProvider);
         lcd.Begin(Convert.ToByte(columns), Convert.ToByte(rows));
         lcd.Backlight = true;
         lcd.BlinkCursor = false;
         lcd.ShowCursor = false;
         lcd.Visible = true;
     }
     if (DisplayMode != DisplayMode.LCD_ONLY) {
         Console.Clear();
         Console.ForegroundColor = ConsoleColor.White;
         Console.BackgroundColor = ConsoleColor.Black;
         Console.CursorVisible = false;
     }
 }
开发者ID:bsutliffe,项目名称:RaspberryPandora,代码行数:34,代码来源:LCDWrapper.cs


示例11: TriangleScene

        public TriangleScene(IEye eye, DisplayMode desctopDisplayMode)
            : base(eye, desctopDisplayMode)
        {
            var vertexShader = Device.Create.VertexShader(ShaderParser.Parse(VertexShaderText));
            var pixelShader = Device.Create.PixelShader(ShaderParser.Parse(PixelShaderText));
            shaderCombination = Device.Create.ShaderCombination(vertexShader, null, null, null, pixelShader);

            var vertexData = new[]
                {
                    new Vertex(-0.7f, -0.7f, Color4.Red),
                    new Vertex(0.0f, 0.7f, Color4.Yellow),
                    new Vertex(0.7f, -0.7f, Color4.Green)
                };

            vertexBuffer = Device.Create.Buffer(new BufferDescription
            {
                SizeInBytes = vertexData.Length * Vertex.SizeInBytes,
                Usage = Usage.Immutable,
                BindFlags = BindFlags.VertexBuffer
            }, new SubresourceData(vertexData));

            vertexLayout = Device.Create.VertexLayout(vertexShader, new[]
                {
                    new VertexLayoutElement(ExplicitFormat.R32G32B32A32_FLOAT, 0, 0),
                    new VertexLayoutElement(ExplicitFormat.R32G32B32A32_FLOAT, 0, 16)
                });
        }
开发者ID:Zulkir,项目名称:Beholder,代码行数:27,代码来源:TriangleScene.cs


示例12: DesignerFlexibleInteger

		/// <summary>
		/// Creates a new designer attribute for handling a float value.
		/// </summary>
		/// <param name="displayName">The name shown on the node and in the property editor for the property.</param>
		/// <param name="description">The description shown in the property editor for the property.</param>
		/// <param name="category">The category shown in the property editor for the property.</param>
		/// <param name="displayMode">Defines how the property is visualised in the editor.</param>
		/// <param name="displayOrder">Defines the order the properties will be sorted in when shown in the property grid. Lower come first.</param>
		/// <param name="flags">Defines the designer flags stored for the property.</param>
		/// <param name="min">The minimum value of the property.</param>
		/// <param name="max">The maximum value of the property.</param>
		/// <param name="steps">The minimum value added or substracted when changing the property's value.</param>
		/// <param name="units">The units the value is represented in.</param>
		public DesignerFlexibleInteger(string displayName, string description, string category, DisplayMode displayMode, int displayOrder, DesignerFlags flags, int min, int max, int steps, string units) : base(displayName, description, category, displayMode, displayOrder, flags)
		{
			_min= min;
			_max= max;
			_steps= steps;
			_units= units;
		}
开发者ID:drzo,项目名称:opensim4opencog,代码行数:20,代码来源:DesignerFlexibleInteger.cs


示例13: MsAGLVisualization

 public MsAGLVisualization(DisplayMode mode, DTE2 _dte, bool transparent, ATEClient client)
 {
     _mode = mode;
     this._dte = _dte;
     
     _transparent = transparent;
     _client = client;
 }
开发者ID:jeroldhaas,项目名称:ContinuousTests,代码行数:8,代码来源:MsAGLVisualization.cs


示例14: DesignerInteger

 public DesignerInteger(string displayName, string description, string category, DisplayMode displayMode, int displayOrder, DesignerFlags flags)
     : base(displayName, description, category, displayMode, displayOrder, flags, typeof(DesignerNumberEditor), null)
 {
     _min = int.MinValue;
     _max = int.MaxValue;
     _steps = 1;
     _units = null;
 }
开发者ID:KeyleXiao,项目名称:behaviac,代码行数:8,代码来源:DesignerInteger.cs


示例15: MetaScene

 public MetaScene(IEye eye, DisplayMode desctopDisplayMode)
 {
     this.eye = eye;
     this.desctopDisplayMode = desctopDisplayMode;
     var swapChain = eye.Device.PrimarySwapChain;
     window = swapChain.Window;
     eye.NewFrame += NewFrame;
 }
开发者ID:Zulkir,项目名称:Beholder,代码行数:8,代码来源:MetaScene.cs


示例16: SelectImageDisplayMode

 /// <summary>
 /// Returns the proper class according to display mode.
 /// </summary>
 /// <param name="dm"></param>
 /// <returns></returns>
 public static ImageDisplayMode SelectImageDisplayMode(DisplayMode dm)
 {
     switch (dm)
     {
         case DisplayMode.NORMAL: return new normalDisplay();
         case DisplayMode.ONLY_CELL_AUT_IMAGE: return new onlyImageDisplay();
     }
     return new noDisplay();
 }
开发者ID:hectolight,项目名称:BrainfuckInterpreter,代码行数:14,代码来源:ImageDisplayMode.cs


示例17: DesignerPropertyEnum

 /// <summary>
 /// Creates a new designer attribute for handling a string value.
 /// </summary>
 /// <param name="displayName">The name shown on the node and in the property editor for the property.</param>
 /// <param name="description">The description shown in the property editor for the property.</param>
 /// <param name="category">The category shown in the property editor for the property.</param>
 /// <param name="displayMode">Defines how the property is visualised in the editor.</param>
 /// <param name="displayOrder">Defines the order the properties will be sorted in when shown in the property grid. Lower come first.</param>
 /// <param name="flags">Defines the designer flags stored for the property.</param>
 public DesignerPropertyEnum(string displayName, string description, string category, DisplayMode displayMode, int displayOrder, DesignerFlags flags, AllowStyles styles, string dependedProperty, string dependingProperty, ValueTypes filterType = ValueTypes.All, double min = double.MinValue, double max = double.MaxValue)
     : base(displayName, description, category, displayMode, displayOrder, flags, typeof(DesignerPropertyEnumEditor), null, filterType)
 {
     _styles = styles;
     _dependedProperty = dependedProperty;
     _dependingProperty = dependingProperty;
     _minValue = min;
     _maxValue = max;
 }
开发者ID:KeyleXiao,项目名称:behaviac,代码行数:18,代码来源:DesignerPropertyEnum.cs


示例18: HeaderColumnSection

 public HeaderColumnSection( ISectionHost host, DisplayMode displayMode, Column column )
     : base(host)
 {
     Debug.Assert( column != null );
     CanDrag = true;
     _displayMode = displayMode;
     _column = column;
     column.DataChanged += column_DataChanged;
 }
开发者ID:CecleCW,项目名称:ProductMan,代码行数:9,代码来源:HeaderColumnSection.cs


示例19: HollywoodLogger

        public HollywoodLogger()
        {

#if HOLLYWOOD_LOG_HTML
            _displayMode = DisplayMode.HTML;
#elif UNITY_EDITOR
            _displayMode = DisplayMode.EDITOR;
#endif

        }
开发者ID:flow38,项目名称:StrangeIoC-Hollywood-extension,代码行数:10,代码来源:HollywoodLogger.cs


示例20: PrepareScreenBuffer

 public static void PrepareScreenBuffer(
     DisplayMode mode,
     byte[] MEM, 
     byte start_page, 
     Color[] palette)
 {
     for (int p = 0; p < mode.width * mode.height; ++p)
        mode.data[p] = palette[ExtractPixel(mode, MEM, start_page, p)];
     mode.target.SetData(mode.data);
 }
开发者ID:Blecki,项目名称:IN8,代码行数:10,代码来源:DisplayMode.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# DisplayOptions类代码示例发布时间:2022-05-24
下一篇:
C# DisplayInformation类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap