Example #1
0
        private static Command CreateProjectCommand()
        {
            var cmd = new Command("project", "Project listing")
            {
                Project_List.GetCommand(),
            };

            cmd.AddAlias("proj");

            return(cmd);
        }
Example #2
0
        public Main()
        {
            InitializeComponent();

            // Check if the SEG Database is available
            var sql = new SqlHelper(ConfigurationManager.ConnectionStrings["SEGDatabase"].ConnectionString);
            if (sql.TestSEG())
            {

                inLogin = true;

                // Initialize basic components - Background
                ImageBrush ib = new ImageBrush();
                ib.ImageSource = new BitmapImage(new Uri(@"pack://application:,,,/Media/Cover-background-landscape.png"));
                ib.Stretch = Stretch.UniformToFill;
                cL.Background = ib;

                eUser.Text = "";
                ePass.Password = "";

                cL.Visibility = Visibility.Visible;
                c.Visibility = Visibility.Hidden;

                // Create the content providers here
                panelProjectNew = new Project_New();
                panelProjectList = new Project_List();
                panelAreaList = new ProjectArea_List();
                panelAssetList = new Area_AssetList();
                panelAreaGenDiag = new Area_GenDiag();
                panelAssetEditGeneral = new Asset_Edit_General();
                panelAssetEditMechanical = new Asset_Edit_Mechanical();
                panelAssetEditMechanicalImg = new Asset_Edit_Mechanical_Img();
                panelAssetEditElectrical = new Asset_Edit_Electrical();
                panelAssetEditElectricalImg = new Asset_Edit_Electrical_Img();
                panelAssetEditElectricalInfo = new Asset_Edit_Electrical_Info();
                panelAssetEditRisk = new Asset_Edit_Risk();

                ControlCenter.Instance.wMain = this;
            }
            else
            {
                MessageBox.Show("The database was missing or the SEG.Desktop was not correctly configured.  Please use the SEG.Tools to correct.", "Init Error");
            }

            //// Disables inking in the WPF application and enables us to track touch events to properly trigger the touch keyboard
            //InkInputHelper.DisableWPFTabletSupport();

            //this.Loaded += EnableKeyboard;
        }