Inheritance: System.Windows.Forms.Form, IMainForm
Esempio n. 1
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            MainForm form = new MainForm();
            MessageService service = new MessageService();
            FileManager manager = new FileManager();

            MainPresenter presenter = new MainPresenter(form, manager, service);
            Application.Run(form);
        }
Esempio n. 2
0
File: Program.cs Progetto: Diamur/C-
		private static void Main(string[] args)
		{
			Application.EnableVisualStyles();
			Application.SetCompatibleTextRenderingDefault(false);
			
			//---собственный код----
			MainForm form = new MainForm();
			MessageService service = new MessageService();
			FileManager manager = new FileManager();
			
			Presenter presenter = new Presenter(form, manager, service );
			//----------------------
						
			Application.Run(form);
		}
Esempio n. 3
0
        /// <summary>
        /// 编辑数据
        /// </summary>
        /// <param name="table">输入数据</param>
        /// <return>是否编辑成功</return>
        public override bool EditData(Hashtable table)
        {
            bool editSuccess = false;
            string content = table["data"] as string;
            if(content == null)
            {
                content = "请输入编辑内容";
            }
            MainForm mainForm = new MainForm(content);
            DialogResult result = mainForm.ShowDialog();
            if(result == DialogResult.OK)
            {
                text = mainForm.Content;
                data = mainForm.Content;                
                editSuccess = true;
            }

            return editSuccess;
        }