示例#1
0
        private bool IsTrialVersion()
        {
            LaytonCabShellWorkItem workItem   = new LaytonCabShellWorkItem();
            LaytonProductKey       productKey = workItem.LoadProductKey();

            return(productKey.IsTrial);
        }
示例#2
0
        public LaytonAboutForm(LaytonCabShellWorkItem workItem)
        {
            InitializeComponent();
            this.workItem = workItem;
            try
            {
                // set the form's background image and icon
                Bitmap bgImage = new Bitmap(Properties.Settings.Default.appAboutScreen);
                this.BackgroundImage = bgImage;
                this.Size            = bgImage.Size;

                // set the form's icon
                this.Icon = new Icon(Properties.Settings.Default.appIcon);
            }
            catch
            {
                // Use existing default images
            }
            this.versionLabel.Text = "8.4.4";
            UpdateLicensing();
            AddModules();
        }
        private void toolbarsWorkspace_ToolClick(object sender, Infragistics.Win.UltraWinToolbars.ToolClickEventArgs e)
        {
            switch (e.Tool.Key)
            {
                case "Refresh":
                    ILaytonView explorerView = (ILaytonView)explorerWorkspace.ActiveSmartPart;
                    explorerView.RefreshView();
                    ILaytonView tabView = (ILaytonView)tabWorkspace.ActiveSmartPart;
                    tabView.RefreshView();
                    break;
                case "Settings":
                    this.WorkItem.RootWorkItem.WorkItems[WorkItemNames.SettingsWorkItem].Activate();
                    break;
                case "Help":
                    try
                    {
                        //System.Diagnostics.Process.Start(Properties.Settings.Default.appHelpFile);
                        FormUserGuide form = new FormUserGuide();
                        form.ShowDialog();
                    }
                    catch
                    {
                        MessageBox.Show("Could not load help file:  " + Properties.Settings.Default.appHelpFile + System.Environment.NewLine + "Be sure the help file is located in the root of the application folder.", "Error Loading Help File", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    }
                    break;
                case "About":
                    LaytonAboutForm aboutForm = new LaytonAboutForm((LaytonCabShellWorkItem)WorkItem.RootWorkItem);
                    aboutForm.ShowDialog();

                    ILaytonView overviewExplorerView = (ILaytonView)explorerWorkspace.ActiveSmartPart;

                    if (overviewExplorerView is Layton.AuditWizard.Overview.OverviewExplorerView)
                        overviewExplorerView.RefreshView();

                    break;
                case "Visit Website":
                    try
                    {
                        System.Diagnostics.Process.Start("http://www.laytontechnology.com");
                    }
                    catch
                    {
                        MessageBox.Show("Unable to launch the default web browser.", "Error Opening Website", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    }
                    break;
                case "Exit":
                    Application.Exit();
                    break;
                case "Expand Main View":
                    LaytonCabShellWorkItem rootWorkItem = WorkItem.RootWorkItem as LaytonCabShellWorkItem;
                    if (rootWorkItem.Shell.ExplorerWorkspaceCollapsed)
                    {
                        rootWorkItem.Shell.ExplorerWorkspaceCollapsed = false;
                        e.Tool.InstanceProps.AppearancesSmall.Appearance.Image = Properties.Resources.expand_view_16;
                        e.Tool.SharedProps.Caption = e.Tool.Key;
                    }
                    else
                    {
                        rootWorkItem.Shell.ExplorerWorkspaceCollapsed = true;
                        e.Tool.InstanceProps.AppearancesSmall.Appearance.Image = Properties.Resources.collapse_view_16;
                        e.Tool.SharedProps.Caption = "Default Layout";                        
                    }
                    break;
                default:
                    break;
            }
        }