Esempio n. 1
0
 private void FillListView()
 {
     try
     {
         // get client
         PLMPackServiceClient client = WCFClientSingleton.Instance.Client;
         // get all cardboard profiles
         DCCardboardProfile[] profiles = client.GetAllCardboardProfile();
         // fill list view
         listViewProfile.Items.Clear();
         foreach (DCCardboardProfile profile in profiles)
         {
             ListViewItem item = new ListViewItem();
             item.Tag  = profile.ID;
             item.Text = profile.Name;
             item.SubItems.Add(profile.Code);
             item.SubItems.Add(string.Format("{0}", profile.Thickness));
             listViewProfile.Items.Add(item);
         }
     }
     catch (Exception ex)
     {
         _log.Error(ex.ToString());
     }
 }
        public override void BuildCardboardProfile()
        {
            // get client
            PLMPackServiceClient client = WCFClientSingleton.Instance.Client;

            DCCardboardProfile[] profiles = client.GetAllCardboardProfile();
            _cardboardProfiles.Clear();
            foreach (DCCardboardProfile cp in profiles)
            {
                _cardboardProfiles.Add(cp.Name, cp);
            }

            _majorationList = null;
        }
        protected override Profile[] LoadProfiles()
        {
            PLMPackServiceClient client = WCFClientSingleton.Instance.Client;

            DCCardboardProfile[] profiles    = client.GetAllCardboardProfile();
            List <Profile>       listProfile = new List <Profile>();

            foreach (DCCardboardProfile cp in profiles)
            {
                listProfile.Add(new Profile(cp.Name));
            }
            if (listProfile.Count > 0)
            {
                Selected = listProfile[0];
            }
            return(listProfile.ToArray());
        }
Esempio n. 4
0
        private void FillProfileComboBox(string selectedProfileName)
        {
            // initialize profile combo box
            comboBoxProfile.Items.Clear();
            // client
            PLMPackServiceClient client = WCFClientSingleton.Instance.Client;

            DCCardboardProfile[] profiles = client.GetAllCardboardProfile();
            foreach (DCCardboardProfile cp in profiles)
            {
                comboBoxProfile.Items.Add(cp);
                if (cp.Name == selectedProfileName)
                {
                    comboBoxProfile.SelectedItem = cp;
                }
            }
        }