This commit is contained in:
da
2015-11-09 18:19:27 +01:00
parent 14db1c0581
commit 7f6a725c6f
4 changed files with 0 additions and 105 deletions
-52
View File
@@ -1,52 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="com.ixab.GUI.ConfigLoadMenu">
<grid id="27dc6" binding="panel" layout-manager="GridLayoutManager" row-count="2" column-count="3" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="0" left="0" bottom="0" right="0"/>
<constraints>
<xy x="20" y="20" width="600" height="400"/>
</constraints>
<properties>
<minimumSize width="600" height="55"/>
<preferredSize width="600" height="55"/>
</properties>
<border type="none"/>
<children>
<component id="ddf9a" class="javax.swing.JTextField" binding="textField1" default-binding="true">
<constraints>
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
<preferred-size width="150" height="-1"/>
</grid>
</constraints>
<properties>
<editable value="false"/>
<enabled value="true"/>
</properties>
</component>
<component id="1ba2b" class="javax.swing.JButton" binding="auswählenButton" default-binding="true">
<constraints>
<grid row="0" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text value="Auswählen..."/>
</properties>
</component>
<component id="7f8c5" class="javax.swing.JButton" binding="ladeKonfigurationButton" default-binding="true">
<constraints>
<grid row="1" column="0" row-span="1" col-span="3" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<enabled value="false"/>
<text value="Lade Konfiguration"/>
</properties>
</component>
<component id="d3eb2" class="javax.swing.JLabel">
<constraints>
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text value="Konfigurationsdatei:"/>
</properties>
</component>
</children>
</grid>
</form>
-52
View File
@@ -1,52 +0,0 @@
package com.ixab.GUI;
import com.ixab.ConfigHandling.Config;
import com.ixab.ConfigHandling.ConfigFileIOHandler;
import com.ixab.ConfigHandling.ConfigFileInstanceHandler;
import javax.swing.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
public class ConfigLoadMenu {
private static JFrame frame;
private JPanel panel;
private JTextField textField1;
private JButton auswählenButton;
private JButton ladeKonfigurationButton;
public ConfigLoadMenu() {
auswählenButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
final JFileChooser jf = new JFileChooser();
jf.showOpenDialog(frame);
textField1.setText(jf.getSelectedFile().getAbsolutePath());
ladeKonfigurationButton.setText("Lade Konfiguration");
ladeKonfigurationButton.setEnabled(true);
}
});
ladeKonfigurationButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
Config c = ConfigFileIOHandler.load(textField1.getText());
if (c == null) {
ladeKonfigurationButton.setText("ACHTUNG: Fehler beim Laden, neue Datei wählen!");
ladeKonfigurationButton.setEnabled(false);
} else {
ConfigFileInstanceHandler.setConfig(c);
StreamChooserMenu.main(null);
frame.dispose();
}
}
});
}
public static void main(String[] args) {
frame = new JFrame("ConfigLoadMenu");
frame.setContentPane(new ConfigLoadMenu().panel);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.pack();
frame.setVisible(true);
}
}
@@ -17,7 +17,6 @@ public class StreamOpener extends Thread {
public void run() { public void run() {
try { try {
Runtime rt = Runtime.getRuntime(); Runtime rt = Runtime.getRuntime();
//Process pr = rt.exec("cmd /c dir");
Process pr = rt.exec(c.getLSPath()+" twitch.tv/"+c.getStreamName(streamIndex)+" "+quality); Process pr = rt.exec(c.getLSPath()+" twitch.tv/"+c.getStreamName(streamIndex)+" "+quality);
BufferedReader input = new BufferedReader(new InputStreamReader(pr.getInputStream())); BufferedReader input = new BufferedReader(new InputStreamReader(pr.getInputStream()));
Binary file not shown.