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


C# IWindow类代码示例

本文整理汇总了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 ); };
        }
开发者ID:Daramkun,项目名称:Misty,代码行数:31,代码来源:GraphicsDevice.cs

示例2: DrawInfo

 public DrawInfo(IWindow extent, double mapScale)
 {
     IPosition c = extent.Center;
     CenterX = c.X;
     CenterY = c.Y;
     MapScale = mapScale;
 }
开发者ID:steve-stanton,项目名称:backsight,代码行数:7,代码来源:DrawInfo.cs

示例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;
        }
开发者ID:W0dan,项目名称:OefeningenLogo,代码行数:26,代码来源:CreateExerciseSheetController.cs

示例4: Window

 protected Window(Generator g, Type type)
     : base(g, type, false)
 {
     inner = (IWindow)this.Handler;
     //toolBars = new ToolBarCollection(this);
     Initialize ();
 }
开发者ID:M1C,项目名称:Eto,代码行数:7,代码来源:Window.cs

示例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;
        }
开发者ID:W0dan,项目名称:OefeningenLogo,代码行数:29,代码来源:AddNumberController.cs

示例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;
            }
        }
开发者ID:raven-ie,项目名称:MASGAU,代码行数:29,代码来源:AWindow.cs

示例7: SetUp

 public void SetUp()
 {
     _IWindow = Substitute.For<IWindow>();
     _IWebServicesSettings = Substitute.For<IDiscogsAuthentificationProvider>();
     _Infra = Substitute.For<IInfraDependencies>();
     _Target = new ImportKeyViewModel(_IWebServicesSettings, _Infra) { Window = _IWindow };
 }
开发者ID:David-Desmaisons,项目名称:MusicCollection,代码行数:7,代码来源:ImportDiscogsKeyViewModelTestor.cs

示例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;
        }
开发者ID:Tauron1990,项目名称:Tauron-Application-Common,代码行数:22,代码来源:IClipboardManager.cs

示例9: Document

 internal Document(IWindow window)
     : base(window)
 {
     this.body = new HTMLBodyElement(window);
     this.defaultView = window;
     this.documentElement = new Element(window);
 }
开发者ID:Woo-Long,项目名称:JsBridge,代码行数:7,代码来源:Document.cs

示例10: LauncherFinalize

 public void LauncherFinalize( IWindow window, IGraphicsDevice graphicsDevice, IAudioDevice audioDevice )
 {
     if ( audioDevice != null )
         audioDevice.Dispose ();
     graphicsDevice.Dispose ();
     window.Dispose ();
 }
开发者ID:Daramkun,项目名称:ProjectLiqueur,代码行数:7,代码来源:Launcher.cs

示例11: Run

        public void Run(IWindow w)
        {
            mainWindow = (WindowsWindow)w;

            done = false;
            System.Windows.Forms.Application.Run(mainWindow);
        }
开发者ID:jmjacintos,项目名称:tesseract,代码行数:7,代码来源:WindowsBackend.cs

示例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();
        }
开发者ID:W0dan,项目名称:OefeningenLogo,代码行数:25,代码来源:CreateExerciseController.cs

示例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);
     }
 }
开发者ID:jeasonyoung,项目名称:csharp_sfit,代码行数:12,代码来源:StudentMainWindow.cs

示例14: WindowPositionSettings

 private WindowPositionSettings(IWindow window, ISettings settings)
 {
     _settings = settings;
     _window = window;
     _window.Closing += WindowClosing;
     Load();
 }
开发者ID:guozanhua,项目名称:phmi,代码行数:7,代码来源:WindowPositionSettings.cs

示例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();
        }
开发者ID:sanmadjack,项目名称:LAUNCH,代码行数:33,代码来源:GuiBuilder.cs


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