예제 #1
0
        protected override void InitControls()
        {
            this.Width           = 400;
            this.Height          = 200;
            this.Text            = "Message";
            this.StartUpPosition = WindowsStartupPosition.CenterScreen;
            NativeLabel frameLabel = new NativeLabel
            {
                Location  = new Point(0, 0),
                Width     = this.Width,
                Height    = 110,
                BackColor = ColorTool.White
            };

            this._LblMessage = new NativeLabel
            {
                Location = new Point(80, 20),
                Width    = this.Width - 110,
                Height   = this.Height - 110,
                Text     = "Enter your text\nEnter your Text",
                //BackColor = ColorTool.Gray,
                //ForeColor = ColorTool.White,
            };
            this._LblIcon = new NativeBitmap
            {
                BitMap   = "asset\\Question.bmp",
                Location = new Point(10, this._LblMessage.Height / 2 - 25),
                Width    = 50,
                Height   = 50,
            };
            this._BnOk = new NativeButton
            {
                Location = new Point(this.Width - 30 - 80, 120),
                Width    = 80,
                Height   = 25,
                Text     = "&Ok"
            };
            this._BnOk.Clicked += Ok_Clicked;
            this._BnCancel      = new NativeButton
            {
                Location = new Point(this._BnOk.Left - 10 - 80, 120),
                Width    = 80,
                Height   = 25,
                Text     = "&Cancel"
            };

            this._BnCancel.Clicked += Cancel_Clicked;
            this.Controls.Add(frameLabel);
            this.Controls.Add(this._LblIcon);
            this.Controls.Add(this._LblMessage);
            this.Controls.Add(this._BnOk);
            this.Controls.Add(this._BnCancel);
        }
예제 #2
0
 public static bool ContainsIcon(Vector3 pos)
 {
     PeMap.ILabel pl = PeMap.LabelMgr.Instance.Find(item =>
     {
         NativeLabel l = item as NativeLabel;
         if (l != null && l.pos == pos)
         {
             return(true);
         }
         return(false);
     });
     if (pl != null)
     {
         return(true);
     }
     return(false);
 }
예제 #3
0
        protected override void InitControls()
        {
            //this.Width = 400;
            //this.Height = 400;
            this.Text     = "Test TExt";
            this.KeyDown += FormKeyDown;


            this.BackColor = CoreWindowsWrapper.Tools.ColorTool.Rgb(255, 255, 255);
            this._IpEdit   = new NativeIpAddressEdit()
            {
                Top    = 10,
                Left   = 10,
                Width  = 120,
                Height = 25
            };

            this._TestButton = new NativeButton()
            {
                Top    = 40,
                Left   = 10,
                Width  = 100,
                Height = 25,
                Text   = "TEST"
            };
            this._Label = new NativeLabel()
            {
                BackColor = CoreWindowsWrapper.Tools.ColorTool.ControlBackground,
                Top       = 80,
                Left      = 10,
                Width     = 150,
                Height    = 25,
                Font      = new Font()
                {
                    Name = "Arial", Size = 15
                }
            };

            this._TestButton.Clicked += OnTestButtonClick;
            this.Controls.Add(this._IpEdit);
            this.Controls.Add(this._TestButton);
            this.Controls.Add(this._Label);
        }
예제 #4
0
 public static void AddNativeIcon(VArtifactTown vat)
 {
     if (vat != null)
     {
         if (vat.isEmpty)
         {
             return;
         }
         if (!NativeLabel.ContainsIcon(vat.TransPos))
         {
             UnknownLabel.Remove(vat.TransPos);
             NativeLabel nl = new NativeLabel(vat);
             if (!nativeCampLabel.ContainsKey(nl.pos))
             {
                 nativeCampLabel.Add(nl.pos, nl);
             }
         }
     }
 }
예제 #5
0
        protected override void InitControls()
        {
            this.Text            = "Configuration Editor";
            this.Width           = 480;
            this.Height          = 430;
            this.IconFile        = "App.ico";
            this.StartUpPosition = WindowsStartupPosition.CenterScreen;

            int top       = 10;
            int leftLeft  = 10;
            int rightLeft = 120;


            this._ChkContextMenu = new NativeCheckBox
            {
                Location = new Point(leftLeft, top),
                Width    = 100,
                Height   = 20,
                Text     = "Context-Menu",
            };
            this._ChkContextMenu.Style |= WindowStylesConst.WS_TABSTOP;
            this._ChkDevTools           = new NativeCheckBox
            {
                Location = new Point(rightLeft, top),
                Width    = 100,
                Height   = 20,
                Text     = "Dev-Tools"
            };

            this._ChkStatusBar = new NativeCheckBox
            {
                Location = new Point(rightLeft + 110, top),
                Width    = 100,
                Height   = 20,
                Text     = "Statusbar"
            };


            this._ChkAppStatusBar = new NativeCheckBox
            {
                Location = new Point(this._ChkStatusBar.Left + this._ChkStatusBar.Width + 10, top),
                Width    = 100,
                Height   = 20,
                Text     = "App-Statusbar"
            };

            top += 30;
            NativeLabel lblTitle = new NativeLabel
            {
                Location  = new Point(leftLeft, top),
                Width     = 100,
                Height    = 20,
                Text      = "Title:",
                BackColor = this.BackColor
            };

            this._TxtTitle = new NativeTextBox
            {
                Location = new Point(rightLeft, top),
                Width    = 300,
                Height   = 20,
            };
            this._TxtTitle.Style |= WindowStylesConst.WS_BORDER;


            top += 30;
            NativeLabel lblUrl = new NativeLabel
            {
                Location  = new Point(leftLeft, top),
                Width     = 100,
                Height    = 20,
                Text      = "Url:",
                BackColor = this.BackColor
            };

            this._TxtUrl = new NativeTextBox
            {
                Location = new Point(rightLeft, top),
                Width    = 300,
                Height   = 20
            };
            this._TxtUrl.Style |= WindowStylesConst.WS_BORDER;


            top += 30;
            NativeLabel lblUserFolder = new NativeLabel
            {
                Location  = new Point(leftLeft, top),
                Width     = 100,
                Height    = 20,
                Text      = "Data-Folder:",
                BackColor = this.BackColor
            };

            this._TxtUserDataFolder = new NativeTextBox
            {
                Location = new Point(rightLeft, top),
                Width    = 300,
                Height   = 20
            };
            this._TxtUserDataFolder.Style |= WindowStylesConst.WS_BORDER;

            this._BnSelectUserDataFolder = new NativeButton
            {
                Location = new Point(rightLeft + 301, top),
                Width    = 25,
                Height   = 20,
                Text     = "…"
            };
            this._BnSelectUserDataFolder.Clicked += BnSelectUserDataFolder_Clicked;

            top += 30;
            NativeLabel lblBrowserExecutable = new NativeLabel
            {
                Location  = new Point(leftLeft, top),
                Width     = 100,
                Height    = 20,
                Text      = "Browser-Folder:",
                BackColor = this.BackColor
            };

            this._TxtBrowserExecutable = new NativeTextBox
            {
                Location = new Point(rightLeft, top),
                Width    = 300,
                Height   = 20
            };
            this._TxtBrowserExecutable.Style |= WindowStylesConst.WS_BORDER;

            this._BnSelectBrowserExecutable = new NativeButton
            {
                Location = new Point(rightLeft + 301, top),
                Width    = 25,
                Height   = 20,
                Text     = "…"
            };
            this._BnSelectBrowserExecutable.Clicked += BnSelectBrowserExecutable_Clicked;

            top += 30;
            this._ChkMonitoring = new NativeCheckBox
            {
                Location = new Point(leftLeft, top),
                Width    = 100,
                Height   = 20,
                Text     = "Monitoring"
            };

            top += 30;
            NativeLabel lblMonitoriingUrl = new NativeLabel
            {
                Location  = new Point(leftLeft, top),
                Width     = 100,
                Height    = 20,
                Text      = "Monitoring-Url:",
                BackColor = this.BackColor
            };

            this._TxtMonitoringUlr = new NativeTextBox
            {
                Location = new Point(rightLeft, top),
                Width    = 300,
                Height   = 20
            };
            this._TxtMonitoringUlr.Style |= WindowStylesConst.WS_BORDER;

            top += 30;
            NativeLabel lblMonitoriingPath = new NativeLabel
            {
                Location  = new Point(leftLeft, top),
                Width     = 100,
                Height    = 20,
                Text      = "Monitoring-Path:",
                BackColor = this.BackColor
            };

            this._TxtMonitoringPath = new NativeTextBox
            {
                Location = new Point(rightLeft, top),
                Width    = 300,
                Height   = 20
            };
            this._TxtMonitoringPath.Style |= WindowStylesConst.WS_BORDER;

            this._BnSelectMonitoringPath = new NativeButton
            {
                Location = new Point(rightLeft + 301, top),
                Width    = 25,
                Height   = 20,
                Text     = "…"
            };
            this._BnSelectMonitoringPath.Clicked += BnSelectMonitoringPath_Click;

            top       += 30;
            this._BnOk = new NativeButton
            {
                Width    = 80,
                Height   = 25,
                Location = new Point(this.Width - 33 - 81, top),
                Text     = "&Ok"
            };
            this._BnOk.Clicked += BnOk_Clicked;
            this._BnCancel      = new NativeButton
            {
                Width    = 80,
                Height   = 25,
                Location = new Point(this._BnOk.Left - 10 - 80, top),
                Text     = "&Cancel"
            };
            this._BnCancel.Clicked += BnCancel_Clicked;
            top        += 80;
            this.Height = top;
            this.Controls.Add(this._BnOk);
            this.Controls.Add(this._ChkContextMenu);
            this.Controls.Add(this._ChkDevTools);
            this.Controls.Add(this._ChkStatusBar);
            this.Controls.Add(this._ChkAppStatusBar);
            this.Controls.Add(lblTitle);
            this.Controls.Add(this._TxtTitle);
            this.Controls.Add(lblUrl);
            this.Controls.Add(this._TxtUrl);
            this.Controls.Add(lblUserFolder);
            this.Controls.Add(this._TxtUserDataFolder);
            this.Controls.Add(this._BnSelectUserDataFolder);
            this.Controls.Add(lblBrowserExecutable);
            this.Controls.Add(this._TxtBrowserExecutable);
            this.Controls.Add(this._BnSelectBrowserExecutable);
            this.Controls.Add(this._ChkMonitoring);
            this.Controls.Add(lblMonitoriingUrl);
            this.Controls.Add(this._TxtMonitoringUlr);
            this.Controls.Add(lblMonitoriingPath);
            this.Controls.Add(this._TxtMonitoringPath);
            this.Controls.Add(this._BnSelectMonitoringPath);

            this.Controls.Add(this._BnCancel);
        }
예제 #6
0
        protected override void InitControls()
        {


            this.Text = CAPTION;
            this.Name = "Window1";
            //this.StatusBar = false;
            // this.Left = 100;
            //this.Top = 100;
            this.Width = 600;
            this.Height = 400;
            
            this._ControlTest = new ControlTest();
            this._ControlTest.Width = 200;
            this._ControlTest.Height = 30;
            this._ControlTest.Left = 300;
            this._ControlTest.Top = 80;
            this._ControlTest.Name = "TEST_CONTAINER";
            
            //this.BackColor = ColorTool.LightGray;
            this.StartUpPosition = WindowsStartupPosition.CenterScreen;
            this.BackColor = ColorTool.White;
            this._Timer = new NativeTimer();
            this._Timer.Interval = 100;
            //this._Timer.ControlId = 700;
            this._Timer.Tick += Timer_OnTick;
            this._Button = new NativeButton
            {
                Left = 10,
                Top = 10,
                Width = 100,
                Height = 30,
                Text = "Test",
                Name = "bnTest",
                BackColor = ColorTool.Blue,
                ForeColor = ColorTool.Green

            };

            this._Button1 = new NativeButton
            {
                Left = 150,
                Top = 10,
                Width = 100,
                Height = 30,
                Text = "Test",
                Name = "bnTest"//,
                //ControlId = 505
            };
            this._Button.Clicked += button_OnClicked;
            this._Button.DblClicked += button_OnDblClicked;
            this._Button1.Clicked += button1_OnClicked;
            this._Button1.DblClicked += button1_OnDblClicked;

            this._Button3 = new NativeButton
            {
                Location = new Point(300, 10),
                Width = 20,
                Height = 30,
                Name = "SelectFolder",
                Text = "…"
            };

            this._Button3.Clicked += Button3_Click;
            this._ComboBox = new NativeComboBox();
            this._ComboBox.Location = new Point(350, 10);
            
            this._ComboBox.Height = 30;
            this._ComboBox.Width = 200;
            this._ComboBox.Name = "cbbTest";
            this._ComboBox.ForeColor = ColorTool.Blue;
            this._ComboBox.BackColor = ColorTool.Green;
            this._ComboBox.Font = new Font() { Name = "Arial", Size = 10 };
            this._ComboBox.SelChange += ComboBox_SelChange;


            this._TextBox = new NativeTextBox
            {
                Left = 10,
                Top = 50,
                Width = 100,
                Height = 30,
                Text = "ATEST",
                Name = "txtTest",
                Font = new Font() { Name = "Arial", Size = 14 },
                ForeColor = ColorTool.Read
                //ControlId = 502
            };
            this._TextBox.Change += TextBox_Change;

            this._TextBox2 = new NativeTextBox
            {
                Left = 10,
                Top = 150,
                Width = 100,
                Height = 30,
                Text = "",
                Name = "txt2Test",
                //ControlId = 503,
                BackColor = ColorTool.Black,
                ForeColor = ColorTool.White

            };

            this._Label1 = new NativeLabel
            {
                Left = 10,
                Top = 200,
                Width = 100,
                Height = 30,
                Text = "Dies ist ein Label"//,
                                           //BackColor=ColorTool.Read,
                                           //ForeColor = ColorTool.Green,
                                           //ControlId = 504

            };
            this._Label1.Clicked += Label1_Click;
            this._Label1.DblClicked += Label1_DblClick;

            this._Bitmap = new NativeBitmap();
            this._Bitmap.BitMap = "Skype.bmp";
            this._Bitmap.Left = 150;
            this._Bitmap.Top = 50;
            this._Bitmap.Width = 100;
            this._Bitmap.Height = 100;

            this._CheckBox = new NativeCheckBox();
            this._CheckBox.Left = 300;
            this._CheckBox.Top = 50;
            this._CheckBox.Width = 200;
            this._CheckBox.Height = 30;
            this._CheckBox.Text = "TEST CHECKBOX";
            this._CheckBox.BackColor = ColorTool.White;
            this._CheckBox.Checked = true;

            this._ListBox = new NativeListBox();
            this._ListBox.Left = 300;
            this._ListBox.Top = 200;
            this._ListBox.Width = 400;
            this._ListBox.Height = 400;
            this._ListBox.BackColor = ColorTool.Yellow;
            this._ListBox.ForeColor = ColorTool.Read;
            this._ListBox.Font = new Font() { Name = "Arial", Size = 16 };
            this._ListBox.MultiSelect = true;
            this._ListBox.DblClicked+=ListBox_DblClicked;
            
            this._ListBox.SelChange+=ListBox_SelChange;

            this._ProgressBar = new NativeProgress
            {
                Left = 10,
                Top = 250,
                Width = 150,
                Height = 30//,
                //ControlId = 507
            };



            this._TextBox.Clicked += TextBox_Click;
            
            this.Controls.Add(this._Button);
            this.Controls.Add(this._Button1);
            this.Controls.Add(this._Button3);
            this.Controls.Add(this._ComboBox);
            this.Controls.Add(this._TextBox);
            this.Controls.Add(this._TextBox2);
            this.Controls.Add(this._Label1);
            this.Controls.Add(this._Bitmap);
            this.Controls.Add(this._CheckBox);
            this.Controls.Add(this._ListBox);
            this.Controls.Add(this._ProgressBar);
            this.Controls.Add(this._Timer);
            this.Controls.Add(this._ControlTest);
            Click += Window1_Click;
            DoubleClick += Window1_DblClick;
            Create += Window1_Create;
            this.MouseMove += Window1_MoseMove;
        }