public frmImportRaster(Raster sourceRaster, Surface refSurface, Purposes ePurpose, string sNoun) { // This call is required by the designer. InitializeComponent(); Cursor = Cursors.WaitCursor; NeedsForcedProjection = false; Text = "Add Existing " + sNoun; grpProjectRaaster.Text = "GCD " + sNoun; Purpose = ePurpose; SourceRaster = sourceRaster; txtSourceRaster.Text = sourceRaster.GISFileInfo.FullName; if (ePurpose == Purposes.FirstDEM) { ExtImporter = new ExtentAdjusterNoReference(sourceRaster.Extent); } else { ReferenceSurface = refSurface; if (Purpose == Purposes.SubsequentDEM || Purpose == Purposes.ReferenceSurface) { ExtImporter = new ExtentAdjusterWithReference(sourceRaster.Extent, refSurface.Raster.Extent); } else { ExtImporter = new ExtentAdjusterFixed(sourceRaster.Extent, refSurface.Raster.Extent); } } Cursor = Cursors.Default; }
async Task ExecuteLoadItemsCommand() { if (IsBusy) { return; } IsBusy = true; try { repository = new AccountRepository(User); Purposes.Clear(); var items = await repository.GetPurposesAsync(); foreach (var item in items) { Purposes.Add(item); } } catch (Exception ex) { Debug.WriteLine(ex); } finally { IsBusy = false; } }
public void InitAddFieldsFromMain() { if (BirthDate.HasValue) { Month = BirthDate.Value.Month; Day = BirthDate.Value.Day; Year = BirthDate.Value.Year; } Purposes = (Purpose ?? "").Split <string>(";").ToList(); AddPurpose = Purposes.Where(x => DefPurposes.All(z => z != x)).JoinToString(";"); SearchFors = (SearchFor ?? "").Split <string>(";").ToList(); AddSearchFor = SearchFors.Where(x => DefSearchFor.All(z => z != x)).JoinToString(";"); Jobs = (Job ?? "").Split <string>(";").ToList(); AddJob = Jobs.Where(x => DefJobs.All(z => z != x)).JoinToString(";"); if (!DefLifePrioritys.Contains(LifePriority)) { AddLifePriority = LifePriority; LifePriority = ""; } Musics = (Music ?? "").Split <string>(";").ToList(); }
/*void Start() * { * statsVisible = popUp.statsVisible; * picVisible = popUp.picVisible; * * SetText(); * * if (picVisible == true) * { * SetPicture(); * } * * SetBg(); * * buttonAmount = popUp.buttonAmount; //How many buttons there are (1 or 2) * * button1 = popUp.button1; //The first button * button2 = popUp.button2; //The second button * * SetPopupSize(); * * SetButtons(); * * SetPopupSize(); * }*/ public void ActivatePopup() { gm = GameObject.Find("GameManager"); purpose = popUp.purpose; removeCurrencyAmount = popUp.removeCurrencyAmount; addCurrencyAmount = popUp.addCurrencyAmount; currencyManager = gm.GetComponent <CurrencyManager>(); nig = gm.GetComponent <NewItemGenerator>(); popUpFrame = GameObject.Find("Empty PopUp Background"); SetBg(); statsVisible = popUp.statsVisible; SetText(); picVisible = popUp.picVisible; if (picVisible == true) { SetPicture(); } SetPopupSize(); buttonAmount = popUp.buttonAmount; SetButtons(); SetPopupSize(); }
public Purposes GetPurposes() { if (purposes == null) { purposes = new Purposes(null, null, null, null); } return(purposes); }
public SupplementsCycleDefinitionEditorViewModel() { foreach (WorkoutPlanPurpose purpose in Enum.GetValues(typeof(WorkoutPlanPurpose))) { Purposes.Add(new ListItem <WorkoutPlanPurpose>(EnumLocalizer.Default.Translate(purpose), purpose)); } foreach (TrainingPlanDifficult diff in Enum.GetValues(typeof(TrainingPlanDifficult))) { Difficulties.Add(new ListItem <TrainingPlanDifficult>(EnumLocalizer.Default.Translate(diff), diff)); } Weeks = new ObservableCollection <SupplementsCycleWeekViewModel>(); }
public static frmImportRaster PrepareToImportRaster(Surface refSurface, Purposes purpose, string Noun, IntPtr parentWindow) { frmImportRaster frm = null; Raster source = ProjectManager.BrowseRaster(naru.ui.UIHelpers.WrapMessageWithNoun("Browse and Select a", Noun, "Raster"), parentWindow); if (source is Raster) { if (GISDatasetValidation.DSHasSpatialRef(source, "raster", "rasters")) { frm = new frmImportRaster(source, refSurface, purpose, Noun); } } return(frm); }
public OperationDetailVM(Operation newOperation, User _user, OperationRepository _opRepository = null) { Title = newOperation?.Date.ToString(); opRepository = _opRepository; User = _user; accountRep = new AccountRepository(User); Destinations = new List <ImageItem>(); if (newOperation != null && !String.IsNullOrEmpty(newOperation.Images)) { foreach (var im in newOperation.StringToPaths()) { Destinations.Add(im); } } #region Get Properties Accounts = accountRep.GetAccounts(); Purposes = accountRep.GetPurposes(); CategoryRepository categoryRep = new CategoryRepository(User); Categories = categoryRep.GetItems(); CurrencyRepository currencyRep = new CurrencyRepository(); Currencies = currencyRep.GetItems(); UserRepository userRep = new UserRepository(); Users = userRep.GetItems(); Accounts.Insert(0, new Account("Выбрать", 0, 0, 0, null)); Categories.Insert(0, new Category("Выбрать", null)); Purposes.Insert(0, new Account("Выбрать", 0, 0, 0, null)); ListForPickerType = new List <string> { "Приход", "Расход", "Перевод" }; #endregion if (newOperation == null) { Operation = new Operation(DateTime.Now, 0, 2, "", null, null, null, null, Users[0]); } else { Operation = newOperation; adding = false; } }
public UserStatus( Purposes purposes, Vendors vendors, string userId, string created, string updated, string consentString, string additionalConsent ) { this.purposes = purposes; this.vendors = vendors; this.userId = userId; this.created = created; this.updated = updated; this.consentString = consentString; this.additionalConsent = additionalConsent; }
public Parts(KeyPurpose[] purposes, string name, string description, TagPubKey pubKey, KeyStrength strength, BaseKeyId keyId, IEnumerable <AppPermissions> permissions) { if (string.IsNullOrWhiteSpace(name)) { throw new ArgumentNullException(nameof(name)); } Version = InterlockKeyVersion; Name = name; Purposes = purposes.Required(); PublicKey = pubKey.Required(); Description = description; Strength = strength; if (Actionable && permissions.None()) { Purposes = Purposes.Where(pu => pu != KeyPurpose.Action).ToArray(); // Remove Action Purpose } Permissions = permissions; Identity = new KeyId(TagHash.HashSha256Of(_hashable)); Id = keyId ?? Identity; }
public void AddPurpose(AssetPurpose assetPurpose) { Purposes.Add(assetPurpose); }
public void AddPurpose(TemporalRole purpose) { Purposes.Add(purpose); }
public void delete(object obj) { var purpose = obj as Purpose; Purposes.Remove(purpose); }
public void add(object obj) { var title = obj as string; Purposes.Add(new Purpose(title)); }