Exemplo n.º 1
0
        internal static void ShowWindow(
            RepositorySpec repSpec,
            bool isGluonMode,
            string installCloudFrom,
            string installEnterpriseFrom,
            string cancelInstallFrom)
        {
            DownloadPlasticExeWindow window = GetWindow <DownloadPlasticExeWindow>();

            window.mRepSpec               = repSpec;
            window.mIsGluonMode           = isGluonMode;
            window.mInstallCloudFrom      = installCloudFrom;
            window.mInstallEnterpriseFrom = installEnterpriseFrom;
            window.mCancelInstallFrom     = cancelInstallFrom;

            window.titleContent = new GUIContent(
                PlasticLocalization.GetString(PlasticLocalization.Name.PlasticSCM));

            if (EditionToken.IsCloudEdition())
            {
                window.minSize = window.maxSize = new Vector2(700, 160);
            }
            else
            {
                window.minSize = window.maxSize = new Vector2(700, 230);
            }

            window.Show();
        }
Exemplo n.º 2
0
        void BuildComponents()
        {
            VisualElement root = rootVisualElement;

            root.Clear();
            InitializeLayoutAndStyles();

            mRequireMessageLabel        = root.Q <Label>("requireMessage");
            mMessageLabel               = root.Q <Label>("message");
            mDownloadCloudEditionButton = root.Q <Button>("downloadCloudEdition");
            mDownloadEnterpriseButton   = root.Q <Button>("downloadEnterpriseEdition");
            mCancelButton               = root.Q <Button>("cancel");
            mProgressControlsContainer  = root.Q <VisualElement>("progressControlsContainer");

            root.Q <Label>("title").text =
                PlasticLocalization.GetString(PlasticLocalization.Name.InstallPlasticSCM);

            mDownloadCloudEditionButton.text =
                PlasticLocalization.GetString(PlasticLocalization.Name.DownloadCloudEdition);
            mDownloadCloudEditionButton.clicked += DownloadCloudEditionButton_Clicked;

            if (EditionToken.IsCloudEdition())
            {
                mDownloadEnterpriseButton.AddToClassList("display-none");
                DownloadPlasticExeWindow window = GetWindow <DownloadPlasticExeWindow>();
            }
            else
            {
                mMessageLabel.text =
                    PlasticLocalization.GetString(
                        PlasticLocalization.Name.WhichVersionInstall);
                mDownloadEnterpriseButton.text =
                    PlasticLocalization.GetString(
                        PlasticLocalization.Name.DownloadEnterpriseEdition);
                mDownloadEnterpriseButton.clicked += DownloadEnterpriseEditionButton_Clicked;
            }

            mCancelButton.text =
                PlasticLocalization.GetString(PlasticLocalization.Name.CancelButton);
            mCancelButton.clicked += CancelButton_Clicked;

            mProgressControls = new ProgressControlsForDialogs(
                new VisualElement[] {
                mDownloadCloudEditionButton,
                mDownloadEnterpriseButton,
                mCancelButton
            });

            mProgressControlsContainer.Add(mProgressControls);
        }
Exemplo n.º 3
0
        internal static void ShowWindow(bool isGluonMode)
        {
            sIsGluonMode = isGluonMode;

            DownloadPlasticExeWindow window = GetWindow <DownloadPlasticExeWindow>();

            window.titleContent = new GUIContent(
                PlasticLocalization.GetString(PlasticLocalization.Name.PlasticSCM));

            if (EditionToken.IsCloudEdition())
            {
                window.minSize = window.maxSize = new Vector2(700, 160);
            }
            else
            {
                window.minSize = window.maxSize = new Vector2(700, 230);
            }

            window.Show();
        }