public AddResource(TempWindow t) { tw = t; InitializeComponent(); WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen; Resource = new Resource(); Resource.X = -1; Resource.Y = -1; autoCompleteBoxTypes.DataContext = tw.database; autoCompleteBoxTags.DataContext = tw.database; DataContext = Resource; selectedTags = new ObservableCollection <ResourceTag>(); // comboBoxTags.DataContext = this; idError = false; nameError = false; descriptionError = false; publicError = false; priceError = false; }
public EditResources(TempWindow t) { tw = t; InitializeComponent(); SelectedResource = null; DataContext = this; Resources = tw.database.Resources; }
public DeleteTypes(TempWindow t) { tw = t; InitializeComponent(); WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen; SelectedType = null; DataContext = this; tw.database.loadData(); Types = tw.database.Types; }
public EditTypes(TempWindow t) { tw = t; InitializeComponent(); WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen; SelectedType = null; DataContext = this; tw.database.loadData(); Types = tw.database.Types; IndexesForUndo = new List <int>(); }
public DeleteTypes(TempWindow t) { tw = t; InitializeComponent(); WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen; SelectedType = null; DataContext = this; tw.database.loadData(); Types = tw.database.Types; TypesForUndo = new ObservableCollection <ResourceType>(); }
public DeleteResources(TempWindow t) { tw = t; InitializeComponent(); SelectedResource = null; DataContext = this; Resources = tw.database.Resources; ResourcesForUndo = new ObservableCollection <Resource>(); }
public EditTags(TempWindow t) { tw = t; InitializeComponent(); WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen; SelectedTag = null; DataContext = this; t.database.loadData(); Tags = t.database.Tags; }
private void Mapa4Button_Click(object sender, RoutedEventArgs e) { string trenutni = System.IO.Directory.GetCurrentDirectory(); string putanja = System.IO.Path.Combine(trenutni, "Maps/world-map-big_04.gif"); TempWindow tag = new TempWindow("Mapa4"); ImageBrush imgB = new ImageBrush(); imgB.ImageSource = new BitmapImage(new Uri(putanja, UriKind.Relative)); tag.Map.Background = imgB; tag.Show(); }
public ShowTags(TempWindow t) { tw = t; InitializeComponent(); WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen; SelectedTag = null; DataContext = this; Console.WriteLine("hejj"); tw.database.loadData(); Tags = tw.database.Tags; Console.WriteLine(Tags.Count()); }
private void asiaButton_Click(object sender, RoutedEventArgs e) { string currentDirectory = System.IO.Directory.GetCurrentDirectory(); string path = System.IO.Path.Combine(currentDirectory, "Maps/asia_map.jpg"); TempWindow tag = new TempWindow("ASIA"); ImageBrush imgB = new ImageBrush(); imgB.ImageSource = new System.Windows.Media.Imaging.BitmapImage(new Uri(path, UriKind.Relative)); tag.Map.Background = imgB; tag.Show(); }
public AddTag(string id, TempWindow t) { tw = t; InitializeComponent(); WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen; tag = new ResourceTag(); tag.Id = id; DataContext = tag; idError = false; descriptionError = false; }
public ShowResources(TempWindow t) { tw = t; InitializeComponent(); WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen; SelectedResource = null; DataContext = this; Resourcess = tw.database.Resources; comboBoxType.DataContext = tw.database; FromDate = DateTime.Now; ToDate = DateTime.Now; }
public EditTags(TempWindow t) { tw = t; InitializeComponent(); WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen; SelectedTag = null; DataContext = this; t.database.loadData(); Tags = t.database.Tags; TagsForUndo = new ObservableCollection <ResourceTag>(); IndexesForUndo = new List <int>(); }
public AddType(TempWindow t) { tw = t; InitializeComponent(); WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen; type = new ResourceType(); DataContext = type; idError = false; nameError = false; iconPathError = false; descriptionError = false; }
public EditType(string typeId, TempWindow t) { tp = t; InitializeComponent(); WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen; oldId = typeId; type = tp.database.GetType(oldId); DataContext = type; idError = false; nameError = false; iconPathError = false; descriptionError = false; }
public EditTag(string tagId, TempWindow t) { InitializeComponent(); temp = t; WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen; oldId = tagId; Tagg = new ResourceTag(t.database.GetTag(tagId)); if (Tagg.Color != null) { ColorPicker.SelectedColor = (Color)ColorConverter.ConvertFromString(tag.Color); } DataContext = tag; idError = false; descriptionError = false; }
public EditResource(string resourceId, TempWindow t) { tw = t; InitializeComponent(); WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen; oldId = resourceId; Resource = new Resource(tw.database.GetResource(resourceId)); DataContext = Resource; autoCompleteBoxTypes.DataContext = tw.database; autoCompleteBoxTags.DataContext = tw.database.Tags; Database d = tw.database; SelectedTags = new ObservableCollection <ResourceTag>(); comboBoxTags.DataContext = this; foreach (var tag in Resource.Tags) { SelectedTags.Add(tag); } foreach (var typeDatabase in tw.database.Types) { if (Resource.Type.Id != null) { if (Resource.Type.Id.Equals(typeDatabase.Id)) { autoCompleteBoxTypes.Text = typeDatabase.Id; } } } idError = false; nameError = false; descriptionError = false; publicError = false; priceError = false; }
public NameSearch(TempWindow tw) { InitializeComponent(); window = tw; autoCompleteBoxName.DataContext = window.database; }
public EditTag(TempWindow t) { temp = t; InitializeComponent(); }
public Filter(TempWindow tw) { InitializeComponent(); window = tw; }