예제 #1
0
        public void setControlAvailability(bool res)
        {
            this.dataGrid.IsEnabled = res;

            if (!res)
            {
                this.windowMain.MenuItemClearShortlist.IsEnabled  = res;
                this.windowMain.MenuItemAddToShortlist.IsEnabled  = res;
                this.windowMain.MenuItemImportShortlist.IsEnabled = res;
                this.windowMain.MenuItemExportShortlist.IsEnabled = res;

                this.progressBar.Value = 0;
                globalFuncs.FadeInElement(this.progressBar, globalFuncs.progressBarDuration, 1, true);
                setProgressBarValueDelegate = new SetProgressBarValueDelegate(this.setProgressBarValue);
            }
            else
            {
                globalFuncs.FadeOutElement(this.progressBar, globalFuncs.progressBarDuration, this.progressBar.Opacity);
                setProgressBarValueDelegate = null;

                if (dataTable.Count > 0)
                {
                    this.windowMain.MenuItemClearShortlist.IsEnabled  = res;
                    this.windowMain.MenuItemAddToShortlist.IsEnabled  = res;
                    this.windowMain.MenuItemImportShortlist.IsEnabled = res;
                    this.windowMain.MenuItemExportShortlist.IsEnabled = res;
                }
            }
        }
 public void removeCustomSetting()
 {
     globalFuncs.FadeOutElement(this.ButtonWarning, globalFuncs.elementDuration, globalFuncs.elementFinalOpacity);
     for (int i = 0; i < settings.preferencesSettings.Count; ++i)
     {
         if (settings.preferencesSettings[i].name.Equals("Custom"))
         {
             settings.usingCustomSettings = false;
             settings.preferencesSettings.RemoveAt(i);
             settings.settingNames.RemoveAt(i);
             String selection = settings.preferencesSettings[i].name;
             settings.settingSettings         = false;
             vm.setting.ComboBoxSelectedIndex = globalFuncs.getElementIndex(ref settings.settingNames, selection);
             settings.settingSettings         = true;
             break;
         }
     }
 }
 public void setControlAvailability(bool res)
 {
     this.GroupBoxTeamsSearch1.IsEnabled = res;
     this.GroupBoxTeamsSearch2.IsEnabled = res;
     this.GroupBoxTeamsSearch3.IsEnabled = res;
     this.windowMain.MenuItemClearTeamFields.IsEnabled = res;
     this.dataGrid.IsEnabled = res;
     this.searching          = !res;
     if (!res)
     {
         finishedLoading = false;
         this.dataTable.Clear();
         this.progressBar.Value = 0;
         globalFuncs.FadeInElement(this.progressBar, globalFuncs.progressBarDuration, 1, true);
         setProgressBarValueDelegate = new SetProgressBarValueDelegate(this.setProgressBarValue);
     }
     else
     {
         finishedLoading = true;
         globalFuncs.FadeOutElement(this.progressBar, globalFuncs.progressBarDuration, this.progressBar.Opacity);
         setProgressBarValueDelegate = null;
         this.dataGrid.Items.Refresh();
     }
 }