本文整理汇总了C#中DisplayMode类的典型用法代码示例。如果您正苦于以下问题:C# DisplayMode类的具体用法?C# DisplayMode怎么用?C# DisplayMode使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DisplayMode类属于命名空间,在下文中一共展示了DisplayMode类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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;
}
示例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;
}
示例3: ComparisonGraphLegend
public ComparisonGraphLegend()
{
// Required to initialize variables
InitializeComponent();
mode = DisplayMode.Subpoints;
}
示例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;
}
}
示例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;
}
示例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
}
示例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();
}
示例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.");
}
}
示例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);
}
示例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;
}
}
示例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)
});
}
示例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;
}
示例13: MsAGLVisualization
public MsAGLVisualization(DisplayMode mode, DTE2 _dte, bool transparent, ATEClient client)
{
_mode = mode;
this._dte = _dte;
_transparent = transparent;
_client = client;
}
示例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;
}
示例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;
}