예제 #1
0
 public PageConfig()
 {
     InitializeComponent();
     FM = new MyWinForm(this);
     FM.SetDefaultStyle("分页设置");
     numericUpDown1.Value = (decimal)INI.GetPerPage();
     MyTip.Set(label1, "设为 0 则不进行分页。");
 }
예제 #2
0
 public DataView()
 {
     InitializeComponent();
     FM = new MyWinForm(this);
     FM.SetDefaultStyle("数据");
     conA = MyDB.GetAccessConnection(AccessPath);
     conS = MyDB.GetSqlServerConnection("127.0.0.1", "111", "Northwind");
     Catalog();
 }
예제 #3
0
 public Main()
 {
     InitializeComponent();
     FM = new MyWinForm(this);
     FM.SetDefaultStyle("快捷命令");
     process    = new Process();
     CmdTxtPath = INI.Root + @"\Backup\Commands.txt";
     LoadCommands();
 }
예제 #4
0
 public Groups()
 {
     InitializeComponent();
     FM = new MyWinForm(this);
     FM.SetDefaultStyle("日记本");
     M     = MyModel.GetInstance(Global.con);
     LB    = new MyListBox(listBox1, "select * from DiaryGroups order by GroupOrder", "GroupName", "GroupID", Global.con, true);
     table = LB.DataTable;
     ToAdd();
 }
예제 #5
0
 public Locations()
 {
     InitializeComponent();
     M  = MyModel.GetInstance(Global.con);
     FM = new MyWinForm(this);
     FM.SetDefaultStyle("当前地点:" + M.GetLocationNameByID(INI.GetLocationID()));
     LB    = new MyListBox(listBox1, "select * from LabelLocations order by LocationOrder", "LocationName", "LocationID", Global.con, true);
     table = LB.DataTable;
     ToAdd();
 }
예제 #6
0
 public Groups()
 {
     InitializeComponent();
     M     = MyModel.GetInstance(Global.con);
     FM    = new MyWinForm(this);
     LB    = new MyListBox(listBox1, "select * from LabelGroups where LocationID=" + LocationID + " order by GroupOrder", "GroupName", "GroupID", Global.con, true);
     table = LB.DataTable;
     FM.SetDefaultStyle("标签分组 >> 地点:" + M.GetLocationNameByID(LocationID));
     ToAdd();
 }
예제 #7
0
 public LabelsUpdate(object GroupID)
 {
     this.GroupID = GroupID;
     InitializeComponent();
     M          = MyModel.GetInstance(Global.con);
     FM         = new MyWinForm(this);
     LocationID = INI.GetLocationID();
     FM.SetDefaultStyle("标签 >> 地点:" + M.GetLocationNameByID(LocationID));
     LoadList();
     DefineView();
 }
예제 #8
0
        public SelectDB(CentralControl CentralForm)
        {
            this.CentralForm = CentralForm;
            InitializeComponent();
            FM = new MyWinForm(this);
            FM.SetDefaultStyle("选择数据库");

            listBox1.Items.Clear();
            foreach (FileInfo file in new DirectoryInfo(INI.Root).GetFiles("*.mdb"))
            {
                listBox1.Items.Add(file.Name);
            }
        }
예제 #9
0
 public Labels(Form LoginForm = null)
 {
     this.LoginForm = LoginForm;
     M = MyModel.GetInstance(Global.con);
     InitializeComponent();
     FM = new MyWinForm(this);
     FM.SetDefaultStyle("标签簿 >> 地点:" + M.GetLocationNameByID(INI.GetLocationID()));
     if (LoginForm == null)
     {
         button4.Enabled = false;
     }
     DefineView();
 }
예제 #10
0
 public Records(Form LoginForm = null)
 {
     this.LoginForm = LoginForm;
     M = MyModel.GetInstance(Global.con);
     InitializeComponent();
     FM = new MyWinForm(this);
     FM.SetDefaultStyle("日记本");
     if (LoginForm == null)
     {
         button6.Enabled = false;
     }
     DefineView();
 }
예제 #11
0
        public BindBox()
        {
            InitializeComponent();
            FM = new MyWinForm(this);
            FM.SetDefaultStyle("选择");
            conA = MyDB.GetAccessConnection(AccessPath);
            conS = MyDB.GetSqlServerConnection("127.0.0.1", "111", "Northwind");

            CBB = new MyComboBox(comboBox1, "select CustomerID,ContactName from Customers", "ContactName", "CustomerID", conA);
            LB  = new MyListBox(listBox1, "select CustomerID,ContactName from Customers", "CustomerID", "ContactName", conA);
            CLB = new MyCheckedListBox(checkedListBox1, "select CustomerID,ContactName from Customers", "ContactName", "CustomerID", conA);
            //checkedListBox1.Items.Add("selection1", true);//添加选中状态的项
        }
예제 #12
0
 public Notes(Form LoginForm = null)
 {
     this.LoginForm = LoginForm;
     M = MyModel.GetInstance(Global.con);
     InitializeComponent();
     FM = new MyWinForm(this);
     FM.SetDefaultStyle("笔记本");
     if (LoginForm == null)
     {
         button6.Enabled = false;
     }
     MyTip.Set(label1, "点击清空筛选");
     DefineView();
 }
예제 #13
0
        public Form1()
        {
            InitializeComponent();
            FM = new MyWinForm(this);
            FM.SetDefaultStyle("Test");
            con             = MyDB.GetAccessConnection(AccessPath);
            cmd.Connection  = con;
            cmd.CommandText = "select EmployeeID as ID,LastName+FirstName as 姓名,TitleOfCourtesy as 尊称 from Employees";
            adapter         = new OleDbDataAdapter(cmd);
            adapter.Fill(dataset, "Tab");
            table = dataset.Tables["Tab"];

            BindDataToGVX();
            BindDataToComboX();
        }
예제 #14
0
 public Maintenance(CentralControl CentralForm)
 {
     this.CentralForm = CentralForm;
     InitializeComponent();
     FM = new MyWinForm(this);
     FM.SetDefaultStyle("软件维护");
     if (Global.con == null)
     {
         groupBox1.Enabled = false;
     }
     else
     {
         M = MyModel.GetInstance(Global.con);
     }
 }
예제 #15
0
 public Timer()
 {
     InitializeComponent();
     FM = new MyWinForm(this);
     FM.SetDefaultStyle("Timer");
     timer          = new System.Windows.Forms.Timer();
     timer.Tick    += timer_Tick;
     timer.Interval = 10;
     timer.Enabled  = true;
     //timer.Start();
     //============================
     timer2          = new System.Windows.Forms.Timer();
     timer2.Interval = 1;
     timer2.Tick    += timer2_Tick;
     gun             = new MyScanGun("COM3", "9600");//根据实际情况设置
     if (!gun.Open())
     {
         return;
     }
     timer2.Start();
 }
예제 #16
0
 public Records(Form LoginForm = null)
 {
     this.LoginForm = LoginForm;
     InitializeComponent();
     FM = new MyWinForm(this);
     FM.SetDefaultStyle("纪念簿");
     if (LoginForm == null)
     {
         button5.Enabled = false;
     }
     M     = MyModel.GetInstance(Global.con);
     LB    = new MyListBox(listBox2, "select * from Anniversaries order by MonthN,DayN,ID", "Title", "ID", Global.con, true);
     table = LB.DataTable;
     ToAdd();
     if (M.CountAnniRecords() != 0)//有数据
     {
         row = M.GetAnnInfoByID(M.GetNearestDateID()).Rows[0];
         LB.SelectedValue = row["ID"];
         label2.Text      = "最近的纪念日:";
         label4.Text      = row["Title"] + "," + row["MonthN"] + "月" + row["DayN"] + "日。";
     }
 }
예제 #17
0
 public Login()
 {
     InitializeComponent();
     FM = new MyWinForm(this);
     FM.SetDefaultStyle("Windows助手");
 }
예제 #18
0
 private void button2_Click(object sender, EventArgs e)//地点管理
 {
     new Locations().ShowDialog();
     FM.SetDefaultStyle("标签簿 >> 地点:" + M.GetLocationNameByID(INI.GetLocationID()));
     ReloadData();
 }