Exemple #1
0
        private void linksListBox_SelectedIndexChanged(object sender, EventArgs e)
        {
            m_currentId = linksListBox.SelectedIndex + 1;

            m_registryManager = null;
            m_registryManager = new CRegistryManager();
            m_customSlotData  = CRegistryManager.GetCustomSlots();

            string[] linkValues = CCustomSlot.GetDataFromId(m_customSlotData, m_currentId, false);

            if (linkValues != null)
            {
                LinkTitle.Text = linkValues[0];
                LinkPath.Text  = linkValues[1];
                LinkArgs.Text  = linkValues[2];
            }
            else
            {
                LinkTitle.Text = "";
                LinkPath.Text  = "";
                LinkArgs.Text  = "";
            }

            #if DEBUG
            Framework.Log("Listbox refreshed");
            #endif
        }
Exemple #2
0
        private void MainWindow_Activated(object sender, EventArgs e)
        {
            //Clipboard functions
            if (Clipboard.ContainsImage())
            {
                m_isImageInClipboard       = true;
                pasteTextureButton.Enabled = true;
            }
            else
            {
                m_isImageInClipboard       = false;
                pasteTextureButton.Enabled = false;
            }

            //Refresh custom links if the links management form was open
            if (m_isLinksManagementPreviouslyOpen)
            {
                m_registryManager = null;
                m_registryManager = new CRegistryManager();
                m_customSlotData  = CRegistryManager.GetCustomSlots();
                SetCustomSlots();

                m_isLinksManagementPreviouslyOpen = false;
            }
        }
Exemple #3
0
        private void RefreshListBox()
        {
            //m_customSlotData = customSlotData;
            m_customSlotData = CRegistryManager.GetCustomSlots();

            //Add slots values to the ListBox
            int i = 0;

            foreach (string noFormat in m_customSlotData)
            {
                if (i != 0)
                {
                    string[] values = CCustomSlot.GetDataFromId(m_customSlotData, i);
                    if (values != null)
                    {
                        linksListBox.Items.Add(values[0]);
                    }
                    else
                    {
                        linksListBox.Items.Add("Custom link " + i);
                    }
                }
                i++;
            }
        }
Exemple #4
0
        public MainWindow()
        {
            InitializeComponent();

            m_framework       = new Framework(consoleTextbox);
            m_registryManager = new CRegistryManager();

            this.AllowDrop  = true;
            this.DragEnter += new DragEventHandler(MainWindow_DragEnter);
            this.DragDrop  += new DragEventHandler(MainWindow_DragDrop);

            #if DEBUG
            this.TopMost = false;
            this.Text    = APP_TITLE_NAME + " - DEV";
            #endif

            //Use registry settings
            if (m_registryManager.m_customPathInput == "")
            {
                customPath.Text = Framework.GetCRYENGINELocation();
            }
            else
            {
                customPath.Text = m_registryManager.m_customPathInput;
            }

            m_customSlotData = CRegistryManager.GetCustomSlots();
            SetCustomSlots();

            this.Text = APP_TITLE_NAME;

            Framework.Log(APP_TITLE_NAME + " ready!");
        }