コード例 #1
0
 public ApartmentCounterIndicationInputForm(System.Drawing.Point mPoint, long m_Apartmnet)
 {
     this.InitializeComponent();
     this.mApartmnet = m_Apartmnet;
     base.set_Location(new System.Drawing.Point((int) ((int) (mPoint.get_X() * 0.05)), (int) ((int) (mPoint.get_Y() * 0.3))));
     base.set_ClientSize(new System.Drawing.Size((int) (mPoint.get_X() - (base.Location.get_X() * 5)), (int) (mPoint.get_Y() - (base.Location.get_Y() * 2))));
     this.m_ApartmentCounterIndicationInputUIView1.FillNotUpdateIndications(this.mApartmnet);
 }
コード例 #2
0
ファイル: ComboBoxButton.cs プロジェクト: u4097/SQLScript
 protected override void OnMouseMove(System.Windows.Forms.MouseEventArgs e)
 {
     base.OnMouseMove(e);
     if (this.CapturingMouse)
     {
         System.Drawing.Rectangle rectangle = new System.Drawing.Rectangle(0, 0, base.get_Width(), base.get_Height());
         this.btnState = System.Windows.Forms.VisualStyles.ComboBoxState.Normal;
         if (((e.get_X() >= rectangle.get_Left()) && (e.get_X() <= rectangle.get_Right())) && ((e.get_Y() >= rectangle.get_Top()) && (e.get_Y() <= rectangle.get_Bottom())))
         {
             this.btnState = System.Windows.Forms.VisualStyles.ComboBoxState.Pressed;
         }
         base.set_Capture(true);
         base.Invalidate();
     }
     else if (!this.get_Focused() && (this.btnState != System.Windows.Forms.VisualStyles.ComboBoxState.Hot))
     {
         this.btnState = System.Windows.Forms.VisualStyles.ComboBoxState.Hot;
         base.Invalidate();
     }
 }
コード例 #3
0
ファイル: BalloonWindow.cs プロジェクト: u4097/SQLScript
        protected virtual System.Drawing.Rectangle OnNCCalcSize(System.Drawing.Rectangle windowRect)
        {
            windowRect.Inflate(-TIPMARGIN, -TIPMARGIN);
            switch (this.Quadrant)
            {
                case BallonQuadrant.TopLeft:
                case BallonQuadrant.TopRight:
                    windowRect.set_Y((int) (windowRect.get_Y() + TIPTAIL));
                    windowRect.set_Height((int) (windowRect.get_Height() - TIPTAIL));
                    return windowRect;

                case BallonQuadrant.BottomLeft:
                case BallonQuadrant.BottomRight:
                    windowRect.set_Height((int) (windowRect.get_Height() - TIPTAIL));
                    return windowRect;
            }
            return windowRect;
        }
コード例 #4
0
ファイル: LocalAddressForm.cs プロジェクト: u4097/SQLScript
 private void localAddressTree_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e)
 {
     if ((e.Button == System.Windows.Forms.MouseButtons.Right) && (this.localAddressTree.Nodes.get_Count() == 0))
     {
         System.Windows.Forms.ContextMenuStrip strip = new System.Windows.Forms.ContextMenuStrip();
         strip.Items.Add("Добавить населенный пункт", Images.ADD, new System.EventHandler(this.AddCity_Click)).set_ImageScaling(System.Windows.Forms.ToolStripItemImageScaling.None);
         strip.Show(base.PointToScreen(new System.Drawing.Point(e.get_X(), e.get_Y())));
     }
 }
コード例 #5
0
ファイル: BaseTree.cs プロジェクト: u4097/SQLScript
 private void tree_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e)
 {
     if (e.Button == System.Windows.Forms.MouseButtons.Right)
     {
         System.Windows.Forms.TreeNode nodeAt = base.GetNodeAt(e.get_X(), e.get_Y());
         if (nodeAt != null)
         {
             base.set_SelectedNode(nodeAt);
         }
     }
 }
コード例 #6
0
ファイル: BaseTree.cs プロジェクト: u4097/SQLScript
 private void tree_MouseUp(object sender, System.Windows.Forms.MouseEventArgs e)
 {
     if ((e.Button == System.Windows.Forms.MouseButtons.Right) && (base.SelectedNode != null))
     {
         System.Windows.Forms.ContextMenuStrip menu = new System.Windows.Forms.ContextMenuStrip();
         this.FillContextMenu(menu, base.SelectedNode.GetType());
         if (menu.Items.get_Count() > 0)
         {
             menu.Items.Add("-");
         }
         menu.Items.Add("Обновить", Images.UPDATE, new System.EventHandler(this.Update_Click)).set_ImageScaling(System.Windows.Forms.ToolStripItemImageScaling.None);
         menu.Show(base.PointToScreen(new System.Drawing.Point(e.get_X(), e.get_Y())));
     }
 }