1:   // AutostartCommands.cs
2:   // Copyright (C) 2001 Mike Krueger
3:   //
4:   // This program is free software; you can redistribute it and/or
5:   // modify it under the terms of the GNU General Public License
6:   // as published by the Free Software Foundation; either version 2
7:   // of the License, or (at your option) any later version.
8:   //
9:   // This program is distributed in the hope that it will be useful,
10:   // but WITHOUT ANY WARRANTY; without even the implied warranty of
11:   // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12:   // GNU General Public License for more details.
13:   //
14:   // You should have received a copy of the GNU General Public License
15:   // along with this program; if not, write to the Free Software
16:   // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
17:   //
18:   // As a special exception, if you link this library with other files to
19:   // produce an executable, this library does not by itself cause the
20:   // resulting executable to be covered by the GNU General Public License.
21:   // This exception does not however invalidate any other reasons why the
22:   // executable file might be covered by the GNU General Public License.
23:  
24:   using System;
25:   using System.Collections;
26:   using System.CodeDom.Compiler;
27:   using System.Windows.Forms;
28:  
29:   using Core.Properties;
30:   using Core.AddIns.Codons;
31:  
32:   using SharpDevelop.Gui;
33:  
34:   namespace SharpDevelop.Base.Commands {
35:       
36:       public class StartWorkbenchCommand : AbstractCommand
37:       {
38:           const string workbenchMemento "SharpDevelop.Workbench.WorkbenchMemento";
39:           
40:           public override void Run()
41:           {
42:               Form f = (Form)WorkbenchSingleton.Workbench;
43:               f.Show();
44:               
45:               if (SharpDevelopMain.CommandLineArgs != null) {
46:                   foreach (string file in SharpDevelopMain.CommandLineArgs) {
47:                       switch (System.IO.Path.GetExtension(file).ToUpper()) {
48:                           case ".CMBX":
49:                           case ".PRJX":
50:                               WorkbenchSingleton.Workbench.OpenCombine(file);
51:                               break;
52:                           default:
53:                               WorkbenchSingleton.Workbench.OpenFile(file);
54:                               break;
55:                       }
56:                   }
57:               }
58:               
59:               
60:               Application.Run(f);
61:               
62:               GlobalProperties.SetProperty(workbenchMementoWorkbenchSingleton.Workbench.CreateMemento());
63:           }
64:       }
65:       
66:       public class StartTipOfTheDayCommand : AbstractCommand
67:       {
68:           public override void Run()
69:           {
70:               // show tip of the day
71:               if (GlobalProperties.GetProperty("SharpDevelop.Gui.Dialog.TipOfTheDayView.ShowTipsAtStartup"true)) {
72:                   ViewTipOfTheDay dview new ViewTipOfTheDay();
73:                   dview.Run();
74:               }
75:           }
76:           
77:       }
78:       
79:       
80:   }

This page was automatically generated by SharpDevelop.