Esempio n. 1
0
        private void button_add_Click(object sender, RoutedEventArgs e)
        {
            Parcel parcel = new Parcel(textBox_name.Text, textBox_number.Text);
            m_parcels.Add(parcel);

            //Tallennetaan paketit
            Save();
        }
Esempio n. 2
0
        public InfoPage(Parcel parcel)
        {
            InitializeComponent();

            string status = "";
            foreach (string s in parcel.StatusList)
            {
                status += s;
                status += "\n";
            }
            textBlock_info.Text = status;
        }
Esempio n. 3
0
        private void Load()
        {
            int i = 0;
            string key = PARCEL_KEY + i;
            string numKey = NUMBER_KEY + i;
            m_parcels = new ObservableCollection<Parcel>();
            while (m_settings.Contains(key))
            {

                var number = "";
                var name = "";
                if (m_settings.Contains(key))
                {
                    name = m_settings[key].ToString();
                }
                if (m_settings.Contains(numKey))
                {
                    number = m_settings[numKey].ToString();
                    Parcel parcel = new Parcel(name, number);
                    m_parcels.Add(parcel);
                }

                System.Diagnostics.Debug.WriteLine("loading " + key);

                i++;
                key = PARCEL_KEY + i;
                numKey = NUMBER_KEY + i;
            }
        }