Ejemplo n.º 1
0
 public static void Switch(ShopEnum shop)
 {
     foreach (ShopProfile sp in Shops)
     {
         if (sp.Shop == shop)
         {
             _current = sp;
             break;
         }
     }
 }
Ejemplo n.º 2
0
        private void cboShops_SelectedIndexChanged(object sender, EventArgs e)
        {
            ShopProfile sp = (ShopProfile)cboShops.SelectedItem;
            User        u  = User.GetUser(Settings.Operator);

            if (null == u)
            {
                rdoWw.Text      = "<Failed to get operator>";
                rdoWw.ForeColor = Color.Red;
                return;
            }

            string ww = u.GetWW(cboShops.SelectedIndex);

            if (!string.IsNullOrEmpty(ww))
            {
                sp.SubAccount = ww;
            }
            ;

            sp.Pw           = u.GetWWPW(cboShops.SelectedIndex);
            rdoWw.Text      = sp.Account + (string.IsNullOrEmpty(ww) ? string.Empty : ":" + sp.SubAccount);
            rdoWw.ForeColor = Color.FromArgb(0xff, 0x80, 0x80, 0x80);
        }
Ejemplo n.º 3
0
 private void btnOK_Click(object sender, EventArgs e)
 {
     ShopProfile.Switch(((ShopProfile)cboShops.SelectedItem).Shop);
     this.DialogResult = DialogResult.OK;
     this.Close();
 }