Beispiel #1
0
        protected override int WizSetActive(IntPtr hwnd)
        {
            // Find out which property page this is....

            switch (GetPropPage(hwnd))
            {
            // This page corresponds to the "Do you want to make changes to the machine
            // or the user policy" page
            case Page1Index:
                TurnOnNext(true);
                break;

            // This page corresponds to the "Choose an assembly to trust" page
            case Page2Index:
                if (Page2.Filename != null && Page2.Filename.Length > 0)
                {
                    TurnOnNext(true);
                }
                else
                {
                    TurnOnNext(false);
                }
                break;

            // This page corresponds to the 'how do you want to trust this assembly' when
            // the assembly has a publisher certificate
            case Page3Index:
                Page3.Filename = Page2.Filename;
                Page3.PutValuesInPage();
                TurnOnNext(true);
                break;

            // This page is for the "You can only give this assembly full trust" page
            case Page4Index:
                TurnOnNext(Page4.GiveFullTrust);
                break;

            // This page gives the slider and allows the user to choose the permission level
            // they want
            case Page5Index:
                TurnOnNext(true);
                break;

            // This page says "Sorry, policy is too complicated.... we can't make any changes"
            case Page6Index:
                TurnOnFinish(true);
                break;

            // This page shows the summary of what we're doing
            case Page7Index:
                // We should send some info to the table to display...
                String[] sInfo = { CResourceStore.GetString("Assembly"),
                                   Page2.Filename,
                                   CResourceStore.GetString("User Type"),
                                   Page1.isForHomeUser?CResourceStore.GetString("Home User"):CResourceStore.GetString("Corporate User"),
                                   CResourceStore.GetString("New Permission Level"),
                                   GetNameOfNewPermissionLevel() };
                Page7.TableInfo = sInfo;
                TurnOnFinish(true);
                break;
            }
            return(base.WizSetActive(hwnd));
        }// WizSetActive