Пример #1
0
 private void CloseForm()
 {
     if (acf != null)
     {
         acf.Close();
         acf.Dispose();
         acf = null;
     }
 }
Пример #2
0
 internal override void Initialize(Aura a)
 {
     if (a is AuraImage)
     {
         acf = new Forms.AuraContainerForm(Forms.AuraContainerForm.AuraTypeEnum.Image);
     }
     if (a is AuraText)
     {
         acf = new Forms.AuraContainerForm(Forms.AuraContainerForm.AuraTypeEnum.Text);
     }
     acf.plug     = a.ctx.plug;
     acf.AuraName = a.Name;
     acf.AuraPrepare();
     acf.ctx = a.ctx;
 }
Пример #3
0
        private void btnTextForce_Click(object sender, EventArgs e)
        {
            List <string> anames = new List <string>();

            foreach (DataGridViewRow r in dgvText.SelectedRows)
            {
                anames.Add(r.Cells[0].Value.ToString());
            }
            if (plug.sc != null)
            {
                Scarborough.Scarborough.ItemAction ia = new Scarborough.Scarborough.ItemAction();
                ia.Action   = Scarborough.Scarborough.ItemAction.ActionTypeEnum.Deactivate;
                ia.Item     = null;
                ia.ItemType = Scarborough.Scarborough.ItemAction.ItemTypeEnum.Text;
                foreach (string aname in anames)
                {
                    ia.Id = aname;
                    plug.sc.ExecuteAction(ia);
                }
            }
            else
            {
                foreach (string aname in anames)
                {
                    lock (plug.textauras)
                    {
                        if (plug.textauras.ContainsKey(aname) == true)
                        {
                            Forms.AuraContainerForm acf = plug.textauras[aname];
                            acf.AuraDeactivate();
                        }
                    }
                }
            }
            btnTextRefresh_Click(sender, e);
        }