Exemplo n.º 1
0
        public Login()
        {
            InitializeComponent();
            //UpdateLibrary.update.startJc();

            this.textBox2.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtPassword_KeyDown);

            textBox1.Text = DataAcc.readTxtLastLogin().Trim();

            string DomainUserName = System.Security.Principal.WindowsIdentity.GetCurrent().Name;

            if (textBox1.Text.Equals(""))
            {
                textBox1.Text = DomainUserName;
                //textBox1.Text = "@.com";
            }
            textBox2.SetWatermark("Email password");

            if (DomainUserName.Equals(@"DESKTOP-UF4UQ1S\tianyaxx"))
            {
                textBox1.Text = "*****@*****.**";
                textBox2.Text = "test";
            }

            if (DomainUserName.Equals(@"HDBIOSCIENCES\xuxiang"))
            {
                textBox1.Text       = "*****@*****.**";
                textBox2.Text       = "test";
                MySqlConn.ConnetStr = "192.168.1.103";
            }
        }
Exemplo n.º 2
0
        private void fileOpenToolStripMenuItem_Click(object sender, EventArgs e)
        {
            string FileFullPath = DataAcc.FilePathFull();

            if (FileFullPath == "")
            {
                return;
            }
            else
            {
                Stream FileStream = (Stream)File.Open(FileFullPath, FileMode.Open);
                document.Load(FileStream);
            }
        }