ChangeState() public method

Changes state of all listed controls.
public ChangeState ( bool state ) : void
state bool If true, enables/makes visible. Functions run regardless and take state as parameter.
return void
コード例 #1
0
        /// <summary>
        /// Sets up GUI elements 
        /// </summary>
        private void InitialiseGUI()
        {
            // KFreon: Make preview bigger
            DisappearTextBox(true);
            EnableSecondProgressBar(false);
            FirstHalfInfoState(false);
            SecondHalfInfoState(false);

            // KFreon: Setup gooey
            DebugOutput.PrintLn("Gooeying things");
            gooey = new Gooey(PreviewTabPages);
            gooey.AddControl(LoadButton, "Load", true);
            gooey.AddControl(ExtractTOP, "ExtractTOP", true);
            gooey.AddControl(ClearAllFilesButton, "ClearAll", true);
            gooey.AddControl(BuildTPFTOP, "Rebuild", true);
            gooey.AddControl(RunAutofixButton, "RunAutofix", true);
            //gooey.AddControl(MODtoTPFButton, "MODtoTPF", true);
            gooey.AddControl(AnalyseButton, "Analyse", true);
            gooey.AddControl(InstallButton, "InstallB", true);
            gooey.AddControl(extractInvalidToolStripMenuItem, "extractInvalid", true);
            gooey.AddControl(ChangeButton, "ChangeButton", true);
            gooey.AddControl(AutofixSingleButton, "AutofixSingleButton", false);
            gooey.AddControl(extractValidsToolStripMenuItem, "extractValids", true);

            gooey.ChangeState(false);


            // KFreon: Initialise MainListView



            OverallProgressBar.Value = 0;
            OverallStatusLabel.Text = "Ready.";
        }
コード例 #2
0
ファイル: Texplorer2.cs プロジェクト: Dybuk/ME3Explorer
        public Texplorer2(bool nowindow = false, int which = -1)
        {
            if (!nowindow)
                InitializeComponent();
            KFreonTPFTools3.UpgradeSettings();

            // KFreon: Set number of threads if necessary
            if (Properties.Settings.Default.NumThreads == 0)
            {
                Properties.Settings.Default.NumThreads = KFreonLib.Misc.Methods.SetNumThreads(false);
                SaveProperties();
            }

            WhichGame = (which == -1) ? Properties.Settings.Default.TexplorerGameVersion : which;
            MEExDirecs.WhichGame = WhichGame;

            StatusUpdater = new TextUpdater(StatusLabel, StatusStrip);
            ProgBarUpdater = new ProgressBarChanger(StatusStrip, MainProgressBar);
            gooey = new Gooey(MainTreeView);
            SetupGUI();

            DebugOutput.StartDebugger("Texplorer 2.0");
            if (!nowindow)
            {
                ChangeButton.Text = "Modding ME" + WhichGame;
                WindowTitle = "Texplorer 2.0:  " + "ME" + WhichGame;
                this.Text = WindowTitle;
                DisappearPictureBox();
                ResetSearchBox();
            }
            backbone = new BackBone(() =>
            {
                Console.WriteLine("changing gui to false");
                gooey.ChangeState(false);
                return true;
            }, () =>
            {
                Console.WriteLine("Changeing gui to true");
                gooey.ChangeState(true);
                return true;
            });

            noWindow = nowindow;


            // KFreon: Get number of threads to use
            NumThreads = KFreonLib.Misc.Methods.SetNumThreads(false);

            DebugOutput.PrintLn("Using: " + NumThreads + " threads.");

            // KFreon: Setup paths
            // KFreon: Check game states DONE HERE COS TREE NEEDS THESE THINGS
            CheckGameStates();


            // KFreon: Check path exists
            bool exists = true;

            // KFreon: Load tree only if necessary
            if (!nowindow && exists)
                backbone.AddToBackBone(b =>
                {
                    BeginLoadingTree();
                    return true;
                });

            // KFreon: Display version
            if (!nowindow)
                VersionLabel.Text = "Version: " + Assembly.GetExecutingAssembly().GetName().Version.ToString();
        }