Subversion Repositories svn.mios

Rev

Rev 657 | Rev 722 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 657 Rev 721
Line 101... Line 101...
101
                "sysexCurrentDirectory", SysexSendReceiveGUI.currentDirectory);
101
                "sysexCurrentDirectory", SysexSendReceiveGUI.currentDirectory);
102
102
103
        HexFileUploadGUI.setCurrentDirectory(preferences.get(
103
        HexFileUploadGUI.setCurrentDirectory(preferences.get(
104
                "uploadCurrentDirectory", HexFileUploadGUI
104
                "uploadCurrentDirectory", HexFileUploadGUI
105
                        .getCurrentDirectory()));
105
                        .getCurrentDirectory()));
106
-
 
107
        miosStudio.getHexFileUploadDeviceManager().setMIOS32_Mode(
-
 
108
                preferences.getBoolean("uploadMIOS32_Mode", false));
-
 
109
106
110
        String[] frames = preferences.get("visibleFrames", "").split(",");
107
        String[] frames = preferences.get("visibleFrames", "").split(",");
111
        String[] ec = preferences.get("externalCommands", "").split("\n");
108
        String[] ec = preferences.get("externalCommands", "").split("\n");
112
109
113
        createWindowsHashtable();
110
        createWindowsHashtable();
Line 162... Line 159...
162
            String[] temp = ec[i].split("\t");
159
            String[] temp = ec[i].split("\t");
163
            if (temp.length == 2) {
160
            if (temp.length == 2) {
164
                miosStudioGUI.addExternalCommandButton(temp[0], temp[1]);
161
                miosStudioGUI.addExternalCommandButton(temp[0], temp[1]);
165
            }
162
            }
166
        }
163
        }
-
 
164
       
-
 
165
        // TODO
-
 
166
       
167
    }
167
    }
168
168
169
    public void destroy() {
169
    public void destroy() {
170
170
171
        Preferences preferences = getPreferences();
171
        Preferences preferences = getPreferences();
Line 179... Line 179...
179
179
180
        preferences.put("uploadCurrentDirectory", HexFileUploadGUI
180
        preferences.put("uploadCurrentDirectory", HexFileUploadGUI
181
                .getCurrentDirectory());
181
                .getCurrentDirectory());
182
182
183
        preferences.putBoolean("uploadMIOS32_Mode", miosStudio
183
        preferences.putBoolean("uploadMIOS32_Mode", miosStudio
184
                .getHexFileUploadDeviceManager().isMIOS32_Mode());
184
                .getHexFileUploadDeviceManager().isMIOS32Mode());
185
185
186
        JInternalFrame[] frames = miosStudioGUI.getDesktop().getAllFrames();
186
        JInternalFrame[] frames = miosStudioGUI.getDesktop().getAllFrames();
187
        String visibleFrames = "";
187
        String visibleFrames = "";
188
188
189
        for (int i = 0; i < frames.length; i++) {
189
        for (int i = 0; i < frames.length; i++) {
Line 227... Line 227...
227
                    .getExternalCommands().elementAt(i);
227
                    .getExternalCommands().elementAt(i);
228
            externalCommandsString += ecb.commandName + "\t"
228
            externalCommandsString += ecb.commandName + "\t"
229
                    + ecb.externalCommand + "\n";
229
                    + ecb.externalCommand + "\n";
230
        }
230
        }
231
        preferences.put("externalCommands", externalCommandsString);
231
        preferences.put("externalCommands", externalCommandsString);
-
 
232
       
-
 
233
        // TODO
232
    }
234
    }
233
235
234
    public void exit(JFrame frame) {
236
    public void exit(JFrame frame) {
235
237
236
        Preferences preferences = getPreferences();
238
        Preferences preferences = getPreferences();
237
239
238
        preferences.putInt("mainWindowX", frame.getX());
240
        preferences.putInt("mainWindowX", frame.getX());
239
        preferences.putInt("mainWindowY", frame.getY());
241
        preferences.putInt("mainWindowY", frame.getY());
240
        preferences.putInt("mainWindowWidth", frame.getWidth());
242
        preferences.putInt("mainWindowWidth", frame.getWidth());
241
        preferences.putInt("mainWindowHeight", frame.getHeight());
243
        preferences.putInt("mainWindowHeight", frame.getHeight());
-
 
244
       
242
        System.exit(0);
245
        System.exit(0);
243
    }
246
    }
244
247
245
    protected Preferences getPreferences() {
248
    protected Preferences getPreferences() {
246
        return Preferences.userRoot().node("org/midibox/miostudio/gui");
249
        return Preferences.userRoot().node("org/midibox/miostudio/gui");