Exemple #1
0
        internal DebugHelpers(VoicepackCombiner VoicepackCombiner)
        {
            _voicepackCombiner = VoicepackCombiner;

            ShowCmdConsoleWindow();
            SetDebugOutputToConsole();
        }
        public VoicepackCombinerForm(VoicepackCombiner voicepackCombiner)
        {
            InitializeComponent();
            base.Initialize();

            _voicepackCombiner = voicepackCombiner;

            // Custom renderer for displaying gradients and background color.
            menuStrip1.Renderer = new CustomToolStripRenderer();

            this.RoundedEdges = true;

            listBoxVoicepacks.DataSource    = _voicepackCombiner.VoicepacksFilesToCombine;
            listBoxVoicepacks.DisplayMember = "Name";
            listBoxVoicepacks.ItemHeight    = 17;
            listBoxVoicepacks.DrawMode      = System.Windows.Forms.DrawMode.OwnerDrawFixed;
            listBoxVoicepacks.DrawItem     += new DrawItemEventHandler(listBox_DrawItem);
            listBoxVoicepacks.DragEnter    += new DragEventHandler(listBox_DragEntered);
            listBoxVoicepacks.DragDrop     += new DragEventHandler(listBox_DragDropped);

            //Need to add an updatemethod: otherwise the bound data is only updated when windows is closed.. (now it is updated when property changes, and when windows closes)
            checkBoxEnableCombinedVoicepack.DataBindings.Add("Checked", _voicepackCombiner, "UseCombinedVoicepack", true, DataSourceUpdateMode.OnPropertyChanged);
            _voicepackCombiner.VoicepacksFilesToCombine.ListChanged += VoicepackFiles_ListChanged;
            UpdateGUIVoicepackListIsEmpty();

            //Check if the global voicepack has changed since last time the UI was open
            _voicepackCombiner.CheckCombinedVoicepackIsStillGlobal();
            //Do the check every few seconds while UI is open so it gets updated
            pollGlobalVoicepackTimer          = new System.Timers.Timer(5000);
            pollGlobalVoicepackTimer.Elapsed += PollGlobalVoicepackChangedTimerElapsed;
            pollGlobalVoicepackTimer.Start();

            VoicepackCombinerFormTooltips.SetToolTip(listBoxVoicepacks, "Testing tooltips");
        }
        /// <summary>
        /// Creates and adds the voicepack combiner menu items as children to parentItemName
        /// </summary>
        public VoicepackCombinerMenuItems(string parentItemName,
                                          VoicepackCombiner voicepackCombiner,
                                          VoicepackCombinerForm voicepackCombinerForm,
                                          GUIMain mainForm)
        {
            _voicepackCombiner     = voicepackCombiner;
            _voicepackCombinerForm = voicepackCombinerForm;
            _mainForm = mainForm;

            CreateVoicepackCombinerSubMenu();
            AddVoicepackCombinerSubMenuToParent(parentItemName);

            UpdateGUIVoicepackListIsEmpty();
        }
        public DebugForm(VoicepackCombiner voicepackCombiner)
        {
            InitializeComponent();

            _voicepackCombiner = voicepackCombiner;
        }