Skip to content

Commit

Permalink
add db
Browse files Browse the repository at this point in the history
  • Loading branch information
song committed Jul 23, 2021
1 parent 13137b7 commit ba4018f
Show file tree
Hide file tree
Showing 10 changed files with 17 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.idea/
out/*
*.db
.db
*.iml
.DS_Store
Binary file modified descPics/collections.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified descPics/contacts.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified descPics/user.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/com/rc/app/Launcher.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
*/
public class Launcher
{
public static String APP_NAME = "微信";
private static Launcher context;

public static SqlSession sqlSession;
Expand Down
4 changes: 3 additions & 1 deletion src/com/rc/components/message/MainOperationPopupMenu.java
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down Expand Up @@ -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();
Expand Down
8 changes: 5 additions & 3 deletions src/com/rc/frames/MainFrame.java
Original file line number Diff line number Diff line change
Expand Up @@ -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.
* <p>
Expand Down Expand Up @@ -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()
Expand All @@ -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();

Expand All @@ -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);
Expand Down
4 changes: 3 additions & 1 deletion src/com/rc/panels/AboutPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand All @@ -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);
}
Expand Down
7 changes: 4 additions & 3 deletions src/com/rc/panels/TitlePanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down Expand Up @@ -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);


Expand Down Expand Up @@ -293,7 +294,7 @@ public void setTitle(String title)

public void showAppTitle()
{
this.titleLabel.setText("和理通");
this.titleLabel.setText(APP_NAME);
roomInfoButton.setVisible(false);
}

Expand Down
Binary file added wechat.db
Binary file not shown.

0 comments on commit ba4018f

Please sign in to comment.