Пример #1
0
        private void CreateCustomPanelList(AttachedPanelsItem currentRootObject, CustomPanel parentCustomPanel)
        {
            if (parentCustomPanel == null)
            {
                parentCustomPanel = new CustomPanel()
                {
                    Hight         = currentRootObject.PanelHeight,
                    Width         = currentRootObject.PanelWidth,
                    Offset        = Converters.DoubleStringToIntWithRound(currentRootObject.HingeOffset),
                    Name          = currentRootObject.PanelName,
                    AT            = currentRootObject.AttachedToSide,
                    IsRotatedFlag = true,
                    RotationState = RotationState.none
                };
                customPanels.Add(parentCustomPanel);
            }
            foreach (var n in currentRootObject.AttachedPanelsItems.AttachedPanelsItem)
            {
                var nPanel = new CustomPanel()
                {
                    Name          = n.PanelName,
                    Width         = n.PanelWidth,
                    Hight         = n.PanelHeight,
                    Offset        = Converters.DoubleStringToIntWithRound(n.HingeOffset),
                    AT            = n.AttachedToSide,
                    Parent        = parentCustomPanel,
                    IsRotatedFlag = false,
                    RotationState = RotationState.none
                };

                parentCustomPanel.ChildPanels.Add(nPanel);
                customPanels.Add(nPanel);
                CreateCustomPanelList(n, nPanel);
            }
        }
        protected override void OnViewControlsCreated()
        {
            base.OnViewControlsCreated();
            Frame.GetController <DashboardCustomizationController>().OrganizeDashboardAction.Active["CustomDashboardViewRootController"] = false;
            IsObjectChanged = false;
            DashboardView DetailView = (View as DashboardView);

            view            = new XafBootstrapView();
            view.IsRootView = true;
            CustomPanel     cp    = new CustomPanel();
            IList <Control> ctrls = new List <Control>();

            foreach (Control control in (DetailView.Control as Control).Controls)
            {
                ctrls.Add(control);
            }

            foreach (var control in ctrls)
            {
                cp.Controls.Add(control);
            }

            view.View            = DetailView;
            view.ControlToRender = cp;
            (View.Control as Control).Controls.Add(view);
        }
Пример #3
0
 public string specialAttack; //特別攻撃の番号
 // Use this for initialization
 void Start()
 {
     //コンポーネントのインスタンスを取得
     anim        = GetComponent <Animator>();
     customPanel = GameObject.Find("CustomPanel").GetComponent <CustomPanel>();
     Debug.Log(GameObject.Find("CustomPanel").name);
 }
Пример #4
0
        private void delTable(int idx)
        {
            int iRowIdx = 0;
            int iColIdx = 0;

            tableLayoutPanel1.Controls.Clear();
            mCustomPanel.Clear();

            for (int index = 0; index < listView1.Items.Count; index++)
            {
                CustomPanel cPanel = new CustomPanel();

                iColIdx = index % 5;
                iRowIdx = index / 5;

                cPanel.setData(listView1.Items[index]);
                if (mStatus == statusMechine.STATUS_MAIN_VIDEO_PLAY)
                {
                    cPanel.getPanel().BackColor = Color.LightGreen;
                }
                else
                {
                    cPanel.getPanel().BackColor = Color.Orange;
                }
                TableLayoutPanelCellPosition cp = new TableLayoutPanelCellPosition(iColIdx, iRowIdx);
                tableLayoutPanel1.Controls.Add(cPanel.getPanel());
                tableLayoutPanel1.SetCellPosition(cPanel.getPanel(), cp);

                mCustomPanel.Add(cPanel);
            }
        }
    public Form1()
    {
        InitializeComponent();
        label1 = new System.Windows.Forms.Label();
        this.SuspendLayout();
        this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 23F);
        this.AutoScaleMode       = System.Windows.Forms.AutoScaleMode.Font;
        this.ClientSize          = new System.Drawing.Size(1401, 462);
        this.Controls.Add(this.label1);
        this.Font   = new System.Drawing.Font("Times New Roman", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
        this.Margin = new System.Windows.Forms.Padding(6, 5, 6, 5);
        this.Name   = "Form1";
        this.Text   = "Form1";
        this.ResumeLayout(false);
        this.PerformLayout();
        int         borderThickness = 5;
        Color       borderColor     = Color.Cyan;
        CustomPanel panel1          = new CustomPanel(borderThickness, borderColor);

        panel1.BackColor = Color.Yellow;
        panel1.Location  = new Point(400, 30);
        panel1.Size      = new Size(300, 300);
        panel1.Parent    = this;
        this.Controls.Add(panel1);
        label1.Name      = "label1";
        label1.TabIndex  = 0;
        label1.AutoSize  = true;
        label1.ForeColor = Color.Black;
        label1.Text      = "this is the text whose center I want to align";
        label1.Location  = new Point(panel1.Location.X + panel1.Width / 2 - label1.Width / 2, 80);
        if (this.Controls.Contains(label1))
        {
            label1.BringToFront();
        }
    }
Пример #6
0
        protected override void OnViewControlsCreated()
        {
            base.OnViewControlsCreated();
            IsObjectChanged = false;
            DetailView DetailView = (View as DetailView);

            view            = new XafBootstrapView();
            view.IsRootView = true;
            CustomPanel     cp    = new CustomPanel();
            IList <Control> ctrls = new List <Control>();

            foreach (Control control in (DetailView.Control as Control).Controls)
            {
                ctrls.Add(control);
            }

            foreach (var control in ctrls)
            {
                cp.Controls.Add(control);
            }

            view.View            = DetailView;
            view.ControlToRender = cp;
            (View.Control as Control).Controls.Add(view);
        }
Пример #7
0
    public void ShowScreen(CustomPanel prefab, object payload, bool isReturn = false, float durationTime = 0.5f)
    {
        if (currentPrefab == prefab)
        {
            return;
        }

        currentPrefab = prefab;
        CustomPanel go = Instantiate(prefab, panelsTransform);

        if (payload != null)
        {
            go.GetComponent <IPayloadReceiver>()?.ReceivedPayload(payload);
        }

        if (currentPanel != null)
        {
            raycaster.enabled = false;
            go.transform.SetAsFirstSibling();
            currentPanel.FadeToZero(durationTime, () =>
            {
                Destroy(currentPanel.gameObject);
                currentPanel      = go;
                raycaster.enabled = true;
            });
        }
        else
        {
            currentPanel = go;
        }
    }
Пример #8
0
 public BasePresenter(BaseView baseView, IKaptureData kaptureData, KaptureGUILogger logger)
 {
     _kaptureData = kaptureData;
     _logger      = logger;
     SetupBaseView(baseView);
     _viewPanel = _baseView.ViewPanel;
     OpenMainView(this, null);
     Task.Run(InitAdvancedPresenter);
 }
Пример #9
0
 public EnterUserID()
 {
     InitializeComponent();
     CustomPanel bgPanel = new CustomPanel();
     bgPanel.BackColor = Color.FromArgb(247, 150, 70);
     bgPanel.Size = new Size(275, 119);
     bgPanel.BorderWidth = 0;
     this.Controls.Add(bgPanel);
     bgPanel.SendToBack();
 }
Пример #10
0
        internal static void ChangeSection(Form1 form, int index, bool active)
        {
            XtraTabControl    pagesTabControl        = form.pagesTabControl;
            CustomRichTextBox pageTextBox            = ProgramUtil.GetPageTextBox(pagesTabControl.SelectedTabPage);
            CustomPanel       sectionsPanel          = ProgramUtil.GetSectionsPanel(pagesTabControl.SelectedTabPage);
            CheckedListBox    sectionsCheckedListBox = (CheckedListBox)sectionsPanel.Controls["sectionsCheckedListBox"];
            String            content = pageTextBox.Text;
            String            section = sectionsCheckedListBox.Items[index].ToString();

            bool          flag    = false;
            StringBuilder builder = new StringBuilder();

            foreach (String str in content.Split(new[] { Convert.ToChar(ConstantUtil.newLine) }))
            {
                if (builder.Length > 0)
                {
                    builder.Append(ConstantUtil.newLine); //builder.AppendLine();
                }
                if (String.IsNullOrEmpty(str))
                {
                    continue;
                }

                if (str.StartsWith("#SECTION ", StringComparison.OrdinalIgnoreCase))
                {
                    //flag = str.EndsWith(" " + section, StringComparison.OrdinalIgnoreCase);
                    flag = (str == ("#SECTION " + section));
                    builder.Append(str);
                }
                else if (flag)
                {
                    if (active)
                    {
                        builder.Append(str.StartsWith(ConstantUtil.hostsComments) ? str.Substring(ConstantUtil.hostsComments.Length) : str);
                    }
                    else if (!str.StartsWith(ConstantUtil.hostsComments))
                    {
                        builder.Append(ConstantUtil.hostsComments).Append(str);
                    }
                    else
                    {
                        builder.Append(str);
                    }
                }
                else
                {
                    builder.Append(str);
                }
            }

            pageTextBox.SelectAll();
            pageTextBox.SelectedText = builder.ToString();
            TextManager.RefreshUndoRedoExternal(form);
            pageTextBox.ScrollToCaret();
        }
Пример #11
0
        public EnterUserID()
        {
            InitializeComponent();
            CustomPanel bgPanel = new CustomPanel();

            bgPanel.BackColor   = Color.FromArgb(247, 150, 70);
            bgPanel.Size        = new Size(275, 119);
            bgPanel.BorderWidth = 0;
            this.Controls.Add(bgPanel);
            bgPanel.SendToBack();
        }
Пример #12
0
        public void Reset()
        {
            ControlPanels = new CustomPanel[] { EditorConsoleManager.Instance.ToolPane.FilesPanel, EditorConsoleManager.Instance.ToolPane.LayersPanel, EditorConsoleManager.Instance.ToolPane.ToolsPanel };

            if (_consoleLayers != null)
            {
                _consoleLayers.MouseMove  -= _mouseMoveHandler;
                _consoleLayers.MouseEnter -= _mouseEnterHandler;
                _consoleLayers.MouseExit  -= _mouseExitHandler;
            }

            _objectsSurface      = new SadConsole.Consoles.Console(25, 10);
            _objectsSurface.Font = SadConsoleEditor.Settings.Config.ScreenFont;
            _objectsSurface.Data.DefaultForeground = Color.White;
            _objectsSurface.Data.DefaultBackground = Color.Transparent;
            _objectsSurface.Data.Clear();
            _objectsSurface.BeforeRenderHandler = (cr) => cr.Batch.Draw(SadConsole.Engine.BackgroundCell, cr.RenderBox, null, new Color(0, 0, 0, 0.5f));

            _consoleLayers                                  = new LayeredConsole(1, 25, 10);
            _consoleLayers.Font                             = SadConsoleEditor.Settings.Config.ScreenFont;
            _consoleLayers.CanUseMouse                      = true;
            _consoleLayers.CanUseKeyboard                   = true;
            _consoleLayers.GetLayerMetadata(0).Name         = "Root";
            _consoleLayers.GetLayerMetadata(0).IsRemoveable = false;
            _consoleLayers.GetLayerMetadata(0).IsMoveable   = false;

            _width  = 25;
            _height = 10;

            SelectedGameObjects = new GameObjectCollection();
            GameObjects         = new List <GameObjectCollection>();
            GameObjects.Add(SelectedGameObjects);

            _mouseMoveHandler = (o, e) => { if (this.MouseMove != null)
                                            {
                                                this.MouseMove(_consoleLayers.ActiveLayer, e);
                                            }
                                            EditorConsoleManager.Instance.ToolPane.SelectedTool.MouseMoveSurface(e.OriginalMouseInfo, _consoleLayers.ActiveLayer); };
            _mouseEnterHandler = (o, e) => { if (this.MouseEnter != null)
                                             {
                                                 this.MouseEnter(_consoleLayers.ActiveLayer, e);
                                             }
                                             EditorConsoleManager.Instance.ToolPane.SelectedTool.MouseEnterSurface(e.OriginalMouseInfo, _consoleLayers.ActiveLayer); };
            _mouseExitHandler = (o, e) => { if (this.MouseExit != null)
                                            {
                                                this.MouseExit(_consoleLayers.ActiveLayer, e);
                                            }
                                            EditorConsoleManager.Instance.ToolPane.SelectedTool.MouseExitSurface(e.OriginalMouseInfo, _consoleLayers.ActiveLayer); };

            _consoleLayers.MouseMove  += _mouseMoveHandler;
            _consoleLayers.MouseEnter += _mouseEnterHandler;
            _consoleLayers.MouseExit  += _mouseExitHandler;
        }
Пример #13
0
        public HotspotTool()
        {
            //_mouseOverObjectPanel = new DisplayObjectToolPanel("Mouse Object");

            //ControlPanels = new CustomPanel[] { _panel, _mouseOverObjectPanel };
            ControlPanels = new CustomPanel[] { };

            Brush = new SadConsole.Game.GameObject(Settings.Config.ScreenFont);
            Brush.Animation = new AnimatedTextSurface("default", 1, 1);
            Brush.Animation.CreateFrame();
            Brush.IsVisible = false;
        }
Пример #14
0
        internal static void CheckAnnotationWordWrap(Form1 form, ToolStripMenuItem wordWrapToolStripMenuItem)
        {
            CustomPanel annotationPanel = ProgramUtil.GetAnnotationPanel(form.pagesTabControl.SelectedTabPage);

            if (annotationPanel == null)
            {
                return;
            }

            CustomRichTextBoxBase annotationTextBox = (CustomRichTextBoxBase)annotationPanel.Controls["annotationTextBox"];

            wordWrapToolStripMenuItem.Checked = !wordWrapToolStripMenuItem.Checked;
            annotationTextBox.WordWrap        = wordWrapToolStripMenuItem.Checked;
        }
        private static void MappingOneChild(CustomPanel node)
        {
            for (int i = 0; i < node.ChildPanels.Count; i++)
            {
                CustomPanel childPanel = node.ChildPanels[i];

                if (childPanel.IsRotatedFlag)
                {
                    continue;
                }

                childPanel = PanelRotate(childPanel, node);
                MappingOneChild(childPanel);
            }
        }
Пример #16
0
        private void CustomPanelConvertToRectagle(CustomPanel node)
        {
            if (node.Parent == null)
            {
                RectangleWrapper rectangleWrapper = new RectangleWrapper()
                {
                    ActualRectangle = new Rectangle()
                    {
                        X      = customPanelsAfterXYCoordinates[0].X,
                        Y      = customPanelsAfterXYCoordinates[0].Y,
                        Height = Converters.DoubleStringToIntWithRound(customPanelsAfterXYCoordinates[0].Hight),
                        Width  = Converters.DoubleStringToIntWithRound(customPanelsAfterXYCoordinates[0].Width)
                    },
                    Name   = node.Name,
                    Offset = node.Offset
                };

                node.IsDrew = true;
                rectanglesToDraw.Add(rectangleWrapper);
            }
            for (int i = 0; i < node.ChildPanels.Count; i++)
            {
                CustomPanel childPanel = node.ChildPanels[i];

                if (childPanel.IsDrew)
                {
                    continue;
                }

                RectangleWrapper currentRectangles = new RectangleWrapper()
                {
                    ActualRectangle = new Rectangle()
                    {
                        X      = childPanel.X,
                        Y      = childPanel.Y,
                        Height = Converters.DoubleStringToIntWithRound(childPanel.Hight),
                        Width  = Converters.DoubleStringToIntWithRound(childPanel.Width)
                    },
                    Name   = childPanel.Name,
                    Offset = childPanel.Offset
                };

                childPanel.IsDrew = true;

                rectanglesToDraw.Add(currentRectangles);
                CustomPanelConvertToRectagle(childPanel);
            }
        }
Пример #17
0
        internal static void SetZoom(XtraTabPage tabPage, int zoomFactor)
        {
            CustomPanel columnRulerPanel = (CustomPanel)tabPage.Controls["columnRulerPanel"];

            if (columnRulerPanel == null)
            {
                return;
            }

            RichTextBox columnRulerTextBox = (RichTextBox)columnRulerPanel.Controls["columnRulerTextBox"];

            columnRulerTextBox.ZoomFactor = (float)zoomFactor / 100;

            int newHeight = Convert.ToInt32(Convert.ToInt32(columnRulerTextBox.Font.GetHeight() * 2 + 5) * columnRulerTextBox.ZoomFactor);

            columnRulerPanel.Height   = newHeight + 1;
            columnRulerTextBox.Height = newHeight;
        }
Пример #18
0
        private static void CloseHostsSectionPanel(Form1 form, bool suppressMessage = false)
        {
            ToolStripMenuItem hostsFileConfiguratorToolStripMenuItem = form.hostsFileConfiguratorToolStripMenuItem;
            XtraTabControl    pagesTabControl = form.pagesTabControl;
            CustomPanel       sectionsPanel   = ProgramUtil.GetSectionsPanel(pagesTabControl.SelectedTabPage);

            if (sectionsPanel != null)
            {
                pagesTabControl.SelectedTabPage.Controls.Remove(sectionsPanel);
            }

            hostsFileConfiguratorToolStripMenuItem.Checked = false;

            if (!suppressMessage)
            {
                WindowManager.ShowInfoBox(form, LanguageUtil.GetCurrentLanguageString("HostsClose", className));
            }
        }
Пример #19
0
        private void CreateAndShowMainWindow()
        {
            // Create the application's main window and instantiate a CustomPanel

            customPanel1 = new CustomPanel();
            customPanel1.Width = 450;
            customPanel1.Height = 450;

            // Add elements to populate the CustomPanel

            rect1 = new Rectangle();
            rect2 = new Rectangle();
            rect3 = new Rectangle();
            rect1.Width = 200;
            rect1.Height = 200;
            rect1.Fill = Brushes.Blue;
            rect2.Width = 200;
            rect2.Height = 200;
            rect2.Fill = Brushes.Purple;
            rect3.Width = 200;
            rect3.Height = 200;
            rect3.Fill = Brushes.Red;

            // Add a TextBlock to show flowing and clip behavior

            txt1 = new TextBlock();
            txt1.Text = "Text is clipped when it reaches the edge of the container";
            txt1.FontSize = 25;

            // Add the elements defined above as children of the CustomPanel

            customPanel1.Children.Add(rect1);
            customPanel1.Children.Add(rect2);
            customPanel1.Children.Add(rect3);
            customPanel1.Children.Add(txt1);

            // Add the CustomPanel as a Child of the MainWindow and show the Window

            mainWindow = new Window();
            mainWindow.Content = customPanel1;
            mainWindow.Title = "Custom Panel Sample";
            mainWindow.Show();
        }
Пример #20
0
        internal static void UpdatePanelFont(Form1 form)
        {
            if (form == null) //Before initialization
            {
                return;
            }

            XtraTabControl pagesTabControl  = form.pagesTabControl;
            XtraTabPage    selectedTabPage  = pagesTabControl.SelectedTabPage;
            CustomPanel    columnRulerPanel = (CustomPanel)selectedTabPage.Controls["columnRulerPanel"];

            if (columnRulerPanel == null)
            {
                return;
            }

            TogglePanel(form);
            TogglePanel(form);
        }
Пример #21
0
        private void CreateAndShowMainWindow()
        {
            // Create the application's main window and instantiate a CustomPanel

            customPanel1        = new CustomPanel();
            customPanel1.Width  = 450;
            customPanel1.Height = 450;

            // Add elements to populate the CustomPanel

            rect1        = new Rectangle();
            rect2        = new Rectangle();
            rect3        = new Rectangle();
            rect1.Width  = 200;
            rect1.Height = 200;
            rect1.Fill   = Brushes.Blue;
            rect2.Width  = 200;
            rect2.Height = 200;
            rect2.Fill   = Brushes.Purple;
            rect3.Width  = 200;
            rect3.Height = 200;
            rect3.Fill   = Brushes.Red;

            // Add a TextBlock to show flowing and clip behavior

            txt1          = new TextBlock();
            txt1.Text     = "Text is clipped when it reaches the edge of the container";
            txt1.FontSize = 25;

            // Add the elements defined above as children of the CustomPanel

            customPanel1.Children.Add(rect1);
            customPanel1.Children.Add(rect2);
            customPanel1.Children.Add(rect3);
            customPanel1.Children.Add(txt1);

            // Add the CustomPanel as a Child of the MainWindow and show the Window

            mainWindow         = new Window();
            mainWindow.Content = customPanel1;
            mainWindow.Title   = "Custom Panel Sample";
            mainWindow.Show();
        }
Пример #22
0
        internal static void UpdatePanelAppearance(XtraTabPage tabPage, bool customLineNumbersVisible)
        {
            CustomRichTextBox pageTextBox       = ProgramUtil.GetPageTextBox(tabPage);
            CustomLineNumbers customLineNumbers = ProgramUtil.GetCustomLineNumbers(tabPage);
            CustomPanel       columnRulerPanel  = (CustomPanel)tabPage.Controls["columnRulerPanel"];

            if (columnRulerPanel == null)
            {
                return;
            }

            pageTextBox.Size = new Size(pageTextBox.Size.Width + 1, pageTextBox.Size.Height);
            pageTextBox.Size = new Size(pageTextBox.Size.Width - 1, pageTextBox.Size.Height);
            RichTextBox columnRulerTextBox = (RichTextBox)columnRulerPanel.Controls["columnRulerTextBox"];

            columnRulerTextBox.Width = pageTextBox.Width + 1;
            columnRulerTextBox.Left  = customLineNumbersVisible ? customLineNumbers.Width : 0;
            //columnRulerPanel.MarginLeftHorizontalLine = tabPage.Width - columnRulerTextBox.Width - 5;
            columnRulerPanel.MarginLeftHorizontalLine = columnRulerTextBox.Left;
            columnRulerPanel.Refresh();
        }
Пример #23
0
        private static void CloseAnnotationPanel(Form1 form, bool suppressMessage = false)
        {
            ToolStripMenuItem annotationPanelToolStripMenuItem = form.annotationPanelToolStripMenuItem;
            XtraTabControl    pagesTabControl = form.pagesTabControl;
            CustomPanel       annotationPanel = ProgramUtil.GetAnnotationPanel(form.pagesTabControl.SelectedTabPage);

            if (annotationPanel != null)
            {
                CustomRichTextBoxBase annotationTextBox = (CustomRichTextBoxBase)annotationPanel.Controls["annotationTextBox"];

                if (!String.IsNullOrEmpty(annotationTextBox.Text) && !suppressMessage)
                {
                    if (WindowManager.ShowQuestionBox(form, LanguageUtil.GetCurrentLanguageString("WarningAnnotationPanelClose", className)) == DialogResult.No)
                    {
                        return;
                    }
                }

                pagesTabControl.SelectedTabPage.Controls.Remove(annotationPanel);
            }

            ProgramUtil.GetPageTextBox(pagesTabControl.SelectedTabPage).Focus();
            annotationPanelToolStripMenuItem.Checked = false;
        }
Пример #24
0
        private void addTable(ListViewItem liItem)
        {
            int         customPanelIndex = mCustomPanel.Count;
            int         iRowIdx          = 0;
            int         iColIdx          = 0;
            CustomPanel cPanel           = new CustomPanel();

            cPanel.Index = customPanelIndex;

            iColIdx = customPanelIndex % 10;
            iRowIdx = customPanelIndex / 10;

            cPanel.setData(liItem);
            cPanel.getPanel().BackColor = Color.Orange;
            cPanel.setVideoType("대기 영상");
            cPanel.getButton().Name         = customPanelIndex.ToString();
            cPanel.getButton().Click       += new System.EventHandler(this.btSingleEventHandler);
            TableLayoutPanelCellPosition cp = new TableLayoutPanelCellPosition(iColIdx, iRowIdx);

            tableLayoutPanel1.Controls.Add(cPanel.getPanel());
            tableLayoutPanel1.SetCellPosition(cPanel.getPanel(), cp);

            mCustomPanel.Add(cPanel);
        }
Пример #25
0
        private static void CalculateReferencePointToAllPanels(CustomPanel node)
        {
            for (int i = 0; i < node.ChildPanels.Count; i++)
            {
                CustomPanel currentPanel = node.ChildPanels[i];


                if (currentPanel.AT == "0" &&
                    currentPanel.Parent.RotationState == RotationState.none &&
                    currentPanel.RotationState == RotationState.twice
                    ||
                    currentPanel.AT == "1" &&
                    currentPanel.Parent.RotationState == RotationState.once &&
                    currentPanel.RotationState == RotationState.twice
                    )
                {
                    currentPanel.X = OffsetCalculationForPlaceToMiddle(currentPanel.Parent.X, currentPanel.Parent.Width, currentPanel.Width);
                    currentPanel.Y = currentPanel.Parent.Y + Converters.DoubleStringToIntWithRound(currentPanel.Parent.Hight);
                }

                if (currentPanel.AT == "1" &&
                    currentPanel.Parent.RotationState == RotationState.none &&
                    currentPanel.RotationState == RotationState.once
                    ||
                    currentPanel.AT == "2" &&
                    currentPanel.Parent.RotationState == RotationState.once &&
                    currentPanel.RotationState == RotationState.once
                    )
                {
                    string tempVal = currentPanel.Width;
                    currentPanel.Width = currentPanel.Hight;
                    currentPanel.Hight = tempVal;

                    currentPanel.X = currentPanel.Parent.X + Converters.DoubleStringToIntWithRound(currentPanel.Parent.Width);
                    currentPanel.Y = currentPanel.Parent.Y;
                }


                if (currentPanel.AT == "2" &&
                    currentPanel.Parent.RotationState == RotationState.none &&
                    currentPanel.RotationState == RotationState.none
                    ||
                    currentPanel.AT == "1" &&
                    currentPanel.Parent.RotationState == RotationState.thrice &&
                    currentPanel.RotationState == RotationState.none

                    )
                {
                    //currentPanel.X = currentPanel.Parent.X;
                    currentPanel.X = OffsetCalculationForPlaceToMiddle(currentPanel.Parent.X, currentPanel.Parent.Width, currentPanel.Width);
                    currentPanel.Y = currentPanel.Parent.Y - Converters.DoubleStringToIntWithRound(currentPanel.Hight);
                }


                if (currentPanel.AT == "3" &&
                    currentPanel.Parent.RotationState == RotationState.none &&
                    currentPanel.RotationState == RotationState.thrice)
                {
                    string tempVal = currentPanel.Width;
                    currentPanel.Width = currentPanel.Hight;
                    currentPanel.Hight = tempVal;

                    currentPanel.X = currentPanel.Parent.X - Converters.DoubleStringToIntWithRound(currentPanel.Width);
                    currentPanel.Y = currentPanel.Parent.Y;
                }

                if (currentPanel.AT == "3" &&
                    currentPanel.Parent.RotationState == RotationState.once &&
                    currentPanel.RotationState == RotationState.none
                    ||
                    currentPanel.AT == "2" &&
                    currentPanel.Parent.RotationState == RotationState.none &&
                    currentPanel.RotationState == RotationState.none
                    )
                {
                    currentPanel.X = OffsetCalculationForPlaceToMiddle(currentPanel.Parent.X, currentPanel.Parent.Width, currentPanel.Width);
                    currentPanel.Y = currentPanel.Parent.Y - Converters.DoubleStringToIntWithRound(currentPanel.Hight);
                }

                if (currentPanel.AT == "3" &&
                    currentPanel.Parent.RotationState == RotationState.thrice &&
                    currentPanel.RotationState == RotationState.twice)
                {
                    currentPanel.X = OffsetCalculationForPlaceToMiddle(currentPanel.Parent.X, currentPanel.Parent.Width, currentPanel.Width);
                    currentPanel.Y = currentPanel.Parent.Y + Converters.DoubleStringToIntWithRound(currentPanel.Parent.Hight);
                }
                CalculateReferencePointToAllPanels(currentPanel);
            }
        }
Пример #26
0
 private void InitializeComponent()
 {
     this.chkCallRxTone = new System.Windows.Forms.CheckBox();
     this.lblName       = new System.Windows.Forms.Label();
     this.lblCallId     = new System.Windows.Forms.Label();
     this.lblCallType   = new System.Windows.Forms.Label();
     this.pnlContact    = new CustomPanel();
     this.txtCallId     = new DMR.SGTextBox();
     this.cmbRingStyle  = new CustomCombo();
     this.cmbCallType   = new CustomCombo();
     this.lblRingStyle  = new System.Windows.Forms.Label();
     this.txtName       = new DMR.SGTextBox();
     this.pnlContact.SuspendLayout();
     this.SuspendLayout();
     //
     // chkCallRxTone
     //
     this.chkCallRxTone.AutoSize = true;
     this.chkCallRxTone.Location = new System.Drawing.Point(158, 173);
     this.chkCallRxTone.Name     = "chkCallRxTone";
     this.chkCallRxTone.Size     = new System.Drawing.Size(141, 20);
     this.chkCallRxTone.TabIndex = 6;
     this.chkCallRxTone.Text     = "Call Receive Tone";
     this.chkCallRxTone.UseVisualStyleBackColor = true;
     //
     // lblName
     //
     this.lblName.Location  = new System.Drawing.Point(60, 50);
     this.lblName.Name      = "lblName";
     this.lblName.Size      = new System.Drawing.Size(87, 24);
     this.lblName.TabIndex  = 0;
     this.lblName.Text      = "Name";
     this.lblName.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
     //
     // lblCallId
     //
     this.lblCallId.Location  = new System.Drawing.Point(60, 80);
     this.lblCallId.Name      = "lblCallId";
     this.lblCallId.Size      = new System.Drawing.Size(87, 24);
     this.lblCallId.TabIndex  = 2;
     this.lblCallId.Text      = "Call ID";
     this.lblCallId.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
     //
     // lblCallType
     //
     this.lblCallType.Enabled   = false;
     this.lblCallType.Location  = new System.Drawing.Point(60, 110);
     this.lblCallType.Name      = "lblCallType";
     this.lblCallType.Size      = new System.Drawing.Size(87, 24);
     this.lblCallType.TabIndex  = 4;
     this.lblCallType.Text      = "Call Type";
     this.lblCallType.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
     //
     // pnlContact
     //
     this.pnlContact.AutoScroll = true;
     this.pnlContact.AutoSize   = true;
     this.pnlContact.Controls.Add(this.txtCallId);
     this.pnlContact.Controls.Add(this.chkCallRxTone);
     this.pnlContact.Controls.Add(this.cmbRingStyle);
     this.pnlContact.Controls.Add(this.cmbCallType);
     this.pnlContact.Controls.Add(this.lblRingStyle);
     this.pnlContact.Controls.Add(this.txtName);
     this.pnlContact.Controls.Add(this.lblCallType);
     this.pnlContact.Controls.Add(this.lblName);
     this.pnlContact.Controls.Add(this.lblCallId);
     this.pnlContact.Dock     = System.Windows.Forms.DockStyle.Fill;
     this.pnlContact.Location = new System.Drawing.Point(0, 0);
     this.pnlContact.Name     = "pnlContact";
     this.pnlContact.Size     = new System.Drawing.Size(355, 228);
     this.pnlContact.TabIndex = 7;
     //
     // txtCallId
     //
     this.txtCallId.InputString   = null;
     this.txtCallId.Location      = new System.Drawing.Point(158, 80);
     this.txtCallId.MaxByteLength = 0;
     this.txtCallId.Name          = "txtCallId";
     this.txtCallId.Size          = new System.Drawing.Size(120, 23);
     this.txtCallId.TabIndex      = 3;
     this.txtCallId.Enter        += new System.EventHandler(this.txtCallId_Enter);
     this.txtCallId.Leave        += new System.EventHandler(this.txtCallId_Leave);
     this.txtCallId.Validating   += new System.ComponentModel.CancelEventHandler(this.txtCallId_Validating);
     //
     // cmbRingStyle
     //
     this.cmbRingStyle.DropDownStyle     = System.Windows.Forms.ComboBoxStyle.DropDownList;
     this.cmbRingStyle.FormattingEnabled = true;
     this.cmbRingStyle.Location          = new System.Drawing.Point(158, 140);
     this.cmbRingStyle.Name                  = "cmbRingStyle";
     this.cmbRingStyle.Size                  = new System.Drawing.Size(120, 24);
     this.cmbRingStyle.TabIndex              = 5;
     this.cmbRingStyle.SelectedIndexChanged += new System.EventHandler(this.cmbRingStyle_SelectedIndexChanged);
     //
     // cmbCallType
     //
     this.cmbCallType.DropDownStyle     = System.Windows.Forms.ComboBoxStyle.DropDownList;
     this.cmbCallType.FormattingEnabled = true;
     this.cmbCallType.Location          = new System.Drawing.Point(158, 110);
     this.cmbCallType.Name                  = "cmbCallType";
     this.cmbCallType.Size                  = new System.Drawing.Size(120, 24);
     this.cmbCallType.TabIndex              = 5;
     this.cmbCallType.SelectedIndexChanged += new System.EventHandler(this.cmbCallType_SelectedIndexChanged);
     //
     // lblRingStyle
     //
     this.lblRingStyle.Location  = new System.Drawing.Point(60, 140);
     this.lblRingStyle.Name      = "lblRingStyle";
     this.lblRingStyle.Size      = new System.Drawing.Size(87, 24);
     this.lblRingStyle.TabIndex  = 4;
     this.lblRingStyle.Text      = "Ring Style";
     this.lblRingStyle.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
     //
     // txtName
     //
     this.txtName.InputString   = null;
     this.txtName.Location      = new System.Drawing.Point(158, 50);
     this.txtName.MaxByteLength = 0;
     this.txtName.Name          = "txtName";
     this.txtName.Size          = new System.Drawing.Size(120, 23);
     this.txtName.TabIndex      = 1;
     this.txtName.Leave        += new System.EventHandler(this.txtName_Leave);
     //
     // ContactForm
     //
     this.ClientSize = new System.Drawing.Size(355, 228);
     this.Controls.Add(this.pnlContact);
     this.Font         = new System.Drawing.Font("Arial", 10F);
     this.Name         = "ContactForm";
     this.Text         = "Digital Contact";
     this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.ContactForm_FormClosing);
     this.Load        += new System.EventHandler(this.ContactForm_Load);
     this.pnlContact.ResumeLayout(false);
     this.pnlContact.PerformLayout();
     this.ResumeLayout(false);
     this.PerformLayout();
 }
Пример #27
0
        private void InitializeComponent()
        {
            DataGridViewCellStyle dataGridViewCellStyle  = new DataGridViewCellStyle();
            DataGridViewCellStyle dataGridViewCellStyle2 = new DataGridViewCellStyle();

            this.pnlAttachment        = new CustomPanel();
            this.grpCall              = new GroupBox();
            this.cmbCallCh            = new CustomCombo();
            this.lblCallCh            = new Label();
            this.cmbCallZone          = new CustomCombo();
            this.lblCallZone          = new Label();
            this.grpRecording         = new GroupBox();
            this.chkRecordingSwitch   = new CheckBox();
            this.cmbRecordingInterval = new CustomCombo();
            this.lblRecordingInterval = new Label();
            this.grpGps        = new GroupBox();
            this.chkGpsSwitch  = new CheckBox();
            this.cmbTimeZone   = new CustomCombo();
            this.lblTimeZone   = new Label();
            this.grpP1         = new GroupBox();
            this.cmbP1Key      = new CustomCombo();
            this.lblP1Key      = new Label();
            this.grpFm         = new GroupBox();
            this.cmbBootCh     = new ComboBox();
            this.lblBootCh     = new Label();
            this.chkFmSwitch   = new CheckBox();
            this.dgvAttachment = new DataGridView();
            this.txtMessage    = new DataGridViewTextBoxColumn();
            this.pnlAttachment.SuspendLayout();
            this.grpCall.SuspendLayout();
            this.grpRecording.SuspendLayout();
            this.grpGps.SuspendLayout();
            this.grpP1.SuspendLayout();
            this.grpFm.SuspendLayout();
            ((ISupportInitialize)this.dgvAttachment).BeginInit();
            base.SuspendLayout();
            this.pnlAttachment.AutoScroll = true;
            this.pnlAttachment.AutoSize   = true;
            this.pnlAttachment.Controls.Add(this.grpCall);
            this.pnlAttachment.Controls.Add(this.grpRecording);
            this.pnlAttachment.Controls.Add(this.grpGps);
            this.pnlAttachment.Controls.Add(this.grpP1);
            this.pnlAttachment.Controls.Add(this.grpFm);
            this.pnlAttachment.Dock     = DockStyle.Fill;
            this.pnlAttachment.Location = new Point(0, 0);
            this.pnlAttachment.Name     = "pnlAttachment";
            this.pnlAttachment.Size     = new Size(759, 553);
            this.pnlAttachment.TabIndex = 3;
            this.grpCall.Controls.Add(this.cmbCallCh);
            this.grpCall.Controls.Add(this.lblCallCh);
            this.grpCall.Controls.Add(this.cmbCallZone);
            this.grpCall.Controls.Add(this.lblCallZone);
            this.grpCall.Location                  = new Point(43, 369);
            this.grpCall.Name                      = "grpCall";
            this.grpCall.Size                      = new Size(291, 100);
            this.grpCall.TabIndex                  = 18;
            this.grpCall.TabStop                   = false;
            this.grpCall.Text                      = "Call Channel";
            this.grpCall.Visible                   = false;
            this.cmbCallCh.DropDownStyle           = ComboBoxStyle.DropDownList;
            this.cmbCallCh.FormattingEnabled       = true;
            this.cmbCallCh.Location                = new Point(148, 57);
            this.cmbCallCh.Name                    = "cmbCallCh";
            this.cmbCallCh.Size                    = new Size(87, 20);
            this.cmbCallCh.TabIndex                = 17;
            this.lblCallCh.Location                = new Point(22, 57);
            this.lblCallCh.Name                    = "lblCallCh";
            this.lblCallCh.Size                    = new Size(119, 20);
            this.lblCallCh.TabIndex                = 16;
            this.lblCallCh.Text                    = "Channel";
            this.lblCallCh.TextAlign               = ContentAlignment.MiddleRight;
            this.cmbCallZone.DropDownStyle         = ComboBoxStyle.DropDownList;
            this.cmbCallZone.FormattingEnabled     = true;
            this.cmbCallZone.Location              = new Point(148, 23);
            this.cmbCallZone.Name                  = "cmbCallZone";
            this.cmbCallZone.Size                  = new Size(87, 20);
            this.cmbCallZone.TabIndex              = 15;
            this.cmbCallZone.SelectedIndexChanged += this.cmbCallZone_SelectedIndexChanged;
            this.lblCallZone.Location              = new Point(22, 23);
            this.lblCallZone.Name                  = "lblCallZone";
            this.lblCallZone.Size                  = new Size(119, 20);
            this.lblCallZone.TabIndex              = 14;
            this.lblCallZone.Text                  = "Zone";
            this.lblCallZone.TextAlign             = ContentAlignment.MiddleRight;
            this.grpRecording.Controls.Add(this.chkRecordingSwitch);
            this.grpRecording.Controls.Add(this.cmbRecordingInterval);
            this.grpRecording.Controls.Add(this.lblRecordingInterval);
            this.grpRecording.Location       = new Point(43, 251);
            this.grpRecording.Name           = "grpRecording";
            this.grpRecording.Size           = new Size(291, 100);
            this.grpRecording.TabIndex       = 13;
            this.grpRecording.TabStop        = false;
            this.grpRecording.Text           = "Recording";
            this.grpRecording.Visible        = false;
            this.chkRecordingSwitch.AutoSize = true;
            this.chkRecordingSwitch.Location = new Point(148, 23);
            this.chkRecordingSwitch.Name     = "chkRecordingSwitch";
            this.chkRecordingSwitch.Size     = new Size(120, 16);
            this.chkRecordingSwitch.TabIndex = 6;
            this.chkRecordingSwitch.Text     = "Recording Swicth";
            this.chkRecordingSwitch.UseVisualStyleBackColor = true;
            this.cmbRecordingInterval.DropDownStyle         = ComboBoxStyle.DropDownList;
            this.cmbRecordingInterval.FormattingEnabled     = true;
            this.cmbRecordingInterval.Location  = new Point(148, 51);
            this.cmbRecordingInterval.Name      = "cmbRecordingInterval";
            this.cmbRecordingInterval.Size      = new Size(84, 20);
            this.cmbRecordingInterval.TabIndex  = 8;
            this.lblRecordingInterval.Location  = new Point(22, 51);
            this.lblRecordingInterval.Name      = "lblRecordingInterval";
            this.lblRecordingInterval.Size      = new Size(119, 20);
            this.lblRecordingInterval.TabIndex  = 7;
            this.lblRecordingInterval.Text      = "Recording Interval";
            this.lblRecordingInterval.TextAlign = ContentAlignment.MiddleRight;
            this.grpGps.Controls.Add(this.chkGpsSwitch);
            this.grpGps.Controls.Add(this.cmbTimeZone);
            this.grpGps.Controls.Add(this.lblTimeZone);
            this.grpGps.Location       = new Point(43, 128);
            this.grpGps.Name           = "grpGps";
            this.grpGps.Size           = new Size(291, 100);
            this.grpGps.TabIndex       = 12;
            this.grpGps.TabStop        = false;
            this.grpGps.Text           = "Gps";
            this.chkGpsSwitch.AutoSize = true;
            this.chkGpsSwitch.Location = new Point(148, 23);
            this.chkGpsSwitch.Name     = "chkGpsSwitch";
            this.chkGpsSwitch.Size     = new Size(84, 16);
            this.chkGpsSwitch.TabIndex = 6;
            this.chkGpsSwitch.Text     = "Gps Switch";
            this.chkGpsSwitch.UseVisualStyleBackColor = true;
            this.cmbTimeZone.DropDownStyle            = ComboBoxStyle.DropDownList;
            this.cmbTimeZone.FormattingEnabled        = true;
            this.cmbTimeZone.Location  = new Point(148, 51);
            this.cmbTimeZone.Name      = "cmbTimeZone";
            this.cmbTimeZone.Size      = new Size(84, 20);
            this.cmbTimeZone.TabIndex  = 8;
            this.lblTimeZone.Location  = new Point(22, 51);
            this.lblTimeZone.Name      = "lblTimeZone";
            this.lblTimeZone.Size      = new Size(119, 20);
            this.lblTimeZone.TabIndex  = 7;
            this.lblTimeZone.Text      = "TimeZone";
            this.lblTimeZone.TextAlign = ContentAlignment.MiddleRight;
            this.grpP1.Controls.Add(this.cmbP1Key);
            this.grpP1.Controls.Add(this.lblP1Key);
            this.grpP1.Location             = new Point(43, 22);
            this.grpP1.Name                 = "grpP1";
            this.grpP1.Size                 = new Size(291, 88);
            this.grpP1.TabIndex             = 12;
            this.grpP1.TabStop              = false;
            this.grpP1.Text                 = "P1 ";
            this.cmbP1Key.DropDownStyle     = ComboBoxStyle.DropDownList;
            this.cmbP1Key.FormattingEnabled = true;
            this.cmbP1Key.Location          = new Point(148, 36);
            this.cmbP1Key.Name              = "cmbP1Key";
            this.cmbP1Key.Size              = new Size(84, 20);
            this.cmbP1Key.TabIndex          = 10;
            this.lblP1Key.Location          = new Point(22, 36);
            this.lblP1Key.Name              = "lblP1Key";
            this.lblP1Key.Size              = new Size(119, 20);
            this.lblP1Key.TabIndex          = 9;
            this.lblP1Key.Text              = "P1 Key";
            this.lblP1Key.TextAlign         = ContentAlignment.MiddleRight;
            this.grpFm.Controls.Add(this.cmbBootCh);
            this.grpFm.Controls.Add(this.lblBootCh);
            this.grpFm.Controls.Add(this.chkFmSwitch);
            this.grpFm.Controls.Add(this.dgvAttachment);
            this.grpFm.Location                              = new Point(362, 22);
            this.grpFm.Name                                  = "grpFm";
            this.grpFm.Size                                  = new Size(323, 496);
            this.grpFm.TabIndex                              = 11;
            this.grpFm.TabStop                               = false;
            this.grpFm.Text                                  = "FM";
            this.cmbBootCh.DropDownStyle                     = ComboBoxStyle.DropDownList;
            this.cmbBootCh.FormattingEnabled                 = true;
            this.cmbBootCh.Location                          = new Point(131, 56);
            this.cmbBootCh.Name                              = "cmbBootCh";
            this.cmbBootCh.Size                              = new Size(121, 20);
            this.cmbBootCh.TabIndex                          = 11;
            this.lblBootCh.Location                          = new Point(34, 56);
            this.lblBootCh.Name                              = "lblBootCh";
            this.lblBootCh.Size                              = new Size(90, 20);
            this.lblBootCh.TabIndex                          = 10;
            this.lblBootCh.Text                              = "Boot Channel";
            this.lblBootCh.TextAlign                         = ContentAlignment.MiddleRight;
            this.chkFmSwitch.AutoSize                        = true;
            this.chkFmSwitch.Location                        = new Point(131, 29);
            this.chkFmSwitch.Name                            = "chkFmSwitch";
            this.chkFmSwitch.Size                            = new Size(102, 16);
            this.chkFmSwitch.TabIndex                        = 6;
            this.chkFmSwitch.Text                            = "Boot Enter Fm";
            this.chkFmSwitch.UseVisualStyleBackColor         = true;
            this.dgvAttachment.AllowUserToAddRows            = false;
            dataGridViewCellStyle.Alignment                  = DataGridViewContentAlignment.MiddleCenter;
            dataGridViewCellStyle.BackColor                  = SystemColors.Control;
            dataGridViewCellStyle.Font                       = new Font("Arial", 10f, FontStyle.Regular);
            dataGridViewCellStyle.ForeColor                  = SystemColors.WindowText;
            dataGridViewCellStyle.SelectionBackColor         = SystemColors.Highlight;
            dataGridViewCellStyle.SelectionForeColor         = SystemColors.HighlightText;
            dataGridViewCellStyle.WrapMode                   = DataGridViewTriState.True;
            this.dgvAttachment.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle;
            this.dgvAttachment.ColumnHeadersHeightSizeMode   = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
            this.dgvAttachment.Columns.AddRange(this.txtMessage);
            this.dgvAttachment.Location               = new Point(29, 88);
            this.dgvAttachment.Name                   = "dgvAttachment";
            this.dgvAttachment.RowTemplate.Height     = 23;
            this.dgvAttachment.Size                   = new Size(264, 393);
            this.dgvAttachment.TabIndex               = 2;
            this.dgvAttachment.RowPostPaint          += this.dgvAttachment_RowPostPaint;
            this.dgvAttachment.CellEndEdit           += this.dgvAttachment_CellEndEdit;
            this.dgvAttachment.EditingControlShowing += this.dgvAttachment_EditingControlShowing;
            dataGridViewCellStyle2.Alignment          = DataGridViewContentAlignment.MiddleCenter;
            this.txtMessage.DefaultCellStyle          = dataGridViewCellStyle2;
            this.txtMessage.HeaderText                = "Frequency";
            this.txtMessage.MaxInputLength            = 50;
            this.txtMessage.Name     = "txtMessage";
            this.txtMessage.Width    = 200;
            base.AutoScaleDimensions = new SizeF(6f, 12f);
//			base.AutoScaleMode = AutoScaleMode.Font;
            base.ClientSize = new Size(759, 553);
            base.Controls.Add(this.pnlAttachment);
            this.Font         = new Font("Arial", 10f, FontStyle.Regular);
            base.Name         = "AttachmentForm";
            this.Text         = "Attachment";
            base.Load        += this.AttachmentForm_Load;
            base.FormClosing += this.AttachmentForm_FormClosing;
            this.pnlAttachment.ResumeLayout(false);
            this.grpCall.ResumeLayout(false);
            this.grpRecording.ResumeLayout(false);
            this.grpRecording.PerformLayout();
            this.grpGps.ResumeLayout(false);
            this.grpGps.PerformLayout();
            this.grpP1.ResumeLayout(false);
            this.grpFm.ResumeLayout(false);
            this.grpFm.PerformLayout();
            ((ISupportInitialize)this.dgvAttachment).EndInit();
            base.ResumeLayout(false);
            base.PerformLayout();
        }
        protected override void OnViewControlsCreated()
        {
            base.OnViewControlsCreated();
            IsObjectChanged = false;
            DetailView DetailView = (View as DetailView);
            view = new XafBootstrapView();
            view.IsRootView = true;
            CustomPanel cp = new CustomPanel();
            IList<Control> ctrls = new List<Control>();

            foreach (Control control in (DetailView.Control as Control).Controls)
                ctrls.Add(control);

            foreach (var control in ctrls)
                cp.Controls.Add(control);

            view.View = DetailView;
            view.ControlToRender = cp;
            (View.Control as Control).Controls.Add(view);
        }
Пример #29
0
        public GameForm()
        {
            Width           = 1000;
            Height          = Game.Height;
            DoubleBuffered  = true;
            WindowState     = FormWindowState.Maximized;
            Game.ShotsLimit = 3;

            var canvas = new CustomPanel()
            {
                Width                 = Game.Width,
                Height                = Game.Height,
                BackgroundImage       = Textures.Collection["corusant_state1"],
                Dock                  = DockStyle.Fill,
                BackgroundImageLayout = ImageLayout.Stretch
            };

            canvas.Paint += (sender, args) =>
            {
                Drawer.PaintStartScreen(args.Graphics, canvas);
                Drawer.PaintScore(args.Graphics, Game);
                Drawer.PaintPlayer(args.Graphics, Game.Player);
                Drawer.PaintObstacles(args.Graphics, Game);
                Drawer.PaintBlasts(args.Graphics, Game.Blasts);
                Drawer.PaintEnemies(args.Graphics);
                Drawer.PaintDeathScreen(args.Graphics, canvas);
            };
            KeyDown += KeyBoardHandler;

            Controls.Add(canvas);

            var bgCounter    = 1;
            var planeCounter = 1;

            timer.Tick += (sender, args) =>
            {
                Tools.SetCanvasFlickering(canvas, ref bgCounter, 30);
                Tools.SetPlaneFlickering(Game, ref planeCounter, 10);

                foreach (var obs in Game.Obstacles)
                {
                    obs.SetLocation(obs.X - 10, obs.Y);

                    if (obs.IntersectsWithPlayer(Game.Player))
                    {
                        explosionSound.Play();
                        PlayerCurrentStructure = Textures.Collection["xwing_destroyed"];
                        Game.Finish();
                        timer.Stop();
                    }
                }

                var blastsToRemove  = new HashSet <Blast>();
                var enemiesToRemove = new HashSet <Enemy>();

                foreach (var blast in Game.Blasts)
                {
                    var obsToRemove = new HashSet <Obstacle>();
                    blast.Move(MoveDirection.Right);

                    if (blast.X > Game.Width)
                    {
                        blastsToRemove.Add(blast);
                    }

                    foreach (var obs in Game.Obstacles)
                    {
                        if (blast.IntersectsWithObstacle(obs))
                        {
                            blastsToRemove.Add(blast);
                            obsToRemove.Add(obs);
                            Game.Score++;
                        }
                    }

                    foreach (var enemy in Game.Enemies)
                    {
                        if (blast.IntersectsWithEnemy(enemy))
                        {
                            blastsToRemove.Add(blast);
                            enemiesToRemove.Add(enemy);
                            Game.Score *= 2;
                        }
                    }

                    foreach (var enemy in enemiesToRemove)
                    {
                        Game.Enemies.Remove(enemy);
                    }

                    foreach (var obs in obsToRemove)
                    {
                        Game.Obstacles.Remove(obs);
                        Game.Obstacles.Add(Game.GenerateObstacles(1).First());
                    }
                }

                foreach (var blast in blastsToRemove)
                {
                    Game.Blasts.Remove(blast);
                }

                canvas.Invalidate();
            };
        }
        protected override void OnViewControlsCreated()
        {
            base.OnViewControlsCreated();
            Frame.GetController<DashboardCustomizationController>().OrganizeDashboardAction.Active["CustomDashboardViewRootController"] = false;
            IsObjectChanged = false;
            DashboardView DetailView = (View as DashboardView);
            view = new XafBootstrapView();
            view.IsRootView = true;
            CustomPanel cp = new CustomPanel();
            IList<Control> ctrls = new List<Control>();

            foreach (Control control in (DetailView.Control as Control).Controls)
                ctrls.Add(control);

            foreach (var control in ctrls)
                cp.Controls.Add(control);

            view.View = DetailView;
            view.ControlToRender = cp;
            (View.Control as Control).Controls.Add(view);
        }
Пример #31
0
        private void InitializeComponent()
        {
            this.pnlZoneBasic = new CustomPanel();
            this.grpSub       = new GroupBox();
            this.cmbSubCh     = new CustomCombo();
            this.lblSubCh     = new Label();
            this.cmbSubZone   = new CustomCombo();
            this.lblSubZone   = new Label();
            this.grpMain      = new GroupBox();
            this.cmbMainCh    = new CustomCombo();
            this.lblMainCh    = new Label();
            this.cmbMainZone  = new CustomCombo();
            this.lblCurZone   = new Label();
            this.pnlZoneBasic.SuspendLayout();
            this.grpSub.SuspendLayout();
            this.grpMain.SuspendLayout();
            base.SuspendLayout();
            this.pnlZoneBasic.AutoScroll = true;
            this.pnlZoneBasic.AutoSize   = true;
            this.pnlZoneBasic.Controls.Add(this.grpSub);
            this.pnlZoneBasic.Controls.Add(this.grpMain);
            this.pnlZoneBasic.Dock     = DockStyle.Fill;
            this.pnlZoneBasic.Location = new Point(0, 0);
            this.pnlZoneBasic.Name     = "pnlZoneBasic";
            this.pnlZoneBasic.Size     = new Size(600, 197);
            this.pnlZoneBasic.TabIndex = 0;

            this.grpSub.Controls.Add(this.cmbSubCh);
            this.grpSub.Controls.Add(this.lblSubCh);
            this.grpSub.Controls.Add(this.cmbSubZone);
            this.grpSub.Controls.Add(this.lblSubZone);
            this.grpSub.Location                  = new Point(300, 35);
            this.grpSub.Name                      = "grpSub";
            this.grpSub.Size                      = new Size(250, 129);
            this.grpSub.TabIndex                  = 7;
            this.grpSub.TabStop                   = false;
            this.grpSub.Text                      = "Down";
            this.cmbSubCh.DropDownStyle           = ComboBoxStyle.DropDownList;
            this.cmbSubCh.FormattingEnabled       = true;
            this.cmbSubCh.Location                = new Point(98, 71);
            this.cmbSubCh.Name                    = "cmbSubCh";
            this.cmbSubCh.Size                    = new Size(120, 24);
            this.cmbSubCh.TabIndex                = 5;
            this.lblSubCh.Location                = new Point(19, 71);
            this.lblSubCh.Name                    = "lblSubCh";
            this.lblSubCh.Size                    = new Size(70, 24);
            this.lblSubCh.TabIndex                = 4;
            this.lblSubCh.Text                    = "Channel";
            this.lblSubCh.TextAlign               = ContentAlignment.MiddleRight;
            this.cmbSubZone.DropDownStyle         = ComboBoxStyle.DropDownList;
            this.cmbSubZone.FormattingEnabled     = true;
            this.cmbSubZone.Location              = new Point(98, 37);
            this.cmbSubZone.Name                  = "cmbSubZone";
            this.cmbSubZone.Size                  = new Size(120, 24);
            this.cmbSubZone.TabIndex              = 1;
            this.cmbSubZone.SelectedIndexChanged += new EventHandler(this.cmbSubZone_SelectedIndexChanged);
            this.cmbSubZone.DropDown             += new EventHandler(this.cmbSubZone_DropDown);
            this.lblSubZone.Location              = new Point(19, 37);
            this.lblSubZone.Name                  = "lblSubZone";
            this.lblSubZone.Size                  = new Size(70, 24);
            this.lblSubZone.TabIndex              = 0;
            this.lblSubZone.Text                  = "Zone";
            this.lblSubZone.TextAlign             = ContentAlignment.MiddleRight;
            this.grpMain.Controls.Add(this.cmbMainCh);
            this.grpMain.Controls.Add(this.lblMainCh);
            this.grpMain.Controls.Add(this.cmbMainZone);
            this.grpMain.Controls.Add(this.lblCurZone);
            this.grpMain.Location                  = new Point(25, 35);
            this.grpMain.Name                      = "grpMain";
            this.grpMain.Size                      = new Size(250, 129);
            this.grpMain.TabIndex                  = 6;
            this.grpMain.TabStop                   = false;
            this.grpMain.Text                      = "Up";
            this.cmbMainCh.DropDownStyle           = ComboBoxStyle.DropDownList;
            this.cmbMainCh.FormattingEnabled       = true;
            this.cmbMainCh.Location                = new Point(98, 71);
            this.cmbMainCh.Name                    = "cmbMainCh";
            this.cmbMainCh.Size                    = new Size(120, 24);
            this.cmbMainCh.TabIndex                = 3;
            this.lblMainCh.Location                = new Point(19, 71);
            this.lblMainCh.Name                    = "lblMainCh";
            this.lblMainCh.Size                    = new Size(70, 24);
            this.lblMainCh.TabIndex                = 2;
            this.lblMainCh.Text                    = "Channel";
            this.lblMainCh.TextAlign               = ContentAlignment.MiddleRight;
            this.cmbMainZone.DropDownStyle         = ComboBoxStyle.DropDownList;
            this.cmbMainZone.FormattingEnabled     = true;
            this.cmbMainZone.Location              = new Point(98, 37);
            this.cmbMainZone.Name                  = "cmbMainZone";
            this.cmbMainZone.Size                  = new Size(120, 24);
            this.cmbMainZone.TabIndex              = 1;
            this.cmbMainZone.SelectedIndexChanged += new EventHandler(this.cmbMainZone_SelectedIndexChanged);
            this.cmbMainZone.DropDown             += new EventHandler(this.cmbMainZone_DropDown);
            this.lblCurZone.Location               = new Point(19, 37);
            this.lblCurZone.Name                   = "lblCurZone";
            this.lblCurZone.Size                   = new Size(70, 24);
            this.lblCurZone.TabIndex               = 0;
            this.lblCurZone.Text                   = "Zone";
            this.lblCurZone.TextAlign              = ContentAlignment.MiddleRight;
            base.AutoScaleDimensions               = new SizeF(7f, 16f);
//			base.AutoScaleMode = AutoScaleMode.Font;
            base.ClientSize = new Size(600, 197);
            base.Controls.Add(this.pnlZoneBasic);
            this.Font         = new Font("Arial", 10f, FontStyle.Regular);
            base.Name         = "ZoneBasicForm";
            this.Text         = "Zone";
            base.Load        += new EventHandler(this.ZoneBasicForm_Load);
            base.FormClosing += new FormClosingEventHandler(this.ZoneBasicForm_FormClosing);
            this.pnlZoneBasic.ResumeLayout(false);
            this.grpSub.ResumeLayout(false);
            this.grpMain.ResumeLayout(false);
            base.ResumeLayout(false);
            base.PerformLayout();
        }
Пример #32
0
 public PaintTool()
 {
     ControlPanels = new CustomPanel[] { CharacterPickPanel.SharedInstance };
 }
        private static void AddControls(bool displayOnly)
        {
            try
            {

                s_tbCntlDisplay.TabPages.Clear();
                s_tbCntlDisplay.Controls.Clear();

                //Exit if the layer is not found
                if (v_ViewerLayer == null)
                    return;
                if (v_ViewerLayer.FeatureClass == null)
                    return;

                int pLeftPadding = 10;

                //Clear out the controls from the container
               // s_tbCntlDisplay.TabPages.Clear();
              //  s_tbCntlDisplay.Controls.Clear();
                TabPage pTbPg = new TabPage();
                s_tbCntlDisplay.TabPages.Add(pTbPg);

                //Controls to display attributes
                //Dim pTbPg As TabPage = Nothing
                TextBox pTxtBox = default(TextBox);
                Label pLbl = default(Label);
                NumericUpDown pNumBox = default(NumericUpDown);
                System.Windows.Forms.Button pBtn = null;
                ComboBox pCBox = default(ComboBox);
                RadioButton pRDButton = default(RadioButton);

                DateTimePicker pDateTime = default(DateTimePicker);
                //Spacing between each control
               // int intCtrlSpace = 5;
                //Spacing between a lable and a control
                //int intLabelCtrlSpace = 0;

                //Set the width of each control
                //   Dim my.Globals.Constants.c_ControlWidth As Integer = 50
                //used for sizing text, only used when text is larger then display
                Graphics g = default(Graphics);
                SizeF s = default(SizeF);

                //Used to loop through featurelayer
                IFields pDCs = default(IFields);
                IField pDc = default(IField);
                int pSubTypeDefValue = 0;

                //Get the columns for hte layer
                pDCs = v_ViewerLayer.FeatureClass.Fields;
                ISubtypes pSubType = (ISubtypes)v_ViewerLayer.FeatureClass;
                if (pSubType.HasSubtype)
                {
                    pSubTypeDefValue = pSubType.DefaultSubtypeCode;
                    //pfl.Columns(pfl.SubtypeColumnIndex).DefaultValue
                }

                //Field Name
                string strfld = null;
                //Field Alias
                string strAli = null;

                IDomain pDom = default(IDomain);
                for (int i = 0; i <= pDCs.FieldCount - 1; i++)
                {
                    pDc = (IField)pDCs.get_Field(i);
                    ILayerFields pLayerFields = default(ILayerFields);
                    IFieldInfo pFieldInfo = default(IFieldInfo);

                    pLayerFields = (ILayerFields)v_ViewerLayer;
                    pFieldInfo = pLayerFields.get_FieldInfo(pLayerFields.FindField(pDc.Name));
                    //  pFieldInfo.Visible = False

                    if (pFieldInfo.Visible == false)
                    {

                    }
                    else
                    {

                        pDom = null;

                        //Get the field names
                        strfld = pDc.Name;
                        strAli = pDc.AliasName;

                        //Check the field types

                        if (v_ViewerLayer.FeatureClass.ShapeFieldName == strfld ||
                            v_ViewerLayer.FeatureClass.OIDFieldName == strfld ||
                            (strfld).ToUpper() == ("shape.len").ToUpper() ||
                           (strfld).ToUpper() == ("shape.area").ToUpper() ||
                           (strfld).ToUpper() == ("shape_length").ToUpper() ||
                           (strfld).ToUpper() == ("shape_len").ToUpper() ||
                           (strfld).ToUpper() == ("shape_area").ToUpper() ||
                           (strfld).ToUpper() == ("LASTUPDATE").ToUpper() ||
                           (strfld).ToUpper() == ("LASTEDITOR").ToUpper())
                        {

                        }
                        else if (displayOnly)
                        {

                            //Create a lable for the field name
                            pLbl = new Label();
                            //Apply the field alias to the field name
                            pLbl.Text = strAli;
                            //Link the field to the name of the control
                            pLbl.Name = "lblEdit" + strfld;
                            //Add the control at the determined Location
                            pLbl.Left = 0;

                            pLbl.Top = 0;
                            //Apply global font
                            pLbl.Font = c_FntLbl;
                            //Create a graphics object to messure the text
                            g = pLbl.CreateGraphics();
                            s = g.MeasureString(pLbl.Text, pLbl.Font);

                            pLbl.Height = Convert.ToInt32(s.Height);
                            //If the text is larger then the control, truncate the control
                            if (s.Width >= c_ControlWidth)
                            {
                                pLbl.Width = c_ControlWidth;
                                //Use autosize if it fits
                            }
                            else
                            {
                                pLbl.AutoSize = true;
                            }

                            //Create a new control to display the attributes
                            pTxtBox = new TextBox();

                            //Tag the control with the field it represents
                            pTxtBox.Tag = (strfld).Trim();
                            //Name the field with the field name
                            pTxtBox.Name = "txtEdit" + strfld;
                            //Locate the control on the display
                            pTxtBox.Left = 0;
                            // pTxtBox.Enabled = False
                            pTxtBox.BackColor = Color.White;
                            pTxtBox.ReadOnly = true;

                            pTxtBox.Width = c_ControlWidth;
                            if (pDc.Type == esriFieldType.esriFieldTypeString)
                            {
                                //Make the box taller if it is a long field
                                if (pDc.Length > 125)
                                {
                                    pTxtBox.Multiline = true;
                                    pTxtBox.Height = pTxtBox.Height * 3;

                                }

                            }
                            if (pDc.Length > 0)
                            {
                                pTxtBox.MaxLength = pDc.Length;
                            }

                            //Apply global font
                            pTxtBox.Font = c_Fnt;

                            //Group into panels to assist resizing
                            Panel pPnl = new Panel();
                            pPnl.BorderStyle = System.Windows.Forms.BorderStyle.None;

                            pLbl.Top = 0;
                            pTxtBox.Top = 5 + pLbl.Height;
                            pPnl.Width = c_ControlWidth;
                            pPnl.Margin = new Padding(0);
                            pPnl.Padding = new Padding(0);

                            pPnl.Top = 0;
                            pPnl.Left = 0;
                            pPnl.Height = pTxtBox.Height + pLbl.Height + 10;
                            pPnl.Controls.Add(pLbl);
                            pPnl.Controls.Add(pTxtBox);
                            pTbPg.Controls.Add(pPnl);

                            //Reserved Columns
                        }
                        else if (pSubType.SubtypeFieldName == strfld)
                        {
                            //Create a lable for the field name
                            pLbl = new Label();
                            //Apply the field alias to the field name
                            pLbl.Text = strAli + " (Set This Value First)";
                            //Link the field to the name of the control
                            pLbl.Name = "lblEdit" + strfld;

                            //Add the control at the determined Location

                            pLbl.Left = 0;

                            pLbl.Top = 0;
                            pLbl.ForeColor = Color.Blue;

                            //Apply global font
                            pLbl.Font = c_FntLbl;
                            //Create a graphics object to messure the text
                            g = pLbl.CreateGraphics();
                            s = g.MeasureString(pLbl.Text, pLbl.Font);

                            pLbl.Height = Convert.ToInt32(s.Height);
                            //If the text is larger then the control, truncate the control
                            if (s.Width >= c_ControlWidth)
                            {
                                pLbl.Width = c_ControlWidth;
                                //Use autosize if it fits
                            }
                            else
                            {
                                pLbl.AutoSize = true;
                            }

                            if (Globals.SubtypeCount((ISubtypes)pSubType.Subtypes) == 2)
                            {
                                CustomPanel pNewGpBox = new CustomPanel();
                                pNewGpBox.Tag = strfld;
                                pNewGpBox.BorderStyle = System.Windows.Forms.BorderStyle.None;
                                pNewGpBox.BackColor = Color.White;
                                //  pNewGpBox.BorderColor = Pens.LightGray

                                pNewGpBox.Width = c_ControlWidth;
                                pNewGpBox.Top = 0;
                                pNewGpBox.Left = 0;

                                pRDButton = new RadioButton();
                                pRDButton.Font = c_Fnt;
                                pRDButton.Name = "Rdo1Sub";
                                string codeVal = "";
                                string displayVal = "";
                                Globals.SubtypeValuesAtIndex(0, (ISubtypes)pSubType, ref codeVal, ref displayVal);
                                pRDButton.Tag = codeVal;

                                pRDButton.Text = displayVal;

                                pRDButton.Left = pLeftPadding;

                                pRDButton.AutoSize = true;
                                pNewGpBox.Controls.Add(pRDButton);

                                pNewGpBox.Height = pRDButton.Height + 12;
                                pRDButton.Top = pNewGpBox.Height / 2 - pRDButton.Height / 2 - 2;

                                pRDButton = new RadioButton();
                                pRDButton.Font = c_Fnt;
                                pRDButton.Name = "Rdo2Sub";
                                Globals.SubtypeValuesAtIndex(1, pSubType, ref codeVal, ref displayVal);

                                pRDButton.Tag = codeVal;
                                pRDButton.Text = displayVal;
                                pRDButton.Left = pNewGpBox.Width / 2;

                                pRDButton.AutoSize = true;
                                pNewGpBox.Controls.Add(pRDButton);
                                pRDButton.Top = pNewGpBox.Height / 2 - pRDButton.Height / 2 - 2;

                                Panel pPnl = new Panel();
                                pPnl.BorderStyle = System.Windows.Forms.BorderStyle.None;

                                pLbl.Top = 0;
                                pNewGpBox.Top = pLbl.Height + 5;

                                pPnl.Width = c_ControlWidth;
                                pPnl.Margin = new Padding(0);
                                pPnl.Padding = new Padding(0);

                                pPnl.Top = 0;
                                pPnl.Left = 0;
                                pPnl.Height = pNewGpBox.Height + pLbl.Height + 10;
                                pPnl.Controls.Add(pLbl);
                                pPnl.Controls.Add(pNewGpBox);

                                pTbPg.Controls.Add(pPnl);

                                pNewGpBox = null;
                                //  pPf = Nothing

                            }
                            else
                            {
                                pCBox = new ComboBox();
                                pCBox.Tag = strfld;
                                pCBox.Name = "cboEdt" + strfld;
                                pCBox.Left = 0;
                                pCBox.Top = 0;
                                pCBox.Width = c_ControlWidth;
                                pCBox.Height = pCBox.Height + 5;
                                pCBox.DropDownStyle = ComboBoxStyle.DropDownList;

                                pCBox.Font = c_Fnt;
                                pCBox.DataBindings.DefaultDataSourceUpdateMode = DataSourceUpdateMode.Never;

                                pCBox.DataSource = Globals.SubtypeToList(pSubType);
                                pCBox.DisplayMember = "getDisplay";
                                pCBox.ValueMember = "getValue";
                                // pCmdBox.MaxLength = pDc.Length

                                pCBox.SelectionChangeCommitted += cmbSubTypChange_Click;

                                Panel pPnl = new Panel();
                                pPnl.BorderStyle = System.Windows.Forms.BorderStyle.None;

                                pLbl.Top = 0;
                                pCBox.Top = pLbl.Height + 5;

                                pPnl.Width = c_ControlWidth;
                                pPnl.Margin = new Padding(0);
                                pPnl.Padding = new Padding(0);

                                pPnl.Top = 0;
                                pPnl.Left = 0;
                                pPnl.Height = pCBox.Height + pLbl.Height + 15;
                                pPnl.Controls.Add(pLbl);
                                pPnl.Controls.Add(pCBox);

                                pTbPg.Controls.Add(pPnl);
                                string codeVal = "";
                                string displayVal = "";
                                Globals.SubtypeValuesAtIndex(0, (ISubtypes)pSubType, ref codeVal, ref displayVal);

                                pCBox.Text = displayVal;

                            }

                        }
                        else
                        {

                            if (pSubType.HasSubtype)
                            {
                                pDom = pSubType.get_Domain(pSubTypeDefValue, pDc.Name);

                            }
                            else
                            {
                                pDom = pDc.Domain;

                            }
                            //No Domain Found

                            if (pDom == null)
                            {

                                if (pDc.Type == esriFieldType.esriFieldTypeString || pDc.Type == esriFieldType.esriFieldTypeDouble || pDc.Type == esriFieldType.esriFieldTypeInteger || pDc.Type == esriFieldType.esriFieldTypeSingle || pDc.Type == esriFieldType.esriFieldTypeSmallInteger)
                                {
                                    //Create a lable for the field name
                                    pLbl = new Label();
                                    //Apply the field alias to the field name
                                    pLbl.Text = strAli;
                                    //Link the field to the name of the control
                                    pLbl.Name = "lblEdit" + strfld;
                                    //Add the control at the determined Location
                                    pLbl.Left = 0;

                                    pLbl.Top = 0;
                                    //Apply global font
                                    pLbl.Font = c_FntLbl;
                                    //Create a graphics object to messure the text
                                    g = pLbl.CreateGraphics();
                                    s = g.MeasureString(pLbl.Text, pLbl.Font);

                                    pLbl.Height = Convert.ToInt32(s.Height);
                                    //If the text is larger then the control, truncate the control
                                    if (s.Width >= c_ControlWidth)
                                    {
                                        pLbl.Width = c_ControlWidth;
                                        //Use autosize if it fits
                                    }
                                    else
                                    {
                                        pLbl.AutoSize = true;
                                    }

                                    //Create a new control to display the attributes
                                    pTxtBox = new TextBox();

                                    //Tag the control with the field it represents
                                    pTxtBox.Tag = (strfld).Trim();
                                    //Name the field with the field name
                                    pTxtBox.Name = "txtEdit" + strfld;
                                    //Locate the control on the display
                                    pTxtBox.Left = 0;

                                    pTxtBox.Width = c_ControlWidth;
                                    if (pDc.Type == esriFieldType.esriFieldTypeString)
                                    {
                                        //Make the box taller if it is a long field
                                        if (pDc.Length > 125)
                                        {
                                            pTxtBox.Multiline = true;
                                            pTxtBox.Height = pTxtBox.Height * 3;

                                        }

                                    }
                                    if (pDc.Length > 0)
                                    {
                                        pTxtBox.MaxLength = pDc.Length;
                                    }

                                    //Apply global font
                                    pTxtBox.Font = c_Fnt;

                                    //Group into panels to assist resizing
                                    Panel pPnl = new Panel();
                                    pPnl.BorderStyle = System.Windows.Forms.BorderStyle.None;

                                    pLbl.Top = 0;
                                    pTxtBox.Top = 5 + pLbl.Height;
                                    pPnl.Width = c_ControlWidth;
                                    pPnl.Margin = new Padding(0);
                                    pPnl.Padding = new Padding(0);

                                    pPnl.Top = 0;
                                    pPnl.Left = 0;
                                    pPnl.Height = pTxtBox.Height + pLbl.Height + 10;
                                    pPnl.Controls.Add(pLbl);
                                    pPnl.Controls.Add(pTxtBox);
                                    pTbPg.Controls.Add(pPnl);

                                }
                                else if (pDc.Type == esriFieldType.esriFieldTypeDate)
                                {
                                    //Create a lable for the field name
                                    pLbl = new Label();
                                    //Apply the field alias to the field name
                                    pLbl.Text = strAli;
                                    //Link the field to the name of the control
                                    pLbl.Name = "lblEdit" + strfld;
                                    //Add the control at the determined Location
                                    pLbl.Left = 0;

                                    //   pLbl.Top = pNextControlTop
                                    //Apply global font
                                    pLbl.Font = c_FntLbl;
                                    //Create a graphics object to messure the text
                                    g = pLbl.CreateGraphics();
                                    s = g.MeasureString(pLbl.Text, pLbl.Font);

                                    pLbl.Height = Convert.ToInt32(s.Height);
                                    //If the text is larger then the control, truncate the control
                                    if (s.Width >= c_ControlWidth)
                                    {
                                        pLbl.Width = c_ControlWidth;
                                        //Use autosize if it fits
                                    }
                                    else
                                    {
                                        pLbl.AutoSize = true;
                                    }
                                    //Determine the Location for the next control
                                    //   pNextControlTop = pLbl.Top + s.Height + intLabelCtrlSpace

                                    pDateTime = new DateTimePicker();
                                    pDateTime.Font = c_Fnt;
                                    //pDateTime.CustomFormat = "m/d/yyyy"
                                    pDateTime.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
                                    pDateTime.CustomFormat = "M-d-yy";
                                    // h:mm tt"
                                    pDateTime.ShowCheckBox = true;
                                    pDateTime.Tag = strfld;
                                    pDateTime.Name = "dtEdt" + strfld;
                                    pDateTime.Left = 0;
                                    //   pDateTime.Top = pNextControlTop
                                    pDateTime.Width = c_ControlWidth;

                                    //Determine the Location for the next control
                                    //pNextControlTop = pDateTime.Top + pDateTime.Height + intCtrlSpace
                                    Panel pPnl = new Panel();
                                    pPnl.BorderStyle = System.Windows.Forms.BorderStyle.None;

                                    pLbl.Top = 0;
                                    pDateTime.Top = 5 + pLbl.Height;
                                    pPnl.Width = c_ControlWidth;
                                    pPnl.Margin = new Padding(0);
                                    pPnl.Padding = new Padding(0);

                                    pPnl.Top = 0;
                                    pPnl.Left = 0;
                                    pPnl.Height = pDateTime.Height + pLbl.Height + 10;
                                    pPnl.Controls.Add(pLbl);
                                    pPnl.Controls.Add(pDateTime);
                                    pTbPg.Controls.Add(pPnl);

                                }
                                else if (pDc.Type == esriFieldType.esriFieldTypeRaster)
                                {
                                    //Create a lable for the field name
                                    pLbl = new Label();
                                    //Apply the field alias to the field name
                                    pLbl.Text = strAli;
                                    //Link the field to the name of the control
                                    pLbl.Name = "lblEdit" + strfld;
                                    //Add the control at the determined Location
                                    pLbl.Left = 0;
                                    pLbl.Top = 0;
                                    //Apply global font
                                    pLbl.Font = c_FntLbl;
                                    //Create a graphics object to messure the text
                                    g = pLbl.CreateGraphics();
                                    s = g.MeasureString(pLbl.Text, pLbl.Font);
                                    pLbl.Height = Convert.ToInt32(s.Height);
                                    //If the text is larger then the control, truncate the control
                                    if (s.Width >= c_ControlWidth)
                                    {
                                        pLbl.Width = 0;
                                        //Use autosize if it fits
                                    }
                                    else
                                    {
                                        pLbl.AutoSize = true;
                                    }
                                    //Determine the Location for the next control

                                    //Create a new control to display the attributes
                                    pTxtBox = new TextBox();
                                    //Disable the control
                                    //  pPic.ReadOnly = True
                                    //Tag the control with the field it represents
                                    pTxtBox.Tag = (strfld).Trim();
                                    //Name the field with the field name
                                    pTxtBox.Name = "txtEdit" + strfld;
                                    //Locate the control on the display
                                    pTxtBox.Left = 0;
                                    pTxtBox.Top = 0;
                                    pTxtBox.Width = c_ControlWidth - pTxtBox.Height;
                                    if (pDc.Type == esriFieldType.esriFieldTypeString)
                                    {
                                        //Make the box taller if it is a long field
                                        if (pDc.Length > 125)
                                        {
                                            pTxtBox.Multiline = true;
                                            pTxtBox.Height = pTxtBox.Height * 3;

                                        }

                                    }
                                    if (pDc.Length > 0)
                                    {
                                        pTxtBox.MaxLength = pDc.Length;
                                    }

                                    pTxtBox.BackgroundImageLayout = ImageLayout.Stretch;

                                    //Apply global font
                                    pTxtBox.Font = c_Fnt;

                                    pBtn = new System.Windows.Forms.Button();

                                    pBtn.Tag = (strfld).Trim();
                                    //Name the field with the field name
                                    pBtn.Name = "btnEdit" + strfld;
                                    //Locate the control on the display
                                    pBtn.Left = pTxtBox.Left + pTxtBox.Width + 5;
                                    pBtn.Top = 0;
                                    System.Drawing.Bitmap img = null;

                                    img = Properties.Resources.Open2;

                                    img.MakeTransparent(img.GetPixel(img.Width - 1, 1));

                                    pBtn.BackgroundImageLayout = ImageLayout.Center;
                                    pBtn.BackgroundImage = img;
                                    img = null;
                                    pBtn.Width = pTxtBox.Height;
                                    pBtn.Height = pTxtBox.Height;

                                    pBtn.Click += btnLoadImgClick;

                                    Panel pPnl = new Panel();
                                    pPnl.BorderStyle = System.Windows.Forms.BorderStyle.None;

                                    pLbl.Top = 0;
                                    pTxtBox.Top = 5 + pLbl.Height;
                                    pBtn.Top = pTxtBox.Top;
                                    pPnl.Width = c_ControlWidth;
                                    pPnl.Margin = new Padding(0);
                                    pPnl.Padding = new Padding(0);

                                    pPnl.Top = 0;
                                    pPnl.Left = 0;
                                    pPnl.Height = pTxtBox.Height + pLbl.Height + 10;
                                    pPnl.Controls.Add(pLbl);
                                    pPnl.Controls.Add(pTxtBox);
                                    pPnl.Controls.Add(pBtn);
                                    pTbPg.Controls.Add(pPnl);

                                }
                                else if (pDc.Type == esriFieldType.esriFieldTypeBlob)
                                {
                                    //Create a lable for the field name
                                    pLbl = new Label();
                                    //Apply the field alias to the field name
                                    pLbl.Text = strAli;
                                    //Link the field to the name of the control
                                    pLbl.Name = "lblEdit" + strfld;
                                    //Add the control at the determined Location
                                    pLbl.Left = 0;
                                    pLbl.Top = 0;
                                    //Apply global font
                                    pLbl.Font = c_FntLbl;
                                    //Create a graphics object to messure the text
                                    g = pLbl.CreateGraphics();
                                    s = g.MeasureString(pLbl.Text, pLbl.Font);
                                    pLbl.Height = Convert.ToInt32(s.Height);
                                    //If the text is larger then the control, truncate the control
                                    if (s.Width >= c_ControlWidth)
                                    {
                                        pLbl.Width = 0;
                                        //Use autosize if it fits
                                    }
                                    else
                                    {
                                        pLbl.AutoSize = true;
                                    }
                                    //Determine the Location for the next control

                                    //Create a new control to display the attributes
                                    pTxtBox = new TextBox();
                                    //Disable the control
                                    //  pPic.ReadOnly = True
                                    //Tag the control with the field it represents
                                    pTxtBox.Tag = (strfld).Trim();
                                    //Name the field with the field name
                                    pTxtBox.Name = "txtEdit" + strfld;
                                    //Locate the control on the display
                                    pTxtBox.Left = 0;
                                    pTxtBox.Top = 0;
                                    pTxtBox.Width = c_ControlWidth - pTxtBox.Height;
                                    if (pDc.Type == esriFieldType.esriFieldTypeString)
                                    {
                                        //Make the box taller if it is a long field
                                        if (pDc.Length > 125)
                                        {
                                            pTxtBox.Multiline = true;
                                            pTxtBox.Height = pTxtBox.Height * 3;

                                        }

                                    }
                                    if (pDc.Length > 0)
                                    {
                                        pTxtBox.MaxLength = pDc.Length;
                                    }

                                    pTxtBox.BackgroundImageLayout = ImageLayout.Stretch;

                                    //Apply global font
                                    pTxtBox.Font = c_Fnt;

                                    pBtn = new System.Windows.Forms.Button();

                                    pBtn.Tag = (strfld).Trim();
                                    //Name the field with the field name
                                    pBtn.Name = "btnEdit" + strfld;
                                    //Locate the control on the display
                                    pBtn.Left = pTxtBox.Left + pTxtBox.Width + 5;
                                    pBtn.Top = 0;
                                    System.Drawing.Bitmap img = null;

                                    img = Properties.Resources.Open2;

                                    img.MakeTransparent(img.GetPixel(img.Width - 1, 1));

                                    pBtn.BackgroundImageLayout = ImageLayout.Center;
                                    pBtn.BackgroundImage = img;
                                    img = null;
                                    pBtn.Width = pTxtBox.Height;
                                    pBtn.Height = pTxtBox.Height;

                                    pBtn.Click += btnLoadImgClick;

                                    Panel pPnl = new Panel();
                                    pPnl.BorderStyle = System.Windows.Forms.BorderStyle.None;

                                    pLbl.Top = 0;
                                    pTxtBox.Top = 5 + pLbl.Height;
                                    pBtn.Top = pTxtBox.Top;
                                    pPnl.Width = c_ControlWidth;
                                    pPnl.Margin = new Padding(0);
                                    pPnl.Padding = new Padding(0);

                                    pPnl.Top = 0;
                                    pPnl.Left = 0;
                                    pPnl.Height = pTxtBox.Height + pLbl.Height + 10;
                                    pPnl.Controls.Add(pLbl);
                                    pPnl.Controls.Add(pTxtBox);
                                    pPnl.Controls.Add(pBtn);
                                    pTbPg.Controls.Add(pPnl);

                                }
                            }
                            else
                            {
                                if (pDom is CodedValueDomain)
                                {
                                    ICodedValueDomain pCV = default(ICodedValueDomain);

                                    //Create a lable for the field name
                                    pLbl = new Label();
                                    //Apply the field alias to the field name
                                    pLbl.Text = strAli;
                                    //Link the field to the name of the control
                                    pLbl.Name = "lblEdit" + strfld;
                                    //Add the control at the determined Location
                                    pLbl.Left = 0;
                                    pLbl.Top = 0;
                                    //Apply global font
                                    pLbl.Font = c_FntLbl;
                                    //Create a graphics object to messure the text
                                    g = pLbl.CreateGraphics();
                                    s = g.MeasureString(pLbl.Text, pLbl.Font);
                                    pLbl.Height = Convert.ToInt32(s.Height);
                                    //If the text is larger then the control, truncate the control
                                    if (s.Width >= c_ControlWidth)
                                    {
                                        pLbl.Width = c_ControlWidth;
                                        //Use autosize if it fits
                                    }
                                    else
                                    {
                                        pLbl.AutoSize = true;
                                    }
                                    //Determine the Location for the next control
                                    //    pNextControlTop = pLbl.Top + s.Height + intLabelCtrlSpace

                                    pCV = (ICodedValueDomain)pDom;
                                    // pTbPg.Controls.Add(pLbl)

                                    if (pCV.CodeCount == 2)
                                    {
                                        CustomPanel pNewGpBox = new CustomPanel();
                                        pNewGpBox.Tag = strfld;
                                        pNewGpBox.BorderStyle = System.Windows.Forms.BorderStyle.None;
                                        pNewGpBox.BackColor = Color.White;
                                        //  pNewGpBox.BorderColor = Pens.LightGray

                                        pNewGpBox.Width = c_ControlWidth;
                                        pNewGpBox.Top = 0;
                                        pNewGpBox.Left = 0;

                                        pRDButton = new RadioButton();
                                        pRDButton.Name = "Rdo1";
                                        string codeVal = "";
                                        string displayVal = "";
                                        Globals.DomainValuesAtIndex(0, (ICodedValueDomain)pCV, ref codeVal, ref displayVal);

                                        pRDButton.Tag = codeVal;
                                        pRDButton.Text = displayVal;
                                        pRDButton.Font = c_Fnt;
                                        //Dim pPf As SizeF = pRDButton.CreateGraphics.MeasureString(pRDButton.Text, pRDButton.Font)

                                        //'pRDButton.Height = pPf.Height
                                        //pRDButton.Width = pPf.Width + 25

                                        pRDButton.Left = pLeftPadding;

                                        pRDButton.AutoSize = true;
                                        pNewGpBox.Controls.Add(pRDButton);

                                        pNewGpBox.Height = pRDButton.Height + 12;
                                        pRDButton.Top = pNewGpBox.Height / 2 - pRDButton.Height / 2 - 2;

                                        pRDButton = new RadioButton();
                                        pRDButton.Font = c_Fnt;
                                        pRDButton.Name = "Rdo2";
                                        Globals.DomainValuesAtIndex(1, (ICodedValueDomain)pCV, ref codeVal, ref displayVal);

                                        pRDButton.Tag = codeVal;
                                        pRDButton.Text = displayVal;
                                        pRDButton.Left = pNewGpBox.Width / 2;
                                        //pPf = pRDButton.CreateGraphics.MeasureString(pRDButton.Text, pRDButton.Font)
                                        //pRDButton.Height = pPf.Height
                                        //pRDButton.Width = pPf.Width + 25

                                        pRDButton.AutoSize = true;
                                        pNewGpBox.Controls.Add(pRDButton);
                                        pRDButton.Top = pNewGpBox.Height / 2 - pRDButton.Height / 2 - 2;

                                        // pTbPg.Controls.Add(pNewGpBox)

                                        //  pNextControlTop = pNewGpBox.Top + pNewGpBox.Height + 7 + intLabelCtrlSpace

                                        Panel pPnl = new Panel();
                                        pPnl.BorderStyle = System.Windows.Forms.BorderStyle.None;

                                        pLbl.Top = 0;
                                        pNewGpBox.Top = 5 + pLbl.Height;

                                        pPnl.Width = c_ControlWidth;
                                        pPnl.Margin = new Padding(0);
                                        pPnl.Padding = new Padding(0);

                                        pPnl.Top = 0;
                                        pPnl.Left = 0;
                                        pPnl.Height = pNewGpBox.Height + pLbl.Height + 10;
                                        pPnl.Controls.Add(pLbl);
                                        pPnl.Controls.Add(pNewGpBox);

                                        pTbPg.Controls.Add(pPnl);

                                        pNewGpBox = null;
                                        //  pPf = Nothing

                                    }
                                    else
                                    {
                                        pCBox = new ComboBox();
                                        pCBox.Tag = strfld;
                                        pCBox.Name = "cboEdt" + strfld;
                                        pCBox.Left = 0;
                                        pCBox.Top = 0;
                                        pCBox.Width = c_ControlWidth;
                                        pCBox.Height = pCBox.Height + 5;
                                        pCBox.DropDownStyle = ComboBoxStyle.DropDownList;
                                        pCBox.Font = c_Fnt;
                                        pCBox.DataBindings.DefaultDataSourceUpdateMode = DataSourceUpdateMode.Never;

                                        pCBox.DataSource = Globals.DomainToList((IDomain)pCV);
                                        pCBox.DisplayMember = "getDisplay";
                                        pCBox.ValueMember = "getValue";
                                        // pCmdBox.MaxLength = pDc.Length

                                        Panel pPnl = new Panel();
                                        pPnl.BorderStyle = System.Windows.Forms.BorderStyle.None;

                                        pLbl.Top = 0;
                                        pCBox.Top = 5 + pLbl.Height;

                                        pPnl.Width = c_ControlWidth;
                                        pPnl.Margin = new Padding(0);
                                        pPnl.Padding = new Padding(0);

                                        pPnl.Top = 0;
                                        pPnl.Left = 0;
                                        pPnl.Height = pCBox.Height + pLbl.Height + 15;
                                        pPnl.Controls.Add(pLbl);
                                        pPnl.Controls.Add(pCBox);

                                        pTbPg.Controls.Add(pPnl);

                                        //   pTbPg.Controls.Add(pCBox)
                                        // MsgBox(pCBox.Items.Count)
                                        pCBox.Visible = true;

                                        string codeVal = "";
                                        string displayVal = "";
                                        Globals.DomainValuesAtIndex(0, (ICodedValueDomain)pCV, ref codeVal, ref displayVal);

                                        pCBox.Text = displayVal;

                                        //Try

                                        //pCBox.SelectedIndex = 0
                                        //Catch ex As Exception

                                        //End Try
                                        pCBox.Visible = true;
                                        pCBox.Refresh();

                                        //  pNextControlTop = pCBox.Top + pCBox.Height + 7 + intLabelCtrlSpace
                                    }

                                }
                                else if (pDom is RangeDomain)
                                {
                                    IRangeDomain pRV = default(IRangeDomain);
                                    //Create a lable for the field name
                                    pLbl = new Label();
                                    //Apply the field alias to the field name
                                    pLbl.Text = strAli;
                                    //Link the field to the name of the control
                                    pLbl.Name = "lblEdit" + strfld;
                                    //Add the control at the determined Location
                                    pLbl.Left = 0;
                                    pLbl.Top = 0;
                                    //Apply global font
                                    pLbl.Font = c_FntLbl;
                                    //Create a graphics object to messure the text
                                    g = pLbl.CreateGraphics();
                                    s = g.MeasureString(pLbl.Text, pLbl.Font);
                                    pLbl.Height = Convert.ToInt32(s.Height);
                                    //If the text is larger then the control, truncate the control
                                    if (s.Width >= c_ControlWidth)
                                    {
                                        pLbl.Width = c_ControlWidth;
                                        //Use autosize if it fits
                                    }
                                    else
                                    {
                                        pLbl.AutoSize = true;
                                    }
                                    //Determine the Location for the next control

                                    pRV = (IRangeDomain)pDom;
                                    pNumBox = new NumericUpDown();
                                    //    AddHandler pNumBox.MouseDown, AddressOf numericClickEvt_MouseDown

                                    if (pDc.Type == esriFieldType.esriFieldTypeInteger)
                                    {
                                        pNumBox.DecimalPlaces = 0;

                                    }
                                    else if (pDc.Type == esriFieldType.esriFieldTypeDouble)
                                    {
                                        pNumBox.DecimalPlaces = 2;
                                        //pDc.DataType.

                                    }
                                    else if (pDc.Type == esriFieldType.esriFieldTypeSingle)
                                    {
                                        pNumBox.DecimalPlaces = 1;
                                        //pDc.DataType.
                                    }
                                    else
                                    {
                                        pNumBox.DecimalPlaces = 2;
                                        //pDc.DataType.
                                    }

                                    pNumBox.Minimum = Convert.ToDecimal(pRV.MinValue.ToString());
                                    pNumBox.Maximum = Convert.ToDecimal(pRV.MaxValue.ToString());
                                    NumericUpDownAcceleration pf = new NumericUpDownAcceleration(3, Convert.ToInt32(Convert.ToDouble(pNumBox.Maximum - pNumBox.Minimum) * 0.02));

                                    pNumBox.Accelerations.Add(pf);

                                    pNumBox.Tag = strfld;
                                    pNumBox.Name = "numEdt" + strfld;
                                    pNumBox.Left = 0;
                                    pNumBox.BackColor = Color.White;
                                    pNumBox.Top = 0;
                                    pNumBox.Width = c_ControlWidth;
                                    pNumBox.Font = c_Fnt;

                                    Panel pPnl = new Panel();
                                    pPnl.BorderStyle = System.Windows.Forms.BorderStyle.None;

                                    pLbl.Top = 0;
                                    pNumBox.Top = 5 + pLbl.Height;

                                    pPnl.Width = c_ControlWidth;
                                    pPnl.Margin = new Padding(0);
                                    pPnl.Padding = new Padding(0);

                                    pPnl.Top = 0;
                                    pPnl.Left = 0;
                                    pPnl.Height = pNumBox.Height + pLbl.Height + 15;
                                    pPnl.Controls.Add(pLbl);
                                    pPnl.Controls.Add(pNumBox);

                                    pTbPg.Controls.Add(pPnl);

                                }

                            }

                        }
                        pLayerFields = null;
                        pFieldInfo = null;

                    }
                }
                //pDC

                if (pSubType.HasSubtype)
                {
                    SubtypeChange(pSubTypeDefValue, pSubType.SubtypeFieldName);

                }
                //cleanup
                pBtn = null;
                pDCs = null;
                pDc = null;

                pTbPg = null;

                pTxtBox = null;
                pLbl = null;
                pNumBox = null;

                pRDButton = null;

                pCBox = null;
                pDateTime = null;
                g = null;
                //s = null;
                s_tbCntlDisplay.ResumeLayout();
                s_tbCntlDisplay.Refresh();

            }
            catch (Exception ex)
            {
                MessageBox.Show("Error in the Costing Tools - CIPProjectWindow: AddControls" + Environment.NewLine + ex.Message);

            }
        }
        private static void SubtypeChange(int value, string SubtypeField)
        {
            try
            {
                int intSubVal = value;

                //Feature layer being Identified

                //Exit if the layer is not found
                if (v_ViewerLayer == null)
                    return;

                string strFld = null;
                ComboBox pCmbBox = default(ComboBox);
                NumericUpDown pNUP = default(NumericUpDown);
                ICodedValueDomain pCV = default(ICodedValueDomain);
                IRangeDomain pRg = default(IRangeDomain);

                ISubtypes pSubTypes = (ISubtypes)v_ViewerLayer.FeatureClass;
                int pLeftPadding = 10;

                //Loop through all controls
                foreach (TabPage tbPg in s_tbCntlDisplay.TabPages)
                {
                    foreach (Control cntrl in tbPg.Controls)
                    {
                        //If the control is a combobox, then reapply the domain

                        if (cntrl is Panel)
                        {
                            foreach (Control cntrlPnl in cntrl.Controls)
                            {

                                if (cntrlPnl is ComboBox)
                                {
                                    pCmbBox = (ComboBox)cntrlPnl;

                                    if (SubtypeField != pCmbBox.Tag.ToString())
                                    {
                                        //Get the Field
                                        strFld = pCmbBox.Tag.ToString();
                                        if (strFld.IndexOf("|") > 0)
                                        {
                                            strFld = (strFld.Substring(0, strFld.IndexOf("|"))).Trim();
                                        }
                                        //Get the domain

                                        pCV = (ICodedValueDomain)pSubTypes.get_Domain(intSubVal, strFld);
                                        if (pCV == null)
                                        {
                                            pCmbBox.DataSource = null;

                                        }
                                        else
                                        {
                                            //If the domain has two values, remove the combo box and add a custompanel
                                            if (pCV.CodeCount == 2)
                                            {
                                                CustomPanel pNewGpBox = new CustomPanel();
                                                RadioButton pRDButton = default(RadioButton);
                                                pNewGpBox.Tag = pCmbBox.Tag;
                                                pNewGpBox.BorderStyle = System.Windows.Forms.BorderStyle.None;
                                                pNewGpBox.BackColor = Color.White;
                                                //  pNewGpBox.BorderColor = Pens.LightGray

                                                pNewGpBox.Width = pCmbBox.Width;
                                                pNewGpBox.Top = pCmbBox.Top;
                                                pNewGpBox.Left = pCmbBox.Left;

                                                pRDButton = new RadioButton();
                                                pRDButton.Name = "Rdo1";
                                                string codeVal = "";
                                                string displayVal = "";

                                                Globals.SubtypeValuesAtIndex(0, (ISubtypes)pCV, ref codeVal, ref  displayVal);

                                                pRDButton.Tag = codeVal;
                                                pRDButton.Text = displayVal;

                                                pRDButton.Left = pLeftPadding;

                                                pRDButton.AutoSize = true;
                                                pNewGpBox.Controls.Add(pRDButton);

                                                pNewGpBox.Height = pRDButton.Height + 12;
                                                pRDButton.Top = pNewGpBox.Height / 2 - pRDButton.Height / 2 - 2;

                                                pRDButton = new RadioButton();
                                                pRDButton.Name = "Rdo2";
                                                Globals.SubtypeValuesAtIndex(1, (ISubtypes)pCV, ref codeVal, ref displayVal);

                                                pRDButton.Tag = codeVal;
                                                pRDButton.Text = displayVal;

                                                pRDButton.Left = pNewGpBox.Width / 2;

                                                pRDButton.AutoSize = true;
                                                pNewGpBox.Controls.Add(pRDButton);
                                                pRDButton.Top = pNewGpBox.Height / 2 - pRDButton.Height / 2 - 2;

                                                tbPg.Controls.Add(pNewGpBox);

                                                try
                                                {
                                                    tbPg.Controls.Remove(pCmbBox);
                                                    //Dim cnts() As Control = tbPg.Controls.Find("lblEdit" & strFld, False)
                                                    //If cnts.Length > 0 Then
                                                    //    tbPg.Controls.Remove(cnts(0))
                                                    //End If

                                                }
                                                catch// (Exception ex)
                                                {
                                                }

                                                pNewGpBox = null;
                                                pRDButton = null;

                                            }
                                            else
                                            {
                                                //Set the domain value

                                                pCmbBox.DataBindings.DefaultDataSourceUpdateMode = DataSourceUpdateMode.Never;

                                                pCmbBox.DataSource = Globals.DomainToList((IDomain)pCV);
                                                pCmbBox.DisplayMember = "getDisplay";
                                                pCmbBox.ValueMember = "getValue";
                                                pCmbBox.Visible = true;
                                                pCmbBox.Refresh();

                                                string codeVal = "";
                                                string displayVal = "";
                                                Globals.SubtypeValuesAtIndex(0, (ISubtypes)pCV, ref codeVal, ref displayVal);
                                                pCmbBox.Text = displayVal;
                                            }

                                        }

                                    }
                                    //If the contorl is a coded value domain with two values

                                }
                                else if (cntrlPnl is CustomPanel)
                                {

                                    //Get the Field
                                    strFld = cntrlPnl.Tag.ToString();
                                    if (strFld.IndexOf("|") > 0)
                                    {
                                        strFld = (strFld.Substring(0, strFld.IndexOf("|"))).Trim();
                                    }
                                    //Get the fomain
                                    pCV = (ICodedValueDomain)pSubTypes.get_Domain(intSubVal, strFld);

                                    if (pCV == null)
                                    {
                                        cntrlPnl.Controls.Clear();

                                    }
                                    else
                                    {
                                        //If the domain has more than two values, remove the custompanel and add a combo box
                                        if (pCV.CodeCount == 2)
                                        {
                                            try
                                            {
                                                //Set up the proper domain values
                                                RadioButton pRdoBut = default(RadioButton);
                                                pRdoBut = (RadioButton)cntrlPnl.Controls["Rdo1"];
                                                string codeVal = "";
                                                string displayVal = "";
                                                Globals.SubtypeValuesAtIndex(0, (ISubtypes)pCV, ref  codeVal, ref  displayVal);

                                                pRdoBut.Tag = codeVal;
                                                pRdoBut.Text = displayVal;

                                                pRdoBut = (RadioButton)cntrlPnl.Controls["Rdo2"];
                                                Globals.SubtypeValuesAtIndex(1, (ISubtypes)pCV, ref codeVal, ref displayVal);

                                                pRdoBut.Tag = codeVal;
                                                pRdoBut.Text = displayVal;

                                            }
                                            catch //(Exception ex)
                                            {
                                            }

                                        }
                                        else
                                        {
                                            ComboBox pCBox = default(ComboBox);
                                            pCBox = new ComboBox();
                                            pCBox.Tag = strFld;
                                            pCBox.Name = "cboEdt" + strFld;
                                            pCBox.Left = cntrlPnl.Left;
                                            pCBox.Top = cntrlPnl.Top;
                                            pCBox.Width = cntrlPnl.Width;
                                            pCBox.Height = pCBox.Height + 5;
                                            pCBox.DropDownStyle = ComboBoxStyle.DropDownList;

                                            pCBox.DataBindings.DefaultDataSourceUpdateMode = DataSourceUpdateMode.Never;
                                            pCBox.DataSource = Globals.DomainToList((IDomain)pCV);
                                            pCBox.DisplayMember = "getDisplay";
                                            pCBox.ValueMember = "getValue";
                                            pCBox.Visible = true;
                                            pCBox.Refresh();

                                            string codeVal = "";
                                            string displayVal = "";
                                            Globals.SubtypeValuesAtIndex(0, (ISubtypes)pCV, ref codeVal, ref displayVal);
                                            pCBox.Text = displayVal;
                                            // pCmdBox.MaxLength = pDc.Length

                                            tbPg.Controls.Add(pCBox);
                                            // MsgBox(pCBox.Items.Count)

                                            pCBox.Visible = true;
                                            pCBox.Refresh();

                                            tbPg.Controls.Remove(cntrlPnl);

                                            pCBox = null;

                                        }

                                    }
                                    //If the contorl is a range domain
                                }
                                else if (cntrlPnl is NumericUpDown)
                                {
                                    //get the control
                                    pNUP = (NumericUpDown)cntrlPnl;
                                    //Get the field
                                    strFld = pNUP.Tag.ToString();
                                    if (strFld.IndexOf("|") > 0)
                                    {
                                        strFld = (strFld.Substring(0, strFld.IndexOf("|"))).Trim();
                                    }
                                    //Get the domain
                                    pRg = (IRangeDomain)pSubTypes.get_Domain(intSubVal, strFld);
                                    if (pRg == null)
                                    {
                                        pNUP.Enabled = false;

                                    }
                                    else
                                    {
                                        pNUP.Enabled = true;
                                        pNUP.Minimum = Convert.ToDecimal(pRg.MinValue.ToString());
                                        pNUP.Maximum = Convert.ToDecimal(pRg.MaxValue.ToString());
                                    }

                                    pNUP.Refresh();
                                }
                            }

                        }
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("Error in the edit control subtype change" + Environment.NewLine + ex.Message);

            }
        }
Пример #35
0
        private static bool ClosePage(Form1 form, bool showMessages, bool moreTabs, out bool closeAll)
        {
            XtraTabControl pagesTabControl = form.pagesTabControl;

            closeAll = false;

            if (showMessages && TabUtil.IsTabPageModified(pagesTabControl.SelectedTabPage))
            {
                if (moreTabs)
                {
                    DialogResult dialogResult = WindowManager.ShowQuestionCancelNoAllBox(form, LanguageUtil.GetCurrentLanguageString("SaveUntitled", className));

                    if ((dialogResult == DialogResult.Cancel) || (dialogResult == DialogResult.Yes && !FileManager.SaveFile(form, false)))
                    {
                        return(false);
                    }
                    if (dialogResult == DialogResult.Retry)
                    {
                        closeAll = true;
                    }
                }
                else
                {
                    DialogResult dialogResult = WindowManager.ShowQuestionCancelBox(form, LanguageUtil.GetCurrentLanguageString("SaveUntitled", className));

                    if ((dialogResult == DialogResult.Cancel) || (dialogResult == DialogResult.Yes && !FileManager.SaveFile(form, false)))
                    {
                        return(false);
                    }
                }
            }
            else if (!showMessages)
            {
                closeAll = true;
            }

            CustomPanel sectionsPanel   = ProgramUtil.GetSectionsPanel(pagesTabControl.SelectedTabPage);
            CustomPanel annotationPanel = ProgramUtil.GetAnnotationPanel(pagesTabControl.SelectedTabPage);

            if (sectionsPanel != null)
            {
                pagesTabControl.SelectedTabPage.Controls.Remove(sectionsPanel);
            }
            if (annotationPanel != null)
            {
                pagesTabControl.SelectedTabPage.Controls.Remove(annotationPanel);
            }

            if (pagesTabControl.TabPages.Count > 1)
            {
                String selectedTabName  = pagesTabControl.SelectedTabPage.Name;
                int    selectedTabIndex = pagesTabControl.SelectedTabPageIndex;

                pagesTabControl.TabPages.Remove(pagesTabControl.SelectedTabPage);
                ExplorerManager.RemoveNodeToTabExplorer(form, selectedTabName);

                pagesTabControl.SelectedTabPage = selectedTabIndex < pagesTabControl.TabPages.Count ? pagesTabControl.TabPages[selectedTabIndex] : pagesTabControl.TabPages[pagesTabControl.TabPages.Count - 1];

                if (String.IsNullOrEmpty(ProgramUtil.GetFilenameTabPage(pagesTabControl.SelectedTabPage)))
                {
                    ToggleTabFileTools(form, false);
                }
                OtherManager.FocusOnEditor(form);
            }
            else
            {
                ResetTab(form);
            }

            return(true);
        }
        //   ---------
        //   |   2   |
        //   |3     1|
        //   |   0   |
        //   ---------
        //rotation with 90 degree clockwise
        private static CustomPanel PanelRotate(CustomPanel currentChildPanel, CustomPanel parentPanel)
        {
            if (parentPanel.IsRotatedFlag)
            {
                if (parentPanel.RotationState == RotationState.none)
                {
                    switch (currentChildPanel.AT)
                    {
                    case "0":
                        currentChildPanel.RotationState = RotationState.twice;
                        currentChildPanel.IsRotatedFlag = true;
                        break;

                    case "1":
                        currentChildPanel.RotationState = RotationState.once;
                        currentChildPanel.IsRotatedFlag = true;
                        break;

                    case "2":
                        currentChildPanel.RotationState = RotationState.none;
                        currentChildPanel.IsRotatedFlag = true;
                        break;

                    case "3":
                        currentChildPanel.RotationState = RotationState.thrice;
                        currentChildPanel.IsRotatedFlag = true;
                        break;

                    default:
                        break;
                    }
                    return(currentChildPanel);
                }


                if (parentPanel.RotationState == RotationState.once)
                {
                    switch (currentChildPanel.AT)
                    {
                    case "0":
                        currentChildPanel.RotationState = RotationState.thrice;
                        currentChildPanel.IsRotatedFlag = true;
                        break;

                    case "1":
                        currentChildPanel.RotationState = RotationState.twice;
                        currentChildPanel.IsRotatedFlag = true;
                        break;

                    case "2":
                        currentChildPanel.RotationState = RotationState.once;
                        currentChildPanel.IsRotatedFlag = true;
                        break;

                    case "3":
                        currentChildPanel.RotationState = RotationState.none;
                        currentChildPanel.IsRotatedFlag = true;
                        break;

                    default:
                        break;
                    }

                    return(currentChildPanel);
                }
                if (parentPanel.RotationState == RotationState.twice)
                {
                    switch (currentChildPanel.AT)
                    {
                    case "0":
                        currentChildPanel.RotationState = RotationState.none;
                        currentChildPanel.IsRotatedFlag = true;
                        break;

                    case "1":
                        currentChildPanel.RotationState = RotationState.thrice;
                        currentChildPanel.IsRotatedFlag = true;
                        break;

                    case "2":
                        currentChildPanel.RotationState = RotationState.twice;
                        currentChildPanel.IsRotatedFlag = true;
                        break;

                    case "3":
                        currentChildPanel.RotationState = RotationState.once;
                        currentChildPanel.IsRotatedFlag = true;
                        break;

                    default:
                        break;
                    }
                    return(currentChildPanel);
                }
                if (parentPanel.RotationState == RotationState.thrice)
                {
                    switch (currentChildPanel.AT)
                    {
                    case "0":
                        currentChildPanel.RotationState = RotationState.once;
                        currentChildPanel.IsRotatedFlag = true;
                        break;

                    case "1":
                        currentChildPanel.RotationState = RotationState.none;
                        currentChildPanel.IsRotatedFlag = true;
                        break;

                    case "2":
                        currentChildPanel.RotationState = RotationState.thrice;
                        currentChildPanel.IsRotatedFlag = true;
                        break;

                    case "3":
                        currentChildPanel.RotationState = RotationState.twice;
                        currentChildPanel.IsRotatedFlag = true;
                        break;

                    default:
                        break;
                    }
                    return(currentChildPanel);
                }

                return(currentChildPanel);
            }
            else
            {
                return(currentChildPanel);
            }
        }
Пример #37
0
        private void InitializeComponent()
        {
            this.lblType    = new Label();
            this.cmbType    = new ComboBox();
            this.lblKeyLen  = new Label();
            this.cmbKeyLen  = new ComboBox();
            this.dgvKey     = new DataGridView();
            this.txtKey     = new DataGridViewTextBoxColumn();
            this.btnDel     = new Button();
            this.btnAdd     = new Button();
            this.pnlEncrypt = new CustomPanel();
            ((ISupportInitialize)this.dgvKey).BeginInit();
            this.pnlEncrypt.SuspendLayout();
            base.SuspendLayout();
            this.lblType.Location          = new Point(45, 41);
            this.lblType.Name              = "lblType";
            this.lblType.Size              = new Size(109, 24);
            this.lblType.TabIndex          = 0;
            this.lblType.Text              = "Privacy Type";
            this.lblType.TextAlign         = ContentAlignment.MiddleRight;
            this.cmbType.DropDownStyle     = ComboBoxStyle.DropDownList;
            this.cmbType.FormattingEnabled = true;
            this.cmbType.Items.AddRange(new object[3]
            {
                "None",
                "Basic",
                "Enhanced"
            });
            this.cmbType.Location              = new Point(168, 41);
            this.cmbType.Name                  = "cmbType";
            this.cmbType.Size                  = new Size(121, 24);
            this.cmbType.TabIndex              = 1;
            this.cmbType.SelectedIndexChanged += this.cmbType_SelectedIndexChanged;
            this.lblKeyLen.Location            = new Point(45, 71);
            this.lblKeyLen.Name                = "lblKeyLen";
            this.lblKeyLen.Size                = new Size(109, 24);
            this.lblKeyLen.TabIndex            = 2;
            this.lblKeyLen.Text                = "Key Length";
            this.lblKeyLen.TextAlign           = ContentAlignment.MiddleRight;
            this.cmbKeyLen.DropDownStyle       = ComboBoxStyle.DropDownList;
            this.cmbKeyLen.FormattingEnabled   = true;
            this.cmbKeyLen.Items.AddRange(new object[3]
            {
                "32",
                "64",
                "40"
            });
            this.cmbKeyLen.Location                 = new Point(168, 71);
            this.cmbKeyLen.Name                     = "cmbKeyLen";
            this.cmbKeyLen.Size                     = new Size(121, 24);
            this.cmbKeyLen.TabIndex                 = 3;
            this.cmbKeyLen.SelectedIndexChanged    += this.cmbKeyLen_SelectedIndexChanged;
            this.cmbKeyLen.Enter                   += this.cmbKeyLen_Enter;
            this.dgvKey.AllowUserToAddRows          = false;
            this.dgvKey.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
            this.dgvKey.Columns.AddRange(this.txtKey);
            this.dgvKey.Location                = new Point(75, 145);
            this.dgvKey.Name                    = "dgvKey";
            this.dgvKey.RowTemplate.Height      = 23;
            this.dgvKey.Size                    = new Size(240, 353);
            this.dgvKey.TabIndex                = 6;
            this.dgvKey.CellValidated          += this.dgvKey_CellValidated;
            this.dgvKey.RowPostPaint           += this.dgvKey_RowPostPaint;
            this.dgvKey.CellValidating         += this.dgvKey_CellValidating;
            this.dgvKey.EditingControlShowing  += this.dgvKey_EditingControlShowing;
            this.txtKey.HeaderText              = "Key";
            this.txtKey.Name                    = "txtKey";
            this.btnDel.Location                = new Point(220, 107);
            this.btnDel.Name                    = "btnDel";
            this.btnDel.Size                    = new Size(75, 23);
            this.btnDel.TabIndex                = 5;
            this.btnDel.Text                    = "Delete";
            this.btnDel.UseVisualStyleBackColor = true;
            this.btnDel.Click                  += this.btnDel_Click;
            this.btnAdd.Location                = new Point(95, 107);
            this.btnAdd.Name                    = "btnAdd";
            this.btnAdd.Size                    = new Size(75, 23);
            this.btnAdd.TabIndex                = 4;
            this.btnAdd.Text                    = "Add";
            this.btnAdd.UseVisualStyleBackColor = true;
            this.btnAdd.Click                  += this.btnAdd_Click;
            this.pnlEncrypt.AutoScroll          = true;
            this.pnlEncrypt.AutoSize            = true;
            this.pnlEncrypt.Controls.Add(this.cmbType);
            this.pnlEncrypt.Controls.Add(this.dgvKey);
            this.pnlEncrypt.Controls.Add(this.lblType);
            this.pnlEncrypt.Controls.Add(this.btnDel);
            this.pnlEncrypt.Controls.Add(this.lblKeyLen);
            this.pnlEncrypt.Controls.Add(this.btnAdd);
            this.pnlEncrypt.Controls.Add(this.cmbKeyLen);
            this.pnlEncrypt.Dock     = DockStyle.Fill;
            this.pnlEncrypt.Location = new Point(0, 0);
            this.pnlEncrypt.Name     = "pnlEncrypt";
            this.pnlEncrypt.Size     = new Size(390, 539);
            this.pnlEncrypt.TabIndex = 0;
            base.AutoScaleDimensions = new SizeF(7f, 16f);
//			base.AutoScaleMode = AutoScaleMode.Font;
            base.ClientSize = new Size(390, 539);
            base.Controls.Add(this.pnlEncrypt);
            this.Font         = new Font("Arial", 10f, FontStyle.Regular, GraphicsUnit.Point, 0);
            base.Name         = "EncryptForm";
            this.Text         = "Privacy Setting";
            base.Load        += this.EncryptForm_Load;
            base.FormClosing += this.EncryptForm_FormClosing;
            ((ISupportInitialize)this.dgvKey).EndInit();
            this.pnlEncrypt.ResumeLayout(false);
            base.ResumeLayout(false);
            base.PerformLayout();
        }
Пример #38
0
 private void InitializeComponent()
 {
     this.pnlSignalingBasic = new CustomPanel();
     this.nudTxSyncWakeTot  = new CustomNumericUpDown();
     this.chkCallAlert      = new System.Windows.Forms.CheckBox();
     this.nudAutoResetTimer = new CustomNumericUpDown();
     this.chkRadioDisable   = new System.Windows.Forms.CheckBox();
     this.nudTxWakeMsgLimit = new CustomNumericUpDown();
     this.chkRemoteMonitor  = new System.Windows.Forms.CheckBox();
     this.nudRMDuration     = new CustomNumericUpDown();
     this.chkEmgRM          = new System.Windows.Forms.CheckBox();
     this.lblTxSyncWakeTot  = new System.Windows.Forms.Label();
     this.chkSelCall        = new System.Windows.Forms.CheckBox();
     this.lblTxWakeMsgLimit = new System.Windows.Forms.Label();
     this.cmbSelCallToneId  = new System.Windows.Forms.ComboBox();
     this.nudSelCallHang    = new CustomNumericUpDown();
     this.lblSelCallToneId  = new System.Windows.Forms.Label();
     this.lblRMDuration     = new System.Windows.Forms.Label();
     this.lblSelCallHang    = new System.Windows.Forms.Label();
     this.lblAutoResetTimer = new System.Windows.Forms.Label();
     this.pnlSignalingBasic.SuspendLayout();
     ((System.ComponentModel.ISupportInitialize)(this.nudTxSyncWakeTot)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.nudAutoResetTimer)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.nudTxWakeMsgLimit)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.nudRMDuration)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.nudSelCallHang)).BeginInit();
     this.SuspendLayout();
     //
     // pnlSignalingBasic
     //
     this.pnlSignalingBasic.AutoScroll = true;
     this.pnlSignalingBasic.AutoSize   = true;
     this.pnlSignalingBasic.Controls.Add(this.nudTxSyncWakeTot);
     this.pnlSignalingBasic.Controls.Add(this.chkCallAlert);
     this.pnlSignalingBasic.Controls.Add(this.nudAutoResetTimer);
     this.pnlSignalingBasic.Controls.Add(this.chkRadioDisable);
     this.pnlSignalingBasic.Controls.Add(this.nudTxWakeMsgLimit);
     this.pnlSignalingBasic.Controls.Add(this.chkRemoteMonitor);
     this.pnlSignalingBasic.Controls.Add(this.nudRMDuration);
     this.pnlSignalingBasic.Controls.Add(this.chkEmgRM);
     this.pnlSignalingBasic.Controls.Add(this.lblTxSyncWakeTot);
     this.pnlSignalingBasic.Controls.Add(this.chkSelCall);
     this.pnlSignalingBasic.Controls.Add(this.lblTxWakeMsgLimit);
     this.pnlSignalingBasic.Controls.Add(this.cmbSelCallToneId);
     this.pnlSignalingBasic.Controls.Add(this.nudSelCallHang);
     this.pnlSignalingBasic.Controls.Add(this.lblSelCallToneId);
     this.pnlSignalingBasic.Controls.Add(this.lblRMDuration);
     this.pnlSignalingBasic.Controls.Add(this.lblSelCallHang);
     this.pnlSignalingBasic.Controls.Add(this.lblAutoResetTimer);
     this.pnlSignalingBasic.Dock     = System.Windows.Forms.DockStyle.Fill;
     this.pnlSignalingBasic.Location = new System.Drawing.Point(0, 0);
     this.pnlSignalingBasic.Name     = "pnlSignalingBasic";
     this.pnlSignalingBasic.Size     = new System.Drawing.Size(381, 224);
     this.pnlSignalingBasic.TabIndex = 0;
     //
     // nudTxSyncWakeTot
     //
     this.nudTxSyncWakeTot.Increment = new decimal(new int[] {
         5,
         0,
         0,
         0
     });
     this.nudTxSyncWakeTot.Location = new System.Drawing.Point(245, 158);
     this.nudTxSyncWakeTot.Maximum  = new decimal(new int[] {
         375,
         0,
         0,
         0
     });
     this.nudTxSyncWakeTot.Minimum = new decimal(new int[] {
         125,
         0,
         0,
         0
     });
     this.nudTxSyncWakeTot.Name     = "nudTxSyncWakeTot";
     this.nudTxSyncWakeTot.Size     = new System.Drawing.Size(120, 23);
     this.nudTxSyncWakeTot.TabIndex = 8;
     this.nudTxSyncWakeTot.Value    = new decimal(new int[] {
         125,
         0,
         0,
         0
     });
     //
     // chkCallAlert
     //
     this.chkCallAlert.AutoSize = true;
     this.chkCallAlert.Location = new System.Drawing.Point(206, 188);
     this.chkCallAlert.Name     = "chkCallAlert";
     this.chkCallAlert.Size     = new System.Drawing.Size(135, 20);
     this.chkCallAlert.TabIndex = 9;
     this.chkCallAlert.Text     = "Call Alert Encode";
     this.chkCallAlert.UseVisualStyleBackColor = true;
     this.chkCallAlert.Visible = false;
     //
     // nudAutoResetTimer
     //
     this.nudAutoResetTimer.Location = new System.Drawing.Point(214, 192);
     this.nudAutoResetTimer.Maximum  = new decimal(new int[] {
         255,
         0,
         0,
         0
     });
     this.nudAutoResetTimer.Minimum = new decimal(new int[] {
         1,
         0,
         0,
         0
     });
     this.nudAutoResetTimer.Name     = "nudAutoResetTimer";
     this.nudAutoResetTimer.Size     = new System.Drawing.Size(120, 23);
     this.nudAutoResetTimer.TabIndex = 16;
     this.nudAutoResetTimer.Value    = new decimal(new int[] {
         1,
         0,
         0,
         0
     });
     this.nudAutoResetTimer.Visible = false;
     //
     // chkRadioDisable
     //
     this.chkRadioDisable.AutoSize = true;
     this.chkRadioDisable.Location = new System.Drawing.Point(52, 12);
     this.chkRadioDisable.Name     = "chkRadioDisable";
     this.chkRadioDisable.Size     = new System.Drawing.Size(168, 20);
     this.chkRadioDisable.TabIndex = 0;
     this.chkRadioDisable.Text     = "Radio Disable Decode";
     this.chkRadioDisable.UseVisualStyleBackColor = true;
     this.chkRadioDisable.CheckedChanged         += new System.EventHandler(this.chkRadioDisable_CheckedChanged);
     //
     // nudTxWakeMsgLimit
     //
     this.nudTxWakeMsgLimit.Location = new System.Drawing.Point(245, 98);
     this.nudTxWakeMsgLimit.Maximum  = new decimal(new int[] {
         4,
         0,
         0,
         0
     });
     this.nudTxWakeMsgLimit.Minimum = new decimal(new int[] {
         1,
         0,
         0,
         0
     });
     this.nudTxWakeMsgLimit.Name     = "nudTxWakeMsgLimit";
     this.nudTxWakeMsgLimit.Size     = new System.Drawing.Size(120, 23);
     this.nudTxWakeMsgLimit.TabIndex = 4;
     this.nudTxWakeMsgLimit.Value    = new decimal(new int[] {
         4,
         0,
         0,
         0
     });
     //
     // chkRemoteMonitor
     //
     this.chkRemoteMonitor.AutoSize = true;
     this.chkRemoteMonitor.Location = new System.Drawing.Point(52, 36);
     this.chkRemoteMonitor.Name     = "chkRemoteMonitor";
     this.chkRemoteMonitor.Size     = new System.Drawing.Size(180, 20);
     this.chkRemoteMonitor.TabIndex = 1;
     this.chkRemoteMonitor.Text     = "Remote Monitor Decode";
     this.chkRemoteMonitor.UseVisualStyleBackColor = true;
     //
     // nudRMDuration
     //
     this.nudRMDuration.Increment = new decimal(new int[] {
         10,
         0,
         0,
         0
     });
     this.nudRMDuration.Location = new System.Drawing.Point(245, 128);
     this.nudRMDuration.Maximum  = new decimal(new int[] {
         120,
         0,
         0,
         0
     });
     this.nudRMDuration.Minimum = new decimal(new int[] {
         10,
         0,
         0,
         0
     });
     this.nudRMDuration.Name     = "nudRMDuration";
     this.nudRMDuration.Size     = new System.Drawing.Size(120, 23);
     this.nudRMDuration.TabIndex = 6;
     this.nudRMDuration.Value    = new decimal(new int[] {
         10,
         0,
         0,
         0
     });
     //
     // chkEmgRM
     //
     this.chkEmgRM.AutoSize = true;
     this.chkEmgRM.Location = new System.Drawing.Point(52, 62);
     this.chkEmgRM.Name     = "chkEmgRM";
     this.chkEmgRM.Size     = new System.Drawing.Size(255, 20);
     this.chkEmgRM.TabIndex = 2;
     this.chkEmgRM.Text     = "Emergency Romote Monitor Decode";
     this.chkEmgRM.UseVisualStyleBackColor = true;
     //
     // lblTxSyncWakeTot
     //
     this.lblTxSyncWakeTot.Location  = new System.Drawing.Point(49, 158);
     this.lblTxSyncWakeTot.Name      = "lblTxSyncWakeTot";
     this.lblTxSyncWakeTot.Size      = new System.Drawing.Size(185, 24);
     this.lblTxSyncWakeTot.TabIndex  = 7;
     this.lblTxSyncWakeTot.Text      = "Tx Sync Wakeup TOT [ms]";
     this.lblTxSyncWakeTot.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
     //
     // chkSelCall
     //
     this.chkSelCall.AutoSize = true;
     this.chkSelCall.Location = new System.Drawing.Point(208, 188);
     this.chkSelCall.Name     = "chkSelCall";
     this.chkSelCall.Size     = new System.Drawing.Size(131, 20);
     this.chkSelCall.TabIndex = 10;
     this.chkSelCall.Text     = "Self Call Encode";
     this.chkSelCall.UseVisualStyleBackColor = true;
     this.chkSelCall.Visible = false;
     //
     // lblTxWakeMsgLimit
     //
     this.lblTxWakeMsgLimit.Location  = new System.Drawing.Point(49, 98);
     this.lblTxWakeMsgLimit.Name      = "lblTxWakeMsgLimit";
     this.lblTxWakeMsgLimit.Size      = new System.Drawing.Size(185, 24);
     this.lblTxWakeMsgLimit.TabIndex  = 3;
     this.lblTxWakeMsgLimit.Text      = "Tx Wakeup Message Limit";
     this.lblTxWakeMsgLimit.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
     //
     // cmbSelCallToneId
     //
     this.cmbSelCallToneId.DropDownStyle     = System.Windows.Forms.ComboBoxStyle.DropDownList;
     this.cmbSelCallToneId.FormattingEnabled = true;
     this.cmbSelCallToneId.Items.AddRange(new object[] {
         "前置",
         "始终"
     });
     this.cmbSelCallToneId.Location = new System.Drawing.Point(209, 188);
     this.cmbSelCallToneId.Name     = "cmbSelCallToneId";
     this.cmbSelCallToneId.Size     = new System.Drawing.Size(121, 24);
     this.cmbSelCallToneId.TabIndex = 12;
     this.cmbSelCallToneId.Visible  = false;
     //
     // nudSelCallHang
     //
     this.nudSelCallHang.Increment = new decimal(new int[] {
         500,
         0,
         0,
         0
     });
     this.nudSelCallHang.Location = new System.Drawing.Point(219, 190);
     this.nudSelCallHang.Maximum  = new decimal(new int[] {
         7000,
         0,
         0,
         0
     });
     this.nudSelCallHang.Name     = "nudSelCallHang";
     this.nudSelCallHang.Size     = new System.Drawing.Size(120, 23);
     this.nudSelCallHang.TabIndex = 14;
     this.nudSelCallHang.Visible  = false;
     //
     // lblSelCallToneId
     //
     this.lblSelCallToneId.Location  = new System.Drawing.Point(13, 188);
     this.lblSelCallToneId.Name      = "lblSelCallToneId";
     this.lblSelCallToneId.Size      = new System.Drawing.Size(185, 24);
     this.lblSelCallToneId.TabIndex  = 11;
     this.lblSelCallToneId.Text      = "Self Call Tone/ID";
     this.lblSelCallToneId.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
     this.lblSelCallToneId.Visible   = false;
     //
     // lblRMDuration
     //
     this.lblRMDuration.Location  = new System.Drawing.Point(49, 128);
     this.lblRMDuration.Name      = "lblRMDuration";
     this.lblRMDuration.Size      = new System.Drawing.Size(185, 24);
     this.lblRMDuration.TabIndex  = 5;
     this.lblRMDuration.Text      = "Remote Monitor Duration [s]";
     this.lblRMDuration.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
     //
     // lblSelCallHang
     //
     this.lblSelCallHang.Location  = new System.Drawing.Point(23, 190);
     this.lblSelCallHang.Name      = "lblSelCallHang";
     this.lblSelCallHang.Size      = new System.Drawing.Size(185, 24);
     this.lblSelCallHang.TabIndex  = 13;
     this.lblSelCallHang.Text      = "Self Call Hang Time [ms]";
     this.lblSelCallHang.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
     this.lblSelCallHang.Visible   = false;
     //
     // lblAutoResetTimer
     //
     this.lblAutoResetTimer.Location  = new System.Drawing.Point(18, 192);
     this.lblAutoResetTimer.Name      = "lblAutoResetTimer";
     this.lblAutoResetTimer.Size      = new System.Drawing.Size(185, 24);
     this.lblAutoResetTimer.TabIndex  = 15;
     this.lblAutoResetTimer.Text      = "Auto Reset Timer [s]";
     this.lblAutoResetTimer.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
     this.lblAutoResetTimer.Visible   = false;
     //
     // SignalingBasicForm
     //
     this.ClientSize = new System.Drawing.Size(381, 224);
     this.Controls.Add(this.pnlSignalingBasic);
     this.Font = new System.Drawing.Font("Arial", 10F);
     this.Name = "SignalingBasicForm";
     this.Text = "Signaling System";
     this.pnlSignalingBasic.ResumeLayout(false);
     this.pnlSignalingBasic.PerformLayout();
     ((System.ComponentModel.ISupportInitialize)(this.nudTxSyncWakeTot)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.nudAutoResetTimer)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.nudTxWakeMsgLimit)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.nudRMDuration)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.nudSelCallHang)).EndInit();
     this.ResumeLayout(false);
     this.PerformLayout();
 }