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

C# IWindow类代码示例

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

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



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


示例16: show

    public void show(IWindow window, string id)
    {
        Debug.Log("addWindow "+id);
        lock(stack){
        if(stack.Contains(window)){
            Debug.Log("contains "+id);

            IWindow[] array = stack.ToArray();
            Stack<IWindow> aux = new Stack<IWindow>();
            for(int i =array.Length-1; i>=0; i--){
                    Debug.Log("Array["+i+"] "+array[i]);
                if(array[i] != window)
                    aux.Push(array[i]);}

            stack.Clear();
            stack = aux;
        }
        if(stack.Count>0){
            Debug.Log("windowManager.show  count>0");
            stack.Peek().hide();
        }
        stack.Push(window);}
        window.show();

        Debug.Log("stack.count "+stack.Count);
    }
开发者ID:CristianCosta,项目名称:Kinect,代码行数:26,代码来源:WindowManager.cs


示例17: Window

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


示例18: HTMLCanvasElement

        internal HTMLCanvasElement(IWindow window)
            : base(window)
        {
            this.window = (Window)window;

            this.height = this.clientHeight;
            this.width = this.clientWidth;
        }
开发者ID:modulexcite,项目名称:JsBridge,代码行数:8,代码来源:HTMLCanvasElement.cs


示例19: LauncherInitialize

        public void LauncherInitialize( out IWindow window, out IGraphicsDevice graphicsDevice, out IAudioDevice audioDevice )
        {
            window = new Window ( frame );
            graphicsDevice = new GraphicsDevice ( window );
            audioDevice = new AudioDevice ( window );

            IsInitialized = true;
        }
开发者ID:Daramkun,项目名称:ProjectLiqueur,代码行数:8,代码来源:Launcher.cs


示例20: CreateWithNullAgentWillThrow

 public void CreateWithNullAgentWillThrow(IWindow dummyDialogService)
 {
     // Fixture setup
     // Exercise system and verify outcome
     Assert.Throws<ArgumentNullException>(() =>
         new MainWindowViewModel(null, dummyDialogService));
     // Teardown
 }
开发者ID:mesta1,项目名称:dli.net_sourcecode,代码行数:8,代码来源:MainWindowViewModelTest.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# IWindowInfo类代码示例发布时间:2022-05-24
下一篇:
C# IWin32Window类代码示例发布时间: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