private void SyncConfigureButton_Click(object sender, EventArgs e) { MOG_Privileges privileges = MOG_ControllerProject.GetPrivileges(); if (privileges.GetUserPrivilege(MOG_ControllerProject.GetUserName(), MOG_PRIVILEGE.ConfigureUpdateFilterPromotions)) { if (SyncConfigureButton.Visible) { SyncFilterLabel.Visible = true; SyncAddButton.Visible = true; SyncDelButton.Visible = true; SyncSaveButton.Visible = true; SyncPromoteButton.Visible = true; SyncConfigureButton.Visible = false; ClassificationTreeView.Visible = true; SyncShowAssetsCheckBox.Visible = true; SyncFilterComboBox.Enabled = true; CloseButton.Visible = true; SyncFilterComboBox.Width -= (SyncAddButton.Width * 3) + 6; ClassificationTreeView.Initialize(); if (ConfigureFilter != null) { ConfigureFilter(sender, true); } } } else { MOG_Prompt.PromptResponse("Insufficient Privileges", "Your privileges do not allow you to configure sync filters."); } }
public void LoadFilter(string filterName) { // Is this an already fully qualified name? if (DosUtils.ExistFast(filterName) == false) { // No, then lets assume it came from the user's tools directory filterName = MOG_ControllerSystem.LocateTool(filterName + ".sync"); } SyncFilterComboBox.Text = Path.GetFileNameWithoutExtension(filterName); SyncFilterComboBox.Tag = filterName; if (DosUtils.ExistFast(filterName)) { //if (ClassificationTreeView.Visible) //{ // Reset the tree ClassificationTreeView.Initialize(OnWorkerCompleteLoadFilter); //} //else //{ // OnWorkerCompleteLoadFilter(); //} } }
private void SyncDelButton_Click(object sender, EventArgs e) { if (SyncFilterComboBox.SelectedItem != null) { ComboBoxItem item = SyncFilterComboBox.SelectedItem as ComboBoxItem; if (item != null) { string filterFileName = item.FullPath; if (MOG_Prompt.PromptResponse("Delete filter?", "Are you sure you want to delete this filter?\n" + item.FullPath, MOGPromptButtons.YesNo) == MOGPromptResult.Yes) { if (DosUtils.ExistFast(filterFileName) && DosUtils.DeleteFast(filterFileName)) { UpdateFilterDropDown(""); mFilter.Clear(); //if (ClassificationTreeView.Visible) //{ ClassificationTreeView.Initialize(); //} SyncSaveButton.Enabled = false; SyncFilterComboBox.Text = mOriginalSyncComboBoxMessage; } } } } }
public PackageCreator() { InitializeComponent(); // Make sure we are not in the designer / DesignMode //if (GetService(typeof(System.ComponentModel.Design.IDesignerHost)) == null) if (System.ComponentModel.LicenseManager.UsageMode != System.ComponentModel.LicenseUsageMode.Designtime) { MOG_Project project = MOG_ControllerProject.GetProject(); if (project != null) { PlatformCombo.Items.Add("All"); PlatformCombo.SelectedIndex = 0; foreach (MOG_Platform platform in project.GetPlatforms()) { PlatformCombo.Items.Add(platform.mPlatformName); } PlatformCombo.Items.Add(MOG_ControllerProject.GetAllPlatformsString()); ClassificationTreeView.Initialize(DrillToClassification); SyncTargetTreeView.InitializeVirtual(Platform); PlatformCombo.BackColor = Color.PaleGreen; } } IsTextBoxValid(this.PackageNameTextBox); IsTextBoxValid(this.SyncTargetTextBox); IsTextBoxValid(this.ClassificationTextBox); }
private void SyncShowAssetsCheckBox_CheckedChanged(object sender, EventArgs e) { ClassificationTreeView.ShowAssets = SyncShowAssetsCheckBox.Checked; //if (ClassificationTreeView.Visible) //{ ClassificationTreeView.Initialize(); //} }