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; } }
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(); }
/// <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; }
public void SetUp() { _IWindow = Substitute.For<IWindow>(); _IWebServicesSettings = Substitute.For<IDiscogsAuthentificationProvider>(); _Infra = Substitute.For<IInfraDependencies>(); _Target = new ImportKeyViewModel(_IWebServicesSettings, _Infra) { Window = _IWindow }; }
public void Run(IWindow w) { mainWindow = (WindowsWindow)w; done = false; System.Windows.Forms.Application.Run(mainWindow); }
internal Document(IWindow window) : base(window) { this.body = new HTMLBodyElement(window); this.defaultView = window; this.documentElement = new Element(window); }
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; }
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; }
/// <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); } }
public void LauncherFinalize( IWindow window, IGraphicsDevice graphicsDevice, IAudioDevice audioDevice ) { if ( audioDevice != null ) audioDevice.Dispose (); graphicsDevice.Dispose (); window.Dispose (); }
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(); }
public DrawInfo(IWindow extent, double mapScale) { IPosition c = extent.Center; CenterX = c.X; CenterY = c.Y; MapScale = mapScale; }
protected Window (Generator g, Type type, bool initialize = true) : base(g, type, false) { handler = (IWindow)this.Handler; //toolBars = new ToolBarCollection(this); if (initialize) Initialize (); }
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); }
private WindowPositionSettings(IWindow window, ISettings settings) { _settings = settings; _window = window; _window.Closing += WindowClosing; Load(); }
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 ); }; }
protected Window(Generator g, Type type) : base(g, type, false) { inner = (IWindow)this.Handler; //toolBars = new ToolBarCollection(this); Initialize (); }
internal HtmlWindow (WebBrowser owner, Mono.WebBrowser.IWebBrowser webHost, IWindow iWindow) { this.window = iWindow; this.webHost = webHost; this.owner = owner; this.window.Load += new EventHandler (OnLoad); this.window.Unload += new EventHandler (OnUnload); }
/// <summary> メッセージを表示する </summary> public void CreateMessageWindow(string message, float velocity) { if (IsActiveWindow) { return; } _currentWindow = Instantiate(_messageWindow); _currentWindow.message.text = message; DestroyWindow(velocity); }
void HandleRollOn(IWindow window) { if(window.Enabled) { var asControl = window as IControl; asControl.SetState(Highlighted); } }
void HandleRollOff(IWindow window) { if (window.Enabled) { var asControl = window as IControl; asControl.SetState(Enabled); } }
void HandlePush(IWindow window) { if(window.Enabled) { var asControl = window as IControl; asControl.SetState(Pushed); } }
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; }
private void CloseNewProjectWindow() { if (newProjectWindow != null) { newProjectWindow.Close(); newProjectWindow = null; } }
public Reporting(IMessageService messageService, IView view) { _messageService = messageService; if (view is Window && view is IWindow) { _view = view as IWindow; } }
public MetaScene(IEye eye, DisplayMode desctopDisplayMode) { this.eye = eye; this.desctopDisplayMode = desctopDisplayMode; var swapChain = eye.Device.PrimarySwapChain; window = swapChain.Window; eye.NewFrame += NewFrame; }
public void CreateWithNullAgentWillThrow(IWindow dummyDialogService) { // Fixture setup // Exercise system and verify outcome Assert.Throws<ArgumentNullException>(() => new MainWindowViewModel(null, dummyDialogService)); // Teardown }
/// <summary> /// The create progress dialog. /// </summary> /// <param name="text"> /// The text. /// </param> /// <param name="title"> /// The title. /// </param> /// <param name="owner"> /// The owner. /// </param> /// <param name="worker"> /// The worker. /// </param> /// <returns> /// The <see cref="IProgressDialog" />. /// </returns> public IProgressDialog CreateProgressDialog( string text, string title, IWindow owner, Action<IProgress<ActiveProgress>> worker) { return new SimpleProgressDialog(text, title, owner, worker); }
internal HTMLCanvasElement(IWindow window) : base(window) { this.window = (Window)window; this.height = this.clientHeight; this.width = this.clientWidth; }
private void PrepareContentDialog(object view) { this.contentDialog = this.CreateWindow(); this.contentDialog.Content = view; this.contentDialog.Owner = this.HostControl; this.contentDialog.Closed += this.ContentDialogClosed; this.contentDialog.Style = this.GetStyleForView(); this.contentDialog.Show(); }
/// <summary> /// The run internal. /// </summary> /// <param name="args"> /// The args. /// </param> /// <returns> /// The <see cref="int"/>. /// </returns> private int RunInternal(string[] args) { var tempFiles = CefBinariesLoader.Load(HostConfig); CefRuntime.EnableHighDpiSupport(); var assembly = Assembly.GetEntryAssembly() ?? typeof(ChromelyConfiguration).Assembly; var settings = new CefSettings { MultiThreadedMessageLoop = true, LogSeverity = (CefLogSeverity)HostConfig.LogSeverity, LogFile = HostConfig.LogFile, ResourcesDirPath = Path.GetDirectoryName(new Uri(assembly.CodeBase).LocalPath) }; if (HostConfig.HostPlacement.Frameless || HostConfig.HostPlacement.KioskMode) { if (HostConfig.HostApi == ChromelyHostApi.Gtk) { throw new NotSupportedException("Chromely currently does not support frameless windows using GTK."); } // MultiThreadedMessageLoop is not allowed to be used as it will break frameless mode settings.MultiThreadedMessageLoop = false; } settings.LocalesDirPath = Path.Combine(settings.ResourcesDirPath, "locales"); settings.RemoteDebuggingPort = 20480; settings.NoSandbox = true; settings.Locale = HostConfig.Locale; if (HostConfig.UseDefaultSubprocess) { var subProcessExeFullPath = DefaultSubprocessExe.FulPath; settings.BrowserSubprocessPath = subProcessExeFullPath ?? settings.BrowserSubprocessPath; } var argv = args; if (CefRuntime.Platform != CefRuntimePlatform.Windows) { argv = new string[args.Length + 1]; Array.Copy(args, 0, argv, 1, args.Length); argv[0] = "-"; } // Update configuration settings settings.Update(HostConfig.CustomSettings); var mainArgs = new CefMainArgs(argv); var app = new CefGlueApp(HostConfig); // CEF applications have multiple sub-processes (render, plugin, GPU, etc) // that share the same executable. This function checks the command-line and, // if this is a sub-process, executes the appropriate logic. var exitCode = CefRuntime.ExecuteProcess(mainArgs, app, IntPtr.Zero); if (exitCode >= 0) { // The sub-process has completed so return here. CefBinariesLoader.DeleteTempFiles(tempFiles); Log.Info($"Sub process executes successfully with code: {exitCode}"); return(exitCode); } // guard if something wrong foreach (var arg in args) { if (arg.StartsWith("--type=")) { return(-2); } } CefRuntime.Initialize(mainArgs, settings, app, IntPtr.Zero); RegisterSchemeHandlers(); RegisterMessageRouters(); Initialize(); _mainView = CreateMainView(); bool centerScreen = HostConfig.HostPlacement.CenterScreen; if (centerScreen) { _mainView.CenterToScreen(); } _windowCreated = true; CefBinariesLoader.DeleteTempFiles(tempFiles); RunMessageLoop(); _mainView.Dispose(); _mainView = null; CefRuntime.Shutdown(); Shutdown(); return(0); }
public GameWindowTextInput(IWindow window) { this.window = window; }
//------------------------------------------------------------------------------------------------- /// <summary> /// Initializes a new instance of the <see cref="TollRoad" /> class. /// </summary> public TollRoad(IWindow window) : base(window) { }
public WheelEvent(String type, Boolean bubbles = false, Boolean cancelable = false, IWindow view = null, Int32 detail = 0, Int32 screenX = 0, Int32 screenY = 0, Int32 clientX = 0, Int32 clientY = 0, MouseButton button = MouseButton.Primary, IEventTarget target = null, String modifiersList = null, Double deltaX = 0.0, Double deltaY = 0.0, Double deltaZ = 0.0, WheelMode deltaMode = WheelMode.Pixel) { Init(type, bubbles, cancelable, view, detail, screenX, screenY, clientX, clientY, button, target, modifiersList ?? String.Empty, deltaX, deltaY, deltaZ, deltaMode); }
public virtual bool Contains(IWindow window) { return(this.windows.Contains(window)); }
/// <summary> /// Initializes a new instance of the <see cref="LocationArrive" /> class. /// This constructor will be used by the other one /// </summary> /// <param name="window">The window.</param> public LocationArrive(IWindow window) : base(window) { }
public WindowTestFragment(IMauiContext mauiContext, IWindow window) { _mauiContext = mauiContext; _window = window; }
public WindowFittingMgmt(IWindow @base) : base(@base) { }
public void AddWindow(IWindow window, bool firstCreate) { AddWindow(window, true, firstCreate); }
public void Add(IWindow item) { _windows.Add(item); }
public override Boolean Validate(IWindow window) { return(true); }
public bool Contains(IWindow item) { return(_windows.Contains(item)); }
public bool Remove(IWindow item) { return(_windows.Remove(item)); }
/// <summary> /// Initializes a new instance of the <see cref="FordRiverHelp" /> class. /// This constructor will be used by the other one /// </summary> /// <param name="window">The window.</param> public FordRiverHelp(IWindow window) : base(window) { }
/// <summary> /// Initializes a new instance of the <see cref="ProfessionSelector" /> class. /// This constructor will be used by the other one /// </summary> /// <param name="window">The window.</param> public ProfessionSelector(IWindow window) : base(window) { }
public ThemedDefaultWindowWidget(IWindow window) : base(window) { CompoundPresenter.Push(new WindowWidgetPresenter()); }
public ImGuiLayer CreateImGuiLayer (IWindow window, IInputContext inputContext) => new(_gl, window, inputContext);
public ThemedInvalidableWindowWidget(IWindow window) : base(window) { CompoundPresenter.Push(new WindowWidgetPresenter()); }
Task SetupWindowForTests <THandler>(IWindow window, Func <Task> runTests, IMauiContext mauiContext = null) where THandler : class, IElementHandler { mauiContext ??= MauiContext; return(InvokeOnMainThreadAsync(async() => { AViewGroup rootView = MauiContext.Context.GetActivity().Window.DecorView as AViewGroup; _decorDrawable ??= rootView.Background; var linearLayoutCompat = new LinearLayoutCompat(MauiContext.Context); var fragmentManager = MauiContext.GetFragmentManager(); var viewFragment = new WindowTestFragment(MauiContext, window); try { linearLayoutCompat.Id = AView.GenerateViewId(); rootView.AddView(linearLayoutCompat); fragmentManager .BeginTransaction() .Add(linearLayoutCompat.Id, viewFragment) .Commit(); await viewFragment.FinishedLoading; await runTests.Invoke(); } finally { if (window.Handler != null) { window.Handler.DisconnectHandler(); } fragmentManager .BeginTransaction() .Remove(viewFragment) .Commit(); rootView.RemoveView(linearLayoutCompat); await linearLayoutCompat.OnUnloadedAsync(); if (viewFragment.View != null) { await viewFragment.View.OnUnloadedAsync(); } await viewFragment.FinishedDestroying; // This is mainly to remove changes to the decor view that shell imposes if (_decorDrawable != rootView.Background) { rootView.Background = _decorDrawable; } // Unset the Support Action bar if the calling code has set the support action bar if (MauiContext.Context.GetActivity() is AppCompatActivity aca) { aca.SetSupportActionBar(null); } } })); }
/// <summary> /// navigate to window callback /// </summary> /// <param name="window"></param> public void NavigateToWindow(IWindow window) { DefaultMainMenu.Visibility = Visibility.Visible; ActiveItem.Content = window; //window.OnEnter(); }
/// <summary> /// Initializes a new instance of the <see cref="OriginalTopTen" /> class. /// This constructor will be used by the other one /// </summary> /// <param name="window">The window.</param> // ReSharper disable once UnusedMember.Global public OriginalTopTen(IWindow window) : base(window) { }
public void AddWindow() { IWindow window = WindowResolver.GetWindow(); window.Show(); }
public virtual int IndexOf(IWindow window) { return(this.windows.IndexOf(window)); }
public static async Task <byte[]?> CaptureAsPngAsync(IWindow window) { var result = await window.CaptureAsync(); return(await ScreenshotResultToArray(result, ScreenshotFormat.Png, 100)); }
public PartialReflectionOption(IWindow window) : base(window) { }
public static async Task <byte[]?> CaptureAsJpegAsync(IWindow window, int quality = 80) { var result = await window.CaptureAsync(); return(await ScreenshotResultToArray(result, ScreenshotFormat.Jpeg, quality)); }
/// <summary> /// Constructor for arguments class passed to the EditboxKeyUp event /// </summary> /// <param name="window">IWindow</param> /// <param name="editbox">IEditbox</param> /// <param name="keyEventArgs">KeyEventArgs</param> public EditboxKeyUpArgs(IWindow window, IEditbox editbox, KeyEventArgs keyEventArgs) { this.window = window; this.editbox = editbox; this.keyEventArgs = keyEventArgs; }
/// <summary> /// Capture transparent Screenshot of a Window. /// </summary> /// <param name="Window">The <see cref="IWindow"/> to Capture.</param> /// <param name="IncludeCursor">Whether to include Mouse Cursor.</param> public static IBitmapImage CaptureTransparent(IWindow Window, bool IncludeCursor = false) { var platformServices = ServiceProvider.Get <IPlatformServices>(); return(platformServices.CaptureTransparent(Window, IncludeCursor)); }
public ColorFrame(IWindow winodw) : base(winodw) { }
public WindowStation(IWindow @base) : base(@base) { }