command

How do I bind a command to e.g. the right mouse button in a ControlTemplate in WPF?

I have a custom Control derived class and a view model to go with. The user can do several actions with this control, and I'm thinking it's best to implement these as RoutedCommand objects or ICommand derived objects in the view model so the ControlTemplates can bind to them. Binding a command to a button in one ControlTemplate should be...

WPF Calling a custom command on a custom control (from a viewmodel?)

I want to take a snap of the visual tree of a custom wpf control when the user clicks a button in a toolbar. The control is bound to a viewmodel. I have a BitmapSource dp in the custom control holding the snapped image which is bound to a property on my VM. The BitmapSource dp on the control is updated via a custom command on the contro...

Programatic re-evalutation of MVVM command's "can execute" state

Hello! I'm writing a WPF application using the MVVM pattern, based on the following article: WPF Apps With The Model-View-ViewModel Design Pattern I have two buttons on my View with the buttons' "Command" property bound (with data binding) to a given instance of the RelayCommand class (see "Figure 3 The RelayCommand Class" from the art...

WPF Command with Click Event Handler

Hi all, When I use the Command in a Button control the event handler which joined with Click event will never raised, how can I use the Command and handle the Click event handler Thanks in advance ...

Creating dynamic eclipse workspaces through command line

Hi, I am trying to dynamically create eclipse workspace through the command line to add in to automation. I want these workspaces to all share the same main project from a main workspace. Does anyone know if this is possible? If so, can you help me? Thank you! ...

Need to know how to create a DelegateCommand<Type> that returns an integer value

Here is what I am trying to do. Pay close attention to the InsertConlogEntry and how I am trying to assign it to my DelegateCommand, but, how do I handle the return int? Thank you, #region Members public static readonly string AddConlogEntry = "AddConlogEntry"; public static readonly string GetConlogList = "GetConlog...

Javascript grab value via http cmd

Hello, I am trying to grab a value from a url: http://localhost:8080/bin/task_status?id=2&amp;cmd=percent_done I am unsure how to actually do this within a javascript (ajax) command that once the page has been loaded will be called every .5 seconds. It is using the AJAX built in progress bar to display. ...

Standard documentation of Visual Studio commands?

Visual Studio has a concept of commands, i.e. actions executable by pressing a shortcut, entering them on the Command Window etc. Visual Studio itself documents its commands (at least some of them) but I was wondering if there is a unified way to get information about any command, e.g. coming from ReSharper, TestDriven.NET etc. What I'd...

Accessing Webcam Native Controls (Zoom, Brightness etc) via the Command Line

Hello everyone. Does anyone know how to access webcam native controls such as the zoom, brightness level from the command line interface? How does programs like messenger and skype list those options and are able to control those settings? I am trying to do this to an AIR 2 app and know that we can access NativeProcesses etc now. Any...

how to get paramater from commandline when running rcp in command window?

as we know, we can run eclipse in command line as follows: eclipse.exe -clean I need run my eclipse rcp program in the same way myrcp.exe path then how can I get the parameter "path" in myrcp code? thanks~ ...

What does the :compiler command do in Vim?

I recently found that there is a command in Vim called compiler. You can call it with any common compiler (for example, :compiler gcc, :compiler php, etc.), but it doesn't seem to have any immediate effect. I searched on the manpages but didn't find anything useful about what it actually does, nor does the Vim Wiki. Does anyone know wha...

command line tool text output

I have a small command line tool and after running it, I'd like to display the text output in a way that's easy for someone to copy/paste and save it or email it to someone else. Copy/pasting from a command prompt is not done in the standard way, so I don't want people to have to copy/paste from there. Saving the file to disk is possib...

Asp.Net - Can a LinkButton.CommandArgument be typed?

Okay so given a LinkButton inside a the ItemTemplate of a Repeater declared like this - <asp:LinkButton ID="restrictionDelete" runat="server" CssClass="restrictionDelete" Text="Delete..." OnCommand="lnkDeleteRestriction_Command" CommandName="Delete" CommandArgument="<%# Container.DataItem %>"></asp:LinkButton> Now,..t...

android : how to run a shell command from within code

I am trying to execute a command from within my code, the command is "echo 125 > /sys/devices/platform/flashlight.0/leds/flashlight/brightness" and I can run it without problems from adb shell I am using Runtime class to execute it : Runtime.getRuntime().exec("echo 125 > /sys/devices/platform/flashlight.0/leds/flashlight/brightness")...

WPF: Binding to commands in code behind

Hi, I have an WPF Microsoft Surface Applikation and I'm using MVVM-Pattern. I have some buttons that are created in code behind. And I would like to bind commands to them but I only know how that works in the XAML like this: <Custom:SurfaceButton Command="{Binding SaveReservationCommandBinding, Mode=OneWay}"/> But I cannot do it l...

Issuing native system commands in Scala

I want to issue a native system command from a Scala program, and perhaps trap the output. ("ls" comes to mind. There may be other ways to get directory information without issuing the command, but that's beside the point of my question.) It would correspond to os.system(...) in Python. I've looked in "Programming in Scala". I've looked...

CTest with multiple commands.

I'm building some tests using CTest. Usually, I can set up the test by simply the line: ADD_TEST(Test_Name executable args) However, I've run into a problem, I have some tests that require two commands to be run in order for it to work, is there any way I can run two programs within a single ctest, or am I required to create a new te...

viewing foreground process using ps

Hi, I can see the background process using ps. But Is there a way to view the foreground process?. For example, $nohup process1 & then ps -ef | grep "process1" would display the process "process1" in execution. But the above command wouldn't show a foreground process executed like, $process2 Thanks in Advance. ...

Changing to remove path from Env Variable PATH

Hi, I'm trying to use a command line implementation to change the Path env var to remove a path so I don't have to manually removed it on a bunch of machines. I have found this, which I can't seem to get it to work: %Path:str1=str2% str1 is the path and str2 is null, which I'm not sure how to set it to null on the command line. If the...

Where and how should selected items be managed in a MVVM architecture ?

Hello, I have a view that allows the user to select some data : some dates for example, and executes a command that needs these data. So in my command I should have a reference to the selected date, but what is the best practice to make this date go to the ViewModel side where the command lives : to add a SelectedDate dependency prop...