예제 #1
0
        public StartPage()
        {
            InitializeComponent();
            Dock = DockStyle.Fill;

            //Recent projects
            Ogmo.CheckRecentProjects();
            for (int i = 0; i < Properties.Settings.Default.RecentProjects.Count; i++)
            {
                LinkLabel link = new LinkLabel();
                link.Location  = new Point(4, 24 + (i * 20));
                link.LinkColor = Color.Red;
                link.Font      = new Font(FontFamily.GenericMonospace, 10);
                link.Size      = new Size(172, 16);
                link.Text      = Properties.Settings.Default.RecentProjectNames[i];
                link.Name      = Properties.Settings.Default.RecentProjects[i];
                link.Click    += delegate(object sender, EventArgs e) { Ogmo.LoadProject(link.Name); };
                recentPanel.Controls.Add(link);
            }

            //Twitter feed
            WebClient twitter = new WebClient();

            twitter.DownloadStringCompleted += new DownloadStringCompletedEventHandler(twitter_DownloadStringCompleted);
            twitter.DownloadStringAsync(new Uri(@"http://api.twitter.com/1/statuses/user_timeline.xml?screen_name=OgmoEditor"));

            //Browser
            webBrowser.Url = new Uri(Path.Combine(Ogmo.ProgramDirectory, "Content", "changelog.html"));
        }
예제 #2
0
        public StartPage()
        {
            InitializeComponent();
            Dock = DockStyle.Fill;

            //Recent projects
            Ogmo.CheckRecentProjects();
            for (int i = 0; i < Properties.Settings.Default.RecentProjects.Count; i++)
            {
                LinkLabel link = new LinkLabel();
                link.Location  = new Point(4, 30 + (i * 20));
                link.LinkColor = Color.Red;
                link.Font      = new Font(FontFamily.GenericMonospace, 10);
                link.Size      = new Size(172, 16);
                link.Text      = Properties.Settings.Default.RecentProjectNames[i];
                link.Name      = Properties.Settings.Default.RecentProjects[i];
                link.Click    += delegate(object sender, EventArgs e) { Ogmo.LoadProject(link.Name); };
                recentPanel.Controls.Add(link);
            }

            //Browser
            webBrowser.Url = new Uri(Path.Combine(Ogmo.ProgramDirectory, "Content", "changelog.html"));
        }