示例#1
0
        private IEnumerator Action4()
        {
            SystemManager.GetInstance().sceneTouchEnabled = false;

            UserManager.GetInstance().OpenFunction(FunctionType.Weapon);
            UserManager.GetInstance().OpenFunction(FunctionType.Dungeon);

            FunctionData functionData = UserManager.GetInstance().GetFunction(FunctionType.Dungeon);

            EventBox.Send(CustomEvent.HOME_SHOW_FUNCTION, functionData);

            EventBox.EventBoxHandler OnWindowOpen = null;
            OnWindowOpen = delegate(object data)
            {
                if (data == typeof(DungeonSelectWindow))
                {
                    EventBox.Remove(CustomEvent.WINDOW_OPEN, OnWindowOpen);

                    SystemManager.GetInstance().sceneTouchEnabled = true;
                    GuideManager.GetInstance().FinishGuide(GuideScriptID.G01);

                    task.Stop();
                }
            };

            EventBox.Add(CustomEvent.WINDOW_OPEN, OnWindowOpen);

            yield return(new WaitForSeconds(1.0f));

            GirlEntity2D girl = GameObject.FindGameObjectWithTag(TagDefines.TAG_GIRL).GetComponent <GirlEntity2D>();

            girl.weaponLauncher.Unload();

            girl.componentsHolder.GetComponent(ComponentDefs.Body).Play(AnimationDefs.Amaze.ToString().ToLower());
        }
示例#2
0
        private IEnumerator Action3()
        {
            yield return(new WaitForSeconds(1.0f));

            SystemManager.GetInstance().sceneTouchEnabled = true;

            EventBox.EventBoxHandler OnWindowClose = null;
            OnWindowClose = delegate(object data)
            {
                if (data == typeof(WeaponWindow))
                {
                    WeaponData weaponData = UserManager.GetInstance().user.GetActiveWeapon();

                    if (weaponData != null)
                    {
                        EventBox.Remove(CustomEvent.WINDOW_CLOSE, OnWindowClose);

                        task.Stop();

                        task = new Task(Action4());
                    }
                }
            };

            EventBox.Add(CustomEvent.WINDOW_CLOSE, OnWindowClose);
        }
示例#3
0
 public void ClearHeaderWidget()
 {
     source_actions_align.Hide();
     if (source_actions_box.Child != null)
     {
         source_actions_box.Remove(source_actions_box.Child);
     }
 }
示例#4
0
 public void ClearHeaderWidget()
 {
     header_box.Hide();
     if (header_box.Child != null)
     {
         header_box.Remove(header_box.Child);
     }
 }
示例#5
0
        public void UpdateEventLog()
        {
            if (HTML == null)               // TODO: there may be a race condition here

            {
                LogContent.Remove(LogContent.Child);
                Spinner = new SparkleSpinner(22);
                LogContent.Add(Spinner);
                LogContent.ShowAll();
            }

            Thread thread = new Thread(new ThreadStart(delegate {
                GenerateHTML();
                AddHTML();
            }));

            thread.Start();
        }
示例#6
0
 void ShowActiveContent()
 {
     if (tabstrip.ActiveTab != -1)
     {
         var newChild = (GtkShellDocumentViewItem)tabstrip.Tabs [tabstrip.ActiveTab].Tag;
         if (newChild != notebook.Child)
         {
             if (notebook.Child != null)
             {
                 notebook.Remove(notebook.Child);
             }
             notebook.Add(newChild);
         }
     }
     else if (notebook.Child != null)
     {
         notebook.Remove(notebook.Child);
     }
 }
示例#7
0
        private void DeleteForm(object o, EventArgs args)
        {
            //TODO hacer esto de forma generica para qie no me marque execepciones
            //en un Windget guardar la imagen actual (simon o nel)....
            eb.Remove(Nel);
            icon.Remove(eb);

            eb.Add(Simon);             // using stock icon
            // hooking event

            //eb.ButtonPressEvent += new ButtonPressEventHandler (this.OnImageClick);

            icon.Add(eb);
            // showing the trayicon
            icon.ShowAll();

            win = null;
        }
        void HandleThumbnailIconViewButtonPressEvent(object sender, Gtk.ButtonPressEventArgs args)
        {
            // Store caption before switching
            StoreCaption();

            int old_item = current_item;

            current_item = tray_view.CellAtPosition((int)args.Event.X, (int)args.Event.Y);

            if (current_item < 0 || current_item >= items.Length)
            {
                current_item = old_item;
                return;
            }

            string caption = captions [current_item];

            if (caption == null)
            {
                captions [current_item] = caption = "";
            }
            caption_textview.Buffer.Text = caption;
            caption_textview.Sensitive   = true;

            tag_treeview.Model = new TagStore(account.Facebook, tags [current_item], friends);

            IPhoto item = items [current_item];

            if (tag_image_eventbox.Children.Length > 0)
            {
                tag_image_eventbox.Remove(tag_image);
                tag_image.Destroy();
            }

            using (Gdk.Pixbuf data = App.Instance.Container.Resolve <IThumbnailService> ().GetThumbnail(item.DefaultVersion.Uri, ThumbnailSize.Large)) {
                tag_image_height = data.Height;
                tag_image_width  = data.Width;
                tag_image        = new Gtk.Image(data);
                tag_image_eventbox.Add(tag_image);
                tag_image_eventbox.ShowAll();
            }
        }
示例#9
0
 protected void ChangeEveChild(Widget widget)
 {
     eveMain.Remove(this.eveChild);
     this.eveChild = widget;
     this.eveChild.Reparent(eveMain);
 }