0
голосов
1ответов
462 просмотров

get RibbonCommand Name from sender Object that is executed

How to get the Label of Ribbon command that is executed. Information is present in sender object but how to cast it in RibbonCommand and then I can get that command name private void RibbonCommand_Executed(object sender, ExecutedRoutedEventArgs e) { RibbonCommand rbnCmd = sender as RibbonCo...

2
голосов
2ответов
684 просмотров

Define an emacs command that calls another emacs command (preserving interactive stuff)

How can I define an emacs command X that does something and then calls another emacs command Y and also copying the interactive interface of the command Y too? I want to define an altenative version of query-replace with temporarilly toggled value of case-fold-search: (defun alt-query-replace (...

2
голосов
2ответов
10967 просмотров

Enable Button and DelegateCommand

How can I disable a Button until the required data is entered in a TextBox? I'm binding a Button to an ICommand: public ICommand LoginCommand { get { if (_loginCommand == null) { _loginCommand = new DelegateCommand<string>(this.Login, this.IsValid); ...

21
голосов
1ответов
33682 просмотров

WPF ContextMenu with ItemsSource - how to bind to Command in each item?

Possible Duplicate: Specify Command for MenuItem in a DataTemplate I have a collection of objects (viewmodels) that represent menu items. Each of them have a command that I would like to execute when a MenuItem is clicked. If I wanted to do the menu statically, I do it like this: &lt...

31
голосов
3ответов
20792 просмотров

WPF Built-in Commands

I'm looking for a complete list of built-in WPF Commands. The best list I've found so far is here, but it does not list all commands. Some nice-to-have details would be: Controls/components with support to the commands (for example, TextBox supports edit commands such as Paste, Copy, Cut, Red...

1
голосов
1ответов
388 просмотров

Where to put Commands when injecting buttons into a ToolBar?

In my composite WPF application I am injecting some buttons into the shell's toolbar from a module. These buttons are injected using the region manager in the module's IModule Initialize function. Since I'm using MVVM and Commands, where would an appropriate place be to put the Command handlers ...

0
голосов
2ответов
1556 просмотров

How to check for COMMAND key held down Java/SWT at startup on Mac OS X

My app is cross-platform, hence why SWT is being used. I can easily monitor for the Mac Command/Flower key press when the app is running using SWT (they have SWT.COMMAND as a key press). I want to know how to see if the command key is being pressed and held down as the app opens. I found a few ...

0
голосов
1ответов
983 просмотров

using ruby popen wrapped in a shell script

I finished my short file for a homework assignment which uses IO.popen("command").readlines to grab the STDOUT of that command. However, I need to write a shell script to wrap my ruby file in. No problem, but somehow putting it in the shell script makes readlines hang. ruby script.rb foo example...

2
голосов
2ответов
2315 просмотров

How come when I run ruby.exe / IRB all I get is a blank DOS shell?

I installed ruby 1.9.1p243 (2009-07-16 revision 24175) [i386-mingw32] on my Windows XP laptop. When I run ruby.exe I get a blank DOS Shell window. No expected "irb(main):001:0>" at the top left of the command prompt. I can type into the shell but, any code I type in actually does anything whe...

2
голосов
2ответов
822 просмотров

The Command "File.BatchNewTeamProject" is not available in VSTS 2010

I am trying to automate the creation of team projects using a command built into VS 2010 called File.BatchNewTeamProject using a project settings file as an argument, and executing this as a process silently in the background from my c# win app. I am aware of a requirement that Team Explorer has ...

3
голосов
3ответов
952 просмотров

Textmate toggle collapse/expand CSS rule command?

Does anyone know of a command (not a macro) for Textmate / E Text Editor / Redcar / etc. that will collapse a multi-line CSS rule down to one line OR, if the rule is already on one line, expand it out to multi-line? I already know about code folding and that's not what I require - I need to be ab...

4
голосов
1ответов
4655 просмотров

WPF Trigger a Command at end of animation

How can I trigger a Command in my ViewModel at the end of an animation/storyboard using XAML only.

5
голосов
2ответов
3074 просмотров

WPF Commands - Doing it with no code-behind

I'm building a simple data entry app in WPF form using the MVVM pattern. Each form has a presenter object that exposes all the data etc. I'd like to use WPF Commands for enabling and disabling Edit/Save/Delete buttons and menu options. My problem is that this approach seems to require me to add ...

1
голосов
3ответов
1841 просмотров

A good aproach to events in MVVM

So I ran into this problem trying to implement MVVM. AFAIK the best way to execute a method in the ViewModel class is through a CommandBinding. <Button Command={Binding DoSomethingCommand} /> Only this time I need to do something on a ListBoxItem double click, and the ListBoxItem doesn't...

1
голосов
1ответов
1047 просмотров

Track "commands" send to WPF window by touchpad (Bamboo)

I just bought a touchpad wich allows drawing and using multitouch. The api is not supported fully by windows 7, so I have to rely on the build in config dialog. The basic features are working, so if I draw something in my WPF tool, and use both fingers to do a right click, I can e.g. change the ...

7
голосов
4ответов
15868 просмотров

How to interpret status code in Python commands.getstatusoutput()

In a related question, I asked where to find the documentation for the C function "wait." This was an attempt to figure out return codes for the commands.getstatusoutput() module. Stackoverflow came through, but the documentation didn't help. Here's what puzzles me: #!/usr/bin/python import comm...

7
голосов
1ответов
702 просмотров

Eclipse keyboard shortcuts with Dvorak

I use Eclipse with Dvorak-QWERTY Commands (a Mac option). I am running OS 10.6. But when I press the command key, it does not revert back to the QWERTY keyboard but instead stays as Dvorak. This makes keyboard shortcuts a lot harder to use. How can I fix this problem?

4
голосов
2ответов
970 просмотров

How to run every script in a directory except itself?

I have a folder full of *.command files on my OS X workstation. (For those that don't know, *.command files are just shell scripts that launch and run in a dedicated Terminal window). I've dragged this folder onto my Dock to use a "stack" so I can access and launch these scripts conveniently ...

3
голосов
4ответов
10460 просмотров

Timeout when ssh command is executed from my Java program

I have a Java program which runs in Tomcat and which needs to execute several ssh and scp commands, as well as a few simple commands such as ls on the local machine. I am having trouble with my current approach in that I am getting a time out every time I execute an ssh command. I can run the s...

0
голосов
1ответов
1451 просмотров

make cairngorm commands ALWAYS work synchronously

I see the benefit of asynchronous commands (waiting for server responses...) but in my flex app it creates me more problem than anything. Here's what I want: EVERY command executes only after the previous one returned (to result or fault function) And I'd like to do this as easily as possible.....

2
голосов
2ответов
2826 просмотров

Compiler Error- only when compiling from the command line

error CS0583: Internal Compiler Error (0xc0000017 at address 7C812AFB): likely culprit is 'IMPORT'. An internal error has occurred in the compiler. To work around this problem, try simplifying or changing the program near the locations listed below. Locations at the top of the list are closer to ...

0
голосов
2ответов
591 просмотров

Is there a best way to manage WPF UI when using Asynchronous execution commands?

is there a best way to manage a form in WPF application which has asynchronous execution commands? 1) Suppose you have a form where user enters all his data and clicks on Ok button to save changes. 2) Your WPF app starts an asynchronous method to record those data. 3) Now su...

0
голосов
2ответов
410 просмотров

How to run command using output of another command in DOS?

Example: for /? | if (this stream has word "the" in it) {echo the line with "the"} I need somehow to analyze the text in the redirected stream.

5
голосов
6ответов
13974 просмотров

whats the difference between a command and a statement

Often when reading about Tcl (e.g. http://antirez.com/articoli/tclmisunderstood.html) you read that "everything is a command". Sometimes you also hear how other languages are, like Tcl, "command languages." To me with my background in other languages, I just view these "commands" as statement...

627
голосов
14ответов
970912 просмотров

Run Command Prompt Commands

Is there any way to run command prompt commands from within a C# application? If so how would I do the following: copy /b Image1.jpg + Archive.rar Image2.jpg This basically embeds an RAR file within JPG image. I was just wondering if there was a way to do this automatically in C#.

11
голосов
3ответов
8916 просмотров

How do I associate a keypress with a DelegateCommand in Composite WPF?

I am building a composite application using CAL/Prism. The main region is a tab control, with multiple types of views in it. Each view has a custom set commands that it can handle which are bound to toolbar buttons at the top of the window. I've done this before in non-CAL apps by simply setting ...

1
голосов
3ответов
148 просмотров

Ignore lines with same next fields as previous

I have a file contents of which looks like this 123,1,ABC,DEF 123,1,ABC 345,4,TZY 456,3,XYZ 333,4,TTT,YYY 333,4,TTT I want to ignore lines with the previous and next contents the same i.e lines containing 123 and 333 Output needs to be 345,4,TZY 456,3,XYZ Any ideas on how to go about this

0
голосов
3ответов
2604 просмотров

Command to Bulk Compress All Files / Folders Under a Directory

I'm looking for a command that will compress every folder within a directory separately with the name of each archive reflecting the original folder name. I know that tar czvf example.tar.gz example/ will compress an entire folder. However, I have not found a command to bulk archive. Is there s...

3
голосов
2ответов
2717 просмотров

Vim: How to reformat a set of lines into a single line (if the line is a single sentence)?

Not a dup of In Vim, what is the simplest way to join all lines in a file into a single line?, as I specifically mean to use the gq reformatting functionality. I used to write latex in vim using 80 character textwidth. However, I've now switched to an infinite textwidth, so my lines go on foreve...

0
голосов
2ответов
238 просмотров

How to run my own programm using command in Shell?

I just learned that I could use chmod make myscript.sh executable and the run it as $ ./myscript.sh But how can I attach a custom command to it, like $ connectme [options] ?