本文整理汇总了C#中IWindow类的典型用法代码示例。如果您正苦于以下问题:C# IWindow类的具体用法?C# IWindow怎么用?C# IWindow使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IWindow类属于命名空间,在下文中一共展示了IWindow类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GraphicsDevice
public GraphicsDevice( IWindow window )
{
d3d = new SharpDX.Direct3D9.Direct3D ();
IntPtr handle = ( window.Handle as System.Windows.Forms.Form ).Handle;
this.window = window;
d3dpp = new SharpDX.Direct3D9.PresentParameters ( 800, 600, SharpDX.Direct3D9.Format.A8R8G8B8,
1, SharpDX.Direct3D9.MultisampleType.None, 0, SharpDX.Direct3D9.SwapEffect.Discard,
handle, true, true, SharpDX.Direct3D9.Format.D24S8, SharpDX.Direct3D9.PresentFlags.None,
0, SharpDX.Direct3D9.PresentInterval.Immediate );
try
{
d3dDevice = new SharpDX.Direct3D9.Device ( d3d, 0, SharpDX.Direct3D9.DeviceType.Hardware,
handle, SharpDX.Direct3D9.CreateFlags.HardwareVertexProcessing,
d3dpp );
}
catch
{
d3dDevice = new SharpDX.Direct3D9.Device ( d3d, 0, SharpDX.Direct3D9.DeviceType.Hardware,
handle, SharpDX.Direct3D9.CreateFlags.SoftwareVertexProcessing,
d3dpp );
}
Information = new GraphicsDeviceInformation ( d3d );
BackBuffer = new BackBuffer ( this );
ImmediateContext = new GraphicsContext ( this );
//window.Resize += ( object sender, EventArgs e ) => { ResizeBackBuffer ( ( int ) window.ClientSize.X, ( int ) window.ClientSize.Y ); };
}
示例2: DrawInfo
public DrawInfo(IWindow extent, double mapScale)
{
IPosition c = extent.Center;
CenterX = c.X;
CenterY = c.Y;
MapScale = mapScale;
}
示例3: ShowWindow
public IExerciseSheet ShowWindow(IWindow parent)
{
_exercises = new List<string>();
_sheet = null;
_window.Loaded += Loaded;
_window.AddExerciseButtonClicked += AddExerciseButtonClicked;
_window.ExerciseSelected += ExerciseSelected;
_window.ExerciseUnselected += ExerciseUnselected;
_window.SaveButtonClicked += SaveButtonClicked;
_window.CancelButtonClicked += CancelButtonClicked;
_window.ShowDialog(parent);
_window.Loaded -= Loaded;
_window.AddExerciseButtonClicked -= AddExerciseButtonClicked;
_window.ExerciseSelected -= ExerciseSelected;
_window.ExerciseUnselected -= ExerciseUnselected;
_window.SaveButtonClicked -= SaveButtonClicked;
_window.CancelButtonClicked -= CancelButtonClicked;
_window.Clear();
return _sheet;
}
示例4: Window
protected Window(Generator g, Type type)
: base(g, type, false)
{
inner = (IWindow)this.Handler;
//toolBars = new ToolBarCollection(this);
Initialize ();
}
示例5: ShowWindow
public INumberDefinition ShowWindow(IWindow parent)
{
_name = string.Empty;
_decimals = 0;
_minvalue = 0;
_maxvalue = 0;
_decimalsValid = false;
_minvalueValid = false;
_maxvalueValid = false;
_nameValid = false;
_window.SaveButtonClicked += SaveButtonClicked;
_window.CancelButtonClicked += CancelButtonClicked;
_window.NameChanged += NameChanged;
_window.MinvalueChanged += MinvalueChanged;
_window.MaxvalueChanged += MaxvalueChanged;
_window.DecimalsChanged += DecimalsChanged;
_window.ShowDialog(parent);
_window.SaveButtonClicked -= SaveButtonClicked;
_window.CancelButtonClicked -= CancelButtonClicked;
_window.NameChanged -= NameChanged;
_window.MinvalueChanged -= MinvalueChanged;
_window.MaxvalueChanged -= MaxvalueChanged;
_window.DecimalsChanged -= DecimalsChanged;
return _number;
}
示例6: AWindow
public AWindow(IWindow owner)
: base(owner, Core.settings)
{
TabItem from_me = new TabItem();
from_me.BeginInit();
from_me.EndInit();
this.Background = from_me.Background;
ProgressBar from_color = new ProgressBar();
default_progress_color = from_color.Foreground;
// Taskbar progress setup
TaskbarItemInfo = new TaskbarItemInfo();
// var uriSource = new Uri(System.IO.Path.Combine(Core.ExecutablePath, "masgau.ico"), UriKind.Relative);
System.Drawing.Icon ico = Properties.Resources.MASGAUIcon;
this.Icon = System.Windows.Interop.Imaging.CreateBitmapSourceFromHBitmap(
ico.ToBitmap().GetHbitmap(),
IntPtr.Zero,
Int32Rect.Empty,
BitmapSizeOptions.FromEmptyOptions());
if (owner != null) {
this.Owner = owner as System.Windows.Window;
this.WindowStartupLocation = System.Windows.WindowStartupLocation.CenterOwner;
} else {
this.WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen;
}
}
示例7: SetUp
public void SetUp()
{
_IWindow = Substitute.For<IWindow>();
_IWebServicesSettings = Substitute.For<IDiscogsAuthentificationProvider>();
_Infra = Substitute.For<IInfraDependencies>();
_Target = new ImportKeyViewModel(_IWebServicesSettings, _Infra) { Window = _IWindow };
}
示例8: CreateViewer
/// <summary>
/// The create viewer.
/// </summary>
/// <param name="target">
/// The target.
/// </param>
/// <param name="registerForClose">
/// The register for close.
/// </param>
/// <param name="performInitialization">
/// The perform initialization.
/// </param>
/// <returns>
/// The <see cref="ClipboardViewer" />.
/// </returns>
public ClipboardViewer CreateViewer(IWindow target, bool registerForClose, bool performInitialization)
{
Contract.Requires<ArgumentNullException>(target != null, "target");
Contract.Ensures(Contract.Result<ClipboardViewer>() != null);
return null;
}
示例9: Document
internal Document(IWindow window)
: base(window)
{
this.body = new HTMLBodyElement(window);
this.defaultView = window;
this.documentElement = new Element(window);
}
示例10: LauncherFinalize
public void LauncherFinalize( IWindow window, IGraphicsDevice graphicsDevice, IAudioDevice audioDevice )
{
if ( audioDevice != null )
audioDevice.Dispose ();
graphicsDevice.Dispose ();
window.Dispose ();
}
示例11: Run
public void Run(IWindow w)
{
mainWindow = (WindowsWindow)w;
done = false;
System.Windows.Forms.Application.Run(mainWindow);
}
示例12: ShowWindow
public void ShowWindow(IWindow parent)
{
_nameValid = false;
_templateValid = false;
_numbers = new List<INumberDefinition>();
_constraints = new List<IConstraint>();
_window.SaveButtonClicked += SaveButtonClicked;
_window.CancelButtonClicked += CancelButtonClicked;
_window.AddNumberButtonClicked += AddNumberButtonClicked;
_window.AddConstraintButtonClicked += AddConstraintButtonClicked;
_window.NameChanged += NameChanged;
_window.TemplateChanged += TemplateChanged;
_window.ShowDialog(parent);
_window.SaveButtonClicked -= SaveButtonClicked;
_window.CancelButtonClicked -= CancelButtonClicked;
_window.AddNumberButtonClicked -= AddNumberButtonClicked;
_window.AddConstraintButtonClicked -= AddConstraintButtonClicked;
_window.NameChanged -= NameChanged;
_window.TemplateChanged -= TemplateChanged;
_window.Clear();
}
示例13: AddPlugin
/// <summary>
///
/// </summary>
/// <param name="position"></param>
/// <param name="plug"></param>
public void AddPlugin(DockStyle position, IWindow plug)
{
if (position == DockStyle.Bottom)
{
this.AddBottomPlugin(this.panelPlugins, plug);
}
}
示例14: WindowPositionSettings
private WindowPositionSettings(IWindow window, ISettings settings)
{
_settings = settings;
_window = window;
_window.Closing += WindowClosing;
Load();
}
示例15: GuiBuilder
public GuiBuilder(IWindow window)
{
xml = new XmlHandler(System.IO.Directory.GetCurrentDirectory(),"games.xml");
this.window = window;
profile_combo = window.getProfileCombo();
tabs = window.getTabs();
profiles = new Dictionary<int, XmlNode>();
XmlNode games_node = xml.profile_xml.FirstChild;
if(games_node.Name!="games")
throw new Exception("nO LIKE");
profile_combo.addItem(null,"Please Select A Game");
profile_combo.setActiveIndex(0);
int i = 1;
foreach(XmlNode node in games_node.ChildNodes) {
switch(node.Name) {
case "game":
profile_combo.addItem(node.Attributes["name"].Value,node.Attributes["title"].Value);
profiles.Add(i,node);
i++;
break;
}
}
profile_combo.selectionChanged += HandleProfile_comboselectionChanged;
window.refresh();
}