Beispiel #1
0
        public Application(IAbout a)
        {
            var s = new InternalSaveActionSprite();

            s.AttachSpriteTo(a.Content);

            s.WebService = new ApplicationWebService();

            var pp = new ProjectNameInput();

            pp.AttachControlTo(a.Content);

            var Files = new IHTMLDiv().AttachTo(a.Content);

            s.WhenReady(
                i =>
            {
                Action Update = delegate
                {
                    var sln = new SolutionBuilder
                    {
                        Name = pp.ProjectName.Text
                    };

                    i.FileName = sln.Name + ".zip";
                    i.Clear();

                    Files.Clear();

                    sln.WriteTo(
                        (SolutionFile f) =>
                    {
                        new IHTMLPre {
                            innerText = f.Name
                        }.AttachTo(Files);

                        i.Add(f.Name, f.Content);
                    }
                        );
                };

                pp.UpdateButton.TextChanged +=
                    delegate
                {
                };

                pp.UpdateButton.Click +=
                    delegate
                {
                    Update();
                };

                Update();
            }
                );
        }