//radioButton__Open_my_chosen_file #region private void radioButton__Open_my_chosen_file_CheckedChanged(object sender, MouseEventArgs e) { string str = Dialogs.ShowOpenFileDialog("Open KnowledgesTree File", "Supported Files (*.Ktree) | *.Ktree", new string[] { "Ktree" }); if (string.IsNullOrEmpty(str) && !radioButton__Open_my_chosen_file.Checked) { radioButton__Open_the_most_recent_active_file.Checked = true; } else { SystemFile.Save(str, 2); radioButton__Open_my_chosen_file.Checked = true; } }
static void Main(string[] args) { //Application.Run(new FormMain()); try { if (args.Length > 0) { Application.Run(new FormMain(args[0])); } else { Application.Run(new FormMain(null)); } } catch (Exception ex) { ErrorFile.Save(ex); SystemFile.Save((int.Parse(SystemFile.Get(3)) + 1).ToString(), 3); throw ex; } }
public DialogResult Show(MessageBoxButtons buttons, string text, Exception ex, Form form) { if (form == null) { StartPosition = FormStartPosition.CenterScreen; } else { StartPosition = FormStartPosition.Manual; Left = form.Left + form.Width / 2 - Width / 2; Top = form.Top + form.Height / 2 - Height / 2; } richTextBox1.WordWrap = false; Text = text; KhongBietDatTenSaoLuon(buttons, text + "\n" + ex.Message + "\n" + ex.StackTrace); //lưu số lần bị lỗi vào file "System.ini" SystemFile.Save((int.Parse(SystemFile.Get(3)) + 1).ToString(), 3); ErrorFile.Save(ex); // return((DialogResult)returner); }