Ejemplo n.º 1
0
        private void ShowToolbar()
        {
            var resourceImages   = new ResourceImages();
            var toolStripButtons = new ToolStrip();

            editButton = new ToolStripButton("Editieren", resourceImages.DatasetOpen, OnToolItemClick)
            {
                Enabled =
                    true,
                Tag = "Edit"
            };
            saveButton = new ToolStripButton("Speichern", null, OnToolItemClick)
            {
                Tag = "Save", Enabled = false
            };
            cancelButton = new ToolStripButton("Abbrechen", null, OnToolItemClick)
            {
                Tag = "Cancel", Enabled = false
            };


            toolStripButtons.Items.Add(editButton);
            toolStripButtons.Items.Add(saveButton);
            toolStripButtons.Items.Add(cancelButton);

            SettingsDataRegistry.Instance.CoreInterface.ToolBarManager.AddToolGroup(toolStripButtons, false, 1);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Zeigt die Toolbar an.
        /// </summary>
        private void ShowToolbar()
        {
            var resources = new ResourceImages();

            // Leiste erstellen
            var toolstripButtons = new ToolStrip();

            // Buttons erstellen
            openButton = new ToolStripButton("Editieren", resources.DatasetOpen, OnToolItemClick)
            {
                Enabled =
                    false,
                Tag = "Edit"
            };
            deleteButton = new ToolStripButton("Löschen", resources.DatasetDelete, OnToolItemClick)
            {
                Enabled = false, Tag = "Delete"
            };

            // einfügen in die Leiste
            toolstripButtons.Items.Add(openButton);
            toolstripButtons.Items.Add(deleteButton);

            // einfügen der Leiste
            ActivitiesRegistry.Instance.CoreInterface.ToolBarManager.AddToolGroup(toolstripButtons, false, 1);
        }
Ejemplo n.º 3
0
            public ChampionTracker(Obj_AI_Hero champion)
            {
                Champion           = champion;
                LastPotion         = champion.ServerPosition;
                StartInvisibleTime = Game.ClockTime;
                var sprite =
                    new Render.Sprite(
                        Helper.ChangeOpacity(
                            ResourceImages.GetChampionSquare(champion.SkinName) ??
                            ResourceImages.GetChampionSquare("Aatrox"), Opacity), new Vector2(0, 0));

                sprite.GrayScale();
                sprite.Scale            = new Vector2(Scale, Scale);
                sprite.VisibleCondition = sender => TrackerCondition;
                sprite.PositionUpdate   =
                    () => Drawing.WorldToMinimap(LastPotion) + new Vector2(-(sprite.Width / 2), -(sprite.Height / 2));
                sprite.Add(0);
                Text = new Render.Text(0, 0, "", Menu.Item("TextSize").GetValue <Slider>().Value, Color.White)
                {
                    VisibleCondition = sender => TrackerCondition,
                    PositionUpdate   = () => Drawing.WorldToMinimap(LastPotion),
                    TextUpdate       = () => Helper.FormatTime(Game.ClockTime - StartInvisibleTime),
                    OutLined         = true,
                    Centered         = true
                };
                Text.Add(0);
                AppDomain.CurrentDomain.DomainUnload += CurrentDomainOnDomainUnload;
                AppDomain.CurrentDomain.ProcessExit  += CurrentDomainOnDomainUnload;
            }
Ejemplo n.º 4
0
        /// <summary>
        /// Lädt den Controller.
        /// </summary>
        /// <param name="core">Zugriff auf den Kern</param>
        /// <param name="programPath">Programmpfad</param>
        public void Load(ICoreInterface core, string programPath)
        {
            // Datenspeicher initialisieren
            DaoFactory.Initialize(core.DatabaseConnection);
            // Registrierung initialisieren
            ActivitiesRegistry.Instance.Initialize(core, programPath);

            // Klasse registrieren (HomeVisits)
            core.DatabaseConnection.AddMappingClass(typeof(HomeVisit));

            // Navigation erstellen
            var dataNavigationBar = core.NavigationBar.CreateDataNavigationBar();

            // Navigationsbutton einfügen
            core.NavigationBar.AddButton("activitiesDataButton", "Aktivitäten", null, null, dataNavigationBar, OnNavBarButtonClick);

            // Erstellen eines Buttons zum Hinzufügen von Aktivitäten
            var resourceImages = new ResourceImages();

            dataNavigationBar.AddButton(
                "newActivityButton", "Neue Aktivität hinzufügen", resourceImages.DatasetAdd, null,
                delegate {
                core.WindowManager.BringWindowToFront <IActivitiesListView>();
                var view = ((IActivitiesListView)core.WindowManager.ActiveWindow);
                view.GetModel().UserWantsToAddActivity();
            }
                );
        }
Ejemplo n.º 5
0
        /// <summary>
        /// Lädt den Controller.
        /// </summary>
        /// <param name="core">Zugriff auf den Kern</param>
        /// <param name="programPath">Programmpfad</param>
        public void Load(ICoreInterface core, string programPath)
        {
            // Datenspeicher initialisieren
            DaoFactory.Initialize(core.DatabaseConnection);
            // Registrierung initialisieren
            ActivitiesRegistry.Instance.Initialize(core, programPath);

            // Klasse registrieren (HomeVisits)
            core.DatabaseConnection.AddMappingClass(typeof(HomeVisit));

            // Navigation erstellen
            var dataNavigationBar = core.NavigationBar.CreateDataNavigationBar();
            // Navigationsbutton einfügen
            core.NavigationBar.AddButton("activitiesDataButton", "Aktivitäten", null, null, dataNavigationBar, OnNavBarButtonClick);

            // Erstellen eines Buttons zum Hinzufügen von Aktivitäten
            var resourceImages = new ResourceImages();
            dataNavigationBar.AddButton(
                "newActivityButton", "Neue Aktivität hinzufügen", resourceImages.DatasetAdd, null,
                delegate {
                    core.WindowManager.BringWindowToFront<IActivitiesListView>();
                    var view = ((IActivitiesListView) core.WindowManager.ActiveWindow);
                    view.GetModel().UserWantsToAddActivity();
                    }
                );
        }
Ejemplo n.º 6
0
 public object ProvideValue(IServiceProvider serviceProvider)
 {
     if (Source == null)
     {
         return(null);
     }
     return(ResourceImages.PngFromName(Source));
 }
Ejemplo n.º 7
0
 protected override void Print()
 {
     for (int i = 0; i < items.Length; i++)
     {
         Text t = items[i].GetComponentInChildren <Text>();
         t.text = "Stage " + (i + 1).ToString();
         Image img = items[i].GetComponent <Image>();
         img.overrideSprite = ResourceImages.GetStageImage(i);
     }
 }
Ejemplo n.º 8
0
    public override void Set(int currentStageLevel = 0)
    {
        if (currentStageLevel > 0)
        {
            level = currentStageLevel;
            maxHP = Mathf.RoundToInt(maxHP * level * maxHPStep);
            gold  = Mathf.RoundToInt(gold * level * goldStep);
            enemyImage.overrideSprite = ResourceImages.GetEnemyImage(level);
        }

        hpSlider.maxValue = maxHP;
        currentHP         = maxHP;
        SetHP();
    }
Ejemplo n.º 9
0
    public Enemy(int num)
    {
        // 적 초기화
        maxHP     = 5;
        currentHP = maxHP;
        maxHPStep = 3.5f;
        gold      = 1;
        goldStep  = 2.8f;
        level     = 0;

        enemyImage = GameObject.Find("Enemy-Image").GetComponent <Image>();
        animator   = GameObject.Find("Enemy-Image").GetComponent <Animator>();
        enemyImage.overrideSprite = ResourceImages.GetEnemyImage(0);

        hpSlider = GameObject.Find("HP-Slider").GetComponent <Slider>();
        hpText   = GameObject.Find("HP-Text").GetComponent <Text>();
        Set();
    }
Ejemplo n.º 10
0
    // Start is called before the first frame update
    void Start()
    {
        status = new Status(
            new Power(1, 3, 1, 2.0f),
            new CriticalDamage(1, 3, 1, 2.0f),
            new CriticalPercentage(1, 5, 0.1f, 0.1f),
            new AutoGold(1, 3, 1, 2)
            );

        ResourceImages.SetImages();

        stage = new Stage(maxStages);

        player = new Player(status);

        menu = new Menu(maxStages);

        StartCoroutine(player.AddAutoGoldPerSec());
        StartCoroutine(TimeCheck());
    }
Ejemplo n.º 11
0
        /// <summary>
        /// Lädt den Controller
        /// </summary>
        /// <param name="coreInterface">Core</param>
        /// <param name="programPath">Pfad</param>
        public void Load(ICoreInterface coreInterface, string programPath)
        {
            core = coreInterface;

            // Initialize the registry in order to save the CoreInterface and program path
            // there.
            SettingsDataRegistry.Instance.Initialize(coreInterface, programPath);

            // Dao initialisieren
            DaoFactory.Initialize(coreInterface.DatabaseConnection);
            // Einstellungsklasse registrieren
            coreInterface.DatabaseConnection.AddMappingClass(typeof(Model.Setting));

            ResourceImages resourceImages = new ResourceImages();

            ResourceManager resourceManager = new ResourceManager("MyBiaso.Core.Customer.Properties.Resources", this.GetType().Assembly);

            var dataNavigationBar = core.NavigationBar.CreateDataNavigationBar();

            core.NavigationBar.AddButton("settingsButton", "Einstellungen", null, null, dataNavigationBar, OnNavBarButtonClick);
        }
Ejemplo n.º 12
0
        /// <summary>
        /// Lädt den Controller
        /// </summary>
        /// <param name="coreInterface">Core</param>
        /// <param name="programPath">Pfad</param>
        public void Load(ICoreInterface coreInterface, string programPath)
        {
            core = coreInterface;


            // Initialize the registry in order to save the CoreInterface and program path
            // there.
            SettingsDataRegistry.Instance.Initialize(coreInterface, programPath);

            // Dao initialisieren
            DaoFactory.Initialize(coreInterface.DatabaseConnection);
            // Einstellungsklasse registrieren
            coreInterface.DatabaseConnection.AddMappingClass(typeof(Model.Setting));

            ResourceImages resourceImages = new ResourceImages();

            ResourceManager resourceManager = new ResourceManager("MyBiaso.Core.Customer.Properties.Resources", this.GetType().Assembly);

            var dataNavigationBar = core.NavigationBar.CreateDataNavigationBar();

            core.NavigationBar.AddButton("settingsButton", "Einstellungen", null, null, dataNavigationBar, OnNavBarButtonClick);
        }
Ejemplo n.º 13
0
        public void Load(ICoreInterface ci, string programPath)
        {
            // Save the CoreInterface
            _ci = ci;

            // Initialize DaoFactory.
            DaoFactory.Initialize(ci.DatabaseConnection);

            // Initialize the registry in order to save the CoreInterface and program path
            // there.
            CustomerDataRegistry.Instance.Initialize(ci, programPath);

            // Register the customer class.
            ci.DatabaseConnection.AddMappingClass(typeof(Model.Customer));

            ResourceImages resourceImages = new ResourceImages();

            ResourceManager resourceManager = new ResourceManager("MyBiaso.Core.Customer.Properties.Resources", this.GetType().Assembly);

            // Create a new data navigation bar.
            var dataNavigationBar = ci.NavigationBar.CreateDataNavigationBar();

            dataNavigationBar.AddButton("newCustomerButton", "Neuen Kunden hinzufügen", resourceImages.DatasetAdd, null,
                                        delegate {
                ci.WindowManager.BringWindowToFront <ICustomerDataView>();
                var view = ((ICustomerDataView)ci.WindowManager.ActiveWindow);
                view.GetModel().UserWantsToAddCustomer();
            });

            ci.NavigationBar.AddButton("customerDataButton", "Kundenverwaltung", null, (Image)resourceManager.GetObject("customers"), dataNavigationBar, OnNavBarButtonClick);

            // Register menu items.
            //object menuItem = ci.MainMenu.AddMainMenuItem("Customers", "customerDataMenuItem", "Customers",
            //                                              (object)null, null);
            //ci.MainMenu.AddMainMenuItem("Add new customer...", "newCustomerMenuItem", "Add new customer", menuItem,
            //                            OnNewCustomerMenuItemClick);
        }
Ejemplo n.º 14
0
        public void Load(ICoreInterface ci, string programPath)
        {
            // Save the CoreInterface
            _ci = ci;

            // Initialize DaoFactory.
            DaoFactory.Initialize(ci.DatabaseConnection);

            // Initialize the registry in order to save the CoreInterface and program path
            // there.
            CustomerDataRegistry.Instance.Initialize(ci, programPath);

            // Register the customer class.
            ci.DatabaseConnection.AddMappingClass(typeof(Model.Customer));

            ResourceImages resourceImages = new ResourceImages();

            ResourceManager resourceManager = new ResourceManager("MyBiaso.Core.Customer.Properties.Resources", this.GetType().Assembly);

            // Create a new data navigation bar.
            var dataNavigationBar = ci.NavigationBar.CreateDataNavigationBar();
            dataNavigationBar.AddButton("newCustomerButton", "Neuen Kunden hinzufügen", resourceImages.DatasetAdd, null,
                delegate {
                    ci.WindowManager.BringWindowToFront<ICustomerDataView>();
                    var view = ((ICustomerDataView) ci.WindowManager.ActiveWindow);
                    view.GetModel().UserWantsToAddCustomer();
                });

            ci.NavigationBar.AddButton("customerDataButton", "Kundenverwaltung", null, (Image)resourceManager.GetObject("customers"), dataNavigationBar, OnNavBarButtonClick);

            // Register menu items.
            //object menuItem = ci.MainMenu.AddMainMenuItem("Customers", "customerDataMenuItem", "Customers",
            //                                              (object)null, null);
            //ci.MainMenu.AddMainMenuItem("Add new customer...", "newCustomerMenuItem", "Add new customer", menuItem,
            //                            OnNewCustomerMenuItemClick);
        }
Ejemplo n.º 15
0
 public void SetNextStage()
 {
     stageImage.overrideSprite = ResourceImages.GetStageImage(level);
     enemy.Set(level);
     level += 1;
 }
Ejemplo n.º 16
0
        private void ShowToolbar()
        {
            var resourceImages = new ResourceImages();
            var toolStripButtons = new ToolStrip();

            editButton = new ToolStripButton("Editieren", resourceImages.DatasetOpen, OnToolItemClick)
            {
                Enabled =
                    true,
                Tag = "Edit"
            };
            saveButton = new ToolStripButton("Speichern", null, OnToolItemClick) { Tag = "Save", Enabled = false };
            cancelButton = new ToolStripButton("Abbrechen", null, OnToolItemClick) { Tag = "Cancel", Enabled = false };

            toolStripButtons.Items.Add(editButton);
            toolStripButtons.Items.Add(saveButton);
            toolStripButtons.Items.Add(cancelButton);

            SettingsDataRegistry.Instance.CoreInterface.ToolBarManager.AddToolGroup(toolStripButtons, false, 1);
        }
Ejemplo n.º 17
0
        /// <summary>
        /// Zeigt die Toolbar an.
        /// </summary>
        private void ShowToolbar()
        {
            var resources = new ResourceImages();

            // Leiste erstellen
            var toolstripButtons = new ToolStrip();

            // Buttons erstellen
            openButton = new ToolStripButton("Editieren", resources.DatasetOpen, OnToolItemClick)
            {
                Enabled =
                    false,
                Tag = "Edit"
            };
            deleteButton = new ToolStripButton("Löschen", resources.DatasetDelete, OnToolItemClick) { Enabled = false, Tag = "Delete" };

            // einfügen in die Leiste
            toolstripButtons.Items.Add(openButton);
            toolstripButtons.Items.Add(deleteButton);

            // einfügen der Leiste
            ActivitiesRegistry.Instance.CoreInterface.ToolBarManager.AddToolGroup(toolstripButtons, false, 1);
        }