Esempio n. 1
0
        private void MainForm_Shown(object sender, EventArgs e)
        {
            this.Text = this.Text + " V" + Assembly.GetExecutingAssembly().GetName().Version.ToString();

            DockPanel = this.dockPanel1;

            _frmDatabase             = new DatabaseForm();
            _frmDatabase.OutputCode += new Action <Database>(frmDatabase_OutputCode);
            _frmDatabase.CreateCode += new Action <Table>(frmDatabase_CreateCode);
            _frmDatabase.DataInfo   += new Action <Database, Table>(frmDatabase_DataInfo);
            _frmDatabase.Show(DockPanel);

            FrmDebug = new DebugForm();
            FrmDebug.Show(DockPanel);


            _frmTemplate = new TemplateForm();
            _frmTemplate.TemplateChanged += new Action(frmTemplate_TemplateChanged);
            _frmTemplate.Show(DockPanel);



            BackgroundWorker bw = new BackgroundWorker();

            bw.DoWork             += new DoWorkEventHandler(bw_DoWork);
            bw.RunWorkerCompleted += new RunWorkerCompletedEventHandler(bw_RunWorkerCompleted);



            bw.RunWorkerAsync();

            OpenUrl(SqlConfig.HomeUrl);
        }
Esempio n. 2
0
        // Tile debug forms
        private void ToolStripMenuItem_File_Debug_Tile_Click(object sender, EventArgs e)
        {
            int iX = this.Left + this.Width;
            int iY = this.Top;

            if (iX > Screen.PrimaryScreen.Bounds.Width)
            {
                iX = 0;
            }
            if (iY > Screen.PrimaryScreen.Bounds.Height)
            {
                iY = 0;
            }

            foreach (RSMPGS_Debug DebugForm in RSMPGS.DebugForms)
            {
                DebugForm.WindowState = FormWindowState.Normal;
                DebugForm.Left        = iX;
                DebugForm.Top         = iY;
                DebugForm.Width       = 500;
                DebugForm.Height      = 500;
                DebugForm.BringToFront();
                iX += 50;
                iY += 50;
            }
        }
Esempio n. 3
0
        private void DebugButton_Click(object sender, EventArgs e)
        {
            DebugForm f = new DebugForm();

            f.Setup();
            f.Show(this.ParentForm);
        }
Esempio n. 4
0
 internal void ShowDebugForm()
 {
     if (_debugForm == null || !_debugForm.Visible)
     {
         _debugForm = new DebugForm(_voicepackCombiner);
         _debugForm.Show();
     }
 }
Esempio n. 5
0
 public void Open()
 {
     if (_form == null)
     {
         _form = new DebugForm(this);
         _form.Show();
         _form.ShowCommands(_commands);
     }
 }
Esempio n. 6
0
        public NVelocityLanguage()
        {
            #region Colorable Items

            _colorableItems = new ColorableItem[] {
                // NVText
                new ColorableItem("NVelocity – Text", "NVelocity – Text", COLORINDEX.CI_SYSPLAINTEXT_FG, COLORINDEX.CI_USERTEXT_BK, Color.Empty, Color.Empty, FONTFLAGS.FF_DEFAULT),
                // NVKeyword
                new ColorableItem("NVelocity – Keyword", "NVelocity – Keyword", COLORINDEX.CI_BLUE, COLORINDEX.CI_USERTEXT_BK, Color.Empty, Color.Empty, FONTFLAGS.FF_BOLD),
                // NVComment
                new ColorableItem("NVelocity – Comment", "NVelocity – Comment", COLORINDEX.CI_DARKGREEN, COLORINDEX.CI_USERTEXT_BK, Color.Empty, Color.Empty, FONTFLAGS.FF_DEFAULT),
                // NVIdentifier
                new ColorableItem("NVelocity – Identifier", "NVelocity – Identifier", COLORINDEX.CI_PURPLE, COLORINDEX.CI_USERTEXT_BK, Color.Empty, Color.Empty, FONTFLAGS.FF_DEFAULT),
                // NVString
                new ColorableItem("NVelocity – String", "NVelocity – String", COLORINDEX.CI_MAROON, COLORINDEX.CI_USERTEXT_BK, Color.Empty, Color.Empty, FONTFLAGS.FF_DEFAULT),
                // NVNumber
                new ColorableItem("NVelocity – Number", "NVelocity – Number", COLORINDEX.CI_SYSPLAINTEXT_FG, COLORINDEX.CI_USERTEXT_BK, Color.Empty, Color.Empty, FONTFLAGS.FF_DEFAULT),
                // NVDirective
                new ColorableItem("NVelocity – Directive", "NVelocity – Directive", COLORINDEX.CI_BLUE, COLORINDEX.CI_USERTEXT_BK, Color.Empty, Color.Empty, FONTFLAGS.FF_BOLD),
                // NVOperator
                new ColorableItem("NVelocity – Operator", "NVelocity – Operator", COLORINDEX.CI_SYSPLAINTEXT_FG, COLORINDEX.CI_USERTEXT_BK, Color.Empty, Color.Empty, FONTFLAGS.FF_DEFAULT),
                // NVBracket
                new ColorableItem("NVelocity – Bracket", "NVelocity – Bracket", COLORINDEX.CI_SYSPLAINTEXT_FG, COLORINDEX.CI_USERTEXT_BK, Color.Empty, Color.Empty, FONTFLAGS.FF_DEFAULT),
                // NVDictionaryDelimiter
                new ColorableItem("NVelocity – Dictionary Delimiter", "NVelocity – Dictionary Delimiter", COLORINDEX.CI_PURPLE, COLORINDEX.CI_USERTEXT_BK, Color.Empty, Color.Empty, FONTFLAGS.FF_DEFAULT),
                // NVDictionaryKey
                new ColorableItem("NVelocity – Dictionary Key", "NVelocity – Dictionary Key", COLORINDEX.CI_RED, COLORINDEX.CI_USERTEXT_BK, Color.Empty, Color.Empty, FONTFLAGS.FF_DEFAULT),
                // NVDictionaryEquals
                new ColorableItem("NVelocity – Dictionary Equals", "NVelocity – Dictionary Equals", COLORINDEX.CI_BLUE, COLORINDEX.CI_USERTEXT_BK, Color.Empty, Color.Empty, FONTFLAGS.FF_DEFAULT),
                // XmlText
                new ColorableItem("NVelocity – XML Text", "NVelocity – XML Text", COLORINDEX.CI_SYSPLAINTEXT_FG, COLORINDEX.CI_USERTEXT_BK, Color.Empty, Color.Empty, FONTFLAGS.FF_DEFAULT),
                // XmlComment
                new ColorableItem("NVelocity – XML Comment", "NVelocity – XML Comment", COLORINDEX.CI_DARKGREEN, COLORINDEX.CI_USERTEXT_BK, Color.Empty, Color.Empty, FONTFLAGS.FF_DEFAULT),
                // XmlTagName
                new ColorableItem("NVelocity – XML Tag Name", "NVelocity – XML Tag Name", COLORINDEX.CI_MAROON, COLORINDEX.CI_USERTEXT_BK, Color.Empty, Color.Empty, FONTFLAGS.FF_DEFAULT),
                // XmlAttributeName
                new ColorableItem("NVelocity – XML Attribute Name", "NVelocity – XML Attribute Name", COLORINDEX.CI_RED, COLORINDEX.CI_USERTEXT_BK, Color.Empty, Color.Empty, FONTFLAGS.FF_DEFAULT),
                // XmlAttributeValue
                new ColorableItem("NVelocity – XML Attribute Value", "NVelocity – XML Attribute Value", COLORINDEX.CI_BLUE, COLORINDEX.CI_USERTEXT_BK, Color.Empty, Color.Empty, FONTFLAGS.FF_DEFAULT),
                // XmlTagDelimiter
                new ColorableItem("NVelocity – XML Tag Delimiter", "NVelocity – XML Tag Delimiter", COLORINDEX.CI_BLUE, COLORINDEX.CI_USERTEXT_BK, Color.Empty, Color.Empty, FONTFLAGS.FF_DEFAULT),
                // XmlOperator
                new ColorableItem("NVelocity – XML Operator", "NVelocity – XML Operator", COLORINDEX.CI_BLUE, COLORINDEX.CI_USERTEXT_BK, Color.Empty, Color.Empty, FONTFLAGS.FF_DEFAULT),
                // XmlEntity
                new ColorableItem("NVelocity – XML Entity", "NVelocity – XML Entity", COLORINDEX.CI_RED, COLORINDEX.CI_USERTEXT_BK, Color.Empty, Color.Empty, FONTFLAGS.FF_DEFAULT),
                // XmlCDataSection
                new ColorableItem("NVelocity – XML CData Section", "NVelocity – XML CData Section", COLORINDEX.CI_DARKGRAY, COLORINDEX.CI_USERTEXT_BK, Color.Empty, Color.Empty, FONTFLAGS.FF_DEFAULT)
                // XmlProcessingInstruction
                // ===== not done
            };
            #endregion

#if DEBUG
            _debugForm = new DebugForm();
            _debugForm.Show();
#endif
        }
Esempio n. 7
0
        public IEnumerable <string> ListNoxInstances()
        {
            if (!IsNoxInstalled())
            {
                return(null);
            }

            var matchingFiles = Directory.GetFiles(NoxDirectory + @"\BignoxVMS", "*.vbox", SearchOption.AllDirectories);


            NoxInstances = new Dictionary <string, string>();
            foreach (var file in matchingFiles)
            {
                var hostIp   = "";
                var hostPort = "";
                foreach (var line in File.ReadLines(file))
                {
                    if (!line.Contains("guestport=\"5555\"/>"))
                    {
                        continue;
                    }

                    var i = 0;
                    foreach (var value in Regex.Matches(line, "\\\"(.*?)\\\""))
                    {
                        switch (i)
                        {
                        case 2:
                            hostIp = value.ToString().Trim('"');
                            break;

                        case 3:
                            hostPort = value.ToString().Trim('"');
                            break;
                        }

                        i++;
                    }
                    break;
                }

                var instancePathInt = file.LastIndexOf('\\');
                var instanceFile    = file.Substring(instancePathInt + 1);
                var instanceNameInt = instanceFile.LastIndexOf('.');
                var instanceName    = instanceFile.Substring(0, instanceNameInt);

                DebugForm.WarningLog(instanceName + " Host: " + hostIp + " Port: " + hostPort);

                NoxInstances.Add(instanceName, hostIp + ":" + hostPort);
            }

            var instances = (from item in matchingFiles let instancePathInt = item.LastIndexOf('\\') select item.Substring(instancePathInt + 1) into instanceFile let instanceFileInt = instanceFile.LastIndexOf('.') select instanceFile.Substring(0, instanceFileInt)).ToList();

            return(instances);
        }
Esempio n. 8
0
 public void AboutDialog()
 {
     try
     {
         var about = new DebugForm(VisualStudio, Version, this);
         about.ShowDialog();
     }
     catch (Exception e)
     {
         Log.Error("AboutDialog failed", e);
     }
 }
Esempio n. 9
0
        public bool InstanceAlreadyRunning(string instanceName)
        {
            foreach (var process in Process.GetProcessesByName("Nox"))
            {
                DebugForm.Log("Opened Nox Instance: \n" + GetCommandLine(process));
                return(GetCommandLine(process).Contains(instanceName));
            }

            DebugForm.ErrorLog(instanceName + " is not running!");

            return(false);
        }
Esempio n. 10
0
        private void btnDebug_Click(object sender, EventArgs e)
        {
            DebugForm debugDialog = new DebugForm();

            debugDialog.LogLevel         = LogLevel;
            debugDialog.LogFilePath      = LogFilePath;
            debugDialog.DataMartClientId = DataMartClientId;
            if (debugDialog.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                LogLevel    = debugDialog.LogLevel;
                LogFilePath = debugDialog.LogFilePath;
            }
        }
Esempio n. 11
0
 /// Открывает форму, если она закрыта или закрывает, если открыта
 public void ChangeFormState()
 {
     if (_form == null)
     {
         _form = new DebugForm(this);
         _form.Show();
         _form.ShowCommands(_commands);
     }
     else
     {
         _form.Close();
     }
 }
Esempio n. 12
0
        //
        // View all forms
        //
        private void RSMPGS_Main_Shown(object sender, EventArgs e)
        {
            if (bLoadFailed)
            {
                return;
            }

            foreach (RSMPGS_Debug DebugForm in RSMPGS.DebugForms)
            {
                DebugForm.Show();
                DebugForm.BringToFront();
            }
        }
Esempio n. 13
0
        public static Bitmap CaptureDWM()
        {
            if (thumb != IntPtr.Zero)
            {
                DwmUnregisterThumbnail(thumb);
            }

            int windowWidth;

            if (DebugForm.WindowRect.X > DebugForm.WindowRect.Width)
            {
                windowWidth = DebugForm.WindowRect.X - DebugForm.WindowRect.Width;
            }
            else
            {
                windowWidth = DebugForm.WindowRect.Width - DebugForm.WindowRect.X;
            }
            var windowHeight = DebugForm.WindowRect.Height - DebugForm.WindowRect.Y;

            var dwmCaptureForm = new Form
            {
                Text    = "DWM Capture Window",
                Width   = windowWidth + 15,
                Height  = windowHeight + 32,
                Left    = 0,
                Top     = 0,
                TopMost = true
            };

            dwmCaptureForm.Show();

            int i = DwmRegisterThumbnail(dwmCaptureForm.Handle, DebugForm.WindowHandle, out thumb);

            if (i == 0)
            {
                DWMFunctions.UpdateThumb();
            }

            DebugForm.GetWindowRect(dwmCaptureForm.Handle, out var dwmCapRectangle);

            var dwmCapture = new CaptureImage().CaptureFromScreen(dwmCapRectangle);

            DebugForm.DebugPictureBox.Invoke(
                new MethodInvoker(delegate { DebugForm.DebugPictureBox.Image = dwmCapture; }));

            DwmUnregisterThumbnail(thumb);
            dwmCaptureForm.Close();

            return(dwmCapture);
        }
Esempio n. 14
0
 private void RawButton_Click(object sender, EventArgs e)
 {
     try
     {
         using (DebugForm debugForm = new DebugForm(Master, devno, TargetSensor))
         {
             debugForm.ShowInTaskbar = false;
             debugForm.StartPosition = FormStartPosition.CenterParent;
             debugForm.ShowDialog(this);
         }
     }
     catch
     {
     }
 }
Esempio n. 15
0
 public void AddRawDebugData(bool bNewPacket, int iDirection, bool bForceHexCode, byte[] bBuffer, int iOffset, int iBufferLength)
 {
     lock (this)
     {
         foreach (RSMPGS_Debug DebugForm in RSMPGS.DebugForms)
         {
             try
             {
                 DebugForm.AddRawDebugDataMethod(DateTime.Now, bNewPacket, iDirection, bForceHexCode, bBuffer, iOffset, iBufferLength);
                 //DebugForm.BeginInvoke(DebugForm.DelegateAddRawDebugData, new Object[] { DateTime.Now, bNewPacket, iDirection, bForceHexCode, bBuffer, iOffset, iBufferLength });
             }
             catch { }
         }
     }
 }
Esempio n. 16
0
 public void AddJSonDebugData(int iDirection, string sPacketType, string sDebugData)
 {
     lock (this)
     {
         foreach (RSMPGS_Debug DebugForm in RSMPGS.DebugForms)
         {
             try
             {
                 DebugForm.AddJSonDebugDataMethod(DateTime.Now, iDirection, sPacketType, sDebugData);
                 //DebugForm.BeginInvoke(DebugForm.DelegateAddJSonDebugData, new Object[] { DateTime.Now, iDirection, sPacketType, sDebugData });
             }
             catch { }
         }
     }
 }
Esempio n. 17
0
 private void DebugToolStripMenuItem_Click(object sender, EventArgs e)
 {
     //启动调试界面
     if (debugForm.IsDisposed != true)
     {
         debugForm.Show();  //弹出这个窗口
         debugForm.Focus(); //激活显示
     }
     else
     {
         debugForm = new DebugForm();
         debugForm.Show();  //弹出这个窗口
         debugForm.Focus(); //激活显示
     }
 }
Esempio n. 18
0
        private void WaitForEmulator()
        {
            while (true)
            {
                var adbProcessOutput = new ADB().RunADB("shell getprop dev.bootcomplete");

                if (adbProcessOutput.Equals("1\r\r\n"))
                {
                    DebugForm.WarningLog(adbProcessOutput);
                    break;
                }

                Thread.Sleep(500);
            }
        }
Esempio n. 19
0
        /// <summary>
        /// Custom cleanup code for anything not part of baseclient class.
        /// </summary>
        protected override void Cleanup()
        {
            base.Cleanup();

            if (DebugForm != null)
            {
                DebugForm.Close();
                DebugForm = null;
            }

            if (MainForm != null)
            {
                MainForm.Close();
                MainForm = null;
            }
        }
Esempio n. 20
0
        public static void OpenDebugLog()
        {
            DebugForm form = DebugForm.GetFormInstance(DebugHelper.Logger);

            if (!form.HasUploadRequested)
            {
                form.UploadRequested += text =>
                {
                    //if (MessageBox.Show(form, Resources.MainForm_UploadDebugLogWarning, "ShareX", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.Yes)
                    //{
                    //    UploadManager.UploadText(text);
                    //}
                };
            }

            form.ForceActivate();
        }
Esempio n. 21
0
        public Bitmap ADBScreenshot()
        {
            var timer = new Stopwatch();
            timer.Start();
            var debug = RunADB("shell screencap -p /mnt/shared/Image/ADBCapture_" + DebugForm.SelectedEmuInstance.Text + ".png");
            DebugForm.Log(debug);

            timer.Stop();
            DebugForm.WarningLog("ADB Screencap done after " + timer.ElapsedMilliseconds + "ms!");
            
            Bitmap tempBitmap;
            using(var image = new Bitmap(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile) + @"\Nox_share\Image\ADBCapture_" + DebugForm.SelectedEmuInstance.Text + ".png"))
            {
                tempBitmap = new Bitmap(image);
            }
            
            return tempBitmap;
        }
Esempio n. 22
0
    void LoadForms()
    {
        debugForm         = new DebugForm();
        debugForm.Visible = false;

        layerForm         = new LayerFormAdv();
        layerForm.Visible = false;

        textureForm         = new TextureForm();
        textureForm.Visible = false;

        meshDesigner         = new MeshDesigner();
        meshDesigner.Visible = false;

        outlinerForm         = new OutlinerForm();
        outlinerForm.Visible = false;

        tilePicker = meshDesigner.TilePicker;
    }
Esempio n. 23
0
        public Game1()
        {
            graphics = new GraphicsDeviceManager(this);
            Content.RootDirectory = "Content";

            graphics.PreferredBackBufferWidth  = 640;
            graphics.PreferredBackBufferHeight = 320;
            graphics.ApplyChanges();

            Window.AllowUserResizing = true;

            for (int i = 0; i < 16; i++)
            {
                Keys[i] = false;
            }

            chip8 = new CPU();
            dbg   = new DebugForm(chip8);
            dbg.Show();
        }
Esempio n. 24
0
        public ExampleClient()
            : base()
        {
            // Initialize the DebugForm
            DebugForm = new DebugForm();
            DebugForm.DataController    = Data;
            DebugForm.ResourceManager   = ResourceManager;
            DebugForm.PacketSend       += DebugForm_PacketSend;
            DebugForm.PacketLogChanged += DebugForm_PacketLogChanged;
            DebugForm.Closed           += DebugForm_Closed;
            DebugForm.Show();

            // Initialize the MainForm
            MainForm = new MainForm();
            MainForm.LoginControl.ConnectRequest    += LoginControl_ConnectRequest;
            MainForm.LoginControl.DisconnectRequest += LoginControl_DisconnectRequest;
            MainForm.Closed += MainForm_Closed;
            MainForm.ButtonSelectCharacter.Click += ButtonSelectCharacter_Click;
            MainForm.Show();
        }
Esempio n. 25
0
        public static void Main(string[] args)
        {
            DebugForm debugWindow = new DebugForm();

            WordGraph graph = new WordGraph();

            ImportXml.XmlToWordGraph("vocals.xml", out graph);

            List <Vocable> vocs = graph.getContent();

            foreach (Vocable v in vocs)
            {
                System.Console.WriteLine(v);
            }

            debugWindow.ShowItems(vocs);


            Application.EnableVisualStyles();
            Application.Run(debugWindow);
        }
Esempio n. 26
0
            internal static void RefreshLogForm(string log, bool openForm)
            {
                DebugForm debugForm = null;

                if (Helpers.TryGetForm(out debugForm))
                {
                    debugForm.TextBoxDebug.Text           = log;
                    debugForm.TextBoxDebug.SelectionStart = debugForm.TextBoxDebug.Text.Length;
                    debugForm.TextBoxDebug.ScrollToCaret();
                    debugForm.TextBoxDebug.Refresh();
                    debugForm.Activate();
                }
                else if (openForm)
                {
                    debugForm = new DebugForm();
                    debugForm.TextBoxDebug.Text           = log;
                    debugForm.TextBoxDebug.SelectionStart = debugForm.TextBoxDebug.Text.Length;
                    debugForm.TextBoxDebug.ScrollToCaret();
                    debugForm.TextBoxDebug.Refresh();
                    debugForm.Show();
                }
            }
Esempio n. 27
0
            public void Update()
            {
                if (InActualRpm <= 0.0)
                {
                    OutGain = MinimumGain;
                    return;
                }

                if (InActualRpm >= MaximumRpm)
                {
                    OutGain = 1.0;
                }
                else
                {
                    var ratio = (InTargetRpm - InActualRpm) / MaximumRpm + 1.0;
                    OutGain = Math.Max(Math.Min(ratio, MaximumGain), MinimumGain);
                }


                DebugForm.SetText(DebugForm.GovernerRatio, OutGain.ToString("F3"));
                DebugForm.SetText(DebugForm.ActualRpm, InActualRpm.ToString("0000"));
                DebugForm.SetText(DebugForm.TargetRpm, InTargetRpm.ToString("0000"));
            }
Esempio n. 28
0
        public void StartNox()
        {
            if (!IsNoxInstalled())
            {
                return;
            }

            if (InstanceAlreadyRunning(DebugForm.SelectedEmuInstance.Text))
            {
                return;
            }

            var noxExePath = NoxDirectory + @"\Nox.exe";

            DebugForm.WarningLog("Found the path for NOX: " + noxExePath);

            var noxProcess = new Process();

            noxProcess = DebugForm.SelectedEmuInstance.Items.Count > 0 ? Process.Start(noxExePath, "-clone:" + DebugForm.SelectedEmuInstance.SelectedItem) : Process.Start(noxExePath);

            WaitForEmulator();

            DebugForm.WindowHandle = noxProcess.Handle;
        }
Esempio n. 29
0
        public void Break(IDebugFrame debugFrame, Stack stack)
        {
            DebugForm debugForm = new DebugForm(debugFrame, stack);

            debugForm.ShowDialog();
        }
Esempio n. 30
0
        private void Debug_Click(object sender, EventArgs e)
        {
            DebugForm form = new DebugForm();

            form.Show();
        }
Esempio n. 31
0
        private void showDebugFormToolStripButton_Click(object sender, EventArgs e)
        {
            if (cellDebugForm == null)
            {
                cellDebugForm = new DebugForm();
                cellDebugForm.Grid = grid;

                cellDebugForm.VisibleChanged += (ss, se) => showDebugFormToolStripButton.Checked = cellDebugForm.Visible;
            }
            else if(cellDebugForm.Visible)
            {
                cellDebugForm.Visible = false;
                borderDebugForm.Visible = false;
                return;
            }

            if (!cellDebugForm.Visible)
            {
                cellDebugForm.InitTabType = DebugForm.InitTab.Grid;
                cellDebugForm.Show(this);
            }

            if (borderDebugForm == null)
            {
                borderDebugForm = new DebugForm();
                borderDebugForm.Grid = grid;
            }

            if (!borderDebugForm.Visible)
            {
                borderDebugForm.InitTabType = DebugForm.InitTab.Border;
                borderDebugForm.Show(this);
            }

            if (cellDebugForm.Visible || borderDebugForm.Visible) ResetDebugFormLocation();
        }