public MainWindow()
        {
            InitializeComponent();

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

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

            this.Text = APP_TITLE_NAME;
            #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;

            showCryTif.Checked = m_registryManager.m_useCryTifDialog;

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

            Framework.Log(APP_TITLE_NAME + " ready!");
        }
        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
        }
示例#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++;
            }
        }
示例#4
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
        }
示例#5
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;
            }
        }
示例#6
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!");
        }
示例#7
0
        private void LinkTitle_Leave(object sender, EventArgs e)
        {
            CRegistryManager.SaveCustomSlot(m_currentId, LinkTitle.Text, LinkPath.Text, LinkArgs.Text);

            if (linksListBox.SelectedIndex != -1)
            {
                if (LinkTitle.Text != null && LinkTitle.Text != "")
                {
                    linksListBox.Items[linksListBox.SelectedIndex] = LinkTitle.Text;
                }
                else
                {
                    linksListBox.Items[linksListBox.SelectedIndex] = "Custom link " + m_currentId.ToString();
                }
            }
        }
        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;
            }
        }
示例#9
0
 private void LinkArgs_Leave(object sender, EventArgs e)
 {
     CRegistryManager.SaveCustomSlot(m_currentId, LinkTitle.Text, LinkPath.Text, LinkArgs.Text);
 }
        //Clipboard functions
        private void MainWindow_Activated(object sender, EventArgs e)
        {
            if (Clipboard.ContainsImage())
            {
                Framework.Log("Image in clipboard: saving in memory");

                m_clipboardImage = (Image)Clipboard.GetDataObject().GetData(DataFormats.Bitmap, true);

                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;
            }
        }
示例#11
0
 //Save settings on app close
 private void MainWindow_FormClosing(object sender, FormClosingEventArgs e)
 {
     CRegistryManager.SaveAllSettings(customPath.Text);
 }