Example #1
0
        void RunDelete(bool staging)
        {
            ListBox listBox = staging ? stagingBuildList : liveBuildList;

            if (listBox.SelectedValue == null)
            {
                return;
            }
            BuildVersionData buildData = (BuildVersionData)listBox.SelectedValue;

            EpicApi.Run(EpicApi.BuildDeleteCommand(App.saveData, productData, buildData.buildVersion, staging));
        }
        private void RunLabel(CheckBox checkBox)
        {
            if (checkBox.IsChecked == false)
            {
                return;
            }

            LabelData labelData = this.labelData;

            labelData.platform = checkBox.Content.ToString();
            ProcessStartInfo cmd = EpicApi.BuildLabelCommand(App.saveData, productData, labelData);

            if (!add)
            {
                cmd = EpicApi.BuildUnlabelCommand(App.saveData, productData, labelData);
            }
            EpicApi.Run(cmd);
        }
Example #3
0
        private void Refresh(bool staging = true, Action finished = null)
        {
            EpicApi.BuildVersion callback;
            if (staging)
            {
                callback = BuildVersionStaging;
                Dispatcher.Invoke(() => { StagingBuildVersions.Clear(); });
            }
            else
            {
                callback = BuildVersionLive;
                Dispatcher.Invoke(() => { LiveBuildVersions.Clear(); });
            }

            EpicApi.buildVersion += callback;
            EpicApi.Run(EpicApi.BuildListCommand(App.saveData, productData, staging, System.IO.Path.GetFullPath(".") + (staging ? "/Staging/" : "/Live/") + productData.realName + ".json"), () =>
            {
                EpicApi.buildVersion -= callback;
                finished?.Invoke();
            });
        }
Example #4
0
        private void UploadClick(object sender, RoutedEventArgs e)
        {
            taskbarItemInfo.ProgressState = System.Windows.Shell.TaskbarItemProgressState.Normal;
            uploadButton.IsEnabled        = false;
            buildData.staging             = true;
            ComboBoxItem item = liveBox.SelectedItem as ComboBoxItem;

            if (item != null)
            {
                buildData.staging = item.Content.ToString() != "Live";
            }

            buildData.buildRoot    = buildRootText.Text;
            buildData.cloudDir     = cloudDirText.Text;
            buildData.buildVersion = buildVersionText.Text;
            buildData.appLaunch    = appLaunchText.Text;
            buildData.appArgs      = appArgsText.Text;
            EpicData.Save(buildData, productData.realName);
            EpicApi.uploadProgress += UploadProgress;
            EpicApi.Run(EpicApi.BuildPatchGenCommand(App.saveData, productData, buildData));
        }