private void rightModelessButton_Click(object sender, EventArgs e) { var wpfWindow = new SimpleWindow(); ElementHost.EnableModelessKeyboardInterop(wpfWindow); wpfWindow.Show(); }
public static void OpenWindow() { window = GetWindow <SimpleWindow>(); window.titleContent = new GUIContent("Simple Window"); window.maxSize = new Vector2(800, 800); window.minSize = window.maxSize; }
private void OpenSaleButton_Click(object sender, RoutedEventArgs e) { SimpleWindow simpleWindow = new SimpleWindow(); Sale vente = (Sale)SaleDataGrid.SelectedItem; simpleWindow.Content = new PopupWindow(vente); simpleWindow.Show(); //Page pg = GetDependencyObjectFromVisualTree(this, typeof(Page)) as Page; //Sale vente = (Sale)SaleDataGrid.SelectedItem; //pg.NavigationService.Navigate(new PopupWindow(vente)); }
private void Application_Startup(object sender, StartupEventArgs e) { CreateMenu(); LoadIcon(); simpleWindow = new SimpleWindow(); Task.Run(() => { if (!Ns.Start()) { MessageBox.Show(@"Startup Failed", @"Error", MessageBoxButton.OK, MessageBoxImage.Error); Exit(false); } Current.Dispatcher.Invoke(() => { simpleWindow.Show(); }); }); }
static void Main(string[] args) { Console.WriteLine("Press ESC key to close window"); var window = new SimpleWindow(); window.Run(); Console.WriteLine("All done"); //ChessWindow window = new ChessWindow(); //window.Run(); /* * Game game = new Game(); * string line = ""; * while (line != "Q") * { * Console.Write("> "); * line = Console.ReadLine(); * * if (line == "Q") * { * break; * } * * string[] splitted = line.Split(' '); * if (splitted[0] == "clear") * { * game.Reset(); * } * else if (splitted[0] == "undo") * { * game.Undo(); * } * else * { * Move move = game.Parse(line); * game.Do(move); * } * * } */ }
private void btnSimpleWindow_Click(object sender, EventArgs e) { var window = new SimpleWindow(); window.Show(); }
public static void Init() { SimpleWindow window = GetWindow <SimpleWindow>(false, "Simple Window", true); window.Show(); }
private void wrongModelessWpfButton_Click(object sender, EventArgs e) { var wpfWindow = new SimpleWindow(); wpfWindow.Show(); }