void SignRepositoryItemComboBox_Observers(object sender, ActiveChange msg)
        {
            Current          = msg.CurrentSign;
            SignInfo.Current = msg.CurrentSign;
            Populate();

            this.BestFit();
        }
Exemplo n.º 2
0
 /// <summary>
 /// 当Current Sign改变后,相应改变图片的显示内容
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="msg"></param>
 void DashboardModule_Observers(object sender, ActiveChange msg)
 {
     if (msg.IsSelect)
     {
         try
         {
             if (msg.CurrentSign.Active)
             {
                 ControlService.SignCombo.SelectedItem = msg.CurrentSign;
             }
         }
         catch
         {
             //ControlService.SignCombo.SelectedIndex = 0;
         }
         CurrentSignChanged();
     }
     else
     {
         //如果CurrentSign没有数据,则将图片置空
         if (ControlService.SignCombo.Items.Length <= 0)
         {
             SetPicImageNull();
         }
         else
         {
             //当编辑了Sign之后,当前Current Sign应该定位到该Sign,并显示其图片
             if (msg.CurrentSign != null &&
                 msg.CurrentSign.Active)
             {
                 ControlService.SignCombo.SelectedItem = msg.CurrentSign;
                 CurrentSignChanged();
             }
             else if (ControlService.SignCombo.Current != null)
             {
                 CurrentSignChanged();
             }
         }
     }
 }
Exemplo n.º 3
0
 void SignRepositoryItemComboBox_Observers(object sender, ActiveChange msg)
 {
     //Populate();
 }