Example #1
0
 private void FormDA_Load(object sender, EventArgs e)
 {
     FormSettings.LoadFontSettingForUI(this);
     Callback           = _DACALLBACK;
     CallbackPtr        = Marshal.GetFunctionPointerForDelegate(Callback);
     textBoxDesize.Text = "000000FF";
 }
Example #2
0
        private void FormSetAffinity_Load(object sender, EventArgs e)
        {
            FormSettings.LoadFontSettingForUI(this);
            if (currentPid > 4 && currentHProcess != IntPtr.Zero)
            {
                if (systemAffinityMask == 0)
                {
                    MGetSystemAffinityMask(ref systemAffinityMask);
                }
                if (systemAffinityMask == 0)
                {
                    goto Error;
                }

                UInt32 affinityMask = 0;
                int    ntstatus     = MGetProcessAffinityMask(currentHProcess, ref affinityMask);
                if (ntstatus == 0 && affinityMask != 0)
                {
                    for (int i = 0; i < 8 * 8; i++)
                    {
                        if ((i < sizeof(UInt32) * 8) && ((systemAffinityMask >> i) & 0x1) == 0x1)
                        {
                            if (((affinityMask >> i) & 0x1) == 0x1)
                            {
                                AddCpuItem(i);
                                CheckCpuItem(i);
                            }
                        }
                    }
                }
                else
                {
                    lbError.Text += "\nNTSTATUS : " + MNtStatusToStr(ntstatus);
                    goto Error;
                }
            }

            lbTip.Text = Lanuages.LanuageMgr.GetStr("AllowWhatCpusToRun") + "\"" + MAppGetCurSelectName() + "\"?";

            return;

Error:
            {
                lbError.Show();
                lbTip.Hide();
                listItems.Hide();
                btnOk.Enabled = false;
            }
        }
Example #3
0
 private void FormMainListHeaders_Load(object sender, EventArgs e)
 {
     FormSettings.LoadFontSettingForUI(this);
     Add("TitleProcName", 170);
     Add("TitleType", 100);
     Add("TitlePublisher", 100);
     Add("TitleStatus", 70);
     Add("TitlePID", 50);
     Add("TitleCPU", 75);
     Add("TitleRam", 75);
     Add("TitleDisk", 75);
     Add("TitleNet", 75);
     Add("TitleProcPath", 240);
     Add("TitleCmdLine", 200);
     Add("TitleEProcess", 100);
     //DialogResult = DialogResult.Cancel;
 }
Example #4
0
        private void FormKDbgPrint_Load(object sender, EventArgs e)
        {
            FormSettings.LoadFontSettingForUI(this);
            string set = GetConfig("DbgPrintViewPosSize", "AppSetting", "");

            if (set != "" && set.Contains("#"))
            {
                string[] vals = set.Split('#');
                if (vals.Length == 4)
                {
                    try
                    {
                        int x = int.Parse(vals[0]),
                            y = int.Parse(vals[1]);
                        if (x > 0 && x < Screen.PrimaryScreen.Bounds.Width - 200)
                        {
                            Left = x;
                        }
                        if (y > 0 && y < Screen.PrimaryScreen.Bounds.Height - 100)
                        {
                            Top = y;
                        }
                    }
                    catch
                    {
                    }
                    try
                    {
                        int w = int.Parse(vals[2]), h = int.Parse(vals[3]);
                        if (w > 0 && w + Left < Screen.PrimaryScreen.Bounds.Width)
                        {
                            Width = w;
                        }
                        if (h > 0 && h + Top < Screen.PrimaryScreen.Bounds.Height)
                        {
                            Height = h;
                        }
                    }
                    catch { }
                }
            }
        }
Example #5
0
 private void FormDetalsistHeaders_Load(object sender, EventArgs e)
 {
     FormSettings.LoadFontSettingForUI(this);
     NativeMethods.MAppWorkCall3(182, listItems.Handle, IntPtr.Zero);
     foreach (string s in formMain.allCols)
     {
         ListViewItem item = new ListViewItem();
         item.Name = s;
         item.Text = Lanuages.LanuageMgr.GetStr(s);
         if (formMain.ProcessListDetailsGetListIndex(s) != -1)
         {
             item.Tag     = "OldShow";
             item.Checked = true;
         }
         else
         {
             item.Tag = "NewShow";
         }
         listItems.Items.Add(item);
     }
 }
Example #6
0
        private void FormSpyWindow_Load(object sender, EventArgs e)
        {
            FormSettings.LoadFontSettingForUI(this);

            #region Datas
            m_dic_style = new Dictionary <uint, string>();
            m_dic_style.Add(0x00000000, "WS_OVERLAPPED");
            m_dic_style.Add(0x80000000, "WS_POPUP");
            m_dic_style.Add(0x40000000, "WS_CHILD");
            m_dic_style.Add(0x20000000, "WS_MINIMIZE");
            m_dic_style.Add(0x10000000, "WS_VISIBLE");
            m_dic_style.Add(0x08000000, "WS_DISABLED");
            m_dic_style.Add(0x04000000, "WS_CLIPSIBLINGS");
            m_dic_style.Add(0x02000000, "WS_CLIPCHILDREN");
            m_dic_style.Add(0x01000000, "WS_MAXIMIZE");
            m_dic_style.Add(0x00800000, "WS_BORDER");
            m_dic_style.Add(0x00400000, "WS_DLGFRAME");
            m_dic_style.Add(0x00200000, "WS_VSCROLL");
            m_dic_style.Add(0x00100000, "WS_HSCROLL");
            m_dic_style.Add(0x00080000, "WS_SYSMENU");
            m_dic_style.Add(0x00040000, "WS_THICKFRAME");
            m_dic_style.Add(0x00020000, "WS_GROUP|WS_MINIMIZEBOX");
            m_dic_style.Add(0x00010000, "WS_TABSTOP|WS_MAXIMIZEBOX");
            m_dic_exstyle = new Dictionary <uint, string>();
            m_dic_exstyle.Add(0x00000001, "WS_EX_DLGMODALFRAME");
            m_dic_exstyle.Add(0x00000004, "WS_EX_NOPARENTNOTIFY");
            m_dic_exstyle.Add(0x00000008, "WS_EX_TOPMOST");
            m_dic_exstyle.Add(0x00000010, "WS_EX_ACCEPTFILES");
            m_dic_exstyle.Add(0x00000020, "WS_EX_TRANSPARENT");
            m_dic_exstyle.Add(0x00000040, "WS_EX_MDICHILD");
            m_dic_exstyle.Add(0x00000080, "WS_EX_TOOLWINDOW");
            m_dic_exstyle.Add(0x00000100, "WS_EX_WINDOWEDGE");
            m_dic_exstyle.Add(0x00000200, "WS_EX_CLIENTEDGE|WS_EX_RTLREADING");
            m_dic_exstyle.Add(0x00000400, "WS_EX_CONTEXTHELP");
            m_dic_exstyle.Add(0x00001000, "WS_EX_RIGHT");
            m_dic_exstyle.Add(0x00000000, "WS_EX_LEFT|WS_EX_LTRREADING|WS_EX_RIGHTSCROLLBAR");
            m_dic_exstyle.Add(0x00004000, "WS_EX_LEFTSCROLLBAR");
            m_dic_exstyle.Add(0x00010000, "WS_EX_CONTROLPARENT");
            m_dic_exstyle.Add(0x00020000, "WS_EX_STATICEDGE");
            m_dic_exstyle.Add(0x00040000, "WS_EX_APPWINDOW");
            m_dic_exstyle.Add(0x00080000, "WS_EX_LAYERED");
            m_dic_exstyle.Add(0x00100000, "WS_EX_NOINHERITLAYOUT");
            m_dic_exstyle.Add(0x00200000, "WS_EX_NOREDIRECTIONBITMAP");
            m_dic_exstyle.Add(0x00400000, "WS_EX_LAYOUTRTL");
            m_dic_exstyle.Add(0x02000000, "WS_EX_COMPOSITED");
            m_dic_exstyle.Add(0x08000000, "WS_EX_NOACTIVATE");
            #endregion

            mainImageList.ImageSize        = new Size(16, 16);
            mainImageList.ColorDepth       = ColorDepth.Depth32Bit;
            mainImageList.TransparentColor = Color.FromArgb(255, 0, 255);

            #region LoadIcon
            int i = 0;
            mainImageList.Images.Add(PCMgr.Properties.Resources.icoShowedWindow);
            mainImageList.Images.Add(PCMgr.Properties.Resources.icoHidedWindow);
            i++;//1
            mainImageList.Images.Add(PCMgr.Properties.Resources.icoWins);
            i++;
            mainImageList.Images.Add(PCMgr.Properties.Resources.System_Windows_Forms_CheckBox);
            i++;
            mainImageList.Images.Add(PCMgr.Properties.Resources.System_Windows_Forms_RadioButton);
            i++;
            mainImageList.Images.Add(PCMgr.Properties.Resources.System_Windows_Forms_PictureBox);
            i++;
            mainImageList.Images.Add(PCMgr.Properties.Resources.System_Windows_Forms_Button);
            i++;
            mainImageList.Images.SetKeyName(i, "button");
            mainImageList.Images.Add(PCMgr.Properties.Resources.System_Windows_Forms_ComboBox);
            i++;
            mainImageList.Images.SetKeyName(i, "combobox");
            mainImageList.Images.Add(PCMgr.Properties.Resources.System_Windows_Forms_TextBox);
            i++;
            mainImageList.Images.SetKeyName(i, "edit");
            mainImageList.Images.Add(PCMgr.Properties.Resources.System_Windows_Forms_Form);
            i++;
            mainImageList.Images.SetKeyName(i, "none");
            mainImageList.Images.Add(PCMgr.Properties.Resources.System_Windows_Forms_ProgressBar);
            i++;
            mainImageList.Images.SetKeyName(i, "progress");
            mainImageList.Images.Add(PCMgr.Properties.Resources.System_Windows_Forms_RichTextBox);
            i++;
            mainImageList.Images.SetKeyName(i, "richedit");
            mainImageList.Images.Add(PCMgr.Properties.Resources.System_Windows_Forms_VScrollBar);
            i++;
            mainImageList.Images.SetKeyName(i, "scrollbar");
            mainImageList.Images.Add(PCMgr.Properties.Resources.System_Windows_Forms_Label);
            i++;
            mainImageList.Images.SetKeyName(i, "static");
            mainImageList.Images.Add(PCMgr.Properties.Resources.System_Windows_Forms_StatusStrip);
            i++;
            mainImageList.Images.SetKeyName(i, "statusbar");
            mainImageList.Images.Add(PCMgr.Properties.Resources.System_Windows_Forms_DateTimePicker);
            i++;
            mainImageList.Images.SetKeyName(i, "sysdatetimepick32");
            mainImageList.Images.Add(PCMgr.Properties.Resources.System_Windows_Forms_LinkLabel);
            i++;
            mainImageList.Images.SetKeyName(i, "syslink");
            mainImageList.Images.Add(PCMgr.Properties.Resources.System_Windows_Forms_ListView);
            i++;//15
            mainImageList.Images.SetKeyName(i, "listview");
            mainImageList.Images.Add(PCMgr.Properties.Resources.System_Windows_Forms_TabControl);
            i++;
            mainImageList.Images.SetKeyName(i, "systabcontrol32");
            mainImageList.Images.Add(PCMgr.Properties.Resources.System_Windows_Forms_TreeView);
            i++;
            mainImageList.Images.SetKeyName(i, "systreeview32");
            mainImageList.Images.Add(PCMgr.Properties.Resources.System_Windows_Forms_ToolBar);
            i++;
            mainImageList.Images.SetKeyName(i, "toolbar");
            mainImageList.Images.Add(PCMgr.Properties.Resources.System_Windows_Forms_TrackBar);
            i++;
            mainImageList.Images.SetKeyName(i, "trackbar");
            mainImageList.Images.Add(PCMgr.Properties.Resources.System_Windows_Forms_Form);
            i++;
            mainImageList.Images.SetKeyName(i, "window");
            #endregion

            treeViewMain.ImageList = mainImageList;
            m_byTextBuffer         = new byte[256];
            LoadChildWindows();
        }
Example #7
0
 private void FormLoadDriver_Load(object sender, EventArgs e)
 {
     FormSettings.LoadFontSettingForUI(this);
 }