Inheritance: System.Windows.Forms.Form, IMainForm
示例#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);
        }
示例#2
0
文件: Program.cs 项目: 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);
		}
示例#3
0
文件: Program.cs 项目: viticm/pap2
        /// <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;
        }