private void FormMain_Load(object sender, EventArgs e) { if (nagging != null) { nagging.Close(); nagging = null; } }
public FormMain() { InitializeComponent(); nagging = new FormNag(); nagging.Show(this); var query = from ss in model.Stages.All join ts in model.Tumors.All on ss.Diagnosis equals ts.Diagnosis join ns in model.Nodules.All on ss.Diagnosis equals ns.Diagnosis join ms in model.Metastases.All on ss.Diagnosis equals ms.Diagnosis select new ClassesRecord { ID = 0, Diagnosis = ts.Diagnosis, Stage = ss.Code, StageArabic = ss.CodeArabic, Tumor = ts.Code, Nodus = ns.Code, Metastasis = ms.Code, Code = ClassesRecord.GetCode(ss.ID, ts.ID, ns.ID, ms.ID) }; // Load directions' table with options DataTable table = lib.DataTableHelper.ConvertToDatatable(query.Take(100)); sgData.DataSource = table; sgData.Columns["Code"].Visible = false; lblCaseCode.DataBindings.Add("Text", sgData.DataSource, "Code"); // Preload stage-coding table tableDirections = lib.DataTableHelper.ConvertToDatatable(model.Directions.All); tableDirections.DefaultView.Sort = "Title"; sgDirections.DataSource = tableDirections; lblDirection.DataBindings.Add("Text", sgDirections.DataSource, "ID"); // Keyboard to latin: CultureInfo TypeOfLanguage = CultureInfo.CreateSpecificCulture("en-US"); System.Threading.Thread.CurrentThread.CurrentCulture = TypeOfLanguage; InputLanguage l = InputLanguage.FromCulture(TypeOfLanguage); InputLanguage.CurrentInputLanguage = l; // Select first tab pcMain.SelectedIndex = 0; edICD.Select(); }