minimize

Edge crossing reduction in graph

南楼画角 提交于 2019-11-30 13:40:58
I'd like to ask you if there are any algorithms how to minimize edge crossings in graph, for example if I have a transition matrix of the graph. I found methods like trying to place the nodes around the other node, but I'd like to know some other ideas. Thanks. There's a range of well established algorithms/libraries that have been developed for graph drawing applications, you can get a bit of background here . To draw undirected graphs a popular choice is the force-based layout algorithm, in which graph edges are treated as springs (attractive forces) while the vertices are treated like

How to restore a minimized Window in code-behind?

落花浮王杯 提交于 2019-11-30 11:50:04
问题 This is somewhat of a mundane question but it seems to me there is no in-built method for it in WPF. There only seems to be the WindowState property which being an enum does not help since i cannot tell whether the Window was in the Normal or Maximized state before being minimized. When clicking the taskbar icon the window is being restored just as expected, assuming its prior state, but i cannot seem to find any defined method which does that. So i have been wondering if i am just missing

Cancel A WinForm Minimize?

笑着哭i 提交于 2019-11-30 05:29:55
问题 I have a winform with the minimizeMaximizeClose buttons disabled, but still if someone presses it in the task bar, it will minimize. I want to prevent this from happening. How can I accomplish this? 回答1: You could probably catch them changing it in the SizeChanged event and check the WindowState, if its been set to Minimized then set it back Normal. Not the most elegant solution but should work. eg. private void myForm_SizeChanged(object sender, System.EventArgs e) { if (myForm.WindowState ==

Minimize / Maximize div's with jQuery

蹲街弑〆低调 提交于 2019-11-30 03:00:22
问题 I basically want to minimise some div's . Instead of using "-" and "+", I want to use some symbols (from font-awesome) to minimise and maximise the div's. My question concerning this; how can I insert the classes of the icons in this piece of code? I tried by replacing the .html part with .attr, but that didn't worked out. <script> $(".btn-minimize").click(function(){ if($(this).html() == "-"){ $(this).html("+"); } else{ $(this).html("-"); } $(".widget-content").slideToggle(); }); </script>

How to restore a minimized Window in code-behind?

社会主义新天地 提交于 2019-11-30 01:15:35
This is somewhat of a mundane question but it seems to me there is no in-built method for it in WPF. There only seems to be the WindowState property which being an enum does not help since i cannot tell whether the Window was in the Normal or Maximized state before being minimized. When clicking the taskbar icon the window is being restored just as expected, assuming its prior state, but i cannot seem to find any defined method which does that. So i have been wondering if i am just missing something or if i need to use some custom interaction logic. ( I'll post my current solution as answer )

Edge crossing reduction in graph

我的未来我决定 提交于 2019-11-29 19:05:28
问题 I'd like to ask you if there are any algorithms how to minimize edge crossings in graph, for example if I have a transition matrix of the graph. I found methods like trying to place the nodes around the other node, but I'd like to know some other ideas. Thanks. 回答1: There's a range of well established algorithms/libraries that have been developed for graph drawing applications, you can get a bit of background here. To draw undirected graphs a popular choice is the force-based layout algorithm

How can I automatically compress and minimize JavaScript files in an ASP.NET MVC app?

五迷三道 提交于 2019-11-29 18:49:35
So I have an ASP.NET MVC app that references a number of javascript files in various places (in the site master and additional references in several views as well). I'd like to know if there is an automated way for compressing and minimizing such references into a single .js file where possible. Such that this ... <script src="<%= ResolveUrl("~") %>Content/ExtJS/Ext.ux.grid.GridSummary/Ext.ux.grid.GridSummary.js" type="text/javascript"></script> <script src="<%= ResolveUrl("~") %>Content/ExtJS/ext.ux.rating/ext.ux.ratingplugin.js" type="text/javascript"></script> <script src="<%= ResolveUrl("~

detect keypression when minimized and trayicon

独自空忆成欢 提交于 2019-11-29 16:50:48
For my test I've created a little program in C# to detect key presses with this code: protected override void OnKeyDown(KeyEventArgs e) { if (e.KeyCode == Keys.F12) MessageBox.Show("f12 pressed"); } This works fine when the form is focused and active. I've spent many time to find how to set it for works when minimized, I found a solution here to add system tray icon. I followed solution but didn't work anymore. When i minimize it, the icon tray appears and works, but i didn't detect key presses. Your form will only receive keypress events when it has focus, to receive other keypress events you

Enable Maximize, Minimize and Restore Window in WPF (Manual Resize is disable)

╄→尐↘猪︶ㄣ 提交于 2019-11-29 04:52:21
I need to enable the following on my application (C# WPF application): Have normal size of 1024*768 The user can maximize the application The user can minimize the application The user can restore the application (1024*768) The user cannot manually resize the application by draging its border. There isn't any ResizeMode the fulfills all of those requirements. Is there any way to do do? Nir I've finally found a relatively decent solution. The idea is to overide the OnStateChanged event of the window, cancel the Min/Max constraints and refresh it. If the window is not maximized, we simply apply

Easiest way to have a program minimize itself to the system tray using .NET 4

戏子无情 提交于 2019-11-28 17:51:00
I'm making a new WPF application and I need to be able to minimize the application and have nice and snug in the system tray, right beside the clock (or in that general area). This has to work on Windows XP, Vista and 7. I don't have to support older versions of Windows. What's the simplest way to achieve this if I'm using .NET 4? LaGrandMere Example in MSDN forum Here's a quick example to show how to minimize to the notification area. You need to add references to the System.Window.Forms and System.Drawing assemblies. public partial class Window1 : System.Windows.Window { public Window1() {