diff --git a/.gitignore b/.gitignore index e841ce2..8aea7d3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ .idea/ out/* -*.db +.db *.iml .DS_Store \ No newline at end of file diff --git a/descPics/collections.png b/descPics/collections.png index 539bc55..1639301 100644 Binary files a/descPics/collections.png and b/descPics/collections.png differ diff --git a/descPics/contacts.png b/descPics/contacts.png index 29e7a5d..41c4304 100644 Binary files a/descPics/contacts.png and b/descPics/contacts.png differ diff --git a/descPics/user.png b/descPics/user.png index 73512ec..6622f75 100644 Binary files a/descPics/user.png and b/descPics/user.png differ diff --git a/src/com/rc/app/Launcher.java b/src/com/rc/app/Launcher.java index e8234e9..cb3621f 100644 --- a/src/com/rc/app/Launcher.java +++ b/src/com/rc/app/Launcher.java @@ -23,6 +23,7 @@ */ public class Launcher { + public static String APP_NAME = "微信"; private static Launcher context; public static SqlSession sqlSession; diff --git a/src/com/rc/components/message/MainOperationPopupMenu.java b/src/com/rc/components/message/MainOperationPopupMenu.java index 5776f1c..6813759 100644 --- a/src/com/rc/components/message/MainOperationPopupMenu.java +++ b/src/com/rc/components/message/MainOperationPopupMenu.java @@ -12,6 +12,8 @@ import java.awt.*; import java.awt.event.ActionEvent; +import static com.rc.app.Launcher.APP_NAME; + /** * Created by song on 2017/6/5. */ @@ -63,7 +65,7 @@ public void actionPerformed(ActionEvent e) @Override public void actionPerformed(ActionEvent e) { - int ret = JOptionPane.showConfirmDialog(MainFrame.getContext(), "确认退出微信?", "确认退出", JOptionPane.YES_NO_OPTION); + int ret = JOptionPane.showConfirmDialog(MainFrame.getContext(), "确认退出"+APP_NAME+"?", "确认退出", JOptionPane.YES_NO_OPTION); if (ret == JOptionPane.YES_OPTION) { MainFrame.getContext().exitApp(); diff --git a/src/com/rc/frames/MainFrame.java b/src/com/rc/frames/MainFrame.java index 763264d..7d02a5f 100644 --- a/src/com/rc/frames/MainFrame.java +++ b/src/com/rc/frames/MainFrame.java @@ -19,6 +19,8 @@ import java.awt.event.*; import java.io.InputStream; +import static com.rc.app.Launcher.APP_NAME; + /** * Created by song on 17-5-28. *

@@ -114,7 +116,7 @@ private void initTray() if (isMacOs) { normalTrayIcon = IconUtil.getIcon(this, "/image/ic_launcher_dark.png", 20, 20).getImage(); - trayIcon = new TrayIcon(normalTrayIcon, "微信"); + trayIcon = new TrayIcon(normalTrayIcon, APP_NAME); trayIcon.setImageAutoSize(true); trayIcon.addMouseListener(new MouseAdapter() @@ -132,7 +134,7 @@ public void mousePressed(MouseEvent e) normalTrayIcon = IconUtil.getIcon(this, "/image/ic_launcher.png", 20, 20).getImage(); emptyTrayIcon = IconUtil.getIcon(this, "/image/ic_launcher_empty.png", 20, 20).getImage(); - trayIcon = new TrayIcon(normalTrayIcon, "微信"); + trayIcon = new TrayIcon(normalTrayIcon, APP_NAME); trayIcon.setImageAutoSize(true); PopupMenu menu = new PopupMenu(); @@ -158,7 +160,7 @@ public void mouseClicked(MouseEvent e) MenuItem exitItem = new MenuItem("退出"); exitItem.addActionListener(e -> exitApp()); - MenuItem showItem = new MenuItem("打开微信"); + MenuItem showItem = new MenuItem("打开" + APP_NAME); showItem.addActionListener(e -> setToFront()); menu.add(showItem); menu.add(exitItem); diff --git a/src/com/rc/panels/AboutPanel.java b/src/com/rc/panels/AboutPanel.java index 14389e1..e0cd290 100644 --- a/src/com/rc/panels/AboutPanel.java +++ b/src/com/rc/panels/AboutPanel.java @@ -9,6 +9,8 @@ import javax.swing.*; import java.awt.*; +import static com.rc.app.Launcher.APP_NAME; + /** * Created by song on 26/06/2017. * @@ -32,7 +34,7 @@ private void initComponents() imageLabel.setIcon(icon); versionLabel = new JLabel(); - versionLabel.setText("微信 v" + Launcher.APP_VERSION); + versionLabel.setText( APP_NAME + " v" + Launcher.APP_VERSION); versionLabel.setFont(FontUtil.getDefaultFont(20)); versionLabel.setForeground(Colors.FONT_GRAY_DARKER); } diff --git a/src/com/rc/panels/TitlePanel.java b/src/com/rc/panels/TitlePanel.java index 75b6112..5ec0589 100644 --- a/src/com/rc/panels/TitlePanel.java +++ b/src/com/rc/panels/TitlePanel.java @@ -7,10 +7,11 @@ import com.rc.utils.*; import javax.swing.*; -import javax.swing.border.LineBorder; import java.awt.*; import java.awt.event.*; +import static com.rc.app.Launcher.APP_NAME; + /** * Created by song on 17-5-30. * @@ -203,7 +204,7 @@ private void initComponents() titleLabel = new RCLabel(); titleLabel.setFont(FontUtil.getDefaultFont(18,Font.BOLD)); - titleLabel.setText("微信"); + titleLabel.setText(APP_NAME); //titleLabel.setCursor(handCursor); @@ -293,7 +294,7 @@ public void setTitle(String title) public void showAppTitle() { - this.titleLabel.setText("和理通"); + this.titleLabel.setText(APP_NAME); roomInfoButton.setVisible(false); } diff --git a/wechat.db b/wechat.db new file mode 100644 index 0000000..f1781e0 Binary files /dev/null and b/wechat.db differ