public FormModifyPassword()
 {
     InitializeComponent();
     sqlOper.ConnectionToSqliteDB();             // 连接数据库
     SetStyles();
     SetFormSkin(CashBookConfig.GetAppConfig("Skin"));
 }
Exemple #2
0
 //	private static Boolean IsOKAdd = false;
 public FormAdd()
 {
     InitializeComponent();
     this.Text = frmMenu.GetFrmTitle();          // 新增和修改共用同一个界面,设置不同的标题
     conn.ConnectionToSqliteDB();                // 连接数据库
     SetStyles();
     SetFormSkin(CashBookConfig.GetAppConfig("Skin"));
 }
Exemple #3
0
 public FormUpdate()
 {
     InitializeComponent();
     sqlOper.ConnectionToSqliteDB();                   // 连接数据库
     this.Text = "当前版本: " + ver.GetVersion("mainVer"); // 版本号
     SetStyles();
     SetFormSkin(CashBookConfig.GetAppConfig("Skin"));
 }
Exemple #4
0
        public FormCashBookMenu()
        {
            InitializeComponent();
            objConn.CreateSqliteDBFile();               // 创建数据库文件
            objConn.ConnectionToSqliteDB();             // 连接数据库
            sql_getUID = string.Format("select uid from t_users where acc='{0}'", frm.GetAccount());
            objConn.SelectDataFromSqlite(sql_getUID, UID, 1);
            TableCashBookInfo          = string.Format("t_cashbook_info_{0}", UID[0]);
            sql_create_t_cashbook_info = string.Format("CREATE TABLE {0} (ID INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,UID INTEGER NOT NULL,DateTime TEXT(20) NOT NULL,TallyType TEXT(50) NOT NULL,BudgetType TEXT(50) NOT NULL,Amount INTEGER NOT NULL,InOutProject TEXT(50) NOT NULL,Income DOUBLE NOT NULL DEFAULT 0.00,PayOut DOUBLE NOT NULL DEFAULT 0.00,Total DOUBLE NOT NULL DEFAULT 0.00,PayMode TEXT(20) NOT NULL,RecordUser TEXT(20) NOT NULL,Remark TEXT)", TableCashBookInfo);
            // 建用户数据表t_cashbook_info
            objConn.CreateTableToSqlite(TableCashBookInfo, sql_create_t_cashbook_info);

            SetWindowsFormTitle();              // 设置窗体标题
            // 将用书设置的皮肤保存至配置文件中
            string skinName = CashBookConfig.GetAppConfig("Skin");

            if (string.IsNullOrEmpty(skinName))
            {
                CashBookConfig.UpdateAppConfig("Skin", "DefaultSkin");
            }
            SetStyles();
        }
Exemple #5
0
 public FormAbount()
 {
     InitializeComponent();
     SetFormSkin(CashBookConfig.GetAppConfig("Skin"));
 }
Exemple #6
0
        private void FormCashBookMenu_Load(object sender, EventArgs e)
        {
            this.toolStripStatusLabel_DateTime.Text = "登录时间:" + DateTime.Now.ToString("[yyyy-MM-dd HH:mm:ss]");
            // 启动定时器
            StartTimer();
            // 状态栏显示信息
            this.comboBox_Type.SelectedIndex = 1;    // comboBox默认选择第一项
            this.radioButton_Vague.Checked   = true; // radiobutton默认选中项
            listShowData();                          // 显示数据

            // 从App.config中读取皮肤配置
            string skinName = CashBookConfig.GetAppConfig("Skin");

            switch (skinName)
            {
            case "DefaultSkin":                     // 默认皮肤
                if (!toolStripMenuItem_Default.Checked)
                {
                    toolStripMenuItem_Default.Checked = true;
                }
                // 取消选中的上一个Item
                SelectItem.Checked = false;
                // 储存当前选中的Item
                SelectItem = toolStripMenuItem_Default;
                // 设置皮肤
                this.BackPalace = global::CashBook.Properties.Resources.DefaultSkin;
                break;

            case "PurpleSkin":                     // 炫彩紫色
                if (!toolStripMenuItem_Purple.Checked)
                {
                    toolStripMenuItem_Purple.Checked = true;
                }
                SelectItem.Checked = false;
                SelectItem         = toolStripMenuItem_Purple;
                this.BackPalace    = global::CashBook.Properties.Resources.PurpleSkin;
                break;

            case "LilySkin":                     // 悠然百合
                if (!toolStripMenuItem_Lily.Checked)
                {
                    toolStripMenuItem_Lily.Checked = true;
                }
                SelectItem.Checked = false;
                SelectItem         = toolStripMenuItem_Lily;
                this.BackPalace    = global::CashBook.Properties.Resources.LilySkin;
                break;

            case "GreenSkin":                     // 绿化环保
                if (!toolStripMenuItem_Green.Checked)
                {
                    toolStripMenuItem_Green.Checked = true;
                }
                SelectItem.Checked = false;
                SelectItem         = toolStripMenuItem_Green;
                this.BackPalace    = global::CashBook.Properties.Resources.GreenSkin;
                break;

            case "LogCharm":                     // 原木韵味
                if (!toolStripMenuItem_LogCharm.Checked)
                {
                    toolStripMenuItem_LogCharm.Checked = true;
                }
                SelectItem.Checked = false;
                SelectItem         = toolStripMenuItem_LogCharm;
                this.BackPalace    = global::CashBook.Properties.Resources.LogCharm;
                break;

            case "SpringFestival":                     // 恭贺新春
                if (!toolStripMenuItem_SpringFestival.Checked)
                {
                    toolStripMenuItem_SpringFestival.Checked = true;
                }
                SelectItem.Checked = false;
                SelectItem         = toolStripMenuItem_SpringFestival;
                this.BackPalace    = global::CashBook.Properties.Resources.SpringFestival;
                break;
            }
        }