示例#1
0
        private void btnKayıtOl_Click(object sender, EventArgs e)
        {
            RegisterForm frm = new RegisterForm();

            frm.ShowDialog();
        }
示例#2
0
文件: DBExchange.cs 项目: oeai/medx
        ///Создание нового пользователя через меню регистрации
        public void CreateNewDbUser(String new_username, String new_pass, String new_name, String new_familyname, 
            String new_secondname, DateTime new_birthdate, Int16 new_otdel, Int16 new_status, String new_mail)
        {
            try
              {

                  MD5 md5h = MD5.Create();
                  byte[] PassHash = md5h.ComputeHash(Encoding.Default.GetBytes(new_pass));
                  StringBuilder crHash = new StringBuilder();
                  foreach (byte hashByte in PassHash)
                  {
                      crHash.Append(String.Format("{0:x2}", hashByte));
                  }
                  string dBPassHash = crHash.ToString();

                  NpgsqlCommand WriteNewDbUser = new NpgsqlCommand("CREATE USER " + new_username + " WITH PASSWORD '" + dBPassHash + "' IN GROUP postgres", connectDb);
                  WriteNewDbUser.ExecuteNonQuery();

                  NpgsqlCommand WriteNewDbUserInfo = new NpgsqlCommand("INSERT INTO doctors (family_name, first_name, last_name, status, user_name, otdel, u_mail, birth) VALUES ('"
                      + new_familyname + "','" + new_name + "','" + new_secondname + "','" + new_status + "','" + new_username + "','" + new_otdel + "','" + new_mail + "','" + new_birthdate + "');", connectDb);
                  WriteNewDbUserInfo.ExecuteNonQuery();

                  MessageBox.Show("Пользователь создан", "Спасибо за регистрацию",
                       MessageBoxButtons.OK, MessageBoxIcon.Exclamation);

                  RegisterForm.ActiveForm.Close();
                  RegisterForm FormRegisterDbUser = new RegisterForm();
                  FormRegisterDbUser.ShowDialog();

              }
              catch (Exception exception)
              {
                  System.Windows.Forms.MessageBox.Show(exception.Message.ToString());
              }
              finally
              {

              }
        }
示例#3
0
        private void регистрацияНовогоToolStripMenuItem_Click(object sender, EventArgs e)
        {
            RegisterForm rf = new RegisterForm(vc, dmc);

            rf.ShowDialog(this);
        }
示例#4
0
        private void btn_RegisterInLoginForm_Click(object sender, EventArgs e)
        {
            RegisterForm registerForm = new RegisterForm();

            registerForm.ShowDialog();
        }
示例#5
0
 private static void Run(string queryToLoad, bool runQuery, string activationCode, bool deactivate, bool noForward, bool noUpdate, string caller)
 {
     Application.EnableVisualStyles();
     Application.SetCompatibleTextRenderingDefault(false);
     if (Environment.OSVersion.Version.Major >= 6)
     {
         try
         {
             SetProcessDPIAware();
         }
         catch
         {
         }
     }
     AutoSaver.Start();
     Wheeler.Register();
     if (Environment.OSVersion.Version.Major < 6)
     {
         ToolStripManager.RenderMode = ToolStripManagerRenderMode.System;
     }
     if (!((activationCode != null) || deactivate))
     {
         Splash = new LINQPad.UI.Splash();
         Splash.Show();
         Splash.Update();
     }
     Log.add_StringWriter(new Action <string>(Log.Write));
     Log.add_ExceptionWriter(new Action <Exception>(Log.Write));
     TypeResolver.ManyToOne  = Resources.ManyToOne;
     TypeResolver.OneToMany  = Resources.OneToMany;
     TypeResolver.OneToOne   = Resources.OneToOne;
     TypeResolver.ManyToMany = Resources.ManyToMany;
     TypeResolver.Results    = Resources.Results;
     TypeResolver.Column     = Resources.Column;
     TypeResolver.Key        = Resources.Key;
     TypeResolver.Database   = Resources.Database;
     TypeResolver.GetSameFolderReferences        = new Func <string, string[]>(AssemblyProber.GetSameFolderReferences);
     WSAgent.WebClientFactory                    = new Func <WebClient>(WebHelper.GetWebClient);
     WSAgent.FastWebClientFactory                = new Func <WebClient>(WebHelper.GetFastWebClient);
     WSAgent.BackupWebClientFactory              = new Func <WebClient>(WebHelper.GetBackupWebClient);
     WSAgent.CurrentVersionString                = VersionString;
     AutocompletionManager.PassiveAutocompletion = UserOptions.Instance.PassiveAutocompletion;
     AutocompletionManager.DisableLambdaSnippets = UserOptions.Instance.DisableLambdaSnippets;
     SnippetManager.set_LINQPadSnippetsFolder(UserOptions.Instance.GetCustomSnippetsFolder(false));
     WSAgent.DiagnosticMode = DiagnosticMode;
     AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(Program.CurrentDomain_UnhandledException);
     if (deactivate)
     {
         WSAgent.Remove(true);
     }
     else
     {
         if (activationCode != null)
         {
             using (RegisterForm form = new RegisterForm(activationCode))
             {
                 form.ShowDialog();
                 return;
             }
         }
         if (!noUpdate)
         {
             Thread thread = new Thread(new ParameterizedThreadStart(UpdateAgent.RunServerComms))
             {
                 Name         = "Update Agent",
                 IsBackground = true
             };
             _updateThread = thread;
             _updateThread.Start(caller);
         }
         if (!string.IsNullOrEmpty(caller))
         {
             new Thread(delegate {
                 try
                 {
                     Thread.Sleep(0xbb8);
                     if (File.Exists(caller))
                     {
                         FileInfo info = new FileInfo(caller);
                         if (((info.Directory == null) || (info.Directory.Parent == null)) || (info.Directory.Parent.Name.ToLowerInvariant() != "updates"))
                         {
                             if (info.IsReadOnly)
                             {
                                 info.IsReadOnly = false;
                             }
                             if (!File.Exists(caller + ".config"))
                             {
                                 try
                                 {
                                     File.WriteAllText(caller + ".config", "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\r\n<configuration>\r\n  <startup useLegacyV2RuntimeActivationPolicy=\"true\">\r\n    <supportedRuntime version=\"v4.0\"/>\r\n  </startup>\r\n  <runtime>\r\n    <legacyUnhandledExceptionPolicy enabled=\"1\" />\r\n  </runtime>\r\n</configuration>");
                                 }
                                 catch
                                 {
                                 }
                             }
                             string path = Assembly.GetExecutingAssembly().Location + ".config";
                             if (!File.Exists(path))
                             {
                                 try
                                 {
                                     File.WriteAllText(path, "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\r\n<configuration>\r\n  <startup useLegacyV2RuntimeActivationPolicy=\"true\">\r\n    <supportedRuntime version=\"v4.0\"/>\r\n  </startup>\r\n  <runtime>\r\n    <legacyUnhandledExceptionPolicy enabled=\"1\" />\r\n  </runtime>\r\n</configuration>");
                                 }
                                 catch
                                 {
                                 }
                             }
                             try
                             {
                                 File.Copy(Assembly.GetExecutingAssembly().Location, caller, true);
                             }
                             catch
                             {
                                 Thread.Sleep(0x1388);
                                 File.Copy(Assembly.GetExecutingAssembly().Location, caller, true);
                             }
                         }
                     }
                 }
                 catch
                 {
                 }
             })
             {
                 Name = "Update patcher"
             }.Start();
         }
         UnpackDb();
         QueryOneToOne();
         QueryStudioKeys(noForward);
         StartSemanticParsingService();
         new Thread(delegate {
             try
             {
                 Thread.Sleep(0x3e8);
                 if (GacResolver.IsLINQPadGaced())
                 {
                     MessageBox.Show("Warning: A different revision of LINQPad has been installed to the Global Assembly Cache. This will prevent correct operation.", "LINQPad", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                 }
             }
             catch
             {
             }
         })
         {
             IsBackground = true
         }.Start();
         Application.Run(new MainForm(queryToLoad, runQuery));
         TempFileRef.DeleteAll();
     }
 }
示例#6
0
        private void btnKayitOl_Click(object sender, EventArgs e)
        {
            RegisterForm rgstr = new RegisterForm();

            rgstr.ShowDialog();
        }
示例#7
0
        private void btnCreateAccount_Click(object sender, EventArgs e)
        {
            var registerForm = new RegisterForm(PlaceRepository, AppUserRepository);

            registerForm.ShowDialog();
        }
示例#8
0
        private void buttonAddPerson_Click(object sender, EventArgs e)
        {
            RegisterForm registerForm = new RegisterForm();

            registerForm.ShowDialog();
        }
示例#9
0
 //软件注册
 private void btnRegister_Click(object sender, EventArgs e)
 {
     RegisterForm registerForm = new RegisterForm();
     registerForm.ShowDialog();
 }
示例#10
0
 //检查软件使用次数是否超过10次
 private bool checkTrialTimes()
 {
     BathClass.printWarningMsg("您现在使用的是试用版,可以免费使用10次;");
     int tLong = 0;
     try
     {
         tLong = (int)Registry.GetValue("HKEY_LOCAL_MACHINE\\SOFTWARE\\Angel", "UseTimes", 0);
         BathClass.printWarningMsg("您已经使用了" + tLong + "次!");
     }
     catch
     {
         Registry.SetValue("HKEY_LOCAL_MACHINE\\SOFTWARE\\Angel", "UseTimes", 0, RegistryValueKind.DWord);
     }
     if (tLong < 10)
     {
         int tTimes = tLong + 1;
         Registry.SetValue("HKEY_LOCAL_MACHINE\\SOFTWARE\\Angel", "UseTimes", tTimes);
         return true;
     }
     else
     {
         if (BathClass.printAskMsg("试用次数已到!您是否需要注册?") != DialogResult.Yes)
             return false;
         RegisterForm regForm = new RegisterForm(db);
         if (regForm.ShowDialog() != DialogResult.OK)
             return false;
         return true;
     }
 }
示例#11
0
 /// <summary>
 /// Opens the Register form
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void SignUpBut_Click(object sender, EventArgs e)
 {
     //Creates new form
     this.RegisterForm = new RegisterForm();
     RegisterForm.ShowDialog();
 }
示例#12
0
 //注册
 private void register_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
 {
     RegisterForm registerForm = new RegisterForm(db);
     registerForm.ShowDialog();
 }
示例#13
0
 private void btnCreateAcc_Click(object sender, EventArgs e)
 {
     using (var gui = new RegisterForm())
         gui.ShowDialog();
 }
示例#14
0
        // Token: 0x060001CD RID: 461 RVA: 0x000088C0 File Offset: 0x00006AC0
        private void LoginForm_Load(object sender, EventArgs e)
        {
            string text;

            try
            {
                text = AtapiDevice.GetHddInfo(0).SerialNumber.Trim();
            }
            catch (ApplicationException)
            {
                Hardware hardware = new Hardware();
                text = hardware.GetHardDiskID();
            }
            if (text == "")
            {
                DialogResult dialogResult = WMMessageBox.Show(this, "无法读取硬盘信息!");
                if (dialogResult == DialogResult.OK)
                {
                    Application.Exit();
                }
                return;
            }
            DbUtil  dbUtil  = new DbUtil();
            DataRow dataRow = dbUtil.ExecuteRow("SELECT * FROM settings");

            if (dataRow == null)
            {
                this.readRegisterInfofailed("无法读取系统配置!");
                return;
            }
            uint num = ConvertUtils.ToUInt32(dataRow["totalRegTime"].ToString());

            if (num == 0U)
            {
                RegisterForm registerForm = new RegisterForm();
                registerForm.ShowDialog();
                base.Visible = false;
                return;
            }
            DataTable dataTable = dbUtil.ExecuteQuery("SELECT * FROM histRgTable");

            if (dataTable != null && dataTable.Rows != null && (long)dataTable.Rows.Count != (long)((ulong)num))
            {
                DialogResult dialogResult2 = WMMessageBox.Show(this, "历史注册信息不符!");
                if (dialogResult2 == DialogResult.OK)
                {
                    Application.Exit();
                }
                return;
            }
            dbUtil.AddParameter("code", text);
            DataRow dataRow2 = dbUtil.ExecuteRow("SELECT * FROM rgTable where code=@code");
            ulong   num2     = (dataRow2 != null) ? ConvertUtils.ToUInt64(dataRow2["ivd"].ToString()) : RegisterUtil.GetTimeStamp();
            long    num3     = (long)(num2 - RegisterUtil.GetTimeStamp());

            if (num3 <= 2592000L)
            {
                if (num3 > 0L)
                {
                    DialogResult dialogResult3 = WMMessageBox.Show(this, "软件即将过期,是否重新注册?", "卡表管理软件", MessageBoxButtons.OKCancel);
                    if (dialogResult3 == DialogResult.OK)
                    {
                        RegisterForm registerForm2 = new RegisterForm();
                        registerForm2.ShowDialog();
                        base.Visible = false;
                    }
                }
                else
                {
                    DialogResult dialogResult4 = WMMessageBox.Show(this, "软件已经过期,是否重新注册?", "卡表管理软件", MessageBoxButtons.OKCancel);
                    if (dialogResult4 == DialogResult.OK)
                    {
                        RegisterForm registerForm3 = new RegisterForm();
                        registerForm3.ShowDialog();
                        base.Visible = false;
                        return;
                    }
                    Application.Exit();
                    return;
                }
            }
            ulong num4 = ConvertUtils.ToUInt64(dataRow2["d"].ToString());

            if (num4 > RegisterUtil.GetTimeStamp())
            {
                this.readRegisterInfofailed("请检查时间设置是否正确!");
                return;
            }
            ulong num5 = ConvertUtils.ToUInt64(dataRow2["lud"].ToString());

            if (num5 >= RegisterUtil.GetTimeStamp())
            {
                this.readRegisterInfofailed("请检查时间设置是否正确!");
                return;
            }
            string keyString = (dataRow2 == null) ? "" : dataRow2["key"].ToString();

            if (!RegisterUtil.getRegisterResult(text, keyString))
            {
                DialogResult dialogResult5 = WMMessageBox.Show(this, "注册号码不正确,需要重新注册?", "卡表管理软件", MessageBoxButtons.OKCancel);
                if (dialogResult5 == DialogResult.OK)
                {
                    RegisterForm registerForm4 = new RegisterForm();
                    registerForm4.ShowDialog();
                    base.Visible = false;
                    return;
                }
                Application.Exit();
            }

            string code = dataRow2["code"].ToString();

            Program.code = code;
        }
示例#15
0
        private void RegisterButton_Click(object sender, RoutedEventArgs e)
        {
            RegisterForm registerForm = new RegisterForm();

            registerForm.ShowDialog();
        }
示例#16
0
        private void linkLabelRegister_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            RegisterForm formRegister = new RegisterForm();

            formRegister.ShowDialog();
        }
示例#17
0
        //注册
        private void register_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            RegisterForm registerForm = new RegisterForm(db);

            registerForm.ShowDialog();
        }
示例#18
0
        private void btnBecomeSupporter_Click(object sender, EventArgs e)
        {
            RegisterForm register = new RegisterForm();

            register.ShowDialog();
        }
示例#19
0
        private void btnRegister_Click(object sender, EventArgs e)
        {
            Form registracija = new RegisterForm();

            registracija.ShowDialog();
        }
 private void button2_Click(object sender, EventArgs e)
 {
     reg.ShowDialog();
 }