protected ProgressBarWidget(ProgressBarWidget other)
     : base(other)
 {
     Percentage = other.Percentage;
     GetPercentage = other.GetPercentage;
     IsIndeterminate = other.IsIndeterminate;
 }
Exemple #2
0
 protected ProgressBarWidget(ProgressBarWidget other)
     : base(other)
 {
     Percentage      = other.Percentage;
     GetPercentage   = other.GetPercentage;
     IsIndeterminate = other.IsIndeterminate;
 }
        public D2kDownloadPackagesLogic(Widget widget, Dictionary<string,string> installData, Action afterInstall)
        {
            this.installData = installData;
            this.afterInstall = afterInstall;

            panel = widget.Get("INSTALL_DOWNLOAD_PANEL");
            progressBar = panel.Get<ProgressBarWidget>("PROGRESS_BAR");
            statusLabel = panel.Get<LabelWidget>("STATUS_LABEL");

            ShowDownloadDialog();
        }
        public DownloadPackagesLogic(Widget widget, Action afterInstall, string mirrorListUrl)
        {
            this.mirrorListUrl = mirrorListUrl;
            this.afterInstall = afterInstall;

            panel = widget.Get("INSTALL_DOWNLOAD_PANEL");
            progressBar = panel.Get<ProgressBarWidget>("PROGRESS_BAR");
            statusLabel = panel.Get<LabelWidget>("STATUS_LABEL");

            ShowDownloadDialog();
        }
        public CncDownloadPackagesLogic([ObjectCreator.Param] Widget widget,
		                                [ObjectCreator.Param] Dictionary<string,string> installData,
		                                [ObjectCreator.Param] Action continueLoading)
        {
            this.installData = installData;
            this.continueLoading = continueLoading;

            panel = widget.GetWidget("INSTALL_DOWNLOAD_PANEL");
            progressBar = panel.GetWidget<ProgressBarWidget>("PROGRESS_BAR");
            statusLabel = panel.GetWidget<LabelWidget>("STATUS_LABEL");

            ShowDownloadDialog();
        }
        public DownloadPackagesLogic(Widget widget, Action afterInstall, string mirrorListUrl, string modId)
        {
            this.mirrorListUrl = mirrorListUrl;
            this.afterInstall = afterInstall;
            this.modId = modId;

            panel = widget.Get("INSTALL_DOWNLOAD_PANEL");
            progressBar = panel.Get<ProgressBarWidget>("PROGRESS_BAR");
            statusLabel = panel.Get<LabelWidget>("STATUS_LABEL");

            var text = "Downloading {0} assets...".F(ModMetadata.AllMods[modId].Title);
            panel.Get<LabelWidget>("TITLE").Text = text;

            ShowDownloadDialog();
        }
        public D2kInstallFromCDLogic(Widget widget)
        {
            panel = widget.Get("INSTALL_FROMCD_PANEL");
            progressBar = panel.Get<ProgressBarWidget>("PROGRESS_BAR");
            statusLabel = panel.Get<LabelWidget>("STATUS_LABEL");

            backButton = panel.Get<ButtonWidget>("BACK_BUTTON");
            backButton.OnClick = Ui.CloseWindow;

            retryButton = panel.Get<ButtonWidget>("RETRY_BUTTON");
            retryButton.OnClick = CheckForDisk;

            installingContainer = panel.Get("INSTALLING");
            insertDiskContainer = panel.Get("INSERT_DISK");
            CheckForDisk();
        }
        public D2kExtractGameFilesLogic(Widget widget)
        {
            panel = widget.Get("EXTRACT_GAMEFILES_PANEL");
            progressBar = panel.Get<ProgressBarWidget>("PROGRESS_BAR");
            statusLabel = panel.Get<LabelWidget>("STATUS_LABEL");

            backButton = panel.Get<ButtonWidget>("BACK_BUTTON");
            backButton.OnClick = Ui.CloseWindow;

            retryButton = panel.Get<ButtonWidget>("RETRY_BUTTON");
            retryButton.OnClick = Extract;

            extractingContainer = panel.Get("EXTRACTING");
            copyFilesContainer = panel.Get("COPY_FILES");
            Extract();
        }
        public CncInstallFromCDLogic([ObjectCreator.Param] Widget widget,
		                       [ObjectCreator.Param] Action continueLoading)
        {
            this.continueLoading = continueLoading;
            panel = widget.GetWidget("INSTALL_FROMCD_PANEL");
            progressBar = panel.GetWidget<ProgressBarWidget>("PROGRESS_BAR");
            statusLabel = panel.GetWidget<LabelWidget>("STATUS_LABEL");

            backButton = panel.GetWidget<ButtonWidget>("BACK_BUTTON");
            backButton.OnClick = Widget.CloseWindow;

            retryButton = panel.GetWidget<ButtonWidget>("RETRY_BUTTON");
            retryButton.OnClick = CheckForDisk;

            installingContainer = panel.GetWidget("INSTALLING");
            insertDiskContainer = panel.GetWidget("INSERT_DISK");
            CheckForDisk();
        }
        public InstallFromCDLogic(Widget widget, Action continueLoading)
        {
            installData = Game.ModData.Manifest.Get<ContentInstaller>();
            this.continueLoading = continueLoading;
            panel = widget.Get("INSTALL_FROMCD_PANEL");
            progressBar = panel.Get<ProgressBarWidget>("PROGRESS_BAR");
            statusLabel = panel.Get<LabelWidget>("STATUS_LABEL");

            backButton = panel.Get<ButtonWidget>("BACK_BUTTON");
            backButton.OnClick = Ui.CloseWindow;

            retryButton = panel.Get<ButtonWidget>("RETRY_BUTTON");
            retryButton.OnClick = CheckForDisk;

            installingContainer = panel.Get("INSTALLING");
            insertDiskContainer = panel.Get("INSERT_DISK");
            CheckForDisk();
        }
		public InstallFromCDLogic(Widget widget, Action afterInstall, string modId)
		{
			this.modId = modId;
			installData = ModMetadata.AllMods[modId].Content;
			this.afterInstall = afterInstall;
			panel = widget.Get("INSTALL_FROMCD_PANEL");
			progressBar = panel.Get<ProgressBarWidget>("PROGRESS_BAR");
			statusLabel = panel.Get<LabelWidget>("STATUS_LABEL");

			backButton = panel.Get<ButtonWidget>("BACK_BUTTON");
			backButton.OnClick = Ui.CloseWindow;

			retryButton = panel.Get<ButtonWidget>("RETRY_BUTTON");
			retryButton.OnClick = CheckForDisk;

			installingContainer = panel.Get("INSTALLING");
			insertDiskContainer = panel.Get("INSERT_DISK");
			CheckForDisk();
		}
        public ConvertGameFilesLogic(Widget widget, string[][] ExtractGameFiles, string[][] ExportToPng, string[][] ImportFromPng)
        {
            panel = widget.Get("CONVERT_ASSETS_PANEL");
            progressBar = panel.Get<ProgressBarWidget>("PROGRESS_BAR");
            statusLabel = panel.Get<LabelWidget>("STATUS_LABEL");

            backButton = panel.Get<ButtonWidget>("BACK_BUTTON");
            backButton.OnClick = Ui.CloseWindow;

            retryButton = panel.Get<ButtonWidget>("RETRY_BUTTON");
            retryButton.OnClick = Extract;

            extractingContainer = panel.Get("EXTRACTING");

            this.ExtractGameFiles = ExtractGameFiles;
            this.ExportToPng = ExportToPng;
            this.ImportFromPng = ImportFromPng;

            Extract();
        }
        public CncInstallFromCDLogic(Widget widget, Action afterInstall, string[] filesToCopy, string[] filesToExtract)
        {
            this.afterInstall = afterInstall;
            this.filesToCopy = filesToCopy;
            this.filesToExtract = filesToExtract;

            panel = widget;
            progressBar = panel.Get<ProgressBarWidget>("PROGRESS_BAR");
            statusLabel = panel.Get<LabelWidget>("STATUS_LABEL");

            backButton = panel.Get<ButtonWidget>("BACK_BUTTON");
            backButton.OnClick = Ui.CloseWindow;

            retryButton = panel.Get<ButtonWidget>("RETRY_BUTTON");
            retryButton.OnClick = CheckForDisk;

            installingContainer = panel.Get("INSTALLING");
            insertDiskContainer = panel.Get("INSERT_DISK");

            CheckForDisk();
        }
Exemple #14
0
        public InstallFromDiscLogic(Widget widget, ModContent content, Dictionary<string, ModContent.ModSource> sources, Action afterInstall)
        {
            this.content = content;
            this.sources = sources;

            Log.AddChannel("install", "install.log");

            // this.afterInstall = afterInstall;
            panel = widget.Get("DISC_INSTALL_PANEL");

            titleLabel = panel.Get<LabelWidget>("TITLE");

            primaryButton = panel.Get<ButtonWidget>("PRIMARY_BUTTON");
            secondaryButton = panel.Get<ButtonWidget>("SECONDARY_BUTTON");

            // Progress view
            progressContainer = panel.Get("PROGRESS");
            progressContainer.IsVisible = () => visible == Mode.Progress;
            progressBar = panel.Get<ProgressBarWidget>("PROGRESS_BAR");
            progressLabel = panel.Get<LabelWidget>("PROGRESS_MESSAGE");
            progressLabel.IsVisible = () => visible == Mode.Progress;

            // Message view
            messageContainer = panel.Get("MESSAGE");
            messageContainer.IsVisible = () => visible == Mode.Message;
            messageLabel = messageContainer.Get<LabelWidget>("MESSAGE_MESSAGE");

            // List view
            listContainer = panel.Get("LIST");
            listContainer.IsVisible = () => visible == Mode.List;

            listPanel = listContainer.Get<ScrollPanelWidget>("LIST_PANEL");
            listHeaderTemplate = listPanel.Get("LIST_HEADER_TEMPLATE");
            listTemplate = listPanel.Get<LabelWidget>("LIST_TEMPLATE");
            listPanel.RemoveChildren();

            listLabel = listContainer.Get<LabelWidget>("LIST_MESSAGE");

            DetectContentDisks();
        }
Exemple #15
0
 protected ProgressBarWidget(ProgressBarWidget widget)
     : base(widget)
 {
     Percentage = widget.Percentage;
 }
Exemple #16
0
 protected ProgressBarWidget(ProgressBarWidget widget)
     : base(widget)
 {
     Percentage = widget.Percentage;
 }