Exemplo n.º 1
0
        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;
        }
Exemplo n.º 2
0
        public EditResources(TempWindow t)
        {
            tw = t;
            InitializeComponent();

            SelectedResource = null;
            DataContext      = this;

            Resources = tw.database.Resources;
        }
Exemplo n.º 3
0
 public DeleteTypes(TempWindow t)
 {
     tw = t;
     InitializeComponent();
     WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen;
     SelectedType          = null;
     DataContext           = this;
     tw.database.loadData();
     Types = tw.database.Types;
 }
Exemplo n.º 4
0
 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>();
        }
Exemplo n.º 7
0
        public EditTags(TempWindow t)
        {
            tw = t;
            InitializeComponent();
            WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen;

            SelectedTag = null;
            DataContext = this;

            t.database.loadData();
            Tags = t.database.Tags;
        }
Exemplo n.º 8
0
        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();
        }
Exemplo n.º 11
0
        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;
        }
Exemplo n.º 12
0
        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;
        }
Exemplo n.º 13
0
        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>();
        }
Exemplo n.º 14
0
        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;
        }
Exemplo n.º 15
0
        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;
        }
Exemplo n.º 16
0
        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;
        }
Exemplo n.º 17
0
        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;
        }
Exemplo n.º 18
0
 public NameSearch(TempWindow tw)
 {
     InitializeComponent();
     window = tw;
     autoCompleteBoxName.DataContext = window.database;
 }
Exemplo n.º 19
0
        public EditTag(TempWindow t)
        {
            temp = t;

            InitializeComponent();
        }
Exemplo n.º 20
0
 public Filter(TempWindow tw)
 {
     InitializeComponent();
     window = tw;
 }